|
Re: our own allternative code for the cmu camera
Ok I have been testing your code... but I have run into a problem!
At the beginning the camera goes wild and finds the light object...
- as either the camera mount moves or the light moves, the camera follows it.
If you cover up the camera, the xerror and yerror values turn 0... Camera stands still and nothing happens... as you uncover the camera it detects the light and does a little adjusting...
BUT now here is where the problem comes in:
- Cover up the camera. (xerror = 0, yerror = 0)
- Now move the camera away from the light.
- Uncover the camera.
- The camera stands still!
What if during the competion a robot blocks your camera, and your robot moves away (hence your camera moves away from light)... The camera won't respond until it is shown a glimps of the light.
Maybe you should add a piece of code that after a certian amount of time (while xerror = 0 and yerror = 0) to restart the camera and do that wild scan again.
Last edited by Calvin : 08-02-2006 at 21:43.
|