Quote:
Originally Posted by geomapguy
We are in need of help for implementing a gyro to drive our robot straight for a certain amount of time. (in auto mode)
|
Zero the gyro when the bot is facing in the desired direction.
Then,
If the gyro says that your bot is facing slightly clockwise from the desired direction you need to increase the speed of the right wheels and decrease the speed of the left wheels.
If the gyro says that your bot is facing slightly counterclockwise from the desired direction you need to increase the speed of the left wheels and decrease the speed of the right wheels.
There are many different ways to do this. You can either invent your own or search around for ideas.
Here's
one way to do it with a skid-steer vehicle.
Here's
one way to do it with a 3DoF vehicle.