Visualisation of Point Cloud data of depth camera via Rviz2

Objective:
To visualise point cloud from my depth camera with pose and path taken by the craft

My setup:
Px4 autopilot sitl, x500_depth vehicle, simulation running on gazebo, and bridged ros-gz for camera and depth camera topics, QGroundControl, Micro-XRCE agent for working with ROS2 humble with px4 sitl, rviz2

ros_gz_bridge for camera and depth camera 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

Issues Facing
as, i am aiming to plot a point cloud from my depth camera’s data. or any type of mapping in rviz2, not able to receive any data except my camera’s image.

i even tried to look for my fixed frame by running commands for my setup (which is currently set to ‘map’.

ros2 run tf2_tools view_frames 

which is returning me a pdf file which is stating No tf data received

DepthCloud -Warning
Message
Expected topic type of ‘sensor_msgs/msg/Image’, saw topic type ‘sensor_msgs/msg/Image’

PointCloud2 - status ok but, nothing is being visualised

Image - status ok and, you can see in screenshot that image is being displayed in image Window below display section. it is from topic /camera

Error at terminal
I am also encountering an error on terminal when i am running depth camera

[INFO] [1735132258.527217640] [rviz]: Message Filter dropping message: frame 'x500_depth_0/OakD-Lite/base_link/IMX214' at time 368.512 for reason 'discarding message because the queue is full'

Kindly help or guide me how can i rectify errors or achieve my goal.

i also have the same problem did u solve it pls reply if u see. also i know a lot of things about this i tried the simulating the drone in ignition by changing the source code but was getting some errors with px4 then i found that harmonic isnt fully compatible with humble so i switched to jazzy - ros2 but it didnt work

u can contact me on pratikw369@gmail.com to

@Pratik_Wagh Do you find any solution? I have a similar problem, manage to getting a fixed frame in rviz launching manually static_transform_publisher, but still no data displayed.

YEAH. JUST select the topic u want to visualize in rviz then a msg in ur rviz’s terminal (where u launched the rviz2 command) in which the msg will say a frame name in “” (double quotes) just copy from terminal and enter the frame name in rviz2 where “map” is written by default

this is how i found the frame name
hope this helps

Thank you, that helps a lot! Now I can see the point cloud, but still i’m not able to see camera data displayed. Are you using different settings than default in rviz2 for the camera? I have tried several but unsuccessfully.

My setup

ROS2 humble, PX4 SITL with default setup for Ubuntu 22.04, ros-gz from source

PX4_GZ_WORLD=forest make px4_sitl gz_x500_depth
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
rviz2

I’m not receiving errors or warning and also ros2 echo shows messages are being published. The only interesting log on rviz2 terminal I get is [INFO] [1747033002.560393429] [rviz2]: Stereo is NOT SUPPORTED at startup and each time i try to visulize camera or image.

Here are screenshot from rviz2 and rqt_graph window


Pratik_Wagh

1.try image topic not camera
– select image from topics and then add your topic

2.“/camera@sensor_msgs/msg/Image@ignition.msgs.Image” i think instead of “ignition” it should be “gz” whatever if that works well n good

3.for more help - pratikw369@ – gmail

1 Like