Had the exact same problem...
You have to stop the auto-track to manually set the servo position using the default camera code. My temporary solution (till I find something better) is to not PAN smoothly... and to be very patient.
1) Don't pan the servo, but set three distinct positions: Left, Center, and Right. Make them spread out enough so that you can cover the entire width of the field with these positions.
2) Start at Center, turn on auto-track, wait for a few track packets.
3) If you don't get successfully tracking, set your servo to position left, and wait for a few track packets again.
4) If you don't get successfully tracking, set your servo to position right, and wait for a few track packets again.
The goal is to NOT move the servo manually. When you do this, you have to turn of auto-track, and it takes a little while for the camera to turn it back on again, and to get a track on the object. If you're constantly setting the servo position manually every cycle, you will never give the camera enough time to get a track.
-SlimBoJones...
Quote:
|
Originally Posted by russell
Has anyone actually successfully implemented a scanning routine? One problem I notice with the one above is that you have to use camera_stop() before setting the servos.
I have been playing with it the last two days, and the problem I am having is that once I get the camera pointing where I want it, then I have to set auto servos again and I have to call camera_find_color again, and one of the two seems to center the camera. At least all my attempts at a program like this have resulted in the cam exhibiting seizure like behavior. It seems like there has to be a solution to this, but so far it has eluded me quite successfully..... 
|