|
Re: WPILib Mecanum Drive, PID and drift
Using Mecanum_Cartesian() with the gyro input is intended to give you field-centric driving. The joystick commands are rotated to reflect the current heading of the robot. What would normally be "straight forward" becomes "down field". If your robot drifts to the right, it means the gyro angle is measuring the robot as facing a little to the left of where it was facing when the gyro was calibrated on powerup.
If you don't want field-centric motion control, don't use the gyro input that way.
|