Class GracefulController
Defined in File graceful_controller.hpp
Inheritance Relationships
Base Type
public nav2_core::Controller
Class Documentation
Graceful controller plugin.
Public Functions
Constructor for nav2_graceful_controller::GracefulController.
Destructor for nav2_graceful_controller::GracefulController.
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.
- 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 motion target point.
- Parameters:
motion_target_dist – Optimal motion target distance
path – Current global path
- Returns:
Motion target point
Simulate trajectory calculating in every step the new velocity command based on a new curvature value and checking for collisions.
- Parameters:
robot_pose – Robot pose
motion_target – Motion target point
costmap_transform – Transform between global and local costmap
trajectory – Simulated trajectory
backward – Flag to indicate if the robot is moving backward
- Returns:
true if the trajectory is collision free, false otherwise
Rotate the robot to face the motion target with maximum angular velocity.
- Parameters:
angle_to_target – Angle to the motion target
- Returns:
geometry_msgs::msg::Twist Velocity command
Checks if the robot is in collision.
- Parameters:
x – The x coordinate of the robot in global frame
y – The y coordinate of the robot in global frame
theta – The orientation of the robot in global frame
- Returns:
Whether in collision
Protected Attributes