My team is working on our swerve code, and we are having issues with the wheels occasionally jittering. We believe that setting a tolerance on the SPARK PID controller would fix this, as we can see in advantagescope that the fluctuations in the encoder value are tiny, like 0.01 radians.
We are trying to use the maxmotion.allowedClosedLoopError from the rev SparkMaxConfig API to do this, but it seems like changing this value does nothing. Has anyone been able to successfully set a tolerance on a spark PID controller using the new 2025 Revlib APIs?
is the only thing we added but setting the value to anything doesn’t do anything. The maxMotion API seems to be new for 2025 and I am wondering if it might just be broken.
yeah, that’s right. if you want to use the maxmotion feature, i think you also need to tell it what velocity and acceleration limits you’d like it to use.
We learned that maxmotion requires a max acceleration and velocity. Has anyone found a way to set a PID tolerance using the 2025 rev library without using this?