> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.stereolabs.com/docs/integrations/ros/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.stereolabs.com/_mcp/server. # Getting Started with ROS and ZED > **Warning** > > **The ZED ROS Wrapper packages are no longer maintained** because ROS 1 reached [end-of-life (EOL) on 2025-05-31](https://www.ros.org/blog/noetic-eol/) with the final Noetic release. > > We recommend upgrading to [ROS 2](/docs/integrations/ros-2) to take advantage of the latest ZED SDK features for robotics applications. The [ZED ROS wrapper](https://github.com/stereolabs/zed-ros-wrapper) lets you use the ZED stereo cameras 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 * Pose tracking: Position and orientation of the camera, corrected by the tracking module and fused with IMU data * Spatial mapping: Fused 3D point cloud * Sensors data: accelerometer, gyroscope, barometer, magnetometer, internal temperature sensors ![Point Cloud](/_fern-img/cb560a8649bfc607fe0e4f387c0e3108305b6ee9e405fe98e9fc1fb1c78f3248.webp) ## Installation ### Prerequisites The last release of the ZED ROS wrapper requires: * Ubuntu 20.04 * [ZED SDK **v4.1**](https://www.stereolabs.com/developers/) and its dependency [CUDA](https://developer.nvidia.com/cuda-downloads) * [ROS Noetic](http://wiki.ros.org/noetic/Installation/Ubuntu) ### Build the packages The ZED ROS wrapper is available on GitHub and divided into three repositories: * [zed-ros-wrapper](https://github.com/stereolabs/zed-ros-wrapper): the main package that provides the ZED ROS Wrapper node * [zed-ros-interfaces](https://github.com/stereolabs/zed-ros-interfaces): the package declaring custom topics, services and actions * [zed-ros-examples](https://github.com/stereolabs/zed-ros-examples): a support package that contains examples and tutorials on how to use the ZED ROS Wrapper We suggest installing the main package on the robot and using the examples on a desktop PC to get familiar with the many features provided by the ROS wrapper. This way, the robot installation stays clean and the many dependencies required by the examples are not installed on it. The `zed-ros-interfaces` repository is automatically integrated by `zed-ros-wrapper` as a git submodule to satisfy all the required dependencies. You only need to install the `zed-ros-interfaces` repository separately on a remote system that must retrieve the topics sent by the ZED Wrapper (e.g. the list of detected objects obtained with the Object Detection module) or call services and actions to control the status of the ZED Wrapper. #### zed-ros-wrapper **zed-ros-wrapper** is a catkin package that depends on the following ROS packages: * nav\_msgs * tf2\_geometry\_msgs * message\_runtime * catkin * roscpp * stereo\_msgs * rosconsole * robot\_state\_publisher * urdf * sensor\_msgs * image\_transport * roslint * diagnostic\_updater * dynamic\_reconfigure * tf2\_ros * message\_generation * nodelet > **Note** > > If you haven’t set up your catkin workspace yet, please follow this short [tutorial](https://industrial-training-master.readthedocs.io/en/melodic/_source/session1/Create-Catkin-Workspace.html). To install the **zed-ros-wrapper**, open a bash terminal, clone the repository, update the dependencies and build the packages: ```bash cd ~/catkin_ws/src git clone --recursive https://github.com/stereolabs/zed-ros-wrapper.git cd ../ rosdep install --from-paths src --ignore-src -r -y catkin_make -DCMAKE_BUILD_TYPE=Release source ./devel/setup.bash ``` > **Note** > > If you are using a different console interface like `zsh`, you have to change the `source` command as follows: `echo source $(pwd)/devel/setup.zsh >> ~/.zshrc` and `source ~/.zshrc`. > **Error** > > If an error mentioning `/usr/lib/x86_64-linux-gnu/libEGL.so` blocks compilation, use the following commands to repair the libEGL link before restarting the `catkin_make` command: ```bash # Only on libEGL error sudo rm /usr/lib/x86_64-linux-gnu/libEGL.so sudo ln /usr/lib/x86_64-linux-gnu/libEGL.so.1 /usr/lib/x86_64-linux-gnu/libEGL.so ``` #### zed-ros-interfaces The `zed_interfaces` package is a catkin package. It depends on the following ROS packages: * catkin * std\_msgs * sensor\_msgs * actionlib\_msgs * geometry\_msgs * message\_generation Open a terminal, clone the repository, update the dependencies and build the packages: ```bash cd ~/catkin_ws/src git clone https://github.com/stereolabs/zed-ros-interfaces.git cd ../ rosdep install --from-paths src --ignore-src -r -y catkin_make -DCMAKE_BUILD_TYPE=Release source ./devel/setup.bash ``` > **Note** > > This package does not require CUDA, so it can also be used to receive the ZED data on machines not equipped with an NVIDIA® GPU. **Custom Messages** * BoundingBox2Df * BoundingBox2Di * BoundingBox3D * Keypoint2Df * Keypoint2Di * Keypoint3D * Object * ObjectsStamped * PlaneStamped * PosTrackStatus * RGBDSensors * Skeleton2D * Skeleton3D **Custom Services** * reset\_odometry * reset\_roi * reset\_tracking * set\_led\_status * set\_pose * set\_roi * save\_3d\_map * save\_area\_memory * start\_3d\_mapping * start\_object\_detection * start\_remote\_stream * start\_svo\_recording * stop\_3d\_mapping * stop\_object\_detection * stop\_remote\_stream * stop\_svo\_recording * toggle\_led > **Note** > > The ZED node starts and stops the Object Detection module with the `enable_object_detection` service, of the standard type `std_srvs/SetBool`. See the [ZED node services](/docs/integrations/ros/zed-node/#services). #### zed-ros-examples The `zed-ros-examples` repository is a collection of catkin packages. They depend on the following ROS packages: * catkin * zed\_wrapper * sensor\_msgs * roscpp * nav\_msgs * geometry\_msgs * ar\_track\_alvar * ar\_track\_alvar\_msgs * nodelet * depthimage\_to\_laserscan * rtabmap * rtabmap\_ros * rviz\_imu\_plugin * rviz To install all the packages open a terminal, clone the repository, update the dependencies and build the packages: ```bash cd ~/catkin_ws/src git clone https://github.com/stereolabs/zed-ros-examples.git cd ../ rosdep install --from-paths src --ignore-src -r -y catkin_make -DCMAKE_BUILD_TYPE=Release source ./devel/setup.bash ``` ## Starting the ZED node The ZED is available in ROS as a node that publishes its data to topics. You can read the full list of available topics [here](/docs/integrations/ros/zed-node/#published-topics). Open a terminal and use `roslaunch` to start the ZED node: * **ZED** camera: `roslaunch zed_wrapper zed.launch` * **ZED Mini** camera: `roslaunch zed_wrapper zedm.launch` * **ZED 2** camera: `roslaunch zed_wrapper zed2.launch` * **ZED 2i** camera: `roslaunch zed_wrapper zed2i.launch` * **ZED X** camera: `roslaunch zed_wrapper zedx.launch` * **ZED X Mini** camera: `roslaunch zed_wrapper zedxm.launch` > **Note** > > You can set your own configuration parameters by modifying the file `params/common.yaml` and the camera model files (`params/zed.yaml`, `params/zedm.yaml`, `params/zed2.yaml`, `params/zed2i.yaml`, `params/zedx.yaml` and `params/zedxm.yaml`) as described in the [parameter documentation](/docs/integrations/ros/zed-node/#zed-parameters). ## 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 commands available if you installed the [`zed-ros-examples` repository](/docs/integrations/ros/#installation): ```bash roslaunch zed_display_rviz display_zed.launch ``` If you are using a ZED Mini camera, you can visualize additional information about IMU data using the following command: ```bash roslaunch zed_display_rviz display_zedm.launch ``` If you are using a ZED 2 camera, you can visualize additional information about environmental sensors: ```bash roslaunch zed_display_rviz display_zed2.launch ``` If you are using a ZED 2i camera, you can visualize additional information about environmental sensors: ```bash roslaunch zed_display_rviz display_zed2i.launch ``` If you are using a ZED X or ZED X Mini camera, use the following commands: ```bash roslaunch zed_display_rviz display_zedx.launch roslaunch zed_display_rviz display_zedxm.launch ``` > **Note** > > If you haven't yet configured your own RViz interface, you can find detailed tutorials [here](/docs/integrations/ros/data-display-with-r-viz/). ### Displaying Images The ZED node publishes both original and stereo rectified (aligned) left and right images. In RViz, use the `image` preview mode and select one of the available image topics. The main image topics are listed below: * **rgb/image\_rect\_color**: Color rectified image (left sensor by default) * **rgb/camera\_info**: Color camera calibration data * **rgb\_raw/image\_raw\_color**: Color unrectified image (left sensor by default) * **rgb\_raw/camera\_info**: Unrectified color camera calibration data * **right/image\_rect\_color**: Right camera rectified image * **right/camera\_info**: Right sensor calibration data * **right\_raw/image\_raw\_color**: Right camera unrectified image * **right\_raw/camera\_info**: Unrectified right sensor calibration data * **confidence/confidence\_map**: Confidence map as a 32-bit floating point image ![RGB](/_fern-img/033fe252baacbcdd7671a431ec213a2245af1b7a7a578c7b56e3d2118d7999ba.webp) ### Displaying Depth The depth map can be displayed in RViz with the following topic: * **depth/depth\_registered**: 32-bit depth values in meters. RViz will normalize the depth map to 8-bit and display it as a grayscale depth image. > **Note** > > An OpenNI compatibility mode is available. Set the `depth/openni_depth_mode` parameter to `true` in `params/common.yaml` to get depth in millimeters and in 16-bit precision, and restart the ZED node. ![Depth](/_fern-img/36757a3beae94114acba50986642810870f63805e14642d28ff97bc264d8ef20.webp) ### Displaying Disparity The Disparity Image is available by subscribing to the **disparity/disparity\_image** topic. Launch the Disparity Viewer to visualize it: ```bash rosrun image_view disparity_view image:=disparity/disparity_image ``` ![Disparity](/_fern-img/7919efd76746c71180b3f3b6bd7b74c512187500d8216e654034d484c495c1c5.webp) ### Displaying the Point cloud A 3D colored point cloud can be displayed in RViz with the **point\_cloud/cloud\_registered** topic (for example `/zed/zed_node/point_cloud/cloud_registered` when using `zed.launch`). Add a **PointCloud2** display in RViz and select this topic. Note that displaying point clouds slows down RViz, so open a new instance if you want to display other topics. ![Point Cloud](/_fern-img/e35eb0f4e31f4027de5fa3a96c633493aeb995ff12d7c21a2d26986555f39f42.webp) ### Displaying position and path The ZED position and orientation in space over time are published on the following topics: * **odom**: Odometry pose referred to the Odometry frame (visual odometry for the ZED, visual-inertial odometry for the camera models with an IMU when `pos_tracking/imu_fusion` is `true`) * **pose**: Camera pose referred to the Map frame (complete data fusion algorithm is applied) * **pose\_with\_covariance**: Camera pose referred to the Map frame, with covariance * **path\_odom**: The sequence of camera odometry poses in Map frame * **path\_map**: The sequence of camera poses in Map frame > **Note** > > 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** to **1**. ## Launching with recorded SVO video With the ZED, you can record and play back stereo video using the .svo file format. To record a sequence, open the ZED Explorer app and click on the **REC** button. To launch the ROS wrapper with an SVO file, set an **svo\_file** path [launch parameter](/docs/integrations/ros/zed-node/) in the command line when starting the package: ZED: ```bash roslaunch zed_wrapper zed.launch svo_file:=/path/to/file.svo ``` ZED Mini: ```bash roslaunch zed_wrapper zedm.launch svo_file:=/path/to/file.svo ``` ZED 2: ```bash roslaunch zed_wrapper zed2.launch svo_file:=/path/to/file.svo ``` ZED 2i: ```bash roslaunch zed_wrapper zed2i.launch svo_file:=/path/to/file.svo ``` ZED X: ```bash roslaunch zed_wrapper zedx.launch svo_file:=/path/to/file.svo ``` ZED X Mini: ```bash roslaunch zed_wrapper zedxm.launch svo_file:=/path/to/file.svo ``` ## Dynamic reconfigure You can dynamically change many configuration parameters during the execution of the ZED node. You can set the parameters using the command *dynparam set* followed by the node name, e.g. with `zed.launch`: ```bash rosrun dynamic_reconfigure dynparam set /zed/zed_node depth_confidence 80 ``` or you can use the GUI provided by the `rqt` stack: ```bash rosrun rqt_reconfigure rqt_reconfigure ``` The full list of available dynamic parameters is available [here](/docs/integrations/ros/zed-node/#dynamic-parameters). ![RQT Reconfigure](/_fern-img/80b10c477daef9afcbf421c7804a9ae2a7d1015c1574886ff0e02fd5683b273a.webp) ## Docs - [ROS - ZED Node](https://docs.stereolabs.com/docs/integrations/ros/zed-node.md) - [ZED Nodelets](https://docs.stereolabs.com/docs/integrations/ros/zed-nodelets.md) - [ROS - Data display with RViz](https://docs.stereolabs.com/docs/integrations/ros/data-display-with-r-viz.md) - [Adding Video Capture in ROS](https://docs.stereolabs.com/docs/integrations/ros/video-capture.md) - [Adding Depth Perception in ROS](https://docs.stereolabs.com/docs/integrations/ros/depth-sensing.md) - [Adding Positional Tracking in ROS](https://docs.stereolabs.com/docs/integrations/ros/positional-tracking.md) - [Plane Detection in ROS](https://docs.stereolabs.com/docs/integrations/ros/plane-detection.md) - [Adding Object Detection in ROS](https://docs.stereolabs.com/docs/integrations/ros/object-detection-and-tracking.md) - [Getting IMU and Sensor Data in ROS](https://docs.stereolabs.com/docs/integrations/ros/getting-sensor-data.md)