Skip to content

Commit

Permalink
Fix ROS2 sensorPose from /tf data
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Mar 5, 2024
1 parent f4f77c0 commit aabcb13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mola_input_ros2/src/InputROS2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ bool InputROS2::waitForTransform(
{
geometry_msgs::msg::TransformStamped ref_to_trgFrame =
tf_buffer_->lookupTransform(
target_frame, source_frame, time,
source_frame, target_frame, time,
tf2::durationFromSec(timeout.seconds()));

tf2::Transform tf;
Expand Down
4 changes: 2 additions & 2 deletions mola_input_rosbag2/src/Rosbag2Dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,13 +587,13 @@ bool Rosbag2Dataset::findOutSensorPose(
{
geometry_msgs::msg::TransformStamped ref_to_trgFrame =
tfBuffer_->lookupTransform(
target_frame, source_frame, {} /*latest value*/);
source_frame, target_frame, {} /*latest value*/);

tf2::Transform tf;
tf2::fromMsg(ref_to_trgFrame.transform, tf);
des = mrpt::ros2bridge::fromROS(tf);

MRPT_LOG_INFO_FMT(
MRPT_LOG_DEBUG_FMT(
"[findOutSensorPose] Found pose %s -> %s: %s", source_frame.c_str(),
target_frame.c_str(), des.asString().c_str());

Expand Down

0 comments on commit aabcb13

Please sign in to comment.