|
Re: green
We tested the code out for the first time today, it took about 30-40 minutes to get it tracking properly.
The default colors should work, we never modified those, and the camera picked up the target both with and without a lexan cover over the cathode lights.
Two problems that happened to us which might screw your stuff up...
1. At first the camera "ran away" from the light anytime it saw it. This was fixed by modifying the sign on both the pan and tilt default sign values.
2. The camera would pick up the light fine when pointed at it; however, when it turned from one side of the pan limit to the other, it would pick up the light part way through, lose it by the time it got to the pan position, and would restart the search repeatedly. This occurred because the camera searches with the same tilt value at 3 or 4 different pan positions, then rotates back to the start of the pan positions while shifting the tilt up to the next position. During the shift to the starting pan position, it would pick up the target because the tilt shifts at the same time and the camera was now at the new tilt angle. It no longer the saw the target when it got all the way to the pan start position though, and since it had seen the target and lost it, it restarted the search, which caused the pan position to be reset to 0 and the tilt to be reset to 127, which put us back in the place we had been before the camera's first sweep. It would then repeat indefinetely. To fix this, in the 2 lines of code that set the pan and tilt values for the start of a new search (this is in tracker.c), we just made it keep the current pwm values of the servos rather than reseting.
Anyway, hope this might help other teams with similar problems.
|