Skip to content

Code in Python, for the operation of a 4WD or 2WD robot, using OPENCV, with P Control and PID Control.

License

Notifications You must be signed in to change notification settings

BrianBot24/YACHACK_OPENCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YACHACK_OPENCV

Getting started

Code in Python, for the operation of a 4WD or 2WD robot, using OPENCV, in Control P(kp) and Control PID.

INSTALL WEBCAM

Visit Link: Using a standard USB webcam

INSTALL WEBCAM UVC

Execute in Terminal:

sudo rmmod uvcvideo

sudo modprobe uvcvideo quirks=2

YOU WILL NEED

  • Raspbery Pi 3B+ or Superior
  • WebCAM
  • CHASIS 4WD or 2WD
  • TB6612fng or other Bridge H
  • Motors 4 or 2
  • REG 1117 +3.3V
  • Battery

HOW THE CONTROL PID WORKS

The algorithm was conducted similar to that of a follower line with sensors IR.

  • cx is point Green = 466 (code line 24 - Line_Follower.py)
  • middleX is point Red = 620 (code line 29 - Line_Follower.py)

error=cx-middleX (code line 35 - Line_Follower.py)

error = 466-620

error = -154

Execute PID TEST, replacing the values of cx and middleX PID TEST

LEFT MOTOR SPEED = 82.08

RIGTH MOTOR SPEED = 57.91

About

Code in Python, for the operation of a 4WD or 2WD robot, using OPENCV, with P Control and PID Control.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages