15 #ifndef NAV2_ROUTE__INTERFACES__ROUTE_OPERATION_HPP_
16 #define NAV2_ROUTE__INTERFACES__ROUTE_OPERATION_HPP_
22 #include "rclcpp/rclcpp.hpp"
23 #include "rclcpp_lifecycle/lifecycle_node.hpp"
24 #include "pluginlib/class_loader.hpp"
25 #include "nav2_route/types.hpp"
26 #include "geometry_msgs/msg/pose_stamped.hpp"
27 #include "nav2_costmap_2d/costmap_subscriber.hpp"
39 std::vector<unsigned int> blocked_ids;
46 enum class RouteOperationType
69 using Ptr = std::shared_ptr<nav2_route::RouteOperation>;
88 const rclcpp_lifecycle::LifecycleNode::SharedPtr node,
89 std::shared_ptr<nav2_costmap_2d::CostmapSubscriber> costmap_subscriber,
90 const std::string & name) = 0;
108 virtual RouteOperationType
processType() {
return RouteOperationType::ON_GRAPH;}
132 const geometry_msgs::msg::PoseStamped & curr_pose,
133 const Metadata * mdata =
nullptr) = 0;
A plugin interface to perform an operation while tracking the route such as triggered from the graph ...
virtual ~RouteOperation()=default
Destructor.
virtual void configure(const rclcpp_lifecycle::LifecycleNode::SharedPtr node, std::shared_ptr< nav2_costmap_2d::CostmapSubscriber > costmap_subscriber, const std::string &name)=0
Configure the operation plugin (get params, create interfaces, etc)
virtual std::string getName()=0
An API to get the name of a particular operation for triggering, query or logging.
virtual RouteOperationType processType()
Indication of which type of route operation this plugin is. Whether it is be called by the graph's no...
RouteOperation()=default
Constructor.
virtual OperationResult perform(NodePtr node_achieved, EdgePtr edge_entered, EdgePtr edge_exited, const Route &route, const geometry_msgs::msg::PoseStamped &curr_pose, const Metadata *mdata=nullptr)=0
The main route operation API to perform an operation when triggered. The return value indicates if th...
An object representing edges between nodes.
An object to store the nodes in the graph file.
a struct to hold return from an operation
An ordered set of nodes and edges corresponding to the planned route.