You might’ve heard one of my other posts, but here we are with another issues still with pathplanner. We have our swerve following the paths, but it drives past the finished position and then later goes back to the real position. Any clues on how to remove the overshoot or even tune it to be a smaller one?
Sounds like a PID problem
could also be that feedforward is too high, driving it past the setpoint, and then the PID corrects for it
The overshoot issue is usually a sign that either the PID controller or feedforward tuning needs a little more adjusting. If you’re overshooting and then correcting back, it’s probably because the robot is being too aggressive as it approaches the end of the path.
First thing I’d check is your PID values, specifically, the P and D terms. If P is too high, the system might be overreacting to positional error, causing it to blast past the target before it realizes it needs to stop. Adding or increasing D can help smooth things out by dampening that motion as it gets close to the goal. Just don’t go too crazy with D, or you’ll end up slowing the system down unnecessarily or even introducing jitter.
Another thing to check is your feedforward tuning. PathPlanner relies heavily on accurate velocity and acceleration feedforward values. If these are a little off, the robot might end up driving faster than it should, especially during deceleration phases. Make sure your kV and kA constants are spot on for your drivetrain, or at least close enough to keep things stable.
Also, double-check that your path’s end velocity is actually set to zero at the final waypoint. Sometimes the robot overshoots because it’s expecting to coast through the endpoint instead of fully stopping. If that’s the case, PathPlanner will let it keep driving a bit before correcting back.
If none of that helps, try plotting your desired vs. actual position and velocity over time. It’ll give you a clearer picture of whether the issue is in the control loop (PID) or somewhere else, like odometry or delays in feedback. If you’re using odometry or vision, make sure there isn’t a lag in the data as it could be reacting to old info, which makes it overshoot.
Alright ill try this tomorrow
When you test it, use the PathPlanner Telemetry! It’s a really useful tool for fine-tuning.
What would be a few options/suggestions for teams to go about determining these values accurately for a drivetrain?
Utilizing SysID or ReCalc are methods I’ve seen suggested; Are there other methods people recommend that they’ve found to work well for them in the past?