Closed fmrico closed 3 months ago
@iche033 do we need to backport this to other distros?
Doing a drive-by comment here since I saw the merge notification. I'm not entirely sure if this is a bug or a feature needed to realign images from Gazebo to show up correctly in RViz through TF lookups.
Before going down the backport path, I would validate that this does not break the example used in the original PR https://github.com/gazebosim/gz-sensors/pull/259
Hi,
Actually, this PR fixes to publish in a valid frame, but this is not the correct frame.
If I use FrameId()
I get the wrong frame (tiago/head_2_link/head_front_camera_frame_sensor
), so the options could be:
getCameraFrame()
in RgbdCameraSensor
to get the last part of what FrameId()
returns.getSimpleFrame()
or similar, to get the same.Best
I created a backport PR in https://github.com/gazebosim/gz-sensors/pull/461 that includes the fix from this PR.
https://github.com/gazebosim/gz-sensors/pull/259 fixes the issue for the camera_info
topic, while this PR fixes it for the frame_id
field in the msg header in other topics. So it should not break the example used in https://github.com/gazebosim/gz-sensors/pull/259
🦟 Bug fix
Fixes [No number]
Summary
When using rgbd_camera as sensor,
frame_id
is filled withFrameId()
(for exampletiago/head_2_link/head_front_camera_frame_sensor
), instead ofOpticalFrameId()
(for example,head_front_camera_rgb_optical_frame
). So, theframe_id
in the messages is wrong.This PR fixes it.
I hope it helps. Any comment is welcome :)
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.