Since our programmers are incapable of posting questions cause they are lazy i have to do it for them. ok so this is our problem…the camerea when it is serching is finding the light but is restarting the loop and isnt actually staying focused on the light itself. i right now cant give u a whole lot of info cause i am a mechanical guy and all the programming stuff looks like greek to me. anyway i might be able to post the code as soon as i am done beating these progammers
thanks
team 213
- Make sure you are using the latest code version from www.kevin.org/frc
- If it see’s the light and then quickly moves away, increase the SEARCH DELAY variable value. If this is not your problem, we need more details.
Thanks for the reply. We are using the latest release (January 16) from www.kevin.org/frc . We have adjusted the serch delay, however, this did not solve our problem.
When the program is executed, the camera will seek the light, and will track it for a little while (10 - 20 seconds or so.). However, after tracking the light, it appears as though the camera code was reset. The camera will reinitiate it’s search pattern, until the light is found once again, and the cycle repeats. We have verified that the servos are proprly wired.
thanks again,
team 213
Check your 7.2V power voltage. If it drops below 7.0V the camera seems to have problems.
Also, another thing you want to check is the cable powering the camera. We’ve found that even a slightly loose PWM connection will cause the power to the camera to drop intermittently when the camera is panning or tilting. That will confuse the software into thinking that the light has been lost and it will restart the searching algorithm again.
Let me know if this helps.
Paul Tan.
Go throught Tracking.h and change
// If your camera suddenly moves away from the target once
// it finds it, you'll need to change the sign on one or
// both of these values.
#define PAN_ROTATION_SIGN_DEFAULT +1
#define TILT_ROTATION_SIGN_DEFAULT -1
Hope this helps.
As another suggestion, Team 95 found last year that adjusting the search algorithm so that it continues from where it left off searching instead of going back to the top left makes it much more tolerant to short loss of target acquisition (at the possibility of making it take longer to acquire lock from scratch).
My guess is that you’re not powering the green light with a freshly charged robot battery.
-Kevin
we tried all of that and still nothing. hmmmmm this is really really starting to ■■■■ us off now
Print out the tracking data from the camera.
The camera is fussy, but in the end, it’s pretty predictable.
We had a similar problem last Saturday. Our camera got the target and looked at it for about 3 seconds.Then it started the search algorithm all over again. We did everything and nothing helped. We borrowed another team’s camera and tried again.This was the solution for us.Apparently The camera had some connectors corroded. We work in humid Miami so it might have been that. If you can try to borrow someone’s camera or check the camera for physical defects.
Make sure the camera isn’t mounted upside down in it’s camera bracket. We did that and every time it locked on, about a second later, went off and started scanning again,…
I worked with the camera last year and had the exact same problem.
The solution is to change the code so that the camera does not go back to it’s center positions when a new search is initiated (just do this once when you initialize the camera).
This solves the problem of when the camera goes past the light, detects it (blinks red) but then keeps going and seems to later change it’s mind and sort of try to correct itself.
If your problem is instead finding the light and then keeping it in focus for a few seconds before moving away…try to change the +1/-1 values mentioned above or simply move the green light/move the camera to a different position. Sometimes there is interference at a particular angle from some other things (like a window or a light bulb).
Happy Coding.
we do have an old camera from last year, or the year before we could try
its not upside down, it wouldn’t fit in the case if it was upside down
From the picture on your web site, it looks like it is upside down.
if it were upside down is there a sensor in the camera that detects up/down? because when we grab the frames its not upside down