Regulated Pure Pursuit
Source code on Github.
The Regulated Pure Pursuit controller implements a variation on the Pure Pursuit controller that specifically targeting service / industrial robot needs. It regulates the linear velocities by curvature of the path to help reduce overshoot at high speeds around blind corners allowing operations to be much more safe. It also better follows paths than any other variation currently available of Pure Pursuit. It also has heuristics to slow in proximity to other obstacles so that you can slow the robot automatically when nearby potential collisions. It also implements the Adaptive lookahead point features to be scaled by velocities to enable more stable behavior in a larger range of translational speeds. It also implements the Dynamic Window Pure Pursuit algorithm, which computes optimal velocity commands for path tracking while explicitly considering velocity and acceleration constraints.
The following videos compare Pure Pursuit (PP), Adaptive Pure Pursuit (APP), Regulated Pure Pursuit (RPP), and Dynamic Window Pure Pursuit (DWPP).
Simulation results
Real-robot experiment
See the package's README for more complete information.
If you use the Regulated Pure Pursuit Controller algorithm or software from this repository, please cite this work in your papers:
- S. Macenski, S. Singh, F. Martin, J. Gines, Regulated Pure Pursuit for Robot Path Tracking. Autonomous Robots, 2023.
If you use the Dynamic Window Pure Pursuit Controller algorithm or software from this repository, please cite this work in your papers:
- F. Ohnishi, M. Takahashi, DWPP: Dynamic Window Pure Pursuit Considering Velocity and Acceleration Constraints. arXiv:2601.15006., 2026.
Regulated Pure Pursuit Parameters
max_linear_vel
- Type:
doubleDefault:0.5 -
The maximum linear velocity (m/s) to use. Previously
desired_linear_vel
min_linear_vel
- Type:
doubleDefault:-0.5 -
The minimum linear velocity (m/s) used when
use_dynamic_windowistrue.
max_angular_vel
- Type:
doubleDefault:2.5 -
The maximum angular velocity (rad/s) used when
use_dynamic_windowistrue.
min_angular_vel
- Type:
doubleDefault:-2.5 -
The minimum angular velocity (rad/s) used when
use_dynamic_windowistrue.
max_linear_accel
- Type:
doubleDefault:2.5 -
The maximum linear acceleration (m/s^2) used when
use_dynamic_windowistrue.
max_linear_decel
- Type:
doubleDefault:-2.5 -
The maximum linear deceleration (m/s^2) used when
use_dynamic_windowistrue.
max_angular_accel
- Type:
doubleDefault:3.2 -
The maximum angular acceleration (rad/s^2) to use.
max_angular_decel
- Type:
doubleDefault:-3.2 -
The maximum angular deceleration (rad/s^2) used when
use_dynamic_windowistrue.
lookahead_dist
- Type:
doubleDefault:0.6 -
The lookahead distance (m) to use to find the lookahead point when
use_velocity_scaled_lookahead_distisfalse.
min_lookahead_dist
- Type:
doubleDefault:0.3 -
The minimum lookahead distance (m) threshold when
use_velocity_scaled_lookahead_dististrue.
max_lookahead_dist
- Type:
doubleDefault:0.9 -
The maximum lookahead distance (m) threshold when
use_velocity_scaled_lookahead_dististrue.
lookahead_time
- Type:
doubleDefault:1.5 -
The time (s) to project the velocity by when
use_velocity_scaled_lookahead_dististrue. Also known as the lookahead gain.
rotate_to_heading_angular_vel
- Type:
doubleDefault:1.8 -
If
use_rotate_to_headingistrue, this is the angular velocity to use.
use_velocity_scaled_lookahead_dist
- Type:
boolDefault:false -
Whether to use the velocity scaled lookahead distances or constant
lookahead_distance.
min_approach_linear_velocity
- Type:
doubleDefault:0.05 -
The minimum velocity (m/s) threshold to apply when approaching the goal to ensure progress. Must be
> 0.01.
approach_velocity_scaling_dist
- Type:
doubleDefault:0.6 -
The distance (m) left on the path at which to start slowing down. Should be less than the half the costmap width.
use_collision_detection
- Type:
boolDefault:true -
Whether to enable collision detection.
max_allowed_time_to_collision_up_to_carrot
- Type:
doubleDefault:1.0 -
The time (s) to forward-simulate the current velocity command to check for collisions when
use_collision_detectionistrue. At each simulation step, the robot's footprint is projected forward by the costmap resolution. The simulation stops at whichever limit is reached first: this time limit or the carrot distance. If a collision is detected at any projected pose, the robot will stop. Whenmin_distance_to_obstacleis set, this time limit may be automatically extended to ensure the minimum obstacle distance can be checked at the current velocity.
use_regulated_linear_velocity_scaling
- Type:
boolDefault:true -
Whether to use the regulated features for path curvature (e.g. slow on high curvature paths).
use_cost_regulated_linear_velocity_scaling
- Type:
boolDefault:true -
Whether to use the regulated features for proximity to obstacles (e.g. slow in close proximity to obstacles).
cost_scaling_dist
- Type:
doubleDefault:0.6 -
The minimum distance from an obstacle to trigger the scaling of linear velocity, if
use_cost_regulated_linear_velocity_scalingis enabled. The value set should be smaller or equal to theinflation_radiusset in the inflation layer of costmap, since inflation is used to compute the distance from obstacles.
cost_scaling_gain
- Type:
doubleDefault:1.0 -
A multiplier gain, which should be
<= 1.0, used to further scale the speed when an obstacle is withincost_scaling_dist. Lower value reduces speed more quickly.
regulated_linear_scaling_min_radius
- Type:
doubleDefault:0.9 -
The turning radius (m) for which the regulation features are triggered when
use_regulated_linear_velocity_scalingistrue. Remember, sharper turns have smaller radii.
regulated_linear_scaling_min_speed
- Type:
doubleDefault:0.25 -
The minimum speed (m/s) for which any of the regulated heuristics can send, to ensure process is still achievable even in high cost spaces with high curvature. Must be
> 0.1.
use_fixed_curvature_lookahead
- Type:
boolDefault:false -
Whether to use a fixed lookahead distance to compute curvature from. Since a lookahead distance may be set to vary on velocity, it can introduce a reference cycle that can be problematic for large lookahead distances.
curvature_lookahead_dist
- Type:
doubleDefault:0.6 -
Distance to look ahead on the path to detect curvature.
use_rotate_to_heading
- Type:
boolDefault:true -
Whether to enable rotating to rough heading and goal orientation when using holonomic planners. Recommended on for all robot types that can rotate in place.
- Note
- Both
use_rotate_to_headingandallow_reversingcannot be set totrueat the same time as it would result in ambiguous situations.
allow_reversing
- Type:
boolDefault:false -
Enables the robot to drive in the reverse direction, when the path planned involves reversing (which is represented by orientation cusps). Variants of the
smac_plannercomes with the support of reversing. Checkout the Smac Planner to know more.
rotate_to_heading_min_angle
- Type:
doubleDefault:0.785 -
The difference in the path orientation and the starting robot orientation (radians) to trigger a rotate in place, if
use_rotate_to_headingistrue.
use_cancel_deceleration
- Type:
boolDefault:false -
Whether to use deceleration when the goal is canceled.
cancel_deceleration
- Type:
doubleDefault:3.2 -
Linear deceleration (m/s/s) to apply when the goal is canceled.
interpolate_curvature_after_goal
- Type:
boolDefault:false -
Interpolate a carrot after the goal dedicated to the curvate calculation (to avoid oscilaltions at the end of the path). For visualization, it will be published on the
/curvature_lookahead_pointtopic similarly to/lookahead_point- Note
- Needs
use_fixed_curvature_lookaheadto betrue
allow_parameter_qos_overrides
- Type:
boolDefault:true -
Whether to allow QoS profiles to be overwritten with parameterized values.
min_distance_to_obstacle
- Type:
doubleDefault:-1.0 -
The shortest distance at which the robot is allowed to be from an obstacle along its trajectory. Set
<= 0.0to disable. It is limited to maximum distance of lookahead distance selected.
use_dynamic_window
- Type:
boolDefault:false -
Whether to use the Dynamic Window Pure Pursuit (DWPP) Algorithm. This algorithm computes command velocities that track the path as accurately as possible while respecting velocity and acceleration constraints. It automatically slows down in sharp turns without manual tuning, reducing path tracking errors. Fumiya Ohnishi and Masaki Takahashi, "Dynamic Window Pure Pursuit for Robot Path Tracking Considering Velocity and Acceleration Constraints", the 19th International Conference on Intelligent Autonomous Systems (IAS-19), 2025.
allow_obstacle_checking_beyond_goal
- Type:
boolDefault:false -
Whether to continue obstacle checking past the goal position up to
min_distance_to_obstacle. When enabled, obstacles located beyond the goal along the projected trajectory may prevent motion. This can be useful when the goal pose is close to obstacles or when a safety margin must be enforced beyond the final path pose. For example, in constrained environments, users may prefer to ensure that obstacle checking continues slightly past the goal to avoid approaching obstacles that lie immediately beyond it. Requiresuse_velocity_scaled_lookahead_distto be enabled andmin_distance_to_obstacle > 0.0.
Example
controller_server:
ros__parameters:
controller_frequency: 20.0
min_x_velocity_threshold: 0.001
min_y_velocity_threshold: 0.5
min_theta_velocity_threshold: 0.001
progress_checker_plugins: ["progress_checker"]
goal_checker_plugins: ["goal_checker"]
controller_plugins: ["FollowPath"]
progress_checker:
plugin: "nav2_controller::SimpleProgressChecker"
required_movement_radius: 0.5
movement_time_allowance: 10.0
goal_checker:
plugin: "nav2_controller::SimpleGoalChecker"
xy_goal_tolerance: 0.25
yaw_goal_tolerance: 0.25
stateful: True
FollowPath:
plugin: "nav2_regulated_pure_pursuit_controller::RegulatedPurePursuitController"
max_linear_vel: 0.5
min_linear_vel: -0.5
max_angular_vel: 2.5
min_angular_vel: -2.5
max_linear_accel: 2.5
max_linear_decel: -2.5
max_angular_accel: 3.2
max_angular_decel: -3.2
lookahead_dist: 0.6
min_lookahead_dist: 0.3
max_lookahead_dist: 0.9
lookahead_time: 1.5
rotate_to_heading_angular_vel: 1.8
use_velocity_scaled_lookahead_dist: false
min_approach_linear_velocity: 0.05
approach_velocity_scaling_dist: 0.6
use_collision_detection: true
max_allowed_time_to_collision_up_to_carrot: 1.0
use_regulated_linear_velocity_scaling: true
use_fixed_curvature_lookahead: false
curvature_lookahead_dist: 0.25
use_cost_regulated_linear_velocity_scaling: false
cost_scaling_dist: 0.3
cost_scaling_gain: 1.0
regulated_linear_scaling_min_radius: 0.9
regulated_linear_scaling_min_speed: 0.25
use_rotate_to_heading: true
allow_reversing: false
rotate_to_heading_min_angle: 0.785
min_distance_to_obstacle: 0.0
use_dynamic_window: false
allow_obstacle_checking_beyond_goal: false