Different "Cam Suddenly Stops" Problem

We have been working on autonomous with the camera for about a week and a half (mounted it on last year’s robot). It was tracking the green light just fine up until yesterday. It still searches, but never reports that it has found the light or goes from searching to trackign mode. We only changed one of our speed variables for driving from one test to the next, and the cam quit. So we went back to default cam code and it still doesn’t work.

All 4 PWMs for the camera are plugged in correctly, the backup battery has been checked, and the terminal reports angles and everything correctly, the camera just never sees the light. It’s as if the cap is on (but it’s not :().

I even used the Java program to make sure the camera is focused appropriately! Does anyone know what it could be?

Have a look at the confidence threshold parameter. If set too high, the tracking software will continue to search even though the camera sends a t-packet indicating it has seen a an object of the proper color. This can be used to discriminate against false positives. Try lowering this value (the default is 20) and see if your problem goes away. So that I can get a sense of what’s happening out there, please let me know the outcome.

Edit: I suspect that it stopped working suddenly because you changed something, like moving the lights further apart, and fell below this threshold.

-Kevin

How are you powering the target light? If it’s from a robot battery, it might just be running low on voltage and getting too dim for the code to detect properly. You won’t necessarily notice the very gradual dimming. If this is your problem, you’ll definitely notice it being brighter when you replace the battery, and the camera should be happy.

We’ll definitely try changing the confidence threshold, thanks. We thought of the distance of the light though, and tried it at several distances between 3 and 25 feet from the camera.

This will be tried also. Thanks! We’re having final exams now so I will reply again in about a week with results.

Thanks! We were using a 12v robot battery, and it was low. The voltage was at 11.8 or so volts. Switching it out for a 13.3 volt one solved the problem. Doesn’t seem like a big disparity but it apparently was.

And although it wasn’t the main problem, changing the confidence threshold from 20 to 18 did make tracking a little smoother.:wink:

We have encountered the same problem(It was working fine for a while). Battery for the lights are good, we changed it several times to be sure. Backup and main battery also were definitely very charged. We checked all the connections to make sure they were in. When we bring the green light in front of the camera, the red light on the camera stays red as it usually would in the presence of the green light. However, in the software, it still says “Searching…”. We are using the default code and we did try lowering the confidence treshold to 10 and 15. No difference in results.

you might try restoring the defualts for the camera

Did you read the thread? Both Bharat Nain and I said we were using the default code.

We have been getting the same problem with the camera where the red and green lights are constantly on. We have checked the power to the camera and we have plenty of power going to the camera. This occured with the default code (the easyC kickoff code and “out of the box” default code) on both this year’s camera and last year’s camera. We have also changed the robot controller between this years and last years and the problem still exists. While in this state the camera does absolutely nothing.

We are encountering the same problem. Both the red light and the green light will be on, yet it is as if the camera just stops paying attention to the light. Kevin’s code worked flawlessly last year, I don’t know what could be causing this. I doubt it is a glitch in the camera state machine because IIRC the lights on the CMUCam are controlled by itself, not the FRC? The camera will follow the light around, and then just stop. If you bring the light back, it will pick it up again, but it is like the camera has seen something green behind your light and stays looking at it instead of following the powered green light.

Does anyone know what the issue is? I am positive everything is plugged in and configured correctly, because most of the time it tracks alright.

Please, please, provide feedback, and thanks in advance,
Robinson Levin

EDIT: Could a confidence threshold set too high (or even the default) cause the this behavior? I thought that was internal to Kevin’s tracking code, and wouldn’t keep the red light on, but still…

The red light would indicate that the camera recognizes the light specified by the TC command. A confidence threshold would keep the camera searching instead of transitioning to the tracking state.