Nav2 Navigation Stack - lyrical  lyrical
ROS 2 Navigation Stack
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
nav2_controller::StoppedGoalChecker Class Reference

Goal Checker plugin that checks the position difference and velocity. More...

#include <nav2_controller/include/nav2_controller/plugins/stopped_goal_checker.hpp>

Inheritance diagram for nav2_controller::StoppedGoalChecker:
Inheritance graph
[legend]
Collaboration diagram for nav2_controller::StoppedGoalChecker:
Collaboration graph
[legend]

Public Member Functions

 StoppedGoalChecker ()
 Construct a new Stopped Goal Checker object.
 
 ~StoppedGoalChecker ()
 Destroy the Stopped Goal Checker object.
 
void initialize (const nav2::LifecycleNode::WeakPtr &parent, const std::string &plugin_name, const std::shared_ptr< nav2_costmap_2d::Costmap2DROS > costmap_ros) override
 Initialize the goal checker. More...
 
bool isGoalReached (const geometry_msgs::msg::Pose &query_pose, const geometry_msgs::msg::Pose &goal_pose, const geometry_msgs::msg::Twist &velocity, const nav_msgs::msg::Path &transformed_global_plan) override
 Check if the goal is reached. More...
 
bool getTolerances (geometry_msgs::msg::Pose &pose_tolerance, geometry_msgs::msg::Twist &vel_tolerance, double &path_length_tolerance) override
 Get the position and velocity tolerances. More...
 
bool isGoalXYReached (const geometry_msgs::msg::Pose &query_pose, const geometry_msgs::msg::Pose &goal_pose, const geometry_msgs::msg::Twist &velocity, const nav_msgs::msg::Path &transformed_global_plan) override
 Check if XY goal position has been reached (without considering yaw) More...
 
- Public Member Functions inherited from nav2_controller::SimpleGoalChecker
 SimpleGoalChecker ()
 Construct a new Simple Goal Checker object.
 
 ~SimpleGoalChecker ()
 Destroy the Simple Goal Checker object.
 
void reset () override
 Reset the goal checker state.
 

Protected Member Functions

rcl_interfaces::msg::SetParametersResult validateParameterUpdatesCallback (const std::vector< rclcpp::Parameter > &parameters)
 Validate incoming parameter updates before applying them. This callback is triggered when one or more parameters are about to be updated. It checks the validity of parameter values and rejects updates that would lead to invalid or inconsistent configurations. More...
 
void updateParametersCallback (const std::vector< rclcpp::Parameter > &parameters)
 Apply parameter updates after validation This callback is executed when parameters have been successfully updated. It updates the internal configuration of the node with the new parameter values. More...
 
- Protected Member Functions inherited from nav2_controller::SimpleGoalChecker
rcl_interfaces::msg::SetParametersResult validateParameterUpdatesCallback (const std::vector< rclcpp::Parameter > &parameters)
 Validate incoming parameter updates before applying them. This callback is triggered when one or more parameters are about to be updated. It checks the validity of parameter values and rejects updates that would lead to invalid or inconsistent configurations. More...
 
void updateParametersCallback (const std::vector< rclcpp::Parameter > &parameters)
 Apply parameter updates after validation This callback is executed when parameters have been successfully updated. It updates the internal configuration of the node with the new parameter values. More...
 

Protected Attributes

nav2::LifecycleNode::WeakPtr node_
 
rclcpp::Logger logger_ {rclcpp::get_logger("stopped_goal_checker")}
 
double rot_stopped_velocity_
 
double trans_stopped_velocity_
 
std::mutex mutex_
 
rclcpp::node_interfaces::PostSetParametersCallbackHandle::SharedPtr post_set_params_handler_
 
rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr on_set_params_handler_
 
std::string plugin_name_
 
- Protected Attributes inherited from nav2_controller::SimpleGoalChecker
nav2::LifecycleNode::WeakPtr node_
 
rclcpp::Logger logger_ {rclcpp::get_logger("simple_goal_checker")}
 
double xy_goal_tolerance_
 
double xy_goal_tolerance_buffer_
 
double yaw_goal_tolerance_
 
double path_length_tolerance_
 
bool stateful_
 
bool check_xy_
 
bool symmetric_yaw_tolerance_
 
double xy_goal_tolerance_sq_
 
double xy_goal_tolerance_reset_sq_
 
std::mutex mutex_
 
rclcpp::node_interfaces::PostSetParametersCallbackHandle::SharedPtr post_set_params_handler_
 
rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr on_set_params_handler_
 
std::string plugin_name_
 

Additional Inherited Members

