Quote:
Originally Posted by SteveS
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).