Just want to chime in and say reducing the P value for the PID controller that much here is not a solution, it is just hiding the problem. You’re essentially making the PID controller do nothing and rely on just feed forward, which will be bad for accuracy. 5.0 is a heavily tested value that should work as a good starting point for most robots, if anything its a bit low (we are running kP = 10.0 ourselves). 0.01 will do nothing, essentially the same as just setting it to 0. For example:
target X = 0 meters
actual X = 1.0 meters
error = -1.0 meters
feedback output = 0.01 * -1.0 = -0.01 m/s
For a more reasonable error you’re likely to see:
target X = 0 meters
actual X = 0.05 meters
error = -0.05 meters
feedback output = 0.01 * -0.05 = -0.0005 m/s
With feedback outputs like that it will never be able to correct for any error.
You guys should look at reverting this PR and find what the actual oscillation problem is, as having no feedback while path following is gonna really come back to haunt you and anyone else using this example later.
Same explanation as to why you shouldn’t do this above.