Nav2 Navigation Stack - jazzy  jazzy
ROS 2 Navigation Stack
back_up.hpp
1 // Copyright (c) 2022 Joshua Wallace
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_BEHAVIORS__PLUGINS__BACK_UP_HPP_
16 #define NAV2_BEHAVIORS__PLUGINS__BACK_UP_HPP_
17 
18 #include <memory>
19 
20 #include "drive_on_heading.hpp"
21 #include "nav2_msgs/action/back_up.hpp"
22 
23 using BackUpAction = nav2_msgs::action::BackUp;
24 
25 
26 namespace nav2_behaviors
27 {
28 class BackUp : public DriveOnHeading<nav2_msgs::action::BackUp>
29 {
30 public:
31  using BackUpActionGoal = BackUpAction::Goal;
32  using BackUpActionResult = BackUpAction::Result;
33 
34  ResultStatus onRun(const std::shared_ptr<const BackUpActionGoal> command) override;
35 };
36 
37 } // namespace nav2_behaviors
38 
39 #endif // NAV2_BEHAVIORS__PLUGINS__BACK_UP_HPP_
An action server Behavior for spinning in.