Log in

View Full Version : Urgent help needed : Camera locks on to no apparent target! ?!?!


Salik Syed
19-02-2006, 20:58
I'm thinking this is some wierd serial port bug or something... but basically the "red" locked light is going on the camera stops searching even when nowhere near the target, even with my hand over the lens...

this doesn't happen all the time but intermittently

X-Istence
19-02-2006, 21:31
I'm thinking this is some wierd serial port bug or something... but basically the "red" locked light is going on the camera stops searching even when nowhere near the target, even with my hand over the lens...

this doesn't happen all the time but intermittently


I have the same problem. Let me know if you find the solution. This mostly happens if for some reason the Robot Controller does not start the camera functions or initializes it.

Eldarion
19-02-2006, 21:50
By any chance are you two using custom code (not Kevin's code)?

If so, I discussed something similar here:
http://www.chiefdelphi.com/forums/showthread.php?threadid=44281

Salik Syed
19-02-2006, 21:53
no it's all kevins

Bharat Nain
19-02-2006, 21:57
This has been discussed elsewhere. You can search and find stuff on it. But in tracking.c it checks if there is a light or not to scan because for some weird reason it gets x and y values even when the light is not in front of it. To correct that change the line if(T_Packet_Data.my != 0) to if(P_Packet_Data.confidence != 0).

Keith Watson
19-02-2006, 23:40
This has been discussed elsewhere. You can search and find stuff on it. But in tracking.c it checks if there is a light or not to scan because for some weird reason it gets x and y values even when the light is not in front of it. To correct that change the line if(T_Packet_Data.my != 0) to if(P_Packet_Data.confidence != 0).The condition you are talking about happens if the camera is picking up other lights. And the condition should by "if (P_Packet_Data.confidence > 80)".

Since the first post said the problem persists if a hand is in front of the camera then I do not believe that is the problem they are having. When I leave my hand in front of the camera for 3-5 seconds the search routing starts up again.

X-Istence
20-02-2006, 07:18
By any chance are you two using custom code (not Kevin's code)?

If so, I discussed something similar here:
http://www.chiefdelphi.com/forums/showthread.php?threadid=44281


I am using Kevin's frc_camera_s, as in the no bells and whistles. This sometimes happens even using the default hex file from Kevin.

Kevin Watson
20-02-2006, 12:53
I'm thinking this is some wierd serial port bug or something... but basically the "red" locked light is going on the camera stops searching even when nowhere near the target, even with my hand over the lens...

this doesn't happen all the time but intermittentlyCan you post your user_routines_fast.c/InterruptHandlerLow( ) function?

-Kevin

Idaman323
20-02-2006, 17:15
We are having the same problem, except we dont have it on autonomous mode. We just try getting the camera to track during normal run and the camera has the red light on. Without it moving at all. Im gonna try that change in the code and see how it works.

EDIT: Okay I changed it and this is what I get when I try to compile it.

C:\frc_camera2\frc_camera\tracking.c:97:Error [1105] symbol 'P_Packet_Data' has not been defined
C:\frc_camera2\frc_camera\tracking.c:97:Error [1151] struct or union object designator expected

Kevin Watson
20-02-2006, 18:58
We are having the same problem, except we dont have it on autonomous mode. We just try getting the camera to track during normal run and the camera has the red light on. Without it moving at all. Im gonna try that change in the code and see how it works.

EDIT: Okay I changed it and this is what I get when I try to compile it.

C:\frc_camera2\frc_camera\tracking.c:97:Error [1105] symbol 'P_Packet_Data' has not been defined
C:\frc_camera2\frc_camera\tracking.c:97:Error [1151] struct or union object designator expectedThat should be "T_Packet_Data", not "P_Packet_Data".

-Kevin

Salik Syed
20-02-2006, 23:52
I'll see if i can post the code tomorrow,

lkdjm
06-03-2006, 17:24
I'm thinking this is some weird serial port bug or something... but basically the "red" locked light is going on the camera stops searching even when nowhere near the target, even with my hand over the lens...

this doesn't happen all the time but intermittently

This has happened to us a lot as well. I find that these have often been the problems (in order of most to least common):
1. Low Backup Battery (happens every hour or so!)
3. Fluorescent lighting (very tricky due to the moving particles in the rods)
4. A reflection
5. Low main battery
6. The robot was reset with the button or was too fast
7. Loose wire or a wire plugged in backwards (this was caused a tragedy on ship day when we were practicing driving)
8. Confidence value too low
9. Programming error (luckily we haven't had this yet)
10. A random error that seems to fix itself after some tinkering and resetting (least common because that would be too easy, but it happens)

If you have gone through this list and changed the line in your code that the other posters are suggesting, and it still tracks ghosts, then it is over my head!