Quote:
Originally Posted by Geek 2.0
On a mecanum drive base, is there a way to correct for driving direction? For instance, if I want to go 40 degrees to the left of straight, how can I correct any error? I know encoders would be ideal, but is this possible with an accelerometer?
I could use an integrator on an accelerometer to get velocity, but that's not always very accurate. Any other ideas?
|
Use a gyro.
Take your desired heading angle and subtract the gyro angle from that. Do a little math on the result and run it through a PID.
What you do with the PID output depends on what you mean by "I want to go 40 degrees to the left of straight".
For example, if you want the robot to stay pointed in the commanded direction, the output of the PID would drive the mec's rotation command.