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
Transforms global plan into same frame as pose and clips poses ineligible for lookaheadPoint Points ineligible to be selected as a lookahead point if they are any of the following:
Outside the local_costmap (collision avoidance cannot be assured)
- Parameters:
pose – pose to transform
- Returns:
Path in new frame
Transform a pose to another frame.
- Parameters:
frame – Frame ID to transform to
in_pose – Pose input to transform
out_pose – transformed output
- Returns:
bool if successful
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
Whether collision is imminent.
- Parameters:
robot_pose – Pose of robot
carrot_pose – Pose of carrot
linear_vel – linear velocity to forward project
angular_vel – angular velocity to forward project
carrot_dist – Distance to the carrot for PP
- Returns:
Whether collision is imminent
checks for collision at projected pose
- Parameters:
x – Pose of pose x
y – Pose of pose y
theta – orientation of Yaw
- Returns:
Whether in collision
Cost at a point.
- Parameters:
x – Pose of pose x
y – Pose of pose y
- Returns:
Cost of pose in costmap
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
Get the greatest extent of the costmap in meters from the center.
- Returns:
max of distance from center in meters to edge of costmap
Callback executed when a parameter change is detected.
- Parameters:
event – ParameterEvent message
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