Robotics & Open Science

ZED ROS 2 Wrapper 5.6 enables CUDA zero-copy for ROS 2 Lyrical and Isaac ROS 5

Key Takeaway

The update allows ZED stereo cameras to publish dense data directly from GPU memory to subscribers, eliminating expensive CPU/GPU data transfers.

Summary

StereoLabs has released version 5.6 of the ZED ROS 2 Wrapper, introducing support for the rosidl::Buffer message fields found in ROS 2 Lyrical. This update leverages the CUDA buffer backend, a technology contributed by NVIDIA to the ROS 2 ecosystem, to facilitate zero-copy data transfers between the ZED SDK and GPU-accelerated subscribers.

By publishing dense data—including images, depth maps, and point clouds—directly from GPU memory, the wrapper removes the traditional overhead of moving data from the GPU to the CPU for serialization and subsequent deserialization. This optimization is specifically designed for users of NVIDIA Isaac ROS 5 and hardware such as the Jetson AGX Thor, significantly reducing latency for high-bandwidth robotic sensor data.

Technical implementation of CUDA zero-copy

  • Data Path Optimization: The wrapper eliminates the GPU → CPU → serialize → deserialize → GPU round trip by utilizing the rosidl::Buffer backend to keep dense data in GPU memory.
  • Automatic Fallback Mechanism: The system includes a built-in fallback to standard CPU data for subscribers that do not support the CUDA backend, such as RViz2, Python nodes, or remote machines.
  • Supported Data Types: Zero-copy support extends to standard ROS 2 messages including sensor_msgs/msg/Image and sensor_msgs/msg/PointCloud2 for ZED stereo and ZED X One monocular cameras.
  • Performance Benchmarks: On Jetson AGX Thor hardware, the update demonstrated latency reductions ranging from 10% for compact point clouds to 61% for full-resolution 14.7 MB point clouds.
  • Middleware Compatibility: The implementation is compatible with rmw_fastrtps_cpp (the ROS 2 Lyrical default) and rmw_zenoh_cpp version 0.10.5 or newer.

Why it matters

This release represents a significant advancement for high-performance robotics, particularly for developers using NVIDIA Jetson platforms and Isaac ROS. By standardizing zero-copy GPU data transport through ROS 2 Lyrical, it reduces the computational tax on embedded systems, allowing for more complex real-time perception tasks without increasing latency.

What to do

  • Update to ZED ROS 2 Wrapper v5.6.0 or newer and ZED SDK v5.5 or newer if you use ZED stereo cameras with ROS 2 Lyrical or NVIDIA Isaac ROS 5.
  • Ensure the ZED node and accelerated subscribers run on the same computer and GPU, and install the cuda_buffer packages.
  • For accelerated subscribers, declare CUDA backend acceptance with sub_opts.acceptable_buffer_backends = "cuda" and read GPU memory through the CUDA buffer API in callbacks.
  • Disable intra-process (IPC) if you need GPU buffers instead of CPU data, as explained in the image tutorial.

Original reference: discourse.openrobotics.org →