We are using PathPlanner with MaxSwerve modules and are trying to tune the PID values for the HolonomicPathFollowerConfig. The Angular Velocity graph in PathPlanner shows us getting pretty close to the target velocities along the path, however the turn motors are oscillating pretty rapidly while doing it. They do not seem to do that during teleop driving. Using AdvantageScope while running the path (which is a “simple” move forward by 2 meters while turning 180 degress), we can see that the set points for the swerve modules are indeed oscillating rapidly with the the measured values following close behind. Our swerve code is based heavily off of the MaxSwerve Java Template. The HolonomicPathFollowerConfig translation P value is 1.6. We got that value by running a path that just goes 4m straight forward. It follows the target velocity very well. We’ve been trying various values for the angular P value and, as I said before, we can get the velocity to pretty closely follow the target in the graph.
Any suggestions for what we need to do to get them to stop oscillating and making all this noise, which seems bad for the motors, would be greatly appreciated.