15 #ifndef NAV2_CORE__PATH_HANDLER_HPP_
16 #define NAV2_CORE__PATH_HANDLER_HPP_
23 #include "geometry_msgs/msg/pose.hpp"
24 #include "nav_msgs/msg/path.hpp"
25 #include "nav2_ros_common/lifecycle_node.hpp"
26 #include "nav2_costmap_2d/costmap_2d_ros.hpp"
27 #include "nav2_ros_common/tf2_factories.hpp"
31 using PathIterator = std::vector<geometry_msgs::msg::PoseStamped>::iterator;
32 using PathSegment = std::pair<PathIterator, PathIterator>;
46 typedef std::shared_ptr<nav2_core::PathHandler> Ptr;
59 const nav2::LifecycleNode::WeakPtr & parent,
60 const rclcpp::Logger & logger,
61 const std::string & plugin_name,
62 const std::shared_ptr<nav2_costmap_2d::Costmap2DROS> costmap_ros,
63 nav2::TransformBuffer::SharedPtr tf) = 0;
69 virtual void setPlan(
const nav_msgs::msg::Path & path) = 0;
80 const geometry_msgs::msg::PoseStamped & pose) = 0;
89 const PathIterator & closest_point,
90 const PathIterator & pruned_plan_end) = 0;
98 const builtin_interfaces::msg::Time & stamp) = 0;
Function-object for handling the path from Planner Server.
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 sta...
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.
virtual geometry_msgs::msg::PoseStamped getTransformedGoal(const builtin_interfaces::msg::Time &stamp)=0
Get the global goal pose transformed to the costmap global frame.
virtual void setPlan(const nav_msgs::msg::Path &path)=0
Set new reference plan.
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.