15 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__GET_CURRENT_POSE_ACTION_HPP_
16 #define NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__GET_CURRENT_POSE_ACTION_HPP_
21 #include "geometry_msgs/msg/pose_stamped.hpp"
22 #include "tf2_ros/buffer.h"
23 #include "rclcpp/rclcpp.hpp"
24 #include "behaviortree_cpp/action_node.h"
25 #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
26 #include "nav2_behavior_tree/bt_utils.hpp"
27 #include "nav2_util/geometry_utils.hpp"
28 #include "nav2_util/robot_utils.hpp"
30 namespace nav2_behavior_tree
50 const std::string & xml_tag_name,
51 const BT::NodeConfiguration & conf);
60 BT::InputPort<std::string>(
"global_frame",
"Global reference frame"),
61 BT::InputPort<std::string>(
"robot_base_frame",
"Robot base frame"),
62 BT::OutputPort<geometry_msgs::msg::PoseStamped>(
"current_pose",
"Current pose output"),
70 void halt()
override {}
76 BT::NodeStatus tick()
override;
78 std::string global_frame_, robot_base_frame_;
79 std::shared_ptr<tf2_ros::Buffer> tf_;
80 double transform_tolerance_;
Action Node to get the current robot pose from TF.
static BT::PortsList providedPorts()
Creates list of BT ports.
GetCurrentPoseAction(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
Constructor.