Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
waypoint_task_executor.hpp
1 // Copyright (c) 2020 Fetullah Atas
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 
16 #ifndef NAV2_CORE__WAYPOINT_TASK_EXECUTOR_HPP_
17 #define NAV2_CORE__WAYPOINT_TASK_EXECUTOR_HPP_
18 #pragma once
19 
20 #include <string>
21 
22 #include "nav2_ros_common/lifecycle_node.hpp"
23 #include "geometry_msgs/msg/pose_stamped.hpp"
24 
25 namespace nav2_core
26 {
32 {
33 public:
39 
44  virtual ~WaypointTaskExecutor() {}
45 
52  virtual void initialize(
53  const nav2::LifecycleNode::WeakPtr & parent,
54  const std::string & plugin_name) = 0;
55 
64  virtual bool processAtWaypoint(
65  const geometry_msgs::msg::PoseStamped & curr_pose, const int & curr_waypoint_index) = 0;
66 };
67 } // namespace nav2_core
68 #endif // NAV2_CORE__WAYPOINT_TASK_EXECUTOR_HPP_
Base class for creating a plugin in order to perform a specific task at waypoint arrivals.
virtual void initialize(const nav2::LifecycleNode::WeakPtr &parent, const std::string &plugin_name)=0
Override this to setup your pub, sub or any ros services that you will use in the plugin.
WaypointTaskExecutor()
Construct a new Simple Task Execution At Waypoint Base object.
virtual bool processAtWaypoint(const geometry_msgs::msg::PoseStamped &curr_pose, const int &curr_waypoint_index)=0
Override this to define the body of your task that you would like to execute once the robot arrived t...
virtual ~WaypointTaskExecutor()
Destroy the Simple Task Execution At Waypoint Base object.