Bad performance of Zed X in ROS2 on AGX Orin 32

I’ve been testing a ZED X camera for a few days and noticed that when using the ROS2 node from the getting started guide, the depth image or point cloud FPS is limited to around 10fps in ULTRA mode at 1200p. After switching to PERFORMANCE mode, the FPS increases to about 14fps. By further lowering the resolution to SVGA, setting the minimum distance to 1.5m, and maintaining PERFORMANCE mode with all additional features like object detection, ROI, and tracking turned off, I can achieve around 30fps. This setup utilizes approximately 80-85% of the GPU and 60-70% of the CPU. I’ve tested this using both RViz2 and Foxglove for visualization, on an AGX Orin 32.

According to community discussions, even an Orin NX 16 should be capable of handling two cameras at 60fps with a good resolution in ULTRA mode, leaving some compute power available for additional tasks. When I test the camera using Python with the sample script provided, I observe significantly better FPS for the point cloud at 1200p and ULTRA, with the minimum distance set to 0.3m (default). The compute usage is lower, around 50% for the GPU and 25% for the CPU. So the problem appears to be the ROS2 wrapper/node.

Am I missing something or doing something wrong? I am using ROS2 humble, the latest releases of the Zed SDK, ROS wrapper and zedlink Driver, and installed them as directed by the “getting started” guide. For my project, I require consistent depth information at 30 or 60fps, ideally with two ZED X cameras (or one ZED X with two ZED X ones) at 1080p and 30/60fps in ULTRA mode. This setup should leave enough resources for object detection on a Jetson AGX Orin 64 running ROS2.

Is this setup feasible? If so, what is the recommended hardware configuration to achieve the desired performance? If not, considering the X lineup is designed and advertised for automotive use, would it be more effective to stream data from the Jetson to a more powerful computer for processing? If so, would this approach maintain real-time performance with minimal latency at the required frame rate and resolution?

Hi @auc7us,

Welcome to the Stereolabs forums :smile:

Thank you for sharing your results from your tests. As you’ve seen, publishing large amounts of data such as images and point clouds over ROS 2 communication has a real impact on performance. This is a non-trivial constraint that is known in ROS, and there is quite some documentation around to optimize this.

The easiest optimization I would suggest would be to downsample the size of image/point cloud data in order to send smaller amounts of data over the network. This might not fit all use cases.

Another optimization I can suggest is using ROS 2 Node Composition, in order to use IPC communication and to avoid publishing on the local network. We have documentation to use node composition with the ZED SDK here: ROS 2 composition and ZED ROS 2 Wrapper - Stereolabs

In order to have more precise readings of the performance of the ZED ROS 2 node, I recommend you use our benchmark tool or external benchmark tools (e.g. NVIDIA Benchmark).

We recommend also using the FASTRTPS DDS middleware and tuning it to use large data:

I will add that running our Python and C++ samples will give you the best performance that you can have with our cameras. Please make sure your box is in MAXN mode and you have run the jetson_clocks utility to lock the clocks of the Jetson to their maximum.