From 9434f03b1bcb0725ec50f494d7f979f494f514d3 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Tue, 21 Jan 2025 09:43:12 +0100 Subject: [PATCH] ros2 bridge: rep105 only for map->base_link tfs --- mola_bridge_ros2/src/BridgeROS2.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mola_bridge_ros2/src/BridgeROS2.cpp b/mola_bridge_ros2/src/BridgeROS2.cpp index aac3b32..9e4240e 100644 --- a/mola_bridge_ros2/src/BridgeROS2.cpp +++ b/mola_bridge_ros2/src/BridgeROS2.cpp @@ -1313,7 +1313,11 @@ void BridgeROS2::timerPubLocalization() geometry_msgs::msg::TransformStamped tfStmp; tfStmp.header.stamp = myNow(l.timestamp); - if (params_.publish_localization_following_rep105) + + // Follow REP105 only if we are publishing "map" -> "base_link" poses. + if (params_.publish_localization_following_rep105 && + l.child_frame == params_.base_link_frame && + l.reference_frame == params_.reference_frame) { // Recompute: mrpt::poses::CPose3D T_base_to_odom;