Quote:
Originally Posted by bumblebee3339
Thx.
What about the driving straight with PID? How does it work?
|
Your gyro tells you what your heading is. When you start driving straight, remember what the heading is. As you drive, if your heading drifts clockwise, steer a little bit counter-clockwise. And visa versa.
You could also use the difference between left and right encoder counts to figure out what direction you are driving, but the gyro has the nice property of not caring whether or not your wheels are slipping.