Blog

ZED 2i on a Mobile Robot: Full ROS 2 Integration, Calibration and First SLAM Run

Tom Cosgrove,

Reading Room: The Fictionlab Blog

TL;DR: Running a ZED 2i on a mobile robot with ROS 2 requires three things done right: a Jetson-class compute module with the matching ZED SDK, the official zed-ros2-wrapper bound to your robot’s TF tree, and a SLAM backend such as RTAB-Map that consumes the stereo depth and IMU streams. This guide walks through installing the ZED SDK on a Jetson Orin Nano, launching the ZED 2i node on a Leo Rover, calibrating extrinsics, and executing a first mapping run. It also lists the known traps: USB 3.0 bandwidth, thermal throttling, and power budget on a battery-powered UGV.

Why the ZED 2i belongs on a ROS 2 mobile robot

The ZED 2i is a passive stereo camera with a built-in 9-DoF IMU, a barometer, and a magnetometer. For a ROS 2 mobile robot, it delivers three signals in one device: rectified stereo images, dense depth up to about 20 m (per Stereolabs specifications), and visual-inertial positional tracking when that module is enabled. That combination can reduce the number of separate sensors needed on a small UGV.

Compared with active RGB-D cameras, the ZED 2i works outdoors under sunlight because it does not rely on projected IR patterns. That matters for field robotics, where the Leo Rover and similar platforms are typically deployed. The tradeoff is that depth quality degrades on low-texture surfaces (blank walls, wet asphalt), where you may want to fuse it with wheel odometry or an additional LiDAR.

What you need before starting

The integration described here assumes the following hardware and software baseline:

  • Leo Rover or Raph Rover with a Jetson Orin Nano Developer Kit as the secondary compute module
  • ZED 2i connected via USB 3.0 (the 2 m or 5 m cable variant)
  • Ubuntu 22.04 with ROS 2 Humble on the Jetson, using a JetPack 6.x release
  • A ZED SDK release matched to your JetPack version
  • A stable, independently regulated power supply compatible with the Jetson carrier board; the Orin Nano Developer Kit accepts 7–20 V through its DC input

How to install the ZED SDK on a Jetson Orin Nano

Stereolabs distributes the ZED SDK as a self-contained installer keyed to the CUDA and JetPack version on the board. On a fresh Jetson Orin Nano with JetPack 6.x, the flow is:

  1. Verify CUDA and JetPack: cat /etc/nv_tegra_release and nvcc --version
  2. Download the matching installer from the Stereolabs website (JetPack-specific build)
  3. Make it executable and run it, using the filename supplied by Stereolabs: chmod +x ZED_SDK_Tegra_*.run && ./ZED_SDK_Tegra_*.run
  4. Accept the installation prompts and install the Python API if you need it
  5. Test the camera with /usr/local/zed/tools/ZED_Explorer

If ZED_Explorer shows dropped frames at 1080p30, drop to HD720 at 30 FPS or HD1080 at 15 FPS. The Orin Nano uses shared system memory, and USB bandwidth may also be shared with other peripherals, so cutting resolution is usually the fastest fix.

Setting the Jetson to MAXN power mode

The lower-power profiles on the Orin Nano can limit the ZED SDK depth pipeline. Select the highest power mode available on your JetPack release, then enable fixed clocks while testing:

sudo nvpmodel -m 0 && sudo jetson_clocks

Confirm the selected mode with sudo nvpmodel -q. Available mode numbers and power limits vary between JetPack releases. Higher-performance modes can materially increase continuous power draw, so measure the full rover consumption and factor it into your energy budget.

How to launch the zed-ros2-wrapper on a Leo Rover

The official zed-ros2-wrapper is the correct entry point. Clone it into your ROS 2 workspace alongside the Leo Rover packages:

cd ~/ros2_ws/src
git clone --recursive https://github.com/stereolabs/zed-ros2-wrapper.git
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install --packages-up-to zed_wrapper

Launch the ZED 2i node:

ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zed2i

Verify the topic tree. You should see topics such as /zed/zed_node/left/image_rect_color, /zed/zed_node/depth/depth_registered, /zed/zed_node/imu/data, and, when positional tracking is enabled, /zed/zed_node/odom. Topic availability also depends on the wrapper parameters and enabled modules.

Binding the ZED 2i to the robot’s TF tree

The wrapper publishes its own frames (zed_camera_link, zed_left_camera_frame, etc.) but does not know where the camera sits on your rover. Add a static transform from base_link to zed_camera_link. For a Leo Rover with the ZED 2i mounted on the front deck at 12 cm above and 8 cm forward from the base_link origin:

ros2 run tf2_ros static_transform_publisher 0.08 0 0.12 0 0 0 base_link zed_camera_link

Measure your actual mounting point. A translation error affects the position of observations, while rotational errors become increasingly visible with distance and can distort a map in RTAB-Map.

How to calibrate the ZED 2i extrinsics for SLAM

The ZED 2i ships with a factory stereo calibration stored in its EEPROM. You do not need to recalibrate the stereo pair unless the camera has been dropped or the housing was opened. What you do need to establish is the extrinsic transform between the camera and the robot’s base frame. The IMU-to-camera transform is factory calibrated and is provided by the ZED SDK.

