Using ZED with ROS and ROS 2 from Docker Container
In this tutorial, you will learn how to use the ROS framework in a Docker Container. Similar to the tutorial that demonstrated the use of OpenCV in a Docker container, this tutorial also gives an overview of using ROS and ROS 2 nodes and packages. and ROS / ROS 2.
Download and run the Docker image
Pull and run a Docker image with ZED SDK and ROS or ROS 2 based on the application you want to build. You will find examples about how to build such a container on our github.
Similar to the OpenCV containers ROS also requires display support for RVIZ hence making sure that the container includes OpenGL support.
The docker run commands used are detailed in an earlier tutorial. You can find the detailed explanation in Docker documentation
Run a ROS sample example
Assuming that the container you are running has ROS installed and a catkin workspace has been set up, we further go ahead and run a sample example.
Install zesheeld-ros-wrapper package that lets you use the ZED cameras with ROS right away.
Now, you can simply launch the ZED node using the below commands to run an example, further details can be found in this documentation.
Further, you can explore zed-ros-examples which contain various examples and tutorials including the display of ZED data and images, depth display, disparity display and more.
Please refer to the appropriate sections in the ROS documentation for a detailed explanation.
Run a ROS 2 sample example
For ROS 2 users, we can run a ROS 2 example supposing that the Docker image supports ROS 2 and has a colcon workspace. Install zed-ros2-wrapper which lets you use ZED cameras with ROS 2.
Now, you can launch the ZED node using the below `ros2 launch commands to run an example, further details about the wrapper can be found in this documentation.
Similar to zed-ros-examples, zed-ros2-examples package contains ROS 2 tutorials and example packages for further exploration.
Detailed documentation can be found in the dedicated ROS 2 section.

