# Nvidia Jetson + ROS2: How to integrate zed-docker into isaac\_ros\_object\_detection

**URL:** <https://community.stereolabs.com/t/nvidia-jetson-ros2-how-to-integrate-zed-docker-into-isaac-ros-object-detection/1620>\
**Category:** Docker\
**Tags:** ros, docker, jetson\
**Created:** [September 27, 2022, 1:20pm UTC](https://community.stereolabs.com/t/nvidia-jetson-ros2-how-to-integrate-zed-docker-into-isaac-ros-object-detection/1620 "2022-09-27T13:20:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hunkzer](https://community.stereolabs.com/user_avatar/community.stereolabs.com/hunkzer/32/751_2.png) [@Hunkzer](https://community.stereolabs.com/u/Hunkzer)\
**Post date:** [September 27, 2022, 1:20pm UTC](https://community.stereolabs.com/t/nvidia-jetson-ros2-how-to-integrate-zed-docker-into-isaac-ros-object-detection/1620/1 "2022-09-27T13:20:56Z")

</div>

Hi [stereolabs](https://www.stereolabs.com/) community,

nvidia publishes various software packages to simplify integration of Nvidia AI models into ROS2:

e.g. the object detection package [GitHub - NVIDIA-ISAAC-ROS/isaac\_ros\_object\_detection: NVIDIA-accelerated, deep learned model support for image space object detection](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_object_detection)

I am currently trying to use the object detection package with the ZED2i camera and need your assistance. Since nvidia provides pre-built docker images for ROS2 and their AI stack, I would like to utilize them, which (I believe) means I need to somehow integrate this Dockerfile:

> <https://github.com/stereolabs/zed-docker/blob/master/3.X/l4t/devel/Dockerfile>

into the main Dockerfile from NVIDIA-ISAAC-ROS/isaac\_ros\_common

I found an example on how to extend the Dockerfile for an intel realsense camera: /isaac\_ros\_common/blob/main/docs/modify-dockerfile.md (truncated link since I am limited to 2 links in my 1st post) and would like to do the same for the ZED2i.

This is the Dockerfile I created to integrate the zed sdk into the isaac\_ros\_common docker build process:

# 

```auto
https://ngc.nvidia.com/catalog/containers/nvidia:l4t-base

ARG BASE_IMAGE
FROM ${BASE_IMAGE}

ARG ZED_SDK_MAJOR=3
ARG ZED_SDK_MINOR=7

ARG L4T_MAJOR_VERSION=35
ARG L4T_MINOR_VERSION=1
ARG L4T_PATCH_VERSION=0

#This environment variable is needed to use the streaming features on Jetson inside a container
ENV LOGNAME root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update || true
RUN apt-get install --no-install-recommends lsb-release wget less udev sudo apt-transport-https build-essential cmake -y&& \
    echo "# R${L4T_MAJOR_VERSION} (release), REVISION: ${L4T_MINOR_VERSION}.${L4T_PATCH_VERSION}" > /etc/nv_tegra_release ; \
    wget -q --no-check-certificate -O ZED_SDK_Linux.run https://download.stereolabs.com/zedsdk/${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}/l4t${L4T_MAJOR_VERSION}.${L4T_MINOR_VERSION}/jetsons && \
    chmod +x ZED_SDK_Linux.run ; ./ZED_SDK_Linux.run silent skip_tools skip_python && \
    rm -rf /usr/local/zed/resources/* \
    rm -rf ZED_SDK_Linux.run && \
    rm -rf /var/lib/apt/lists/*

#This symbolic link is needed to use the streaming features on Jetson inside a container
RUN ln -sf /usr/lib/aarch64-linux-gnu/tegra/libv4l2.so.0 /usr/lib/aarch64-linux-gnu/libv4l2.so

#WORKDIR /usr/local/zed

```

The container build process runs fine, but when I try to build the zed-ros2-wrapper package in the ROS2 workspace while being in the container, the zed\_components package can’t seem to find the ZED SDK:

```auto
admin@ubuntu:/workspaces/isaac_ros-dev$ colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release
Starting >>> isaac_ros_test
Starting >>> isaac_ros_tensor_list_interfaces
Starting >>> zed_components                                                                         
Starting >>> isaac_ros_apriltag_interfaces                                                                                  
Starting >>> isaac_ros_bi3d_interfaces
Starting >>> isaac_ros_common                                                                                                   
--- stderr: zed_components                                                                                                                      
* Found ROS2 humble
* ROS2 humble is officially supported by this package.
CMake Error at CMakeLists.txt:80 (find_package):
  By not providing "FindZED.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "ZED", but
  CMake did not find one.

  Could not find a package configuration file provided by "ZED" (requested
  version 3) with any of the following names:

    ZEDConfig.cmake
    zed-config.cmake

  Add the installation prefix of "ZED" to CMAKE_PREFIX_PATH or set "ZED_DIR"
  to a directory containing one of the above files. If "ZED" provides a
  separate development package or SDK, be sure it has been installed.

---
Failed <<< zed_components [1.94s, exited with code 1]
Aborted <<< isaac_ros_common [1.81s]                                                                                        
Aborted <<< isaac_ros_tensor_list_interfaces [3.66s]                                                                         
Aborted <<< isaac_ros_apriltag_interfaces [3.60s]
Aborted <<< isaac_ros_bi3d_interfaces [3.58s]                                                                     
Aborted <<< isaac_ros_test [4.33s]                      

Summary: 0 packages finished [5.28s]
  1 package failed: zed_components
  5 packages aborted: isaac_ros_apriltag_interfaces isaac_ros_bi3d_interfaces isaac_ros_common isaac_ros_tensor_list_interfaces isaac_ros_test
  1 package had stderr output: zed_components
  16 packages not processed

```

Does someone have any advice on how to make the zed-ros2-wrapper work with nvidias’ isaac\_ros\_object\_detection?

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [September 28, 2022, 7:15am UTC](https://community.stereolabs.com/t/nvidia-jetson-ros2-how-to-integrate-zed-docker-into-isaac-ros-object-detection/1620/2 "2022-09-28T07:15:39Z")

</div>

Hi @Hunkzer,  
welcome to the Stereolabs community.

Before installing the ZED ROS2 Wrapper, you must install the ZED SDK:

```auto
# After using an arg in a `FROM` line, the arg is lo
ARG L4T_MINOR_VERSION=1.0
ARG ZED_SDK_MAJOR=3
ARG ZED_SDK_MINOR=7
ARG JETPACK_MAJOR=5
ARG JETPACK_MINOR=0

#Install dependencies
RUN apt-get update -y && apt-get install -y sudo apt-utils apt-transport-https lsb-release udev usbutils git 

#Install ZED SDK
RUN apt-get update -y && apt-get install -y --no-install-recommends wget less cmake curl gnupg2 \
    build-essential python3 python3-pip python3-dev python3-setuptools libusb-1.0-0-dev -y && \
    sudo pip install protobuf && \
    echo "# R35 (release), REVISION: ${L4T_MINOR_VERSION}" > /etc/nv_tegra_release ; \
    wget -q --no-check-certificate -O ZED_SDK_Linux_JP.run https://download.stereolabs.com/zedsdk/${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}/jp${JETPACK_MAJOR}${JETPACK_MINOR}/jetsons && \
    chmod +x ZED_SDK_Linux_JP.run ; ./ZED_SDK_Linux_JP.run silent skip_tools && \
    rm -rf /usr/local/zed/resources/* && \
    rm -rf ZED_SDK_Linux_JP.run && \
    rm -rf /var/lib/apt/lists/*

#This symbolic link is needed to use the streaming features on Jetson inside a container
RUN ln -sf /usr/lib/aarch64-linux-gnu/tegra/libv4l2.so.0 /usr/lib/aarch64-linux-gnu/libv4l2.so

```
