I was building a robot which I wanted to have smooth consistent motions and pathways. I am somewhat familiar with Pure Path Pursuit and wanted to know if someone could point me towards a mathematical or Java algorithm which I could implement or take a look at in order to better understand this concept. Any help is appreciated. Thanks!
In words, rather than code. Assume you have the path defined as a dense list of points.
- Find the point on the path closest to robot
- Draw a circle of radius R about that point, then find the point on the path where the circle cuts (usually the circle will cut between two points). The circle may cut the path multiple times, take the closest (along the path) point.
- Moving at constant velocity, steer toward that point using some kind of proportional controller
Here's an example implementation in Java for FRC:
Let us know if we can answer any more questions about it or the general framework.