I strongly believe Dubin’s Curves to generate paths is better for Pure Pursuit, even though LemLib doesn’t support it. Essentially it treats the robot like a car with a turn radius so that sharp points are now changed with smoother curves.
This allows the robot to keep moving with almost zero moments of point turns, and allows much quicker autonomous routines.
Take a look at this image:
If this were done with Bezier curves, or a straight point to point, the robot would need to do a point turn first before moving which clunkier and wastes precious time. Instead, if you use Dubin’s Curves it auto generates a respectable curve so that the turning and the moving is one single, natural motion.
I have implemented my own pure pursuit algorithm that follows a Dubin’s Curves path in my own library if anyone is interested in looking under the hood at the source code:
One way to make Pure Pursuit reliable is to have it such that if the robot is within 1 inch from the target to just accept the sideways error, straigtehn out, and move forward/back to have no forward/back error and no rotational error. Otherwise the robot will actively back up and drive forward in an oscillating motion.
