For teams that can locate (not necesarily cap) the vision tetra:
Did you use auto servo mode or did you manually pan the camera?
177 decided that it was too likely that the camera would not start with a vision tetra in its field of vision and so we don’t use auto servo mode at all. All of the camera turning is done completely manually by the RC.
What did you guys find works best for you?
I’m using auto servo mode, but I’d prefer not to. Is there any chance that you could share your algorithm for manual searching?
When we were looking into using the camera, we decided on algorithm which used both manual searching and autoservo. Autoservo works very well when the tetra is in view.
I was considering rewriting the code to use auto-servo mode, but I figure since we already have it working without auto-servo mode… Since the camera only really covers about 35 degrees, we didn’t think we could count on the tetra being in view enough of the time.
The basic gist of it is that you use a manual mode to execute a search pattern for the tetra. When you find it, you switch to autoservo mode. If you lose it, you go back to the search pattern. It’s fairly simple and worked rather well for us. The autoservo mode is quite good and provides a really easy way of working with the camera.
That said, we dropped the camera when we realized that we wouldn’t have enough time in autonomous to find and cap with it (that whole falling over thing doesn’t help much).
Auto Servo Mode serves it purpose quite well. We used a basic counter loop that incremented the position of the pan servo and when we got a good T-Packet we swapped it over to auto track mode.
My one attempt at writing my own servo control ended when I got annoyed with the compiler over a stupid error. Later I figured out what the error was, but I didnt have time to fix it, and anyway I had working code using autoservo and just turning the whole robot to scan the field. It works really well (except for being disabled before autonomous and thus wasting time) but we still probably wont use our camera as I never did get around to testing our autonomous program.
Sorry to bring up an old thread, but this intrigues me. We tried doing the same but every time we enabled auto_servo_mode it would reset to 127, 127 and lose the color tracking settings.
Precisely why we didn’t use it.