![]() |
Tracking_state confusion
I have already written a working autonomous code with my team's robot, but I have a small problem that keeps occuring. Our robot will see the light and then a leg of the spider will obstruct the view of the camera, completely eclipsing the light. And if the camera is searching and can not find the light it will use those values and go into destroy mode killing everything around it. How can I use the tracking_state to stop the robot from moving if it doesn't see the light or if it has lost the light? I honestly do not understand the many states of this camera.
|
Re: Tracking_state confusion
One approach would be to keep track of your heading, independent of the camera. If you loose tracking (confidence<1), then basically DR using your last good heading. If you had held a good track before loosing the light, it would safe to assume you could keep going that way (for a while, anyway).
Hope this helps Jon Mittelman Programming Mentor Team 236 TechnoTicks |
Re: Tracking_state confusion
Quote:
-Kevin |
Re: Tracking_state confusion
Hey thanks guys, what I was really looking for was more of a statement that would read something similar to if (tracking_state == CAMERA_ON_TARGET){...} because we are unable to move the camera without destroying it with innertubes and the arm that we're using. Because i'm uncertain as to what the states are, where they are located, and how i can use them to make sure that my code will only work while the camera is locked on.
|
Re: Tracking_state confusion
Quote:
btw, our experience has been that you don't want to use the camera data for chassis commands until you get a CAMERA_ON_TARGET, and once you have a lock, don't ignore your camera until the tracking state has transitioned all the way to SEARCHING. (a bit of hysteresis seems helpful) |
| All times are GMT -5. The time now is 04:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi