Getting Started with ROS 2 and ZED
The ZED ROS 2 wrapper lets you use the ZED stereo and monocular cameras with the second version of ROS, the Robot Operating System, a set of software libraries and tools that help you build robot applications.
It provides access to the following data:
- Rectified/Unrectified images
- Depth data
- Colored 3D point cloud
- Inertial information
- Sensors information
- Visual Inertial Odometry: Position and Orientation of the camera
- Pose tracking: localization of the camera with loop closure
- AI Detected objects
- Human body skeleton tracking

The ROS 2 packages
The ZED ROS 2 integration is split across several packages. The core ones live in the zed-ros2-wrapper repository, while interfaces, robot models, and examples are distributed in dedicated repositories so that they can also be installed on machines without an NVIDIA® GPU.
Packages in the zed-ros2-wrapper repository
Related packages
These packages are required by the wrapper but maintained in their own repositories. They do not depend on CUDA or the ZED SDK, so they can be installed on any ROS 2 machine (for example a remote workstation receiving data over the network).
Installation
Prerequisites
- Ubuntu 20.04 (Focal Fossa) [Not recommended. EOL reached], Ubuntu 22.04 (Jammy Jellyfish), or Ubuntu 24.04 (Noble Numbat)
- ZED SDK
- CUDA dependency
- ROS 2 Foxy Fitzroy, ROS 2 Humble Hawksbill, or ROS 2 Jazzy Jalisco:
- Foxy on Ubuntu 20.04 [Not recommended. EOL reached]
- Humble on Ubuntu 22.04 [EOL May 2027]
- Jazzy Jalisco on Ubuntu 24.04 [EOL May 2029]
The ZED ROS 2 Wrapper has limited compatibility with ROS 2 Foxy on Ubuntu 20.04. Modules requiring ROS 2 Humble (or newer) features are disabled in Foxy (e.g. benchmarking and point cloud compression).
We recommend setting up your environment according to the recommended DDS and Network configurations to obtain the maximum performance.
Build the package
The zed-ros2-wrapper uses colcon to build packages.
If you haven’t set up your colcon workspace yet, please follow this tutorial.
To install the zed-ros2-wrapper packages, open a bash terminal, clone the repository from GitHub, and build:
The option --symlink-install is useful while developing your robotics system. It allows using symbolic links instead of copying files to the ROS 2 folders during the installation, where possible. Each package in ROS 2 must be installed and all the files used by the nodes must be copied into the installation folders. Using symbolic links allows you to modify them in your workspace, reflecting the modification during the next executions without needing to issue a new colcon build command to overwrite the files in the install folders. This is true only for the files that don’t need to be compiled (Python launch scripts, YAML configurations, etc).
If you are using a different console interface like zsh, you have to change the source command as follows: echo source $(pwd)/install/local_setup.zsh >> ~/.zshrc and source ~/.zshrc.
Starting the ZED node
To start the ZED node, open a terminal and use the CLI command ros2 launch:
The zed_camera.launch.py is a ROS 2 Python launch script that automatically starts the ZED node using “manual composition”, loading the parameters from the right “YAML files” associated with the specific camera model, and creating the static TF tree from the “URDF file” that is automatically generated from a xacro configuration file.
You can set your own configurations by modifying the parameters in the files common_stereo.yaml, common_mono.yaml, zed.yaml, zedm.yaml, zed2.yaml, zed2i.yaml, zedx.yaml, zedxm.yaml, virtual.yaml, zedxonegs.yaml, and zedxone4k.yaml available in the folder zed_wrapper/config. For a full description of each parameter, follow the complete guide.
Displaying ZED data
Using RViz 2
RViz 2 is a useful visualization tool in ROS 2. With RViz 2, you can visualize the left and right images acquired by the ZED cameras, the depth image, and the 3D colored point cloud, plus other useful information.
Launch the ZED wrapper along with RViz 2 by using the following command (installing the packages included in the zed-ros2-examples repository is required):
If you haven’t yet configured your own RViz 2 interface, you can find a detailed tutorial here.
Using RViz 2 on NVIDIA® Jetson™ devices is not recommended for heavy tasks such as processing point clouds and full-resolution images; doing so may slow down the system and affect the reliability of the ZED nodes.
Displaying Images
The ZED node publishes both original (raw) and stereo-rectified (aligned) left and right images. In RViz 2, select a topic and use the image preview mode.
Here is a list of the main available image topics (more image topics are available):
- rgb/color/rect/image: Color rectified image (left image by default)
- rgb/color/raw/image: Color unrectified image (left image by default)
- right/color/rect/image: Color rectified right image
- right/color/raw/image: Color unrectified right image
- left/color/rect/image: Color rectified left image
- left/color/raw/image: Color unrectified left image
- confidence/confidence_image: Confidence map

For a step-by-step tutorial on configuring an RViz 2 session to display only the video data you need, see Using Video Capture with ROS 2.
Displaying Depth
The depth map can be displayed in RViz 2 by subscribing to the following topic:
- depth/depth_registered: 32-bit depth values in meters. RViz 2 will normalize the depth map on 8-bit and display it as a grayscale depth image.
An OpenNI compatibility mode is available by modifying the config/common_stereo.yaml file. Set depth.openni_depth_mode to true to get depth in millimeters with 16-bit precision, then restart the ZED node.
To learn how to fine-tune the depth and point cloud configuration and set up a dedicated RViz 2 session, see the Using Depth Perception with ROS 2 tutorial.

