Nav2 Navigation Stack - kilted  kilted
ROS 2 Navigation Stack
progress_checker.hpp
1 // Copyright (c) 2019 Intel Corporation
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 #ifndef NAV2_CORE__PROGRESS_CHECKER_HPP_
16 #define NAV2_CORE__PROGRESS_CHECKER_HPP_
17 
18 #include <memory>
19 #include <string>
20 
21 #include "rclcpp/rclcpp.hpp"
22 #include "rclcpp_lifecycle/lifecycle_node.hpp"
23 #include "geometry_msgs/msg/pose_stamped.hpp"
24 #include "geometry_msgs/msg/pose2_d.hpp"
25 
26 namespace nav2_core
27 {
35 {
36 public:
37  typedef std::shared_ptr<nav2_core::ProgressChecker> Ptr;
38 
39  virtual ~ProgressChecker() {}
40 
45  virtual void initialize(
46  const rclcpp_lifecycle::LifecycleNode::WeakPtr & parent,
47  const std::string & plugin_name) = 0;
54  virtual bool check(geometry_msgs::msg::PoseStamped & current_pose) = 0;
58  virtual void reset() = 0;
59 };
60 } // namespace nav2_core
61 
62 #endif // NAV2_CORE__PROGRESS_CHECKER_HPP_
This class defines the plugin interface used to check the position of the robot to make sure that it ...
virtual bool check(geometry_msgs::msg::PoseStamped &current_pose)=0
Checks if the robot has moved compare to previous pose.
virtual void initialize(const rclcpp_lifecycle::LifecycleNode::WeakPtr &parent, const std::string &plugin_name)=0
Initialize parameters for ProgressChecker.
virtual void reset()=0
Reset class state upon calling.