Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Tracking_state confusion (http://www.chiefdelphi.com/forums/showthread.php?t=54072)

Zero_Cool 13-02-2007 14:48

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.

Jon236 13-02-2007 14:58

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

Kevin Watson 13-02-2007 16:04

Re: Tracking_state confusion
 
Quote:

Originally Posted by Zero_Cool (Post 577512)
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.

If I understand your problem correctly, you might consider mounting the camera at the rear of the 'bot.

-Kevin

Zero_Cool 13-02-2007 16:26

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.

EricS-Team180 14-02-2007 13:04

Re: Tracking_state confusion
 
Quote:

Originally Posted by Zero_Cool (Post 577580)
something similar to if (tracking_state == CAMERA_ON_TARGET){...}

Take a look at the Get_Tracking_State function in Kevin's tracking.c I believe it has what you are looking for.

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