|
Re: Driving Straight With Encoders
Providing your wheels don't slip, the change in heading of your robot is
heading_radians = (leftEncoderDistance - rightEncoderDistance)/TrackWidth
TrackWidth is the distance between the left and right wheels.
Wheel slip and other imperfections make the above heading calculation not perfect, but it's good enough to use in a PID loop to keep your robot driving straight.
__________________
-
An ounce of perception is worth a pound of obscure.
|