Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Moving the robot automatically to follow camera tracking (http://www.chiefdelphi.com/forums/showthread.php?t=73187)

potnisanish 29-01-2009 17:44

Moving the robot automatically to follow camera tracking
 
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?

billbo911 29-01-2009 18:00

Re: Moving the robot automatically to follow camera tracking
 
Quote:

Originally Posted by potnisanish (Post 810505)
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.

Rick Wagner 29-01-2009 20:01

Re: Moving the robot automatically to follow camera tracking
 
My team is mounting the camera rigidly to the robot, without the servo mechanism. Then we turn the robot to center the target in the image. The distance (number of pixels) the centroid of the target blob is from the center of the frame is the error signal that is minimized by turning the robot. The advantage of this is improved performance in not having to wait for the servo loop.

rsisk 29-01-2009 21:01

Re: Moving the robot automatically to follow camera tracking
 
Also search the forums for a thread I started on this same subject. There is an excellent link about 11 posts in from the BeachBots that will lead you to autonomous nirvana... if you are using Labview that is.


All times are GMT -5. The time now is 12:45.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi