16 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__DECORATOR__DISTANCE_CONTROLLER_HPP_
17 #define NAV2_BEHAVIOR_TREE__PLUGINS__DECORATOR__DISTANCE_CONTROLLER_HPP_
22 #include "geometry_msgs/msg/pose_stamped.hpp"
23 #include "nav2_ros_common/tf2_factories.hpp"
24 #include "rclcpp/clock.hpp"
26 #include "behaviortree_cpp/decorator_node.h"
27 #include "nav2_behavior_tree/bt_utils.hpp"
29 namespace nav2_behavior_tree
53 const std::string & name,
54 const BT::NodeConfiguration & conf);
63 BT::InputPort<double>(
"distance", 1.0,
"Distance"),
64 BT::InputPort<std::string>(
"global_frame",
"Global frame"),
65 BT::InputPort<std::string>(
"robot_base_frame",
"Robot base frame")
74 BT::NodeStatus tick()
override;
76 nav2::LifecycleNode::SharedPtr node_;
78 nav2::TransformBuffer::SharedPtr tf_;
79 double transform_tolerance_;
81 geometry_msgs::msg::PoseStamped start_pose_;
83 std::string global_frame_, robot_base_frame_;
A BT::DecoratorNode that ticks its child every time the robot travels a specified distance.
static BT::PortsList providedPorts()
Creates list of BT ports.
DistanceController(const std::string &name, const BT::NodeConfiguration &conf)
A constructor for nav2_behavior_tree::DistanceController.