Class Controller

Class Documentation

class Controller

Default control law for approaching a dock target.

Public Functions

explicit Controller(const rclcpp_lifecycle::LifecycleNode::SharedPtr &node)

Create a controller instance. Configure ROS 2 parameters.

bool computeVelocityCommand(const geometry_msgs::msg::Pose &pose, geometry_msgs::msg::Twist &cmd, bool backward = false)

Compute a velocity command using control law.

Parameters:
  • pose – Target pose, in robot centric coordinates.

  • cmd – Command velocity.

  • backward – If true, robot will drive backwards to goal.

Returns:

True if command is valid, false otherwise.

Protected Attributes

std::unique_ptr<nav2_graceful_controller::SmoothControlLaw> control_law_