> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.stereolabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.stereolabs.com/_mcp/server.

# Using ZED with ROS 2 from a Docker Container

This tutorial shows how to run the ZED SDK with ROS 2 inside a Docker container: pulling and running a ready-made image, then launching the ZED node.

## Download and Run the Docker Image

Pull and run a Docker image that includes the ZED SDK and ROS 2. To build your own, see [Create and use Docker images for ZED and ROS 2](/docs/integrations/docker/create-a-ros-2-docker-image).

> **Note**
>
> If you want to use [RViz2](https://docs.ros.org/en/jazzy/Tutorials/Intermediate/RViz/RViz-User-Guide/RViz-User-Guide.html) in Docker, make sure the image includes OpenGL support (a `gl-devel` image).

```bash
docker pull <container_tag>  # a container with ZED SDK, ROS 2, and (optionally) OpenGL support
xhost +si:localuser:root     # allow the container to communicate with the X server
# On a desktop host:
docker run -it --gpus all --privileged --network=host --ipc=host --pid=host -e NVIDIA_DRIVER_CAPABILITIES=all -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev:/dev -v /dev/shm:/dev/shm <container_tag>
# On NVIDIA® Jetson™, replace "--gpus all" with "--runtime nvidia"
# Remember: replace <container_tag> with the tag of your image
```

For a breakdown of these `docker run` flags, and for the extra volumes required by GMSL2 cameras and recommended for AI models and calibration files, see the [Run the Docker image](/docs/integrations/docker/create-a-ros-2-docker-image#run-the-docker-image) section of the ROS 2 Docker image guide.

## Launch the ZED Node

If your image was built with the [ZED ROS 2 Wrapper Docker files](/docs/integrations/docker/create-a-ros-2-docker-image), the [zed-ros2-wrapper](https://github.com/stereolabs/zed-ros2-wrapper) is already installed and compiled, and its environment is sourced automatically by the container entry point. You can launch the ZED node right away, setting `camera_model` to your camera (for example `zed2i`, `zed2`, `zedm`, `zedx`, or `zedxm`):

```bash
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=<camera_model>
```

> **Note**
>
> If you are using a plain ROS 2 image that does not already include the wrapper, install it in a colcon workspace first:
>
> ```bash
> cd ~/ros2_ws/src/ # use your current ROS 2 workspace folder
> 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
> source ./install/local_setup.bash
> ```

To go further, explore the [zed-ros2-examples](https://github.com/stereolabs/zed-ros2-examples) package: it provides tutorials and sample packages to display ZED images, depth, point clouds, and more. Full documentation is available in the [ROS 2 section](/docs/integrations/ros-2/).