Depth Camera reference frame

Hey there!

I’m currently utilizing the depth camera of the x500_depth model. Specifically, I’m visualizing the point cloud through the topic depth_camera/points using the sensor_msgs/msg/PointCloud2 type.

Could you clarify the reference frame used to view the point cloud?
If it pertains to the body frame of the camera, does the frame have the X-axis aligned with the camera’s direction (implying a coordinate system of either FRD or FLU type), or is it aligned with the Z-axis of the camera instead?

Thank you all in advance!

Hi @P_Ric

You can do a quick test by visualizing the point cloud on RViz if you are using ROS/ROS2.

The standard convention for cameras is to have the z-axis pointed in front of the camera and the x-y plane parallel to the image plane.

Have you figured out how to visualize the point cloud data from the px4_sitl in RVIZ? I am not able to find any resources related to gazebo simulation and rviz visualization using make px4_sitl gz_x500_depth

The gazebo window is launched and QGroundControl commands are received by the simulated drone and flies without any problem. The gazebo or gz topics have the /depth_camera/points topic but nothing in the ros topics. I then used the ros_gz_bridge to create ros2 topics. ros2 run ros_gz_bridge parameter_bridge /camera@sensor_msgs/msg/Image@ignition.msgs.Image /camera_info@sensor_msgs/msg/CameraInfo@ignition.msgs.CameraInfo /depth_camera/points@sensor_msgs/msg/PointCloud2@gz.msgs.PointCloudPacked /depth_camera@sensor_msgs/msg/Image@ignition.msgs.Image

I don’t know if it is working or not since I am not able to visualize it in rviz. The topic is available in RVIZ but nothing is displayed in the RVIZ plane. Is there any demo available to use the px4_sitl with rviz2?