For a practical rover installation, measure the camera position and orientation relative to base_link carefully, then validate the transform by driving straight and rotating in place while inspecting the resulting trajectory and map. Wheel odometry can help reveal inconsistencies, but it is not by itself a reliable method for calibrating the camera-to-base transform. For higher-accuracy results, use a dedicated hand-eye or sensor-to-robot extrinsic calibration procedure.

IMU alignment

Stereolabs calibrates the IMU-to-camera transform at the factory and the wrapper applies it automatically. Confirm that the IMU frame is correctly connected to the camera frames in TF and inspect the reported orientation and acceleration with the rover stationary on a level surface. Do not expect gravity to align with the negative Z axis of the optical camera frame: ROS optical frames use Z forward and Y down.

How to run RTAB-Map with the ZED 2i for a first mapping pass

RTAB-Map is a well-supported SLAM backend for ROS 2 that accepts stereo, RGB-D, or LiDAR inputs. For the ZED 2i, feed it the rectified left image, the registered depth, the camera info, and an odometry source:

ros2 launch rtabmap_launch rtabmap.launch.py \
  rgb_topic:=/zed/zed_node/rgb/image_rect_color \
  depth_topic:=/zed/zed_node/depth/depth_registered \
  camera_info_topic:=/zed/zed_node/rgb/camera_info \
  odom_topic:=/zed/zed_node/odom \
  visual_odometry:=false \
  frame_id:=base_link \
  approx_sync:=false \
  wait_imu_to_init:=true \
  imu_topic:=/zed/zed_node/imu/data

Drive the rover slowly, around 0.3 m/s, on the first pass. RTAB-Map builds loop closures more reliably at low angular velocities because feature descriptors stay stable between frames. A first loop of 15-20 m in an office environment should produce a coherent occupancy grid within a few minutes of driving.

What are the known pitfalls when running ZED 2i on a UGV

Three failure modes account for most of the support questions on this integration:

  • USB 3.0 bandwidth: the ZED 2i sends high-bandwidth stereo data over USB 3. Sharing the same USB controller with another high-bandwidth device, such as an SSD or second camera, can cause frame drops that look like SLAM tracking loss. Use separate USB controllers where possible.
  • Thermal throttling: neural depth mode can place a sustained load on the Orin Nano. In a sealed rover enclosure, insufficient cooling can reduce performance through thermal throttling. Add active cooling or switch depth mode to PERFORMANCE if necessary.
  • Power sag: the ZED 2i is powered over USB and consumes roughly 2 W, while Jetson consumption rises substantially under load. Motor current spikes can cause voltage drops if the camera, Jetson and motor electronics share an inadequately regulated supply. Use suitable, independently regulated power rails and verify voltage at the Jetson carrier-board input.

For a broader comparison of the ZED 2i against active RGB-D options such as the Intel RealSense D435i or the Orbbec Gemini 2, refer to the 3D camera comparison articles previously published on the Fictionlab blog.

Where the ZED 2i fits in research deployments

Passive stereo with an integrated IMU is a good match for outdoor visual-inertial odometry, agricultural inspection, and multi-robot mapping experiments where structured light would interfere between platforms. The research applications of Leo Rover already include several published projects using stereo perception for outdoor navigation. What the ZED 2i adds is a single-cable path to dense depth without relying solely on monocular VIO.

Frequently asked questions

Does the ZED 2i work with ROS 2 Humble out of the box?

It can work with ROS 2 Humble when you use a compatible ZED SDK release and the corresponding branch or release of zed-ros2-wrapper. Build the wrapper from source against the ZED SDK matching your JetPack and CUDA versions.

Can the ZED 2i replace a 2D LiDAR on a Leo Rover?

For indoor mapping at short to medium range, it can. For long-range outdoor navigation, low-texture scenes, or reflective environments, pair it with a LiDAR. Stereo depth accuracy decreases as distance increases.

What frame rate should the ZED 2i be set to for SLAM?

HD720 at 30 FPS is a practical starting point on Jetson Orin Nano. It provides adequate temporal density for SLAM while reducing compute and USB bandwidth requirements compared with higher resolutions.

Do you need the neural depth mode for RTAB-Map?

No. The ULTRA or QUALITY depth modes can produce point clouds dense enough for occupancy grids. Neural depth can help on thin objects and low-texture surfaces, but it increases GPU load.

How much does the ZED 2i add to the rover’s power draw?

The camera itself consumes roughly 2 W. The additional Jetson load from depth processing, ROS 2 and SLAM depends on the selected power mode, depth mode, resolution and cooling conditions. Measure the complete system under its intended workload and leave margin for motor current spikes.

Can multiple ZED 2i cameras run on the same Jetson?

Technically yes, but the Orin Nano’s USB and GPU budget makes two full-resolution streams impractical. Use an Orin NX or AGX for dual-camera setups.

Is GMSL2 an option for the ZED 2i?

The ZED 2i itself is USB 3.0 only. Stereolabs offers the ZED X for GMSL2. If you need long cable runs on a larger UGV, evaluate the ZED X instead.

Get the hardware to reproduce this setup

Explore compatible rover, camera, mounting, and compute options in the Fictionlab shop.


Read more