Fixing TransformBroadcaster *this on rolling (#1443)

This commit is contained in:
matlabbe
2026-08-07 14:03:56 -07:00
committed by GitHub
parent 99436c6e87
commit 0b60e52914
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ OdometryROS::OdometryROS(const std::string & name, const rclcpp::NodeOptions & o
tfBuffer_ = std::make_shared<tf2_ros::Buffer>(get_clock()); tfBuffer_ = std::make_shared<tf2_ros::Buffer>(get_clock());
tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_); tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_);
tfBroadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(this); tfBroadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(*this);
std::string initialPoseStr; std::string initialPoseStr;
frameId_ = this->declare_parameter("frame_id", frameId_); frameId_ = this->declare_parameter("frame_id", frameId_);
+1 -1
View File
@@ -160,7 +160,7 @@ CoreWrapper::CoreWrapper(const rclcpp::NodeOptions & options) :
tfBuffer_ = std::make_shared<tf2_ros::Buffer>(this->get_clock()); tfBuffer_ = std::make_shared<tf2_ros::Buffer>(this->get_clock());
tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_); tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_);
tfBroadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(this); tfBroadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(*this);
bool publishTf = true; bool publishTf = true;
std::string initialPoseStr; std::string initialPoseStr;
+1 -1
View File
@@ -159,7 +159,7 @@ DbPlayer::DbPlayer(const rclcpp::NodeOptions & options) :
resumeSrv_ = this->create_service<std_srvs::srv::Empty>(servicePrefix + "resume", std::bind(&DbPlayer::resumeCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); resumeSrv_ = this->create_service<std_srvs::srv::Empty>(servicePrefix + "resume", std::bind(&DbPlayer::resumeCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
if(publishTf) { if(publishTf) {
tfBroadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(this); tfBroadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(*this);
} }
if(publishClock) if(publishClock)
+1 -1
View File
@@ -41,7 +41,7 @@ ImuToTF::ImuToTF(const rclcpp::NodeOptions & options) :
{ {
tfBuffer_ = std::make_shared<tf2_ros::Buffer>(this->get_clock()); tfBuffer_ = std::make_shared<tf2_ros::Buffer>(this->get_clock());
tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_); tfListener_ = std::make_shared<tf2_ros::TransformListener>(*tfBuffer_);
tfBroadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(this); tfBroadcaster_ = std::make_shared<tf2_ros::TransformBroadcaster>(*this);
int qos = RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT; int qos = RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT;
fixedFrameId_ = this->declare_parameter("fixed_frame_id", fixedFrameId_); fixedFrameId_ = this->declare_parameter("fixed_frame_id", fixedFrameId_);