Class RegulatedPurePursuitController
Defined in File regulated_pure_pursuit_controller.hpp
Inheritance Relationships
Base Type
public nav2_core::Controller
Class Documentation
Regulated pure pursuit controller plugin.
Public Functions
Configure controller state machine.
- Parameters:
parent – WeakPtr to node
name – Name of plugin
tf – TF buffer
costmap_ros – Costmap2DROS object of environment
Cleanup controller state machine.
Activate controller state machine.
Deactivate controller state machine.
Compute the best command given the current pose and velocity, with possible debug information.
Same as above computeVelocityCommands, but with debug results. If the results pointer is not null, additional information about the twists evaluated will be in results after the call.
- Parameters:
pose – Current robot pose
velocity – Current robot velocity
goal_checker – Ptr to the goal checker for this task in case useful in computing commands
- Returns:
Best command
nav2_core setPlan - Sets the global plan
- Parameters:
path – The global plan
Limits the maximum linear speed of the robot.
- Parameters:
speed_limit – expressed in absolute value (in m/s) or in percentage from maximum robot speed.
percentage – Setting speed limit in percentage if true or in absolute values in false case.
Protected Functions
Get lookahead distance.
- Parameters:
cmd – the current speed to use to compute lookahead point
- Returns:
lookahead distance
Creates a PointStamped message for visualization.
- Parameters:
carrot_pose – Input carrot point as a PoseStamped
- Returns:
CarrotMsg a carrot point marker, PointStamped
Whether robot should rotate to rough path heading.
- Parameters:
carrot_pose – current lookahead point
angle_to_path – Angle of robot output relatie to carrot marker
- Returns:
Whether should rotate to path heading
Whether robot should rotate to final goal orientation.
- Parameters:
carrot_pose – current lookahead point
- Returns:
Whether should rotate to goal heading
Create a smooth and kinematically smoothed rotation command.
- Parameters:
linear_vel – linear velocity
angular_vel – angular velocity
angle_to_path – Angle of robot output relatie to carrot marker
curr_speed – the current robot speed
apply regulation constraints to the system
- Parameters:
linear_vel – robot command linear velocity input
lookahead_dist – optimal lookahead distance
curvature – curvature of path
speed – Speed of robot
pose_cost – cost at this pose
Get lookahead point.
- Parameters:
lookahead_dist – Optimal lookahead distance
path – Current global path
- Returns:
Lookahead point
checks for the cusp position
- Parameters:
pose – Pose input to determine the cusp position
- Returns:
robot distance from the cusp
Protected Attributes
Protected Static Functions
Find the intersection a circle and a line segment. This assumes the circle is centered at the origin. If no intersection is found, a floating point error will occur.
- Parameters:
p1 – first endpoint of line segment
p2 – second endpoint of line segment
r – radius of circle
- Returns:
point of intersection