This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Pure Pursuit Controller

PurePursuit is a path tracking algorithm. It computes the angular velocity command that moves the robot from its current position to reach some look-ahead point in front of the robot. The linear velocity is assumed constant, hence you can change the linear velocity of the robot at any point. The algorithm then moves the look-ahead point on the path based on the current position of the robot until the last point of the path. You can think of this as the robot constantly chasing a point in front of it. The property LookAheadDistance decides how far the look-ahead point is placed.

The PurePursuit class (robotics.PurePursuit) is not a traditional controller, but acts as a tracking algorithm for path following purposes. In the Robotics System Toolbox™, you create a PurePursuit controller and specify a list of waypoints. The desired linear and maximum angular velocities can be specified. These properties are determined based on the robot’s specifications. Given the pose (position and orientation) of the robot as an input, the object can be used to calculate the linear and angular velocities commands for the robot. How the robot uses these commands is dependent on the system you are using, so consider how robots can execute a motion given these commands. The final important property is the LookAheadDistance, which tells the robot how far along on the path to track towards. This property is explained in more detail in a section below.

Reference Coordinate System

It is important to understand the reference coordinate frame used by the PurePursuit algorithm for its inputs and outputs. The figure below shows the reference coordinate system. The input waypoints are [x y] coordinates, which are used to compute the robot velocity commands. The robot’s pose is input as a pose and orientation (theta) list of points as [x y theta]. The positive x and y directions are in the right and up directions respectively (blue in figure). The theta value is the angular orientation of the robot measured counterclockwise in radians from the x-axis (robot currently at 0 radians).

Look Ahead Distance

The LookAheadDistance property is the main tuning property for the PurePursuit controller. The look ahead distance is how far along the path the robot should look from the current location to compute the angular velocity commands. The figure below shows the robot and the look-ahead point. As displayed in this image, note that the actual path does not match the direct line between waypoints.

The effect of changing this parameter can change how your robot tracks the path and there are two major goals: regaining the path and maintaining the path. In order to quickly regain the path between waypoints, a small LookAheadDistance will cause your robot to move quickly towards the path. However, as can be seen in the figure below, the robot overshoots the path and oscillates along the desired path. In order to reduce the oscillations along the path, a larger look ahead distance can be chosen, however, it might result in larger curvatures near the corners.

The LookAheadDistance property should be tuned for your application and robot system. Different linear and angular velocities will affect this response as well and should be considered for the path following controller.


There are a few limitations to note about this PurePursuit algorithm:

  • As shown above, the controller cannot exactly follow direct paths between waypoints. Parameters must be tuned to optimize the performance and to converge to the path over time.

  • This PurePursuit algorithm does not stabilize the robot at a point. In your application, a distance threshold for a goal location should be applied to stop the robot near the desired goal. This can be seen in the path following example: Path Following for a Differential Drive Robot.


[1] Coulter, R. Implementation of the Pure Pursuit Path Tracking Algorithm. Carnegie Mellon University, Pittsburgh, Pennsylvania, Jan 1990.

See Also

| |

Related Topics