必须先装好 ZED SDK v5.2 和 CUDA,否则 colcon build 会在 find_package 阶段失败;zed_msgs 在 Humble 上通过 apt 安装,Foxy 等发行版需从 zed-ros2-interfaces 源码安装;Jetson JP6 首次编译若报 CUDA_TOOLKIT_ROOT_DIR 错误,需安装 nvidia-jetpack 和 nvidia-jetpack-dev;仿真模式默认连接 127.0.0.1:30000,多相机时每个相机要使用不同的偶数端口。

zed-ros2-wrapper
stereolabsApache-2.0活跃维护把 ZED 立体相机接入 ROS 2 的官方封装包,提供深度、点云、视觉里程计、SLAM 和人体骨骼跟踪等话题与节点,方便机器人项目直接调用。
ROS 2 wrapper for the ZED SDK
mkdir -p ~/ros2_ws/src/ && cd ~/ros2_ws/src/ && git clone https://github.com/stereolabs/zed-ros2-wrapper.git && cd .. && rosdep install --from-paths src --ignore-src -r -y && colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release --parallel-workers $(nproc)需要 NVIDIA CUDA 支持的 GPU,并安装 ZED SDK v5.2;README 未给出具体显存要求。在 NVIDIA Jetson 上使用 JP6 时,需额外安装 nvidia-jetpack 包。
在 ROS 2 中接入 Stereolabs ZED 相机,直接拿到图像、深度、点云和定位数据
把 ZED 立体相机接入 ROS 2 的官方封装包,提供深度、点云、视觉里程计、SLAM 和人体骨骼跟踪等话题与节点,方便机器人项目直接调用。
核心能力
- 发布彩色、灰度、校正前后的图像与深度数据
- 输出彩色 3D 点云和位置跟踪与建图结果
- 支持目标检测与人体骨架等感知数据
- 提供 sim_mode 仿真模式,无需真实相机即可跑通完整流程
- 通过 launch 参数按相机型号加载 YAML 配置
容易踩的坑
- v5.5.0最新正式版2026-09-18 · 2026-09-18 14:42 UTC
v5.5.0
- Fixed the large IMU publishing delay caused by the IMU being read in step with
grab()(stereo and mono). Withgeneral.grab_frame_rate: 15andgeneral.grab_compute_capping_fps: 5the samples arrived in 5 Hz bursts several hundred milliseconds late; the mono node, which has no compute capping, was delayed by the grab rate alone. Both nodes now read the sensors stream independently ofgrab(), polling well above the hardware ODR so that no sample is lost. Measured on a ZED X on an AGX Orin: median publish delay 411 ms -> 10.5 ms, output rate 92.6 -> 100.0 Hz, and the delay no longer depends ongeneral.grab_compute_capping_fps. SVO and simulation are unchanged. - Fixed
sensors.sensors_pub_ratenot being honored on cameras whose IMU does not run at the rate the ZED SDK advertises (stereo and mono). A ZED X One GS reports 400 Hz but delivers 200 Hz, sosensors_pub_rate: 100produced a steady 50 Hz. Both nodes now decimate against the measured sample interval instead of the advertised one. Cameras that report correctly now produce exactly the requested rate rather than the nearest sub-multiple of the real one (a ZED 2i publishes 100.0 Hz instead of 101.1 Hz). - Reduced the CPU usage of both nodes by counting topic subscribers through the publisher instead of a ROS graph query, and by refreshing the sensors thread counts every 250 ms instead of on every poll. On an AGX Orin this cuts the sensors thread overhead from ~5% to ~2-3% of a CPU core, whether or not the IMU topics are subscribed. Two consequences: a new subscriber to a sensors topic can wait up to 250 ms for its first message, and a subscriber whose QoS is incompatible with the publisher no longer triggers publishing (it could never receive the data anyway).
- Added the
general.bus_typeparameter to theZedCameraOnenode (AUTOdefault,USB,GMSL, and with ZED SDK >= 5.5MIPIandHOLOSCAN), used when the camera is selected withgeneral.camera_id. The bus was hard-coded toGMSL, so a ZED X One Core on a MIPI capture card, or reached over Camera-over-Ethernet through a Holoscan sensor bridge, could not be opened by ID at all. - Added the
pause_svo_recservice (stereo and mono,std_srvs/srv/SetBool) to pause and resume an SVO recording without closing the file. It returnssuccess: falsewhen no recording is active, and the diagnostic reportsSVO Recording: PAUSEDwhile paused. - Added the
general.max_system_clock_step_msparameter (stereo and mono) to set how fast the SDK follows a backward host-clock adjustment (NTP/PTP step, manual date change):4.0is the ZED SDK default and suits slew-only setups, a negative value makes step corrections land instantly as PTP deployments expect, and0.0freezes the offset captured on first use. Applied only whengeneral.sdk_timestamp_clockisSYSTEM_CLOCK. Requires ZED SDK >= 5.3. - Added the
general.sdk_timestamp_clockparameter (stereo and mono) to select the clock behind every SDK timestamp:SYSTEM_CLOCK(default),MONOTONIC_CLOCK, orMONOTONIC_RAW_CLOCK(ZED SDK >= 5.4), which is immune to NTP/PTP frequency slewing as well as to clock steps. It replaces the booleangeneral.sdk_use_monotonic_clock, which is still read and still works, but now logs a deprecation warning. - Added the
svo.encryption_keyparameter (stereo and mono) to encrypt the SVO files created bystart_svo_rec(AES-256-CTR); playback was already supported throughsvo.decryption_key. It accepts a path to a 32-byte key file, a 64-character hex key or a passphrase, and is never written to the log. Requires ZED SDK >= 5.3 and OpenSSL at runtime. - Added the positional tracking pose confidence, a [0,100] quality metric filled by
POSITIONAL_TRACKING_MODE::GEN_3where 0 means tracking is lost. It is reported asPose confidencein the diagnostic and published as the newpose_confidencefield ofPosTrackStatuson~/pose/status. Requires ZED SDK >= 5.4 andzed_msgsv5.5. - Fixed th
- Fixed the large IMU publishing delay caused by the IMU being read in step with
- v5.4.12026-07-24 · 2026-07-24 07:54 UTC
查看更新说明
v5.4.1
-
Fixed camera video settings (exposure, gain, white balance, brightness, etc.) not being reliably applied at start-up. The node now always enforces the configured values when it starts, instead of keeping whatever was left in the camera by a previous application (e.g. ZED Explorer or an earlier run). This fixes two identically-configured cameras showing different images, and the case where the image did not match the configured exposure/gain after opening the node. The apply is also retried if the camera is not ready yet (e.g. during USB bandwidth contention when several cameras are opened at once).
-
Fixed unstable IMU publishing rate (issues #249 and #445). Sensor data is now retrieved by draining the full IMU FIFO with
getSensorsDataBatch()instead of polling only the latest sample, so no sample is dropped and every published sample keeps its hardware timestamp. The drained stream is decimated to the requestedsensors.sensors_pub_ratewith a fractional accumulator that selects samples uniformly, so the parameter is still honored while the inter-sample interval stays constant. Measured on a ZED 2i:sensors_pub_rate100/200/400 Hz yields a steady 101/202/404 Hz output with std-dev ~0.07 ms (vs ~1 ms before, with frequent missed-sample gaps up to ~12.7 ms). -
Added support for ROS 2 Lyrical Luth
-
Improved Docker support:
- Single parameterized
Dockerfilewith newbuild_desktop.sh/build_jetson.shscripts, replacing the previous per-variant Dockerfiles. - Added Jetson cross-compilation from an x86_64 host via QEMU.
- Single parameterized
-
- v5.4.02026-06-18 · 2026-06-18 14:50 UTC
查看更新说明
v5.4
-
Improved point cloud publishing by eliminating one full-cloud copy per published frame (~44 MB at HD2K, proportional at lower res) and removing a second full-cloud CPU allocation.
-
Fixed node lock when calling the
set_svo_frameservice with Positional Tracking enabled -
Fixed Disparity Map data (bad pixel value sign).
-
Changed disparity map publishing policy:
-
The topic
~/disparity/disparity_imageof typestereo_msgs/msg/disparity_imageis now obsolete. -
Added two new topics:
~/disparity/mapof typestereo_msgs/msg/disparity_imagecontaining the Disparity Map for depth processing. This replaces the obsolete~/disparity/disparity_imagetopic. Useros2 run image_view disparity_view --ros-args -r image:=/zed/zed_node/disparity/disparity_imageto visualize this topic.~/disparity/imageof typesensor_msgs/msg/imagecontaining the Normalized Disparity Map as an image for visualization purposes. You can subscribe to this topic in RViz2.
-
-
- v5.3.12026-05-29 · 2026-05-29 09:47 UTC
查看更新说明
v5.3.1
-
Added voxel point cloud support. When
depth.voxel_point_cloudis enabled, the point cloud topic publishes voxel-decimated data usingretrieveVoxelMeasure(). New parameters:depth.voxel_size_mm(voxel cell size in millimeters),depth.voxel_resolution_mode(FIXED,STEREO_UNCERTAINTY,LINEAR), anddepth.voxel_resolution_scale. All voxel parameters are dynamically reconfigurable. -
Added handling of
ERROR_CODE::CAMERA_EXCEEDS_BANDWIDTHduring camera open in both stereo and mono components. When a GMSL PHY CSI bandwidth overflow is detected, the node logs an error and stops initialization. -
Added
XVGAandTXGAas validgrab_resolutionoptions for ZED X HDR camera configurations (zedxhdr,zedxhdrmax,zedxhdrmini,zedxonehdr). -
Added
XVGAandTXGAresolution parsing in both stereo (ZedCamera) and mono (ZedCameraOne) components. -
Added support for ZED X Nano camera: new
zedxnanomodel with dedicated configuration file, URDF macro, and launch file integration. -
Added
video.ae_antibandingparameter for ZED X cameras to control auto-exposure anti-banding mode (0=OFF, 1=AUTO, 2=50Hz, 3=60Hz). Dynamically reconfigurable. -
Added
Scene Illuminancefield to the diagnostic output for ZED X cameras (read-only metric reflecting the level of light in the scene). -
Added
scene_illuminancefield (int32, units 0.1 lux) to theHealthStatusStampedmessage published on~/status/health. Value -1 indicates the metric is unsupported by the connected camera. Requires the matchingzed_msgsv5.3. -
Added
svo.svo_encoding_presetparameter (DEFAULT,ULTRAFAST,FAST,MEDIUM,SLOW) to choose the SVO encoder speed/quality preset when starting a recording. -
Added
svo.decryption_keyparameter (stereo and mono) to open encrypted SVO files. The key/passphrase is forwarded to the SDK viaInitParameters::svo_decryption_key. -
Added
general.sdk_use_monotonic_clockparameter that switches the SDK toTIMESTAMP_CLOCK::MONOTONIC_CLOCKso timestamps are immune to host clock step adjustments (NTP/PTP). When combined withdebug.use_pub_timestamps: false, an offset captured at camera open is applied so published Header stamps remain ROS-epoch-shaped while inter-frame deltas stay monotonic. Process-wide setting; in a composition the first node to open wins (subsequent nodes log a warning and fall back to the active clock). -
IPC is now handled automatically disabling it when NITROS is enabled and enabling it when NITROS is disabled. The
debug.disable_nitrosparameter can be used to disable NITROS and enable IPC if needed. -
Added support to
rclcpp::TypeAdapterfor better handling of Image messages:- A
TypeAdapterpublisher handles the base "raw" topic. Intra-process subscribers receiveStampedSlMat`` (wrappingsl::Mat``) directly without serialization. Inter-process subscribers receivesensor_msgs/msg/Imagevia automaticTypeAdapterconversion. - An
image_transportpublisher handles the transport-specific topics (e.g.,compressed,theora). The "raw" transport is disabled to avoid duplicate messages. - Image transport plugins are now filtered by topic type: visual topics (IMAGE) only advertise
compressedandtheora, while measurement topics (MEASURE) only advertisecompressedDepth. This prevents silent data corruption from incompatible plugin/encoding combinations (e.g., JPEG on float depth). - When the package
isaac_ros_nitrosis installed and NITROS not disabled via thedebug.disable_nitrosparameter, NITROS publishers take priority, and neitherTypeAdapternorimage_transportpublishers are created.
- A
-
- v5.2.22026-04-01 · 2026-04-01 12:41 UTC
查看更新说明
v5.2.2
-
Default Positional Tracking mode changed back to
GEN_1until the stability and reliability ofGEN_3is improved. Users can still select a specific mode by setting thepos_tracking.pos_tracking_modeparameter toGEN_1,GEN_2, orGEN_3according to their needs and preferences. -
Modified node behaviors when Positional Tracking is disabled [
pos_tracking.pos_tracking_enabled: false]:publish_tfis automatically disabled.- The
odomrelated topics are no longer advertised. - The
poserelated topics are no longer advertised. - The GNSS fusion is automatically disabled.
- The Plane Detection is automatically disabled.
- The Positional Tracking services are no longer advertised.
- Depth stability follows the ZED SDK behaviors.
- Object Tracking follows the ZED SDK behaviors.
- Body Tracking follows the ZED SDK behaviors.
-
Add new parameter
debug.debug_dyn_paramsto enable debug logs for dynamic parameters changes.- Dynamic parameters related logs are now displayed only if the new debug parameter
debug.debug_dyn_paramsis set totrueto avoid log spam when changing dynamic parameters.
- Dynamic parameters related logs are now displayed only if the new debug parameter
-
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
This package enables the use of ZED cameras with ROS 2, providing access to a variety of data types, including:
- Color and grayscale images, both rectified and unrectified
- Depth data
- Colored 3D point clouds
- Position and mapping, with optional GNSS data fusion
- Sensor data
- Detected objects
- Human skeleton data
- And more...

Installation
Prerequisites
- Ubuntu 20.04 (Focal Fossa), Ubuntu 22.04 (Jammy Jellyfish), Ubuntu 24.04 (Noble Numbat), or Ubuntu 26.04 (Resolute Raccoon)
- ZED SDK v5.2 (to support older versions please check the releases)
- CUDA dependency
- A supported ROS 2 distribution (see Supported ROS 2 distributions below):
- Humble Hawksbill on Ubuntu 22.04: LTS [EOL May 2027]
- Jazzy Jalisco on Ubuntu 24.04: LTS [EOL May 2029]
- Lyrical on Ubuntu 26.04: LTS
- Foxy Fitzroy on Ubuntu 20.04: backward compatibility only [EOL reached]
- Rolling Ridley, for developers
Supported ROS 2 distributions
- :white_check_mark: All the current LTS distributions are officially supported: ROS 2 Humble Hawksbill (Ubuntu 22.04), Jazzy Jalisco (Ubuntu 24.04), and Lyrical (Ubuntu 26.04).
- :warning: Foxy Fitzroy (Ubuntu 20.04) is still supported for backward compatibility, with limitations when newer packages are not available for it (Foxy reached its End Of Life).
- :hammer_and_wrench: Rolling Ridley is supported for developers, but we cannot always guarantee that breaking changes introduced in Rolling are supported immediately.
- :grey_question: Non-LTS distributions (e.g. Iron, Kilted) are not officially tested, but they could work.
Build the package
The zed_ros2_wrapper is a colcon package.
:pushpin: Note: If you haven’t set up your colcon workspace yet, please follow this short tutorial.
To install the zed_ros2_wrapper, open a bash terminal, clone the package from GitHub, and build it:
mkdir -p ~/ros2_ws/src/ # create your workspace if it does not exist
cd ~/ros2_ws/src/ #use your current ros2 workspace folder
git clone https://github.com/stereolabs/zed-ros2-wrapper.git
cd ..
sudo apt update
rosdep update
rosdep install --from-paths src --ignore-src -r -y # install dependencies
colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release --parallel-workers $(nproc) # build the workspace
echo source $(pwd)/install/local_setup.bash >> ~/.bashrc # automatically source the installation in every new bash (optional)
source ~/.bashrc
:pushpin: Note: the dependency
zed_msgsis no longer installed as a submodule of this package; it is available throughaptas a binary package with ROS 2 Humble. When working with ROS 2 Foxy, or other distributions, you can install it from the sources from the zed-ros2-interfaces repository.
:pushpin: Note: If
rosdepis missing, you can install it with:
sudo apt-get install python3-rosdep python3-rosinstall-generator python3-vcstool python3-rosinstall build-essential
:pushpin: Note: The
zed_debugpackage is intended for internal development only. If you don’t need it, you can skip building this package by adding--packages-skip zed_debugto yourcolconcommand.
:pushpin: Note: When using the ZED ROS 2 Wrapper on an NVIDIA Jetson with JP6, you may get the following error when building the package for the first time
CMake Error at /usr/share/cmake-3.22/Modules/FindCUDA.cmake:859 (message): Specify CUDA_TOOLKIT_ROOT_DIR Call Stack (most recent call first): /usr/local/zed/zed-config.cmake:72 (find_package) CMakeLists.txt:81 (find_package)You can fix the problem by installing the missing
nvidia-jetpackpackages:
sudo apt install nvidia-jetpack nvidia-jetpack-dev:pushpin: Note: The option
--symlink-installis very important, it allows the use of symlinks 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 symlinks allows you to modify them in your workspace, reflecting the modification during the next executions without issuing a newcolcon buildcommand. This is true only for all the files that don't need to be compiled (Python scripts, configurations, etc.).:pushpin: Note: If you are using a different console interface like zsh, you have to change the
sourcecommand as follows:echo source $(pwd)/install/local_setup.zsh >> ~/.zshrcandsource ~/.zshrc.
Starting the ZED node
:pushpin: Note: we recommend reading this ROS 2 tuning guide to improve the ROS 2 experience with ZED.
To start the ZED node, open a bash terminal and use the CLI command ros2 launch:
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=<camera_model>
Replace <camera_model> with the model of the camera that you are using: 'zed', 'zedm', 'zed2', 'zed2i', 'zedx', 'zedxm', 'zedxnano', 'zedxhdrmini', 'zedxhdr', 'zedxhdrmax', 'virtual','zedxonegs','zedxone4k','zedxonehdr'.
The zed_camera.launch.py is a Python launch script that automatically starts the ZED node using "manual composition". The parameters for the indicated camera model are loaded from the relative "YAML files."
A Robot State Publisher node is started to publish the camera static links and joints loaded from the URDF model associated with the camera model.
:pushpin: Note: You can set your configurations by modifying the parameters in the files common_stereo.yaml, zed.yaml zedm.yaml, zed2.yaml, zed2i.yaml, zedx.yaml, zedxm.yaml, common_mono.yaml, zedxonegs.yaml, zedxone4k.yaml, zedxonehdr.yaml available in the folder
zed_wrapper/config.
You can get the list of all the available launch parameters by using the -s launch option:
ros2 launch zed_wrapper zed_camera.launch.py -s
ros2 launch zed_display_rviz2 display_zed_cam.launch.py -s
For full descriptions of each parameter, follow the complete guide here.
RViz visualization
To start a pre-configured RViz environment and visualize the data of all ZED cameras, we provide in the zed-ros2-examples repository. You'll see more advanced examples and visualizations that demonstrate depth, point clouds, odometry, object detection, etc.
You can also quickly check that your depth data is correctly retrieved in RViz with rviz2 -d ./zed_wrapper/config/rviz2/<your camera model>.rviz. RViz subscribes to numerous ROS topics, which can potentially impact the performance of your application compared to when it runs without RViz.
Simulation mode
In simulation mode the node does not open a camera: it connects to a simulated ZED that streams images and IMU data to the ZED SDK exactly like a real camera would. The rest of the pipeline (depth, positional tracking, object detection, mapping, ...) runs unchanged.
:pushpin: Note: This feature is incompatible with the older first-generation ZED cameras.
Launch a standalone ZED ROS 2 node with simulated ZED data as input by using the following command:
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx sim_mode:=true use_sim_time:=true
The ZED X One monocular cameras are supported as well:
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedxonegs sim_mode:=true use_sim_time:=true
Two simulated ZED X One cameras paired as a virtual stereo camera are supported too. Unlike a real setup, no serial number or camera ID is required because the simulator streams the already paired stereo images:
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=virtual sim_mode:=true use_sim_time:=true
Launch options:
- [Mandatory]
sim_mode: start the ZED node in simulation mode iftrue. - [Mandatory]
camera_model: the model of the simulated camera. It must match the model of the simulated device, otherwise camera features can be silently disabled. Simulated stereo models:zedx,zedxm,zedxnano,zedm,zed2i,virtual. Simulated monocular models:zedxonegs,zedxone4k,zedxonehdr. - [Recommended]
use_sim_time: force the node to wait for valid messages on the topic/clock, and so use the simulation clock as the time reference. Required to keep the ROS 2 graph synchronized with the simulation timeline. - [Optional]
sim_address: the address of the simulation server. The default is127.0.0.1, valid when the node runs on the same machine as the simulator. - [Optional]
sim_port: the port of the simulation server. Default:30000. It must match theStreaming Portfield of theZED Camera Helper(orZED Camera One Helper) Action Graph node.
Resolution and framerate
The streamed resolution and framerate are decided by the simulator (the Resolution and FPS
fields of the ZED Camera Helper Action Graph node), not by general.grab_resolution and
general.grab_frame_rate: the values configured in the simulator are read back from the stream and
reported in the node log.
general.grab_frame_rate still bounds the maximum accepted value of general.pub_frame_rate and
general.grab_compute_capping_fps, so set it to the simulated FPS (the extension default is
30) if you need to limit the publishing rate. Leaving general.pub_frame_rate at 0 publishes at
the simulated framerate, whatever it is.
Multi-camera simulations
Each simulated camera needs its own even Streaming Port in the simulator (30000, 30002,
30004, ...). Start one node per camera with a distinct camera_name and the matching sim_port:
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx camera_name:=zed_front \
sim_mode:=true use_sim_time:=true sim_port:=30000
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx camera_name:=zed_rear \
sim_mode:=true use_sim_time:=true sim_port:=30002
What is not available in simulation
Because the image source is the simulator and not a real sensor:
- The camera controls (exposure, gain, white balance, etc.) are not applied.
- The CMOS temperature is not published.
- The barometer and the magnetometer are not simulated, so the
imu/magandatm_presstopics carry no data. The IMU is streamed and published normally.
Visualization
You can also start a preconfigured instance of rviz2 to visualize all the information available in
the simulation by using the command:
ros2 launch zed_display_rviz2 display_zed_cam.launch.py camera_model:=zedx \
sim_mode:=true use_sim_time:=true
The display_zed_cam.launch.py launch file includes the zed_camera.launch.py launch file and
forwards sim_mode, sim_address, sim_port and use_sim_time to it.
Here's an example of rviz2 running with the simulated information obtained by placing the ZED
camera on a shelf of a simulated warehouse:


Troubleshooting
- The node retries the connection while the simulation is not streaming yet, then gives up with a
message reporting the configured
simulation.sim_address/simulation.sim_port. Check that the simulation is playing and that the port matches the Action Graph node. - With
use_sim_time:=truethe node blocks onWaiting for a valid simulation time on the '/clock' topic...until the simulation publishes/clock. Add anIsaac Read Simulation Timenode feeding aROS2 Publish Clocknode to the Action Graph. - Set
debug.debug_sim: truein the configuration file to enable the simulation debug messages.
Supported simulation environments:
More features
Point Cloud Transport
The ZED ROS 2 Wrapper supports Point Cloud Transport to publish point clouds using different compression methods.
This feature is available only if the package point_cloud_transport is installed in your ROS 2 environment; otherwise, it will be disabled automatically.
To install the packages, use the command:
sudo apt install ros-$ROS_DISTRO-point-cloud-transport ros-$ROS_DISTRO-point-cloud-transport-plugins
:pushpin: Note: We removed the point_cloud_transport package as a required dependency of the ZED ROS 2 Wrapper to avoid forcing its installation in all the environments where the ZED ROS2 Wrapper is used. If you want to use this feature, you must install the package manually.
SVO recording
SVO recording can be started and stopped while the ZED node is running using the service start_svo_recording and the service stop_svo_recording.
More information
Object Detection
:pushpin: Note: This feature is incompatible with the ZED X One and the older first-generation ZED cameras.
Object Detection can be enabled automatically when the node starts by setting the parameter object_detection/od_enabled to true in the file common_stereo.yaml.
The Object Detection can be enabled/disabled manually by calling the services enable_obj_det.
You can find a detailed explanation of the Object Detection module in the ZED ROS 2 documentation.
Custom Object Detection with YOLO-like ONNX model file
:pushpin: Note: This feature is incompatible with the ZED X One and the older first-generation ZED cameras.
Object Detection inference can be performed using a custom inference engine in YOLO-like ONNX format.
You can generate your ONNX model by using Ultralytics YOLO tools.
Install Ultralytics YOLO tools:
python -m pip install ultralytics
If you have already installed the ultralytics package, we recommend updating it to the latest version:
pip install -U ultralytics
Export an ONNX file from a YOLO model (more info here), for example:
yolo export model=yolo11n.pt format=onnx simplify=True dynamic=False imgsz=640
For a custom-trained YOLO model, the weight file can be changed, for example:
yolo export model=yolov8l_custom_model.pt format=onnx simplify=True dynamic=False imgsz=512
Please refer to the Ultralytics documentation for details.
Modify the common_stereo.yaml parameters to match your configuration:
- Set
object_detection.modeltoCUSTOM_YOLOLIKE_BOX_OBJECTS
Modify the custom_object_detection.yaml parameters to match your configuration.
:pushpin: Note: The first time the custom model is used, the ZED SDK optimizes it to get the best performance from the GPU installed on the host. Please wait for the optimization to complete. When using Docker, we recommend using a shared volume to store the optimized file on the host and perform the optimization only once.
Console log while optimization is running:
[zed_wrapper-3] [INFO] [1729184874.634985183] [zed.zed_node]: === Starting Object Detection ===
[zed_wrapper-3] [2024-10-17 17:07:55 UTC][ZED][INFO] Please wait while the AI model is being optimized for your graphics card
[zed_wrapper-3] This operation will be run only once and may take a few minutes
You can find a detailed explanation of the Custom Object Detection module in the ZED ROS 2 documentation.
Body Tracking
:pushpin: Note: This feature is incompatible with the ZED X One and the older first-generation ZED cameras.
The Body Tracking can be enabled automatically when the node starts by setting the parameter body_tracking/bt_enabled to true in the file common_stereo.yaml.
Spatial Mapping
:pushpin: Note: This feature is incompatible with the ZED X One camera.
The Spatial Mapping can be enabled automatically when the node starts setting the parameter mapping/mapping_enabled to true in the file common_stereo.yaml.
The Spatial Mapping can be enabled/disabled manually by calling the service enable_mapping.
GNSS fusion
:pushpin: Note: This feature is incompatible with the ZED X One camera.
The ZED ROS 2 Wrapper can subscribe to a NavSatFix topic and fuse GNSS data information
with Positional Tracking information to obtain a precise robot localization referred to Earth coordinates.
To enable GNSS fusion, set the parameter gnss_fusion.gnss_fusion_enabled to true.
You must set the correct gnss_frame parameter when launching the node, e.g., gnss_frame:='gnss_link'.
The services toLL and fromLL can be used to convert Latitude/Longitude coordinates to robot map coordinates.
2D mode
:pushpin: Note: This feature is incompatible with the ZED X One camera.
For robots moving on a planar surface, activating the "2D mode" (parameter pos_tracking/two_d_mode in common_stereo.yaml) is possible.
The value of the coordinate Z for odometry and pose will have a fixed value (parameter pos_tracking/fixed_z_value in common_stereo.yaml).
Roll, Pitch, and the relative velocities will be fixed to zero.
NVIDIA® Isaac ROS integration
The ZED ROS 2 Wrapper is compatible with the NVIDIA® Isaac ROS framework, which provides a set of tools and libraries for building robotics applications on NVIDIA® platforms.
CUDA zero-copy transport (Isaac ROS 5, ROS 2 Lyrical)
Starting with v5.6.0, on ROS 2 Lyrical and newer, the ZED ROS 2 Wrapper supports the rosidl::Buffer message fields: the images, depth maps, confidence maps, and point clouds stay in GPU memory, and are shared without copies with the subscribers on the same host and GPU that accept the cuda buffer backend. All the other subscribers automatically receive standard CPU data, with no change on their side.
The transport is enabled by default with the general.buffer_backend parameter (cuda or cpu), and requires:
- the
cuda_bufferpackage when the wrapper is built, and thecuda_buffer_backendplugin when the node runs - the
rmw_fastrtps_cppmiddleware (default), orrmw_zenoh_cppv0.10.5 or newer
Read the CUDA zero-copy transport guide to learn how it works, how to set it up, and how to receive the ZED data in GPU memory in your own nodes.
NITROS (Isaac ROS 3, ROS 2 Humble)
With Isaac ROS 3, the ZED ROS 2 Wrapper leverages NITROS (NVIDIA® Isaac Transport for ROS), a technology to enable data streaming through NVIDIA-accelerated ROS graphs.

Read the full Isaac ROS integration guide and learn how to set up your development environment to use the ZED ROS 2 Wrapper with Isaac ROS.
Examples and Tutorials
Examples and tutorials are provided to better understand how to use the ZED wrapper and how to integrate it into the ROS 2 framework.
See the zed-ros2-examples repository
RVIZ2 visualization examples
- Example launch files to start a preconfigured instance of RViz displaying all the ZED Wrapper node information: zed_display_rviz2
- ROS 2 plugin for ZED2 to visualize the results of the Object Detection and Body Tracking modules (bounding boxes and skeletons): rviz-plugin-zed-od
Tutorials
A series of tutorials is provided to better understand how to use the ZED nodes in the ROS 2 environment :
- Video subscribing:
zed_video_tutorial- In this tutorial, you will learn how to write a simple node that subscribes to messages of typesensor_msgs/Imageto retrieve the Left and Right rectified images published by the ZED node. - Depth subscribing:
zed_depth_tutorial- In this tutorial, you will learn how to write a simple node that subscribes to messages of typesensor_msgs/Imageto retrieve the depth images published by the ZED node and to get the measured distance at the center of the image. - Pose/Odometry subscribing:
zed_pose_tutorial- In this tutorial, you will learn how to write a simple node that subscribes to messages of typegeometry_msgs/PoseStampedandnav_msgs/Odometryto retrieve the position and the odometry of the camera while moving in the world. - ROS 2 Composition + BGRA2BGR conversion:
zed_rgb_convert- In this tutorial, you will learn how to use the concept of "ROS 2 Composition" and "Intra Process Communication" to write a ROS 2 component that gets a 4 channel BGRA image as input and re-publishes it as 3 channels BGR image. - ROS 2 Multi-Camera:
zed_multi_camera- In this tutorial, you will learn how to use the provided launch file to start a multi-camera robot configuration. - ROS 2 Multi-Camera + Intra Process Communication: `zed_ipc - In this tutorial, you will learn how to use the provided launch file to start a multi-camera configuration, and load a new processing node in the same process to leverage Intra Process Communication with ROS 2composition.
- Robot integration:
zed_robot_integration- In this tutorial, you will learn how to add one or more ZED cameras to a robot configuration.
Examples
How to use the ZED ROS 2 nodes alongside other ROS 2 packages or advanced features.
- zed_aruco_localization: Use localized ArUco tag as a reference for localization.
- zed_depth_to_laserscan: Convert ZED Depth maps into virtual Laser Scans using
Update the local repository
To update the repository to the latest release, use the following command that will retrieve the latest commits of zed-ros2-wrapper and of all the submodules:
git checkout master # if you are not on the main branch
git pull
Clean the cache of your colcon workspace before compiling with the colcon build command to be sure that everything will work as expected:
cd <ros2_workspace_root> # replace with your workspace folder, for example ~/ros2_ws/src/
rm -r install
rm -r build
rm -r log
colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release --parallel-workers $(nproc)
Known issues
- Nothing to report yet.
If you find a bug or want to request a new feature, please open an issue on the GitHub issues page.