|
Re: Have you gotten your robot to go towards the vision tetra?
Sounds like we're all taking VERY similar approaches here.
We must be doing something right =).
1) Proportional correction is the way to go. This was mentioned above, and basically means, read the cam.pan_servo value, and bias your left and right motors proportionally to the angle in which your camera is pointing. Simple enough right?
2) Adjust your theta (fixed tilt axis angle) so that you don't see the green tetras on the opponent's side of the field when the match starts. I don't know yet whether a tilt axis servo is necessary, as when you start driving towards a tetra on your side of the field, you MAY pick up an opponents tetra in your field of view with a fixed tilt angle.
3) Depending on where the vision tetras are placed and where your robot is placed at the beginning of the match, you may not see all the possible tetra positions. Make a panning routine that makes the camera look left and right a bit until it finds a tetra to track. Due to some very minor loopholes, you can do this while the robot is disabled before the beginning of the match.
4) We're still confused about what to do when there are two tetras in our field of view... drive until one of them drops out =).
At this point, we've gotten our test platform to find a tetra by panning while disabled before the match, when the match starts, spin on axis to point to robot straight at a tetra, approach the tetra guided by the camera, and stop when the tetra is about a foot from the front of the robot.
Our platform uses omni-wheels, and we are trying to minimize wheel-slip in our approach to the tetra, because the HARD part is actually finding the center goal AFTER you've picked up the tetra. The use of a gyro is still up in the air depending on how close we can get the robot pointed towards the center goal with just our encoders. If we can get it close, and use the camera to get it the rest of the way, we're set. But we don't know whether this is the case just yet.
-SlimBoJones...
|