Updates to the turret control algorithm and turret PID
Note: I'm putting up this MR as WIP so I don't forget about these changes mostly. Ultimately, turret tuning is an ongoing process and I don't want to merge this now, not until I have a robot to test on again. I just forgot about this branch and I think there are a couple necessary changes on this branch that should not be forgotten. I think I will have a robot to test pretty soon.
Updates:
- Add dt to integral calculation in
turret_pid.cpp
. - Also in
turret_pid.cpp
, fix manual derivative. - Remove unnecessarily complex feed forward control code that does more harm then good. I did some error measurements and found ~4 degrees max error with the previous feed forward code and ~1.4 degrees max error with this simple updated version.
- Add separate param to chassis subsystem, a unique
MAX_OUTPUT_ROTATION_PID
term that can be limited separately fromMAX_WHEEL_SPEED_SINGLE_MOTOR
. - Tuned turret pid parameters, also limit output to the GM 6020 to 30000 instead of 32000 since 30000 is the max allowable output to send.