Pure Pursuit Overshooting Path

I’m the lead programmer on team 75, and I’ve been having trouble implementing the pure pursuit algorithm. Our robot always overshoots the end of the path by 6-12” depending on our speed. The way we determined our velocity at a given point was by associated a lookup velocity at our closest point using a kinematic equation (vf ^2= v0 ^2 + 2 * a * d). I suspect it has to do something with when traveling at a max velocity, it is running through the last points too quickly to decelerate, but that’s only a theory. Any suggestions on how we can fix this?

I would suggest printing out (or graph using SmartDashboard) the expected velocity that your robot should be going at a given time, in other words the velocity that you are getting from the path following algorithm and passing into some sort of control loop for your motors. That will allow you to find out if it is a problem with your algorithm to determine velocity. Then, at the same time, print out or graph the actual velocity of the robot measured by the encoders. The expected graph of velocity over time should look like a trapezoid, with a period of acceleration from the beginning, a period cruising at max speed (if reached), and a period of slowing down at the end. If there is no distinct deceleration period at the end, you might want to alter your velocity determination algorithm.

I would assume the issue is that the expected velocity hits zero much faster than the robot can actually decelerate to a full stop, resulting in the robot to drift 6-12" further. If that is the case, simply increase the amount of time you spend decelerating at the end of the path so the robot will be able to keep up.

It could also be an un-tuned control loop. Make sure that your velocity control loop is tuned by running it at different velocities and comparing the expected vs actual velocity/time graphs.


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.