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"
27 #include "nav2_ros_common/lifecycle_node.hpp"
30 namespace nav2_behavior_tree
45 const std::string & xml_tag_name,
46 const BT::NodeConfiguration & conf);
55 BT::RegisterJsonDefinition<nav_msgs::msg::Path>();
58 BT::InputPort<nav_msgs::msg::Path>(
"input_path",
"Original Path"),
59 BT::OutputPort<nav_msgs::msg::Path>(
"output_path",
"Path truncated to a certain distance"),
60 BT::InputPort<double>(
"distance", 1.0,
"distance"),
68 void halt()
override {}
74 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.