Function mrpt::ros2bridge::lookupSensorPose

Function Documentation

bool mrpt::ros2bridge::lookupSensorPose(mrpt::poses::CPose3D &des, tf2::BufferCore &tfBuffer, const std::string &target_frame, const std::string &reference_frame, const std::optional<mrpt::poses::CPose3D> &fixedSensorPose = std::nullopt, mrpt::system::COutputLogger *logger = nullptr)

Look up a transform in a tf2::BufferCore and store the result as a mrpt::poses::CPose3D.

If fixedSensorPose is set, it is returned directly and tf2 is not queried.

Parameters:
  • des[out] The resulting pose.

  • tfBuffer[in] The tf2 buffer to query.

  • target_frame[in] Frame of the sensor (child frame).

  • reference_frame[in] Reference frame (e.g. base_link).

  • fixedSensorPose[in] If provided, returned as-is (bypass tf2).

Returns:

true on success, false if the transform could not be resolved.