Skip to main content
Back

ros2_cuda_ipc Lets Robot AI Share GPU Memory Without Costly CPU Copies

A new experimental ROS 2 library moves GPU tensors between separate processes without CPU round-trips, using CUDA virtual memory descriptors and DLPack.

  • Daisuke Kato released ros2_cuda_ipc, an experimental library for GPU-to-GPU ROS 2 messaging across processes.
  • Uses CUDA Virtual Memory Management with POSIX file descriptors, avoiding the legacy CUDA IPC memory API.
  • Works on both Jetson and discrete NVIDIA GPUs, since CUDA 10.2.
  • Ships Python bindings through DLPack for direct PyTorch, CuPy, and TensorRT consumption.
  • Separate from the official rosidl_buffer_backends in ROS 2 Lyrical but tackles the same problem.
  • Full announcement and discussion on Open Robotics Discourse.

Robotics pipelines that run perception on the GPU keep hitting the same wall: to share a tensor between two ROS 2 nodes that live in different processes, the data usually gets copied down to CPU memory and back up again. A new experimental library called ros2_cuda_ipc, released by Daisuke Kato, tries to fix that with a standalone approach that keeps GPU buffers on the GPU across process boundaries.

Kato introduced the project on the Open Robotics Discourse as an experimental ROS 2 library for sharing GPU-resident data between processes without copying it through host memory. It is not part of the official ROS 2 core, and it differs from the CUDA buffer backend that shipped with the Lyrical release. Developers can pull it into existing ROS 2 workspaces today.

The composable node trap

The motivation will be familiar to anyone building GPU perception stacks. Camera preprocessing, DNN inference, visualization, and video encoding are typically written as separate components. ROS 2 already supports composable nodes that load multiple components into the same process to avoid inter-process copies, but that forces you to give up process isolation and independent deployment. Splitting them back into separate processes reintroduces the CPU copy at every hop.