2
$\begingroup$

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!

$\endgroup$
  • 1
    $\begingroup$ Can you be a little more specific about what it is that you're after? When I search Google for Pure Pursuit Java algorithm I get 835k hits, at least some of which seem to both describe the algorithm and provide Java code. $\endgroup$ – sempaiscuba Apr 1 '19 at 3:14
2
$\begingroup$

In words, rather than code. Assume you have the path defined as a dense list of points.

  1. Find the point on the path closest to robot
  2. 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.
  3. Moving at constant velocity, steer toward that point using some kind of proportional controller
  4. Repeat
| improve this answer | |
$\endgroup$
  • $\begingroup$ Isn't the circle supposed to be drawn having the centre in the robot rather than in the closest point in the path? $\endgroup$ – Guille Sanchez Oct 9 '19 at 14:15
  • 1
    $\begingroup$ Not sure it makes much difference since the robot should be following the path. I don’t think there is a single definitive definition of pure pursuit. $\endgroup$ – Peter Corke Oct 10 '19 at 0:52
1
$\begingroup$

Here's an example implementation in Java for FRC:

https://github.com/Team488/SeriouslyCommonLib/blob/master/src/main/java/xbot/common/subsystems/drive/PurePursuitCommand.java

Let us know if we can answer any more questions about it or the general framework.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Welcome to Robotics:SE. It's generally better if you include at least the key points from that link in case the link should change at some point. $\endgroup$ – sempaiscuba Oct 1 '19 at 2:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.