I have a ZED2i camera that I’m using with the official ROS 2 wrapper, and I’m encountering the following problem: I want the image transferred to subscribers to be full quality (1280 × 720 at 60 fps). However, when I subscribe to two topics, the frame rate drops (and the SVO recordings also drop to 30 fps). My system needs data from four topics (RGB, depth, point cloud, and body tracking), and when I launch all of them in RViz, the frame rate falls to around 10 fps.
If I scale down the publishing resolution (2.0), it works well—I can subscribe to multiple topics without losing as many fps—but that resolution isn’t sufficient for my needs.
I’ve already configured DDS as per the tutorial, and I am 100% confident in my USB bus and cable (they can handle much more than required).
What can I do to achieve 60 fps and high-resolution publishing so that my nodes receive HD images?
Hi Myzhar!
Host device: PC Ubuntu 24.04.2 LTS
CPU: AMD Ryzen 7 2700 x 16
GPU: NVIDIA GeForce RTX 2070
I run everything on the same machine.
I run RViz on the same machine.
I am subscribing to:
/zed/zed_node/depth/depth_registered (Depth Data is essential for my system)
(When I tried to subscribe to compressed or then I get an error:
[CompressedPublisher]: Compressed Image Transport - JPEG compression requires 8/16-bit color format (input format is: 32FC1)
And when I try the compressedDepth version then the Frequency is always near 40fps even if I subscribe only to this topic)
/zed/zed_node/left/image_rect_color/compressed (A color image is essential for my system)
/zed/zed_node/point_cloud/cloud_registered (It would be good to have in my project)
/zed/zed_node/body_trk/skeletons (It would be good to have in my project)
When you execute rviz2 on the same machine where the nodes are running, you normally experience a degradation of the performance because rviz2 is a high-demanding application.
This is more evident if you publish and subscribe to a high-resolution point cloud.
I recommend you do not subscribe to compressed topics if you are not sending data over the network. Compression and Decompression performed on the same machine is a waste of computing resources.
Thank you for your response. I have currently 2 nodes - one subscribe to image_rect_color (I tried compressed and not compressed without change in fps) and another to depth_registered. Even before any process is activated in these nodes the fps drops to ~38Hz. If only one of these nodes is running then it is 60fps
(I get the fps data from the rgt Runtimemonitor and from recordings that I have in nodes).
I tried Neural_light and performance and did not see the difference in fps.
I tried this out, and now the nodes receive data from two topics (/zed/zed_node/depth/depth_registered and /zed/zed_node/left/image_rect_color/) at 40–50 FPS (it fluctuates rapidly). So it helped a lot. If I use only one topic, the rate is stably at 60 FPS. Is there anything else I can do to make the ZED maintain a stable publishing rate of 60 FPS, regardless of the number of topics I subscribe to?