Skip to content

Commit

Permalink
rosbag2rawlog: BUGFIX: sensor poses were inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Apr 18, 2024
1 parent 5d2123f commit bd02758
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mrpt_rawlog/src/rosbag2rawlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ class RosSynchronizer
std::shared_ptr<tf2::BufferCore> tfBuffer;

bool findOutSensorPose(
mrpt::poses::CPose3D& des, const std::string& target_frame,
const std::string& source_frame,
mrpt::poses::CPose3D& des, const std::string& frame,
const std::string& referenceFrame,
const std::optional<mrpt::poses::CPose3D>& fixedSensorPose)
{
if (fixedSensorPose)
Expand All @@ -218,7 +218,7 @@ bool findOutSensorPose(

geometry_msgs::msg::TransformStamped ref_to_trgFrame =
tfBuffer->lookupTransform(
target_frame, source_frame, {} /*latest value*/);
referenceFrame, frame, {} /*latest value*/);

tf2::Transform tf;
tf2::fromMsg(ref_to_trgFrame.transform, tf);
Expand All @@ -227,7 +227,7 @@ bool findOutSensorPose(
#if 0
std::cout << mrpt::format(
"[findOutSensorPose] Found pose %s -> %s: %s\n",
source_frame.c_str(), target_frame.c_str(), des.asString().c_str());
referenceFrame.c_str(), frame.c_str(), des.asString().c_str());
#endif

return true;
Expand Down

0 comments on commit bd02758

Please sign in to comment.