Open calcmogul opened 9 years ago
Is this still an issue, we should review this, and if not remove it from the issue box.
Yes it is. Instead of using a custom PID controller though, you can now simply override CalculateFeedForward() to make your own feed forward that compensates for gravity. Doing so would also fix the need for separate PID constants for the elevator going up versus down.
The elevator PID loop would behave more predictably if a feed forward were applied. P, I, and D wouldn't need to be nearly as high as they are now. If we compensate for gravity in the feed forward, we won't need two PID profiles anymore. This would also fix the motion profile autonomous driving, which is currently unpredictable.
In order to have enough control over what is applied to the motor in each loop iteration, I think we'll need to go back to PID on the roboRIO instead of offloading it to the CAN Talons; they don't have the right feed forward implementation. There is a PIDController class in the RobotModules project that could be used instead of WPILib's, since WPILib's PIDController class suffers from the same problem that the CAN Talons do.