The camera we are using on our robot goes straight to the upper corner of its range of motion and just stays there instead of searching.
Using dashboard we discovered that it kept going to Pan: 30 Tilt: 254.
These values happen to be the min and max of those servos respectively.
Has anyone else had this problem or know how to fix it?
However when we put the light right in front of it, it does then track. The camera just doesn’t run its search pattern.
Are you using the default camera code from Kevin Watson’s website? If not, you should try it with that so that you can tell if it’s a problem with your software specifically. You should also try using the Labview CMUcam application (I don’t have a link, but search for it on Chief Delphi) to see if the camera is locking on to something else, and to make sure that it is using the right tracking parameters, as well as to make sure that it’s not a hardware problem.
If you’re using the “Bells and Whistles” code, try reloading the default tracking values. The pan step size might have gotten set to something out of range.
We are using the “bells and whistles” version of Kevin’s code and have reloaded the the default settings and were able to then track the light. However the camera still does not run its search pattern.
We used LabView to focus the camera and make sure that it was seeing the light.
Also, on the practice field in our shop the autonomous code tracked the light and was able to run the code and score on the spider leg.
The servos were centered and they have not a been a problem.
Is it likely that the camera was damaged during ship?
We were having that problem a lot last year and still occasionally have it occur from time to time. What we try first is just doing a reset and if that doesn’t work, it usually does for us, we unplug the ttl thing, hit reset, and then plug it back in.
We have tried putting in a bunch of printf’s but they seemed no use when we looked over them. The printf’s gave us back the correct tracking state, but we still had the problem. Our servos are fine, we tried new ones and we had the same problem. The camera tracks fine when we put our light box in front of it and will follow the light. Any help?
This sounds an awful lot like what I saw last year. I’ve barely looked at the camera code this year, but last year I found that .mY (which Kevin’s code was using to determine if the light was in sight) was being returned non-zero even though .confidence was near zero. I modified the code to use confidence rather than mY. Please see this post and the thread containing this post.
N.b. Kevin fixed his code, so if you’re using Kevin’s latest code you have a different problem or your Confidence_Threshold is set too low.
What are your custom settings? If the min and max are too close together (or if they’re swapped), the tracking code isn’t going to be able to move the servos.
I’m confused. After you reloaded the defaults, did it work, or didn’t it? Note that you need to worry about the tracking values, not the camera values.
Are you perhaps trying to get help with a customized search pattern that isn’t working the way you want it to?
Is there a separate reset in the tracking menu? If so, I’m not sure if we reset the tracking values.
We reset the camera settings which allowed the camera to follow the light if and only if it was already in vision. The camera did not run its search pattern.
Also, the min and max pan values are 30 and 220, respectively. The tilt min and max are 150 and 254. We will check and make sure that they are not backwards.
Also, we are using Kevin’s 2007 code.
What confidence threshold would be suitable? I think that the default value is 40.