- Public Types inherited from nav2_core::GoalChecker
typedef std::shared_ptr< nav2_core::GoalCheckerPtr
 

Detailed Description

Goal Checker plugin that checks the position difference and velocity.

Definition at line 53 of file stopped_goal_checker.hpp.

Member Function Documentation

◆ getTolerances()

bool nav2_controller::StoppedGoalChecker::getTolerances ( geometry_msgs::msg::Pose &  pose_tolerance,
geometry_msgs::msg::Twist &  vel_tolerance,
double &  path_length_tolerance 
)
overridevirtual

Get the position and velocity tolerances.

Parameters
pose_toleranceOutput parameter for pose tolerance
vel_toleranceOutput parameter for velocity tolerance
path_length_toleranceOutput parameter for path length tolerance
Returns
true if tolerances are available, false otherwise

Reimplemented from nav2_controller::SimpleGoalChecker.

Definition at line 122 of file stopped_goal_checker.cpp.

References nav2_controller::SimpleGoalChecker::getTolerances().

Here is the call graph for this function:

◆ initialize()

void nav2_controller::StoppedGoalChecker::initialize ( const nav2::LifecycleNode::WeakPtr &  parent,
const std::string &  plugin_name,
const std::shared_ptr< nav2_costmap_2d::Costmap2DROS costmap_ros 
)
overridevirtual

Initialize the goal checker.

Parameters
parentWeak pointer to the lifecycle node
plugin_nameName of the plugin
costmap_rosShared pointer to the costmap

Reimplemented from nav2_controller::SimpleGoalChecker.

Definition at line 71 of file stopped_goal_checker.cpp.

References nav2_controller::SimpleGoalChecker::initialize(), updateParametersCallback(), and validateParameterUpdatesCallback().

Here is the call graph for this function:

◆ isGoalReached()

bool nav2_controller::StoppedGoalChecker::isGoalReached ( const geometry_msgs::msg::Pose &  query_pose,
const geometry_msgs::msg::Pose &  goal_pose,
const geometry_msgs::msg::Twist &  velocity,
const nav_msgs::msg::Path &  transformed_global_plan 
)
overridevirtual

Check if the goal is reached.

Parameters
query_poseCurrent pose of the robot
goal_poseTarget goal pose
velocityCurrent velocity of the robot
transformed_global_planThe transformed global plan
Returns
true if goal is reached, false otherwise

Reimplemented from nav2_controller::SimpleGoalChecker.

Definition at line 99 of file stopped_goal_checker.cpp.

References nav2_controller::SimpleGoalChecker::isGoalReached().

Here is the call graph for this function:

◆ isGoalXYReached()

bool nav2_controller::StoppedGoalChecker::isGoalXYReached ( const geometry_msgs::msg::Pose &  query_pose,
const geometry_msgs::msg::Pose &  goal_pose,
const geometry_msgs::msg::Twist &  velocity,
const nav_msgs::msg::Path &  transformed_global_plan 
)
overridevirtual

Check if XY goal position has been reached (without considering yaw)

Parameters
query_poseThe pose to check
goal_poseThe pose to check against
velocityThe robot's current velocity
transformed_global_planThe global plan after being processed by the path handler
Returns
True if XY goal is reached (position within tolerance, yaw ignored)

Reimplemented from nav2_controller::SimpleGoalChecker.

Definition at line 114 of file stopped_goal_checker.cpp.

References nav2_controller::SimpleGoalChecker::isGoalXYReached().

Here is the call graph for this function:

◆ updateParametersCallback()

void nav2_controller::StoppedGoalChecker::updateParametersCallback ( const std::vector< rclcpp::Parameter > &  parameters)
protected

Apply parameter updates after validation This callback is executed when parameters have been successfully updated. It updates the internal configuration of the node with the new parameter values.

Parameters
parametersList of parameters that have been updated.

Definition at line 173 of file stopped_goal_checker.cpp.

Referenced by initialize().

Here is the caller graph for this function:

◆ validateParameterUpdatesCallback()

rcl_interfaces::msg::SetParametersResult nav2_controller::StoppedGoalChecker::validateParameterUpdatesCallback ( const std::vector< rclcpp::Parameter > &  parameters)
protected

Validate incoming parameter updates before applying them. This callback is triggered when one or more parameters are about to be updated. It checks the validity of parameter values and rejects updates that would lead to invalid or inconsistent configurations.

Parameters
parametersList of parameters that are being updated.
Returns
rcl_interfaces::msg::SetParametersResult Result indicating whether the update is accepted.

Definition at line 148 of file stopped_goal_checker.cpp.

Referenced by initialize().

Here is the caller graph for this function:

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