16 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__TRUNCATE_PATH_ACTION_HPP_
17 #define NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__TRUNCATE_PATH_ACTION_HPP_
22 #include "behaviortree_cpp/action_node.h"
23 #include "behaviortree_cpp/json_export.h"
24 #include "nav_msgs/msg/path.hpp"
25 #include "nav2_behavior_tree/bt_utils.hpp"
26 #include "nav2_behavior_tree/json_utils.hpp"
29 namespace nav2_behavior_tree
44 const std::string & xml_tag_name,
45 const BT::NodeConfiguration & conf);
54 BT::RegisterJsonDefinition<nav_msgs::msg::Path>();
57 BT::InputPort<nav_msgs::msg::Path>(
"input_path",
"Original Path"),
58 BT::OutputPort<nav_msgs::msg::Path>(
"output_path",
"Path truncated to a certain distance"),
59 BT::InputPort<double>(
"distance", 1.0,
"distance"),
67 void halt()
override {}
73 BT::NodeStatus tick()
override;
A BT::ActionNodeBase to shorten path by some distance.
TruncatePath(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
A nav2_behavior_tree::TruncatePath constructor.
static BT::PortsList providedPorts()
Creates list of BT ports.