24#include <geometry_msgs/msg/pose_stamped.h>
25#include <tf2/transform_datatypes.h>
27#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
28#include <tf2_ros/buffer.h>
29#include <tf2_ros/transform_listener.h>
30#include <geometry_msgs/msg/quaternion_stamped.hpp>
46 Pose(std::string poseFrameName =
"base_link", std::string referenceFrame =
"odom");
59 std::lock_guard<std::mutex> guard(
m_mutex_);
60 return this->
pose_.pose;
65 std::lock_guard<std::mutex> guard(
m_mutex_);
83 geometry_msgs::msg::PoseStamped
pose_;
86 static std::shared_ptr<tf2_ros::TransformListener>
tfListener_;
static std::mutex listenerMutex_
static std::shared_ptr< tf2_ros::Buffer > tfBuffer_
static std::shared_ptr< tf2_ros::TransformListener > tfListener_
const std::string & getFrameId() const
geometry_msgs::msg::PoseStamped toPoseStampedMsg()
const std::string & getReferenceFrame() const
void onInitialize() override
std::string referenceFrame_
geometry_msgs::msg::Pose toPoseMsg()
void waitTransformUpdate(rclcpp::Rate r=rclcpp::Rate(20))
geometry_msgs::msg::PoseStamped pose_
std::string poseFrameName_