View Single Post
  #4   Spotlight this post!  
Unread 08-02-2015, 18:21
FleventyFive FleventyFive is offline
Registered User
FRC #4118
 
Join Date: Sep 2014
Location: Gainesville, FL
Posts: 23
FleventyFive is on a distinguished road
Re: WPILib Mecanum Drive, PID and drift

Quote:
Originally Posted by SteveS View Post
As I understand the PIDController class, the output (Joystick class) must have a PIDOutput member or derived from that class. Joystick has neither. How would you implement that?
You could use the Gyro as the input for the PID loop, with Motors as the output, and use the Joystick to set the goal (setpoint) of the loop. It is kind of confusing because really each wheel would need its own PID controller, unless you create a PIDsubsystem which allows you to define what you do with the input and outputs.

My team also has drift when strafing and we're trying to correct it with PID loops using encoders as the input, but selecting gains, etc is difficult expecially if you do not have extended periods of time with the robot to test (because other people are working on it).

Last edited by FleventyFive : 08-02-2015 at 18:22. Reason: to sound not like nigerian
Reply With Quote