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_v3/decorator_node.h"
27 namespace nav2_behavior_tree
43 const std::string & name,
44 const BT::NodeConfiguration & conf);
53 BT::InputPort<double>(
"distance", 1.0,
"Distance"),
54 BT::InputPort<std::string>(
"global_frame", std::string(
"map"),
"Global frame"),
55 BT::InputPort<std::string>(
"robot_base_frame", std::string(
"base_link"),
"Robot base frame")
64 BT::NodeStatus tick()
override;
66 rclcpp::Node::SharedPtr node_;
68 std::shared_ptr<tf2_ros::Buffer> tf_;
69 double transform_tolerance_;
71 geometry_msgs::msg::PoseStamped start_pose_;
74 std::string global_frame_;
75 std::string 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.