|
Re: Moving the robot automatically to follow camera tracking
Quote:
Originally Posted by potnisanish
Our team has the camera working so it can track a color and recognize it as such, but we don't know how to get the robot to move automatically to be able to follow the color.
Anybody know?
|
You will have to determine what PWM value of the Pan, or x-axis, servo is at when the camera is pointing in the direction you want to go. Then use that value as your offset, or zero value. Anything higher or lower and it is too far right, or left, depending on how you use it. Subtract the current x-axis PWM value from the offset value, that will give you a difference value that can be scaled to adjust your drives to rotate the robot toward the target.
The PWM value of the elevation, or y-axis, servo will give you a relative distance from the target. Determining the desired value when you are at the desired distance will again give you a reference for driving forward or back as needed.
I left this a little vague so that you can figure out the details and learn in the process.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
|