|
Re: Advanced Vision Concept [help!]
the problem with servos is that they are not continuous. I would opt for a servo to control the up/down motion and a regular "servo-ed" motor to control the side-to-side. This would let you turn all the way around (although your cable would wrap up).
Basically, to keep the camera set, you just need to find the target and find out how far away it is from the center of your field of view. Continually send instructions to the motor to move it to the middle.
The difficulty is actually mechanically attaching the camera. Without a fancy rotary brush thing, you would have issues with the camera cable being tangled up. If you measured the "actual" rotation of the robot with a gyro, you might be able to get away with a normal servo:
have a variable called "offset_angle" or something.
you will also (because you plan to use a servo) know the angle between the front of the robot and the camera. when the camera sees the target, you can use some trig to determine the angle between the line of sight of the camera and the direction to the goal.
subtract all of these angles to determine how far the robot is from the target (as an angle, ie. "if you turn 15 degrees to the right, you will be facing the target")
You can turn in place and keep track of this angle using the gyro, even if you do not see the goal markings. With this setup, to keep the camera on-track without a continuous motor, point the servo to the "angle between the robot and the goal" Then it will point the camera towards the goal and if you turn around backwards where the servo cannot go, the camera will pan all the way around, turning away from the goal for a minute, and pick it up on the other side.
Did I ramble too much there?
|