Question on new PID Wrapping Code #131
Replies: 4 comments
-
Honestly, I am not sure. Upon testing it hasnt shown to be an issue, which was shocking to me at the time. |
Beta Was this translation helpful? Give feedback.
-
I was just testing on our robot and we were seeing odd behavior until I changed the wrapping minimum to -90. |
Beta Was this translation helpful? Give feedback.
-
I've written a change that eliminates PID wrapping altogether. Unfortunately, REVLib does not describe how PID wrapping works. I've made this change that uses Rotation2d to eliminate the need for using PID wrapping on the controller. I won't be able to test it on-robot until mid-week, but if it works, will submit a PR. |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion because the behavior was fixed by commits that changed the update from the encoders and PID wrapping to [0, 180) |
Beta Was this translation helpful? Give feedback.
-
I haven't had access to our robot for a couple of days, so I have been going through commits. I noticed that the new Swerve Module code changed PID wrapping from (-180, 180) to (0, 90). If I program the teleop drive to drive at fixed (1,-1) velocity, I can definitely get optimize to produce -45 degree setpoints in simulation. Is this an issue?
Should the PID Wrapping be (-90, 90)?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions