Using the FRC Characterization tool returns normal-looking graphs, however, the Kp value of the velocity PID loop seems abnormally high at 5.15. And this is shown because when I run the auto paths using this constant this high the robot jolts and stutters super fast.
We found out the KP can Almost anything. On that bot(code), the given value for kP was around 9 and we put 1. So I suggest starting with 2 and trying to adjust, lower if it’s stutter and higher if it isn’t.
EDIT : check in the robot container for our code about path following
Did you see the Warning at the top of the Feedback Analysis doc, it was added about a week ago:
The feedback gain calculation assumes that there is no mechanical backlash, sensor noise, or phase lag in the sensor measurement. While these are reasonable assumptions in many situations, none of them are strictly true in practice. In particular, many “smart motor controllers” (such as the Talon SRX , Talon FX , and SparkMax ) have default settings that apply substantial low-pass filtering to their encoder velocity measurements, which introduces a significant amount of phase lag. This can cause the calculated gains for velocity loops to be unstable. To rectify this, either decrease the amount of filtering through the controller’s API, or reduce the magnitude of the PID gains - it has been found that shrinking gains by about a factor of 10 works well for most default filtering settings.