Nav2 Navigation Stack - lyrical  lyrical
ROS 2 Navigation Stack
Public Types | Public Member Functions | List of all members
nav2_core::PathHandler Class Referenceabstract

Function-object for handling the path from Planner Server. More...

#include <nav2_core/include/nav2_core/path_handler.hpp>

Inheritance diagram for nav2_core::PathHandler:
Inheritance graph
[legend]

Public Types

typedef std::shared_ptr< nav2_core::PathHandlerPtr
 

Public Member Functions

virtual void initialize (const nav2::LifecycleNode::WeakPtr &parent, const rclcpp::Logger &logger, const std::string &plugin_name, const std::shared_ptr< nav2_costmap_2d::Costmap2DROS > costmap_ros, nav2::TransformBuffer::SharedPtr tf)=0
 Initialize parameters. More...
 
virtual void setPlan (const nav_msgs::msg::Path &path)=0
 Set new reference plan. More...
 
virtual PathSegment findPlanSegment (const geometry_msgs::msg::PoseStamped &pose)=0
 Determines the portion of the global plan to be used for local control. This function locates the start and end iterators of the global plan segment that is relevant for controller computation based on the robot's current pose and local costmap. More...
 
virtual nav_msgs::msg::Path transformLocalPlan (const PathIterator &closest_point, const PathIterator &pruned_plan_end)=0
 Transforms a predefined segment of the global plan into the costmap global frame. More...
 
virtual geometry_msgs::msg::PoseStamped getTransformedGoal (const builtin_interfaces::msg::Time &stamp)=0
 Get the global goal pose transformed to the costmap global frame. More...
 

Detailed Description

Function-object for handling the path from Planner Server.

This class defines the plugin interface used by the Controller Server to manage the path received from the Planner Server. Its primary responsibilities are pruning path segments the robot has already traversed and transforming the remaining, relevant portion of the path into the costmap's global or base frame.

Definition at line 43 of file path_handler.hpp.

Member Function Documentation

◆ findPlanSegment()

virtual PathSegment nav2_core::PathHandler::findPlanSegment ( const geometry_msgs::msg::PoseStamped &  pose)
pure virtual

Determines the portion of the global plan to be used for local control. This function locates the start and end iterators of the global plan segment that is relevant for controller computation based on the robot's current pose and local costmap.

Parameters
poseRobot pose in odom frame
Returns
PathSegment A pair of iterators defining the start and end of the selected plan segment.

Implemented in nav2_controller::FeasiblePathHandler.

◆ getTransformedGoal()

virtual geometry_msgs::msg::PoseStamped nav2_core::PathHandler::getTransformedGoal ( const builtin_interfaces::msg::Time &  stamp)
pure virtual

Get the global goal pose transformed to the costmap global frame.

Parameters
stampTime to get the goal pose at
Returns
Transformed goal pose

Implemented in nav2_controller::FeasiblePathHandler.

◆ initialize()

virtual void nav2_core::PathHandler::initialize ( const nav2::LifecycleNode::WeakPtr &  parent,
const rclcpp::Logger &  logger,
const std::string &  plugin_name,
const std::shared_ptr< nav2_costmap_2d::Costmap2DROS costmap_ros,
nav2::TransformBuffer::SharedPtr  tf 
)
pure virtual

Initialize parameters.

Parameters
parentLifecycle node pointer
loggerNode logging interface
plugin_nameName of the plugin
costmap_rosCostmap2DROS object
tfShared ptr of TF2 buffer

Implemented in nav2_controller::FeasiblePathHandler.

◆ setPlan()

virtual void nav2_core::PathHandler::setPlan ( const nav_msgs::msg::Path &  path)
pure virtual

Set new reference plan.

Parameters
PathPath to use

Implemented in nav2_controller::FeasiblePathHandler.

◆ transformLocalPlan()

virtual nav_msgs::msg::Path nav2_core::PathHandler::transformLocalPlan ( const PathIterator &  closest_point,
const PathIterator &  pruned_plan_end 
)
pure virtual

Transforms a predefined segment of the global plan into the costmap global frame.

Parameters
closest_pointIterator to the starting pose of the path segment.
pruned_plan_endIterator to the ending pose of the path segment.
Returns
nav_msgs::msg::Path The transformed local plan segment in the costmap global frame.

Implemented in nav2_controller::FeasiblePathHandler.


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