Displaying the Point cloud
A 3D colored point cloud can be displayed in RViz 2 by subscribing to the point_cloud/cloud_registered topic.
Add it in RViz 2 with point_cloud -> cloud -> PointCloud2.
Using RViz 2 on NVIDIA® Jetson™ devices is not recommended for heavy tasks such as processing point clouds and full-resolution images; doing so may slow down the system and affect the reliability of the ZED nodes.

Displaying Position and Path
The ZED position and orientation in space over time are published to the following topics:
- odom: Odometry pose referred to the odometry frame
- pose: Camera pose referred to the Map frame (the complete data fusion algorithm is applied)
- pose with covariance: Camera pose referred to the Map frame with covariance
- odometry path: The sequence of camera odometry poses in the Map frame
- map path: The sequence of camera poses in the Map frame
For a detailed explanation of the reference frames, the TF tree, and how to configure the positional tracking module, see the Using Positional Tracking with ROS 2 tutorial. If you want to fuse GNSS data to improve outdoor localization, refer to the Using Geo Tracking with ROS 2 tutorial.
Launching with a recorded SVO video
With the ZED SDK, you can record and play back stereo video by using StereoLabs’ SVO file format. To record a sequence, open the ZED Explorer app (/usr/local/zed/tools) and click on the REC button.
To launch the ROS 2 wrapper with an SVO file, set the related parameter while starting the node. For example, to start the ZED 2 node using the SVO as input source:
with RViz 2:
The ZED ROS 2 Wrapper now supports the SVO v2 format, which is available from the ZED SDK v4.1.
You can also record and replay data directly as ROS 2 bag files. For a complete walkthrough of recording, replaying, and synchronizing camera data, see the Record and Replay Camera Data with ROS 2 guide.
Dynamic reconfigure
You can dynamically change many configuration parameters during the execution of the ZED node.
All the parameters that can be dynamically changed while the node is running are marked as [DYNAMIC] in the YAML configuration files.
For a full description of each parameter please read the complete guide.
You can set the parameters by using the CLI command ros2 param set, e.g.:
If the parameter is set successfully, you will get a confirmation message:
If you try to set a parameter that’s not dynamically reconfigurable, or if you provided an invalid value, you will get this type of error:
You can also use a GUI to set dynamic parameter values:
select Plugins -> Configuration -> Dynamic Reconfigure

Node Diagnostics
The ZED ROS 2 node publishes useful diagnostic information aggregated into the /diagnostics topic using the diagnostic_updater package.
These diagnostics report the health and the real-time performance of the node, including the camera grabbing frequency, the processing time of each enabled module (depth, positional tracking, object detection, etc.), the publishing rate of the main topics, and the camera temperature when available. Monitoring this information is the recommended way to verify that the node is running at the expected frequency and to detect performance bottlenecks on your hardware.
Diagnostic information can be analyzed and parsed by using ROS 2 tools, like for example the Runtime Monitor plugin of rqt.

If the node is not running at the expected frequency, refer to the Stereo Node Frequency Tuning guide to learn how to balance the processing load across the modules.
Going further
The pages above cover the basics of installing and running the ZED ROS 2 Wrapper. The following guides and tutorials describe the individual nodes, the perception modules, and the advanced topics in detail.
Nodes and camera setups
- ZED Stereo Node — the complete reference of the node for stereo cameras, including all the published topics and configuration parameters.
- ZED Monocular Node — the node dedicated to monocular cameras (ZED X One).
- Custom Stereo Rig — how to build a custom stereo rig from a dual ZED X One setup.
- Multi-Camera setup — how to run several ZED cameras on the same system.
Perception modules
- Using Video Capture with ROS 2 — display and configure the camera image streams.
- Using Depth Perception with ROS 2 — depth maps and 3D point clouds.
- Using Positional Tracking with ROS 2 — localize the camera in space with loop closure.
- Using Geo Tracking with ROS 2 — fuse GNSS data to improve outdoor localization.
- Using Plane Detection with ROS 2 — detect planes in the environment.
- Using Object Detection and Tracking with ROS 2 — detect and track objects with the built-in models.
- Custom Object Detection and Tracking with ROS 2 — use your own YOLO-like model.
- Body Tracking with ROS 2 — track human body skeletons.
- Setting the Region of Interest in ROS 2 — restrict SDK processing to a specific area of the image.
Configuration, performance, and integration
- DDS and Network Tuning for ROS 2 — required network settings to reliably exchange large data such as images and point clouds.
- Stereo Node Frequency Tuning — balance the processing load across the enabled modules.
- ROS 2 Composition and ZED ROS 2 Wrapper — load the components in a single process for zero-copy (IPC) communication.
- Hardware Encoding Bridge for ROS 2 — stream compressed data across machines using the ZED SDK Local Streaming module.
- ZED Integration on a Robot — add the ZED camera to the URDF of a robot.
- Record and Replay Camera Data with ROS 2 — capture and replay SVO and ROS 2 bag files.
- Data display with RViz 2 — pre-configured RViz 2 launch files and visualization tools.
Interfaces and models
- The “zed_msgs” Package — the custom topics and services used by the ZED nodes.
- Custom Message Types — the reference of the custom message definitions.
- The “zed_description” Package — the URDF/xacro models and 3D meshes of the ZED camera family.

