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 "tf2_ros/buffer.h"
25 #include "behaviortree_cpp/decorator_node.h"
26 #include "nav2_behavior_tree/bt_utils.hpp"
28 namespace nav2_behavior_tree
46 const std::string & name,
47 const BT::NodeConfiguration & conf);
56 BT::InputPort<double>(
"distance", 1.0,
"Distance"),
57 BT::InputPort<std::string>(
"global_frame",
"Global frame"),
58 BT::InputPort<std::string>(
"robot_base_frame",
"Robot base frame")
67 BT::NodeStatus tick()
override;
69 rclcpp::Node::SharedPtr node_;
71 std::shared_ptr<tf2_ros::Buffer> tf_;
72 double transform_tolerance_;
74 geometry_msgs::msg::PoseStamped start_pose_;
76 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.