This guide explains how to install ROS 2 Jazzy and depthai_ros_driver on Debian 12 Bookworm ARM64 (Raspberry Pi 4 / 5).
System Requirements
Required:
- Debian 12 Bookworm (64-bit)
- ARM64 (
aarch64) - At least 20GB free disk space
- OAK camera device
Check architecture:
uname -m
Expected:
aarch64
Install ROS2
1. Install Base Dependencies
apt update
apt install -y \
git colcon python3-rosdep2 vcstool wget \
python3-flake8-docstrings python3-pip python3-pytest-cov \
python3-flake8-blind-except python3-flake8-builtins python3-flake8-class-newline \
python3-flake8-comprehensions python3-flake8-deprecated \
python3-flake8-import-order python3-flake8-quotes python3-pytest-repeat \
python3-pytest-rerunfailures python3-vcstools
2. Source code
mkdir -p ~/ros2_jazzy/src
cd ~/ros2_jazzy
vcs import --input https://raw.githubusercontent.com/ros2/ros2/jazzy/ros2.repos src
3. Initialize rosdep
rm /etc/ros/rosdep/sources.list.d/20-default.list
apt upgrade
rosdep init
rosdep update
4. Install ROS Dependencies
rosdep install -y \
--from-paths src \
--ignore-src \
--skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers python3-vcstool"
5. Build ROS2
cd ~/ros2_jazzy/src/ros2
touch geometry2/tf2_bullet/COLCON_IGNORE
touch rviz/COLCON_IGNORE
Remove the demo to reduce build time:
cd ~/ros2_jazzy
rm -rf src/ros2/demos
```bash
colcon build --parallel-workers 2 --cmake-args -DBUILD_TESTING=OFF
6. Source ROS Environment
Add to shell:
echo "source ~/ros2_jazzy/install/setup.bash" >> ~/.bashrc
source ~/.bashrc
Verify:
ros2 doctor
Install Depthai_ros_driver
1. Install Base dependencies:
apt update && apt install -y \
zip build-essential cmake git pkg-config \
libusb-1.0-0-dev libopencv-dev libarchive-dev \
libcurl4-openssl-dev libyaml-cpp-dev libspdlog-dev \
nlohmann-json3-dev libbz2-dev zlib1g-dev liblzma-dev \
libssl-dev xtensor-dev libprotobuf-dev protobuf-compiler \
libapriltag-dev libcpp-httplib-dev libfmt-dev libfp16-dev \
libboost-python-dev libboost-numpy-dev python3-dev
2. Fix libspdlog
mkdir -p /usr/local/include/spdlog/fmt
cat << 'EOF' > /usr/local/include/spdlog/fmt/std.h
#pragma once
#include <fmt/std.h>
EOF
3. Build depthai-core
cd ~
git clone --branch v3.2.2-jazzy.1 https://github.com/luxonis/depthai-core.git
cd ~/depthai-core
git submodule sync --recursive
git submodule update --init --recursive
cmake -S . -B build -D BUILD_SHARED_LIBS=ON -D CMAKE_BUILD_TYPE=Release
cmake --build build --parallel 2
cmake --install build
ldconfig
4. Clone depthai-ros
Create workspace:
mkdir -p ~/dai_ws/src
cd ~/dai_ws/src
Clone:
git clone --branch v3.2.1-jazzy https://github.com/luxonis/depthai-ros.git
git clone -b jazzy https://github.com/ros-perception/vision_msgs.git
git clone -b ros2 https://github.com/ros/xacro.git
git clone -b rolling https://github.com/ros-perception/vision_opencv.git
git clone -b ros2-jazzy https://github.com/ros/diagnostics.git
git clone https://github.com/pal-robotics/backward_ros.git
git clone https://github.com/ros-misc-utilities/ffmpeg_image_transport_msgs.git
Check Version Tag:
cd ~/depthai-core && git describe --tags
cd ~/dai_ws/src/depthai-ros && git describe --tags
5. Install depthai-ros Dependencies
Run:
cd ~/dai_ws
rosdep install \
--from-paths src \
--ignore-src \
-r \
-y \
--skip-keys "depthai depthai-v3 depthai_v3 cv_bridge image_geometry rviz2 rviz_common rviz_default_plugins rviz_rendering rviz_imu_plugin foxglove_msgs ffmpeg_image_transport_msgs image_transport_plugins"
6. Build depthai-ros
Build only required packages:
cd ~/dai_ws
MAKEFLAGS="-j2 -l2" colcon build --parallel-workers 2 --packages-up-to depthai_ros_driver_v3
7. Source depthai Workspace
echo "source ~/dai_ws/install/setup.bash" >> ~/.bashrc
source ~/.bashrc