View Single Post
  #1   Spotlight this post!  
Unread 08-02-2015, 10:13
SteveS's Avatar
SteveS SteveS is offline
Registered User
FRC #2594
 
Join Date: Jan 2015
Rookie Year: 2007
Location: Idaho
Posts: 5
SteveS is an unknown quantity at this point
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?
Reply With Quote