Nav2 Navigation Stack - kilted  kilted
ROS 2 Navigation Stack
concatenate_paths_action.hpp
1 // Copyright (c) 2025 Open Navigation LLC
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_BEHAVIOR_TREE__PLUGINS__ACTION__CONCATENATE_PATHS_ACTION_HPP_
16 #define NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__CONCATENATE_PATHS_ACTION_HPP_
17 
18 #include <memory>
19 #include <vector>
20 #include <string>
21 
22 #include "nav_msgs/msg/path.hpp"
23 
24 #include "behaviortree_cpp/action_node.h"
25 
26 namespace nav2_behavior_tree
27 {
28 
32 class ConcatenatePaths : public BT::ActionNodeBase
33 {
34 public:
41  const std::string & xml_tag_name,
42  const BT::NodeConfiguration & conf);
43 
48  static BT::PortsList providedPorts()
49  {
50  return {
51  BT::InputPort<nav_msgs::msg::Path>("input_path1", "Input Path 1 to cancatenate"),
52  BT::InputPort<nav_msgs::msg::Path>("input_path2", "Input Path 2 to cancatenate"),
53  BT::OutputPort<nav_msgs::msg::Path>("output_path", "Paths concatenated"),
54  };
55  }
56 
57 private:
61  void halt() override {}
62 
67  BT::NodeStatus tick() override;
68 };
69 
70 } // namespace nav2_behavior_tree
71 
72 #endif // NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__CONCATENATE_PATHS_ACTION_HPP_
A BT::ActionNodeBase to shorten path by some distance.
static BT::PortsList providedPorts()
Creates list of BT ports.
ConcatenatePaths(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
A nav2_behavior_tree::ConcatenatePaths constructor.