Nav2 Navigation Stack - lyrical  lyrical
ROS 2 Navigation Stack
Public Member Functions | List of all members
nav2_system_tests::UnknownErrorController Class Reference
Inheritance diagram for nav2_system_tests::UnknownErrorController:
Inheritance graph
[legend]
Collaboration diagram for nav2_system_tests::UnknownErrorController:
Collaboration graph
[legend]

Public Member Functions

void configure (const nav2::LifecycleNode::WeakPtr &, std::string, nav2::TransformBuffer::SharedPtr, std::shared_ptr< nav2_costmap_2d::Costmap2DROS >) override
 
void cleanup ()
 Method to cleanup resources.
 
void activate ()
 Method to active planner and any threads involved in execution.
 
void deactivate ()
 Method to deactivate planner and any threads involved in execution.
 
void newPathReceived (const nav_msgs::msg::Path &)
 local setPlan - Notifies the Controller that a new plan is received from the Planner Server More...
 
virtual geometry_msgs::msg::TwistStamped computeVelocityCommands (const geometry_msgs::msg::PoseStamped &, const geometry_msgs::msg::Twist &, nav2_core::GoalChecker *, const nav_msgs::msg::Path &, const geometry_msgs::msg::PoseStamped &)
 Controller computeVelocityCommands - calculates the best command given the current pose and velocity. More...
 
void setSpeedLimit (const double &, const bool &)
 Limits the maximum linear speed of the robot. More...
 
- Public Member Functions inherited from nav2_core::Controller
virtual ~Controller ()
 Virtual destructor.
 
virtual bool cancel ()
 Cancel the current control action. More...
 
virtual void reset ()
 Reset the state of the controller if necessary after task is exited.
 

Additional Inherited Members

- Public Types inherited from nav2_core::Controller
using Ptr = std::shared_ptr< nav2_core::Controller >
 

Detailed Description

Definition at line 28 of file controller_error_plugins.hpp.

Member Function Documentation

◆ computeVelocityCommands()

virtual geometry_msgs::msg::TwistStamped nav2_system_tests::UnknownErrorController::computeVelocityCommands ( const geometry_msgs::msg::PoseStamped &  pose,
const geometry_msgs::msg::Twist &  velocity,
nav2_core::GoalChecker goal_checker,
const nav_msgs::msg::Path &  transformed_global_plan,
const geometry_msgs::msg::PoseStamped &  global_goal 
)
inlinevirtual

Controller computeVelocityCommands - calculates the best command given the current pose and velocity.

It is presumed that the global plan is already set.

This is mostly a wrapper for the protected computeVelocityCommands function which has additional debugging info.

Parameters
poseCurrent robot pose
velocityCurrent robot velocity
goal_checkerPointer to the current goal checker the task is utilizing
transformed_global_planThe global plan after being processed by the path handler
global_goalThe last pose of the global plan
Returns
The best command for the robot to drive

Implements nav2_core::Controller.

Definition at line 47 of file controller_error_plugins.hpp.

◆ configure()

void nav2_system_tests::UnknownErrorController::configure ( const nav2::LifecycleNode::WeakPtr &  ,
std::string  name,
nav2::TransformBuffer::SharedPtr  ,
std::shared_ptr< nav2_costmap_2d::Costmap2DROS  
)
inlineoverridevirtual
Parameters
parentpointer to user's node
costmap_rosA pointer to the costmap

Implements nav2_core::Controller.

Definition at line 34 of file controller_error_plugins.hpp.

◆ newPathReceived()

void nav2_system_tests::UnknownErrorController::newPathReceived ( const nav_msgs::msg::Path &  raw_global_path)
inlinevirtual

local setPlan - Notifies the Controller that a new plan is received from the Planner Server

Parameters
pathThe global plan
Note
This callback should only perform minimal work, such as extracting global information that may be of interest (e.g. reset internal states when new path received). The controller will be provided with the transformed and pruned plan in the local frame during computeVelocityCommands().

Implements nav2_core::Controller.

Definition at line 45 of file controller_error_plugins.hpp.

◆ setSpeedLimit()

void nav2_system_tests::UnknownErrorController::setSpeedLimit ( const double &  speed_limit,
const bool &  percentage 
)
inlinevirtual

Limits the maximum linear speed of the robot.

Parameters
speed_limitexpressed in absolute value (in m/s) or in percentage from maximum robot speed.
percentageSetting speed limit in percentage if true or in absolute values in false case.

Implements nav2_core::Controller.

Definition at line 57 of file controller_error_plugins.hpp.


The documentation for this class was generated from the following file: