|
WPILib Mecanum Drive, PID and drift
This is the first year that we are using C++ and also the first year for a mecanum drive. For ease of learning we are using the WPILib RobotDrive::Mecanum_Cartesian() with the gyro input. We have done pretty good reducing the drift of the gyro. However, when we try to drive straight forward, our robot drifts to the right. Mechanical has done quite a bit of work on the gear boxes and swapped motors and controllers, and the problem persists.
The thought has been to add a PID loop to lock on the angle, but we can not find a way to do this with the WPILib. I also can not find the source code for the library to see if this is possible, or even a really good description of how the code is actually supposed to work. We just don't have the time at this point to write our own mecanum routines.
Has anyone ran into this problem and found any solutions? Also, does anyone know if the WPILib source code is available?
|