Nav2 Navigation Stack - jazzy  jazzy
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 <string>
19 #include <memory>
20 #include <limits>
21 
22 #include "nav_msgs/msg/path.hpp"
23 #include "geometry_msgs/msg/pose_stamped.hpp"
24 #include "nav2_util/geometry_utils.hpp"
25 
26 #include "behaviortree_cpp/action_node.h"
27 
28 namespace nav2_behavior_tree
29 {
30 
39 class ConcatenatePaths : public BT::ActionNodeBase
40 {
41 public:
48  const std::string & xml_tag_name,
49  const BT::NodeConfiguration & conf);
50 
55  static BT::PortsList providedPorts()
56  {
57  return {
58  BT::InputPort<nav_msgs::msg::Path>("input_path1", "Input Path 1 to cancatenate"),
59  BT::InputPort<nav_msgs::msg::Path>("input_path2", "Input Path 2 to cancatenate"),
60  BT::OutputPort<nav_msgs::msg::Path>("output_path", "Paths concatenated"),
61  };
62  }
63 
64 private:
68  void halt() override {}
69 
74  BT::NodeStatus tick() override;
75 };
76 
77 } // namespace nav2_behavior_tree
78 
79 #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.