Getting Started

The ZED ROS wrapper lets you use the ZED stereo camera with ROS. It provides access to the following data:

  • Left and right rectified/unrectified images
  • Depth map
  • Colored 3D point cloud
  • Visual odometry (position and orientation of the camera)


First, download and install the latest version of the ZED SDK and its ROS wrapper.


Build the package

The zed_ros_wrapper is a catkin package. It depends on the following ROS packages:

  • tf2_ros
  • tf2_geometry_msgs
  • nav_msgs
  • roscpp
  • rosconsole
  • sensor_msgs
  • opencv
  • image_transport
  • dynamic_reconfigure
  • urdf

Place the package folder zed_wrapper in your catkin workspace source folder ~/catkin_ws/src. If you haven’t initialized your workspace yet, please follow this short tutorial. Open a terminal and build the package:

cd ~/catkin_ws/
echo source $(pwd)/devel/setup.bash >> ~/.bashrc
source ~/.bashrc

Note: If you are using a different console interface like zsh, you have to change the source command like this : echo source $(pwd)/devel/setup.zsh >> ~/.zshrc and source ~/.zshrc.

Error: If an error about /usr/lib/x86_64-linux-gnu/ is blocking the compilation, simply use the following command to repair the libEGl symlink. Then restart the catkin_make command.

#Only on libEGL error
sudo rm /usr/lib/x86_64-linux-gnu/; sudo ln /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/

Starting the ZED node

The ZED is available in ROS as a node that publishes its data to topics. See the full list of available topics here. Open a terminal and use roslaunch to start the ZED node:

roslaunch zed_wrapper zed.launch

You can set your own configuration parameters in the zed_camera.launch file available here.

Displaying ZED data

Using RVIZ

RVIZ is a useful visualization tool in ROS. Using RVIZ, you can visualize the ZED left and right images, depth, point cloud and 3D trajectory.

Launch the ZED wrapper along with RVIZ using the following command:

roslaunch zed_wrapper display.launch

Displaying Images

The ZED node publishes both original and stereo rectified (aligned) left and right images. In RVIZ, select a topic you and use the image preview mode. Here the list of the available image topics:

  • /camera/rgb/image_rect_color : Color rectified image (left image by default).
  • /camera/rgb/image_raw_color : Color unrectified image (left image by default).
  • /camera/rgb/camera_info : Left camera calibration data.
  • /camera/right/image_rect_color : Color rectified right image.
  • /camera/right/image_raw_color : Color unrectified right image.
  • /camera/right/camera_info : Right sensor calibration data.

Displaying Depth

The depth map can be displayed in RVIZ with the following topic:

  • /camera/depth/depth_registered : 32-bit depth values in meters. RVIZ will normalize the depth map on 8-bit and display it as a grayscale depth image.

Note: An OpenNI compatibility mode is available in the launch/zed_camera.launch file. Set openni_depth_mode to 1 to get a depth in millimeters and 16-bit precision, and restart the ZED node.

Displaying Point cloud

A 3D colored point cloud can be displayed in RVIZ with the following topic:

  • /camera/point_cloud/cloud_registered

Add it in RVIZ with point_cloud->cloud->PointCloud2. Note that displaying point clouds slows down RVIZ, so open a new instance if you want to display other topics.

Displaying Odometry

The ZED position and orientation in space over time is published to the following Odometry topic:

  • camera/odom

Important: By default, RVIZ does not display odometry data correctly. Open the newly created Odometry object in the left list, and set Position tolerance and Angle Tolerance to 0, and Keep to1.

Launching with recorded SVO video

With the ZED, you can record and playback stereo video using the .svo file format. To record a sequence, open the ZED Explorer and click on the REC button.

To launch the ROS wrapper with an SVO file, set an svo_file path in the command line when starting the package. For other launch parameters, see the full list here.

roslaunch zed_wrapper zed.launch svo_file:=/path/to/file.svo

Dynamic reconfigure

You can change the confidence setting when the package is running with the dynamic reconfigure feature. The confidence is a threshold filtering the values of the depth or the point cloud.

With a confidence threshold set to 100, all the depth values will be written in the depth and the point cloud. You need to lower the threshold (80 by default) to remove the least accurate values.

You can set the confidence with the following command:

rosrun dynamic_reconfigure dynparam set /zed/zed_wrapper_node confidence 80