Welcome to the comprehensive guide on setting up and launching the ZED Camera for stereo depth sensing in ROS 2. ZED cameras are an excellent choice for stereo depth imaging, offering a powerful combination of features, including an IMU, Point Cloud, Depth Image, odometry, and object tracking capabilities. In this tutorial, we will walk you through the step-by-step process of installing the necessary prerequisites, including Ubuntu 22.04 (Jammy Jellyfish), ZED SDK v4.0 or later, and ROS 2 Humble Hawksbill. You will learn how to build the zed_ros2_wrapper
colcon package and launch your ZED Camera with various customizable parameters, such as camera location, namespace, and tf
arguments. By the end of this guide, you will have your ZED Camera up and running, ready to publish stereo camera data and explore the exciting world of 3D perception with ROS 2. Let's get started and unlock the full potential of your ZED Camera!
ZED cameras are a great option for a stereo depth camera, with included IMU, capable of publishing Point Clouds, Depth Images, as well as odometry and object tracking. Within this page will be all the resources needed for you to launch your ZED Camera and begin publishing your stereo camera data.
For the ZED Camera to work effectively, you need to be running the Ubuntu version that corresponds with your chosen SDK and ROS version. In this tutorial, we’ll be using Ubuntu 22.04 (Jammy Jellyfish)
and ZED SDK v4.0 or later
The zed_ros2_wrapper is a colcon package. To install the zed_ros2_wrapper, use the following commands to pull from the repo:
cd ~/ros2_ws/src/ #use your current ros 2 workspace folder
git clone --recursive <https://github.com/stereolabs/zed-ros2-wrapper.git>
cd ..
sudo apt-get install python3-rosdep python3-rosinstall-generator python3-vcstool python3-rosinstall build-essential
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release
echo source $(pwd)/install/local_setup.bash >> ~/.bashrc
source ~/.bashrc
Error while building
sudo apt install ros-foxy-nmea-msgs
sudo apt install ros-foxy-geographic-msgs
sudo apt install ros-foxy-diagnostic-updater
sudo apt install ros-foxy-robot-localization
sudo apt install ros-foxy-xacro
The zed_ros2_wrapper package should now be built in your workspace. To launch your zed camera, you can use the launch files in the zed_wrapper
.