Note 1
I posted this question on Robotics Stackexchange last week, sorry for reposting here
Note 2
I created a repo with a minimal, reproducible example to help investigate the suspected issue https://github.com/miccol/rgbd_camera_issue
I'm using the rgbd_camera plugin in Gazebo Harmonic with ROS 2 and ros_gz_bridge to visualize RGB and depth data in RViz.
Here's my setup:
- OS: Ubuntu 22.04
- ROS 2: Jazzy
- Gazebo: Harmonic 8.9.0
The setup publishes the following topics:
/rgbd_camera/camera_info (sensor_msgs/CameraInfo)
/rgbd_camera/depth_image (sensor_msgs/Image)
/rgbd_camera/image (sensor_msgs/Image)
/rgbd_camera/points (sensor_msgs/PointCloud2)
The (Potential) Issue
Although both /camera_info and /points have the same frame_id (rgbd_camera_link), in RViz the camera pyramid (from CameraInfo) and the PointCloud2 are visually misaligned.
The point cloud appears skewed or offset from the expected camera frustum. All TFs are valid, and static transforms are correctly set.


What I've Checked
- Confirmed both messages use the same
frame_id
- TF tree is consistent and stable
- RViz Fixed Frame is
world
- Camera is static and aligned properly
- RGB image renders fine
- PointCloud renders fine
- CameraInfo renders fine
My Hypothesis
There may be a mismatch in the projection model used internally by the rgbd_camera plugin to compute the point cloud vs. what's reported in /camera_info.
Alternatively, it could be a bug in how Gazebo Harmonic or ros_gz_bridge constructs the PointCloud2 message.
Question:
Has anyone seen this misalignment issue between camera_info and point clouds from rgbd_camera in Gazebo Harmonic?
Could this be due to an internal projection inconsistency or a known bug in gz-sensors?
It looks like that, recently, someone else had a similar issue #29 (comment)
moveit/moveit2#3042
Thanks
MC
Note 1
I posted this question on Robotics Stackexchange last week, sorry for reposting here
Note 2
I created a repo with a minimal, reproducible example to help investigate the suspected issue https://github.com/miccol/rgbd_camera_issue
I'm using the
rgbd_cameraplugin in Gazebo Harmonic with ROS 2 andros_gz_bridgeto visualize RGB and depth data in RViz.Here's my setup:
The setup publishes the following topics:
/rgbd_camera/camera_info(sensor_msgs/CameraInfo)/rgbd_camera/depth_image(sensor_msgs/Image)/rgbd_camera/image(sensor_msgs/Image)/rgbd_camera/points(sensor_msgs/PointCloud2)The (Potential) Issue
Although both
/camera_infoand/pointshave the same frame_id (rgbd_camera_link), in RViz the camera pyramid (from CameraInfo) and the PointCloud2 are visually misaligned.The point cloud appears skewed or offset from the expected camera frustum. All TFs are valid, and static transforms are correctly set.
What I've Checked
frame_idworldMy Hypothesis
There may be a mismatch in the projection model used internally by the
rgbd_cameraplugin to compute the point cloud vs. what's reported in/camera_info.Alternatively, it could be a bug in how Gazebo Harmonic or
ros_gz_bridgeconstructs thePointCloud2message.Question:
Has anyone seen this misalignment issue between
camera_infoand point clouds fromrgbd_camerain Gazebo Harmonic?Could this be due to an internal projection inconsistency or a known bug in
gz-sensors?It looks like that, recently, someone else had a similar issue #29 (comment)
moveit/moveit2#3042
Thanks
MC