stereolabs / zed-docker

Docker images for the ZED SDK

Home Page:https://hub.docker.com/r/stereolabs/zed/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zed2i in docker without superuser

GiteZz opened this issue · comments

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • This issue is not a question, feature request, or anything other than a bug report directly related to this project.

Description

I am trying to get the ZED2i to work in a docker container without running as superuser. Several issues have come up that I could solve but now finally when the program is finally able to run as a normal user it no longer wants to connect to the camera.

This is the dockerfile that I'm using to get it to even compile:

FROM company_name.azurecr.io/ros_base:cuda

USER root


ENV NVIDIA_DRIVER_CAPABILITIES \
    ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}compute,video,utility

RUN echo "Europe/Paris" > /etc/localtime ; echo "CUDA Version 11.4.1" > /usr/local/cuda/version.txt

# Setup the ZED SDK
RUN apt-get update -y && apt-get install --no-install-recommends lsb-release wget less udev sudo  build-essential cmake -y 

COPY ./ZED_SDK.run ./ZED_SDK.run
RUN chmod +x ./ZED_SDK.run
RUN ./ZED_SDK.run  -- silent skip_tools
RUN ln -s /lib/x86_64-linux-gnu/libusb-1.0.so.0 /usr/lib/x86_64-linux-gnu/libusb-1.0.so

RUN apt-get update -y && apt-get install libpng-dev libgomp1 -y 
RUN wget download.stereolabs.com/zedsdk/pyzed -O /usr/local/zed/get_python_api.py 

RUN python3 /usr/local/zed/get_python_api.py
RUN python3 -m pip install numpy opencv-python *.whl 

RUN apt-get install -y ros-galactic-diagnostic-updater
RUN apt-get install -y ros-galactic-xacro

ENV NVIDIA_VISIBLE_DEVICES \
    ${NVIDIA_VISIBLE_DEVICES:-all}

RUN chown -R company_name:company_name /usr/local/lib/python3.8/dist-packages
RUN chown -R company_name:company_name /usr/local/zed
RUN chown company_name:company_name /usr/lib/x86_64-linux-gnu/libusb-1.0.so
RUN chown company_name:company_name /lib/x86_64-linux-gnu/libusb-1.0.so.0 

ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/zed/lib/

USER company_name

The company_name.azurecr.io/ros_base:cuda is a docker image build on top of nvidia/cuda:11.4.1-cudnn8-devel-ubuntu20.04 with ROS galactic added. When not running as the company_name user everything seemed to work. However when run with this user we get this output:

[zed_wrapper-2] 1643885217.365956459 [zed2i.zed_node] [INFO] ********************************
[zed_wrapper-2] 1643885217.366047245 [zed2i.zed_node] [INFO]       ZED Camera Component 
[zed_wrapper-2] 1643885217.366058650 [zed2i.zed_node] [INFO] ********************************
[zed_wrapper-2] 1643885217.366065898 [zed2i.zed_node] [INFO]  * namespace: /zed2i
[zed_wrapper-2] 1643885217.366072904 [zed2i.zed_node] [INFO]  * node name: zed_node
[zed_wrapper-2] 1643885217.366079143 [zed2i.zed_node] [INFO] ********************************
[zed_wrapper-2] 1643885217.366092624 [zed2i.zed_node] [INFO] *** DEBUG parameters ***
[zed_wrapper-2] 1643885217.366121072 [zed2i.zed_node] [INFO]  * Debug mode: FALSE
[zed_wrapper-2] 1643885217.366135747 [zed2i.zed_node] [INFO] *** GENERAL parameters ***
[zed_wrapper-2] 1643885217.366171277 [zed2i.zed_node] [INFO]  * Camera model: zed2i - ZED 2i
[zed_wrapper-2] 1643885217.366208824 [zed2i.zed_node] [INFO]  * SDK Verbose: 1
[zed_wrapper-2] 1643885217.366246731 [zed2i.zed_node] [INFO]  * SVO: 
[zed_wrapper-2] 1643885217.366282283 [zed2i.zed_node] [INFO]  * SVO Loop: TRUE
[zed_wrapper-2] 1643885217.366321488 [zed2i.zed_node] [INFO]  * SVO Realtime: FALSE
[zed_wrapper-2] 1643885217.366360800 [zed2i.zed_node] [INFO]  * Camera name: zed2i
[zed_wrapper-2] 1643885217.366394719 [zed2i.zed_node] [INFO]  * Camera ID: 0
[zed_wrapper-2] 1643885217.366424924 [zed2i.zed_node] [INFO]  * Camera SN: 0
[zed_wrapper-2] 1643885217.366460312 [zed2i.zed_node] [INFO]  * Camera timeout [sec]: 5
[zed_wrapper-2] 1643885217.366490853 [zed2i.zed_node] [INFO]  * Camera reconnection temptatives: 5
[zed_wrapper-2] 1643885217.366531175 [zed2i.zed_node] [INFO]  * Camera framerate: 30
[zed_wrapper-2] 1643885217.366569004 [zed2i.zed_node] [INFO]  * GPU ID: -1
[zed_wrapper-2] 1643885217.366607055 [zed2i.zed_node] [INFO]  * Camera resolution: 2 - HD720
[zed_wrapper-2] 1643885217.366637322 [zed2i.zed_node] [INFO]  * Camera self calibration: TRUE
[zed_wrapper-2] 1643885217.366664767 [zed2i.zed_node] [INFO]  * Camera flip: FALSE
[zed_wrapper-2] 1643885217.366703902 [zed2i.zed_node] [INFO]  * [DYN] Publish framerate [Hz]: 15 
[zed_wrapper-2] 1643885217.366724473 [zed2i.zed_node] [INFO] *** VIDEO parameters ***
[zed_wrapper-2] 1643885217.366754561 [zed2i.zed_node] [INFO]  * Use old extrinsic parameters: 0
[zed_wrapper-2] 1643885217.366778763 [zed2i.zed_node] [INFO]  * [DYN] Image downsample factor: 0.5 
[zed_wrapper-2] 1643885217.366821937 [zed2i.zed_node] [INFO]  * [DYN] Brightness: 4
[zed_wrapper-2] 1643885217.366860705 [zed2i.zed_node] [INFO]  * [DYN] Contrast: 4
[zed_wrapper-2] 1643885217.366899819 [zed2i.zed_node] [INFO]  * [DYN] Hue: 0
[zed_wrapper-2] 1643885217.366958664 [zed2i.zed_node] [INFO]  * [DYN] Saturation: 4
[zed_wrapper-2] 1643885217.367026683 [zed2i.zed_node] [INFO]  * [DYN] Sharpness: 4
[zed_wrapper-2] 1643885217.367064573 [zed2i.zed_node] [INFO]  * [DYN] Gamma: 8
[zed_wrapper-2] 1643885217.367095258 [zed2i.zed_node] [INFO]  * [DYN] Auto Exposure/Gain: TRUE
[zed_wrapper-2] 1643885217.367232128 [zed2i.zed_node] [INFO]  * [DYN] Exposure: 80
[zed_wrapper-2] 1643885217.367277427 [zed2i.zed_node] [INFO]  * [DYN] Gain: 80
[zed_wrapper-2] 1643885217.367386235 [zed2i.zed_node] [INFO]  * [DYN] Auto White Balance: TRUE
[zed_wrapper-2] 1643885217.367435375 [zed2i.zed_node] [INFO]  * [DYN] White Balance Temperature: 42
[zed_wrapper-2] 1643885217.367474282 [zed2i.zed_node] [INFO]  * Video QoS History: KEEP_LAST
[zed_wrapper-2] 1643885217.367525101 [zed2i.zed_node] [INFO]  * Video QoS History depth: 1
[zed_wrapper-2] 1643885217.367582600 [zed2i.zed_node] [INFO]  * Video QoS Reliability: RELIABLE
[zed_wrapper-2] 1643885217.367704699 [zed2i.zed_node] [INFO]  * Video QoS Durability: VOLATILE
[zed_wrapper-2] 1643885217.367724427 [zed2i.zed_node] [INFO] *** DEPTH parameters ***
[zed_wrapper-2] 1643885217.367762093 [zed2i.zed_node] [INFO]  * Depth quality: 1 - PERFORMANCE
[zed_wrapper-2] 1643885217.367809902 [zed2i.zed_node] [INFO]  * Depth downsample factor: 0.5 
[zed_wrapper-2] 1643885217.367869252 [zed2i.zed_node] [INFO]  * Min depth [m]: 0.3
[zed_wrapper-2] 1643885217.367911998 [zed2i.zed_node] [INFO]  * Max depth [m]: 20
[zed_wrapper-2] 1643885217.367954378 [zed2i.zed_node] [INFO]  * Depth Sensing Mode: 0 - STANDARD
[zed_wrapper-2] 1643885217.367995000 [zed2i.zed_node] [INFO]  * Depth Stabilization: TRUE
[zed_wrapper-2] 1643885217.368037908 [zed2i.zed_node] [INFO]  * OpenNI mode (16bit point cloud): FALSE
[zed_wrapper-2] 1643885217.368085315 [zed2i.zed_node] [INFO]  * [DYN] Point cloud rate [Hz]: 10
[zed_wrapper-2] 1643885217.368135223 [zed2i.zed_node] [INFO]  * [DYN] Depth Confidence: 50
[zed_wrapper-2] 1643885217.368182163 [zed2i.zed_node] [INFO]  * [DYN] Depth Texture Confidence: 100
[zed_wrapper-2] 1643885217.368227502 [zed2i.zed_node] [INFO]  * Depth QoS History: KEEP_LAST
[zed_wrapper-2] 1643885217.368271046 [zed2i.zed_node] [INFO]  * Depth QoS History depth: 1
[zed_wrapper-2] 1643885217.368316553 [zed2i.zed_node] [INFO]  * Depth QoS Reliability: RELIABLE
[zed_wrapper-2] 1643885217.368362572 [zed2i.zed_node] [INFO]  * Depth QoS Durability: VOLATILE
[zed_wrapper-2] 1643885217.368378060 [zed2i.zed_node] [INFO] *** POSITIONAL TRACKING parameters ***
[zed_wrapper-2] 1643885217.368410677 [zed2i.zed_node] [INFO]  * Positional tracking enabled: TRUE
[zed_wrapper-2] 1643885217.368451198 [zed2i.zed_node] [INFO]  * Base frame id: base_link
[zed_wrapper-2] 1643885217.368495071 [zed2i.zed_node] [INFO]  * Map frame id: map
[zed_wrapper-2] 1643885217.368536538 [zed2i.zed_node] [INFO]  * Odometry frame id: odom
[zed_wrapper-2] 1643885217.368574484 [zed2i.zed_node] [INFO]  * Broadcast Odometry TF: TRUE
[zed_wrapper-2] 1643885217.368612376 [zed2i.zed_node] [INFO]  * Broadcast Pose TF: TRUE
[zed_wrapper-2] 1643885217.368652128 [zed2i.zed_node] [INFO]  * Broadcast Static IMU TF [not for ZED]: TRUE
[zed_wrapper-2] 1643885217.368692843 [zed2i.zed_node] [INFO]  * [DYN] Path publishing rate: 2
[zed_wrapper-2] 1643885217.368734686 [zed2i.zed_node] [INFO]  * Path history lenght: -1
[zed_wrapper-2] 1643885217.368785040 [zed2i.zed_node] [INFO]  * Initial pose: [0,0,0,0,0,0,]
[zed_wrapper-2] 1643885217.368833568 [zed2i.zed_node] [INFO]  * Area Memory: TRUE
[zed_wrapper-2] 1643885217.368885493 [zed2i.zed_node] [INFO]  * Area Memory DB: 
[zed_wrapper-2] 1643885217.368934587 [zed2i.zed_node] [INFO]  * IMU Fusion [not for ZED]: TRUE
[zed_wrapper-2] 1643885217.368984214 [zed2i.zed_node] [INFO]  * Floor Alignment: FALSE
[zed_wrapper-2] 1643885217.369032229 [zed2i.zed_node] [INFO]  * Init Odometry with first valid pose data: TRUE
[zed_wrapper-2] 1643885217.369088009 [zed2i.zed_node] [INFO]  * 2D mode: FALSE
[zed_wrapper-2] 1643885217.369137345 [zed2i.zed_node] [INFO]  * Pose/Odometry QoS History: KEEP_LAST
[zed_wrapper-2] 1643885217.369190227 [zed2i.zed_node] [INFO]  * Pose/Odometry QoS History depth: 1
[zed_wrapper-2] 1643885217.369240181 [zed2i.zed_node] [INFO]  * Pose/Odometry QoS Reliability: RELIABLE
[zed_wrapper-2] 1643885217.369291087 [zed2i.zed_node] [INFO]  * Pose/Odometry QoS Durability: VOLATILE
[zed_wrapper-2] 1643885217.369312056 [zed2i.zed_node] [INFO] *** SENSORS STACK parameters ***
[zed_wrapper-2] 1643885217.369346370 [zed2i.zed_node] [INFO]  * Sensors Camera Sync: FALSE
[zed_wrapper-2] 1643885217.369401373 [zed2i.zed_node] [INFO]  * Sensors publishing rate: 200 Hz
[zed_wrapper-2] 1643885217.369453531 [zed2i.zed_node] [INFO]  * Sensors QoS History: KEEP_LAST
[zed_wrapper-2] 1643885217.369511301 [zed2i.zed_node] [INFO]  * Sensors QoS History depth: 1
[zed_wrapper-2] 1643885217.369567931 [zed2i.zed_node] [INFO]  * Sensors QoS Reliability: RELIABLE
[zed_wrapper-2] 1643885217.369622494 [zed2i.zed_node] [INFO]  * Sensors QoS Durability: VOLATILE
[zed_wrapper-2] 1643885217.369640698 [zed2i.zed_node] [INFO] *** Spatial Mapping parameters ***
[zed_wrapper-2] 1643885217.369673450 [zed2i.zed_node] [INFO]  * Spatial Mapping Enabled: FALSE
[zed_wrapper-2] 1643885217.369734798 [zed2i.zed_node] [INFO]  * Spatial Mapping resolution [m]: 0.1
[zed_wrapper-2] 1643885217.369788874 [zed2i.zed_node] [INFO]  * 3D Max Mapping range [m]: 20
[zed_wrapper-2] 1643885217.369841471 [zed2i.zed_node] [INFO]  * Map publishing rate [Hz]: 0.5
[zed_wrapper-2] 1643885217.369889294 [zed2i.zed_node] [INFO]  * Sensors QoS History: KEEP_LAST
[zed_wrapper-2] 1643885217.369947538 [zed2i.zed_node] [INFO]  * Sensors QoS History depth: 1
[zed_wrapper-2] 1643885217.370056963 [zed2i.zed_node] [INFO]  * Sensors QoS Reliability: RELIABLE
[zed_wrapper-2] 1643885217.370160170 [zed2i.zed_node] [INFO]  * Sensors QoS Durability: VOLATILE
[zed_wrapper-2] 1643885217.370186109 [zed2i.zed_node] [INFO] *** OBJECT DETECTION parameters ***
[zed_wrapper-2] 1643885217.370284615 [zed2i.zed_node] [INFO]  * Object Detection enabled: FALSE
[zed_wrapper-2] 1643885217.370348219 [zed2i.zed_node] [INFO]  * OD min. confidence: 50
[zed_wrapper-2] 1643885217.370407832 [zed2i.zed_node] [INFO]  * OD tracking: TRUE
[zed_wrapper-2] 1643885217.370509935 [zed2i.zed_node] [INFO]  * Object Detection model: 2 - HUMAN BODY FAST
[zed_wrapper-2] 1643885217.370549641 [zed2i.zed_node] [INFO]  * MultiClassBox people: TRUE
[zed_wrapper-2] 1643885217.370587312 [zed2i.zed_node] [INFO]  * MultiClassBox vehicles: TRUE
[zed_wrapper-2] 1643885217.370621263 [zed2i.zed_node] [INFO]  * MultiClassBox bags: TRUE
[zed_wrapper-2] 1643885217.370647695 [zed2i.zed_node] [INFO]  * MultiClassBox animals: TRUE
[zed_wrapper-2] 1643885217.370678929 [zed2i.zed_node] [INFO]  * MultiClassBox electronics: TRUE
[zed_wrapper-2] 1643885217.370710424 [zed2i.zed_node] [INFO]  * MultiClassBox fruits and vegetables: TRUE
[zed_wrapper-2] 1643885217.370738782 [zed2i.zed_node] [INFO]  * Skeleton fitting: FALSE
[zed_wrapper-2] 1643885217.370769976 [zed2i.zed_node] [INFO]  * Body format: 0
[zed_wrapper-2] 1643885217.370812557 [zed2i.zed_node] [INFO]  * Obj. Det. QoS History: KEEP_LAST
[zed_wrapper-2] 1643885217.370849547 [zed2i.zed_node] [INFO]  * Obj. Det. QoS History depth: 1
[zed_wrapper-2] 1643885217.370910873 [zed2i.zed_node] [INFO]  * Obj. Det. QoS Reliability: RELIABLE
[zed_wrapper-2] 1643885217.370945602 [zed2i.zed_node] [INFO]  * Obj. Det. QoS Durability: VOLATILE
[zed_wrapper-2] 1643885217.371032805 [zed2i.zed_node] [INFO] *** SERVICES ***
[zed_wrapper-2] 1643885217.371971491 [zed2i.zed_node] [INFO]  * '/zed2i/zed_node/reset_odometry'
[zed_wrapper-2] 1643885217.372352909 [zed2i.zed_node] [INFO]  * '/zed2i/zed_node/reset_pos_tracking'
[zed_wrapper-2] 1643885217.372957492 [zed2i.zed_node] [INFO]  * '/zed2i/zed_node/set_pose'
[zed_wrapper-2] 1643885217.373395868 [zed2i.zed_node] [INFO]  * '/zed2i/zed_node/enable_obj_det'
[zed_wrapper-2] 1643885217.373791613 [zed2i.zed_node] [INFO]  * '/zed2i/zed_node/enable_mapping'
[zed_wrapper-2] 1643885217.374267101 [zed2i.zed_node] [INFO]  * '/zed2i/zed_node/start_svo_rec'
[zed_wrapper-2] 1643885217.374586844 [zed2i.zed_node] [INFO]  * '/zed2i/zed_node/stop_svo_rec'
[zed_wrapper-2] 1643885217.374869732 [zed2i.zed_node] [INFO]  * '/zed2i/zed_node/toggle_svo_pause'
[zed_wrapper-2] 1643885217.374891190 [zed2i.zed_node] [INFO] ***** STARTING CAMERA *****
[zed_wrapper-2] 1643885217.374900613 [zed2i.zed_node] [INFO] SDK Version: 3.6.4 - Build 38647_f03cc21f
[zed_wrapper-2] 1643885217.379322666 [zed2i.zed_node] [INFO] *** CAMERA OPENING ***
[zed_wrapper-2] [ZED][Init] Depth mode: PERFORMANCE
[zed_wrapper-2] [ZED][ERROR] Camera Open Internal Error: 4
[zed_wrapper-2] [ZED][Init][Info] Failed to open camera. Trying to re-open for 5 seconds.
[zed_wrapper-2] [ZED][Init][Info] Random wait interval before consecutive openings: [250, 1500] msec
[zed_wrapper-2] [ZED][Init][Info] Waiting 718 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Timeout in 4277msec
[zed_wrapper-2] [ZED][Init][Info] Opening Camera. Attempt #2
[zed_wrapper-2] [ZED][ERROR] Camera Open Internal Error: 4
[zed_wrapper-2] [ZED][Init][Info] Waiting 1082 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Trying to force a device reboot to recover the video module.
[zed_wrapper-2] [ZED][Init][Info] Timeout in 1146msec
[zed_wrapper-2] [ZED][Init][Info] Opening Camera. Attempt #3
[zed_wrapper-2] [ZED][ERROR] Camera Open Internal Error: 4
[zed_wrapper-2] [ZED][Init][Info] Waiting 1307 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Camera opening timeout reached
[zed_wrapper-2] 1643885223.219212492 [zed2i.zed_node] [WARN] Error opening camera: CAMERA FAILED TO SETUP
[zed_wrapper-2] 1643885223.219360208 [zed2i.zed_node] [INFO] Please verify the USB3 connection
[zed_wrapper-2] [ZED][Init] Depth mode: PERFORMANCE
[zed_wrapper-2] [ZED][ERROR] Camera Open Internal Error: 4
[zed_wrapper-2] [ZED][Init][Info] Failed to open camera. Trying to re-open for 5 seconds.
[zed_wrapper-2] [ZED][Init][Info] Random wait interval before consecutive openings: [250, 1500] msec
[zed_wrapper-2] [ZED][Init][Info] Waiting 1089 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Timeout in 3906msec
[zed_wrapper-2] [ZED][Init][Info] Opening Camera. Attempt #2
[zed_wrapper-2] [ZED][ERROR] Camera Open Internal Error: 4
[zed_wrapper-2] [ZED][Init][Info] Waiting 313 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Timeout in 3587msec
[zed_wrapper-2] [ZED][Init][Info] Opening Camera. Attempt #3
[zed_wrapper-2] [ZED][ERROR] Camera Open Internal Error: 4
[zed_wrapper-2] [ZED][Init][Info] Waiting 1408 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Trying to force a device reboot to recover the video module.
[zed_wrapper-2] [ZED][Init][Info] Timeout in 132msec
[zed_wrapper-2] [ZED][Init][Info] Opening Camera. Attempt #4
[zed_wrapper-2] [ZED][ERROR] Camera Open Internal Error: 4
[zed_wrapper-2] [ZED][Init][Info] Waiting 1341 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Camera opening timeout reached
[zed_wrapper-2] 1643885235.186395408 [zed2i.zed_node] [WARN] Error opening camera: CAMERA FAILED TO SETUP
[zed_wrapper-2] 1643885235.186462141 [zed2i.zed_node] [INFO] Please verify the USB3 connection
[zed_wrapper-2] [ZED][Init] Depth mode: PERFORMANCE
[zed_wrapper-2] [ZED][ERROR] Camera Open Internal Error: 4
[zed_wrapper-2] [ZED][Init][Info] Failed to open camera. Trying to re-open for 5 seconds.
[zed_wrapper-2] [ZED][Init][Info] Random wait interval before consecutive openings: [250, 1500] msec
[zed_wrapper-2] [ZED][Init][Info] Waiting 565 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Timeout in 4430msec
[zed_wrapper-2] [ZED][Init][Info] Opening Camera. Attempt #2
[zed_wrapper-2] [ZED][ERROR] Camera Open Internal Error: 4
[zed_wrapper-2] [ZED][Init][Info] Waiting 1260 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Trying to force a device reboot to recover the video module.
[zed_wrapper-2] [ZED][Init][Info] Timeout in 1138msec
[zed_wrapper-2] [ZED][Init][Info] Opening Camera. Attempt #3
[zed_wrapper-2] [ZED][Init][Info] Waiting 1202 msec before next opening attempt.
[zed_wrapper-2] [ZED][Init][Info] Camera opening timeout reached
[zed_wrapper-2] 1643885246.014907982 [zed2i.zed_node] [WARN] Error opening camera: CAMERA NOT DETECTED
[zed_wrapper-2] 1643885246.015076440 [zed2i.zed_node] [INFO] Please verify the USB3 connection
[zed_wrapper-2] 1643885246.015122947 [zed2i.zed_node] [ERROR] Camera detection timeout

The container is started with -v /dev:/dev as suggested and using this script:

set -x
# Download the lightest installer
wget -q https://download.stereolabs.com/zedsdk/3.5/jp44/jetsons -O zed_installer.run
# Extracting only the file we're interested in
bash ./zed_installer.run --tar -x './99-slabs.rules'  > /dev/null 2>&1
sudo mv "./99-slabs.rules" "/etc/udev/rules.d/"
sudo chmod 777 "/etc/udev/rules.d/99-slabs.rules"
sudo udevadm control --reload-rules && sudo udevadm trigger

on the host. GPU and so one are also working as expected as I could run the zed tools as root user. I've used the code provided in the ZED ROS2 github repo.

Steps to Reproduce

  1. Build and run docker image
  2. Source ROS
  3. Launch the provided ROS launch file ros2 launch zed_wrapper zed2i.launch.py
    ...

Expected Result

Connection to the camera

Actual Result

Traceback listed above.

ZED Camera model

ZED2i

Environment

OS: nvidia/cuda:11.4.1-cudnn8-devel-ubuntu20.04 docker on Ubuntu 20.04 host OS
CUDA: 11.4.1
ZED_SDK: 3.6.4
GPU: RTX3000

Anything else?

No response

The typical issue is the missing dev rules on the host but you seem to have fixed this already.

To verify that the camera is correctly seen in the container could your post the output of lsusb in the container and on the host?

To clarify, running the same docker image but as root is working as expected?
Could you also try to run a simple C++ tutorial to see if you have the same behavior, just in case?

Thanks for the reply!

This is the output of lsusb in the container:

Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 0572:180a Conexant Systems (Rockwell), Inc. HP Dock Audio
Bus 005 Device 002: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 8564:1000 Transcend Information, Inc. JetFlash
Bus 002 Device 003: ID 2109:0813 VIA Labs, Inc. USB3.0 Hub
Bus 002 Device 072: ID 2b03:f880 Technologies, Inc. ZED 2i
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 06cb:00b7 Synaptics, Inc. 
Bus 001 Device 005: ID 0408:5390 Quanta Computer, Inc. HP Full-HD Camera
Bus 001 Device 010: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 008: ID 256f:c635  
Bus 001 Device 006: ID 413c:2113 Dell Computer Corp. 
Bus 001 Device 003: ID 2109:2813 VIA Labs, Inc. USB2.0 Hub
Bus 001 Device 009: ID 8087:0029 Intel Corp. 
Bus 001 Device 013: ID 2b03:f881  
Bus 001 Device 002: ID 0424:2512 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

It seems that the ZED2i is visible inside the containers.
This is my output on the host:

Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 0572:180a Conexant Systems (Rockwell), Inc. HP Dock Audio
Bus 005 Device 002: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 8564:1000 Transcend Information, Inc. JetFlash
Bus 002 Device 003: ID 2109:0813 VIA Labs, Inc. USB3.0 Hub
Bus 002 Device 006: ID 2b03:f880 Technologies, Inc. ZED 2i
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 06cb:00b7 Synaptics, Inc. 
Bus 001 Device 005: ID 0408:5390 Quanta Computer, Inc. HP Full-HD Camera
Bus 001 Device 010: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 008: ID 256f:c635  
Bus 001 Device 006: ID 413c:2113 Dell Computer Corp. 
Bus 001 Device 003: ID 2109:2813 VIA Labs, Inc. USB2.0 Hub
Bus 001 Device 009: ID 8087:0029 Intel Corp. 
Bus 001 Device 013: ID 2b03:f881  
Bus 001 Device 002: ID 0424:2512 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I have also tested the c++ tutorials and this is my output when running the first tutorial:

[ZED][Init][Info] Camera opening timeout reached
Error CAMERA FAILED TO SETUP, exit program.

Ok, thanks. So both the Camera (2b03:f880) and IMU (2b03:f881) are correctly detected.

CAMERA FAILED TO SETUP usually means there's an issue with the video device (/dev/videoX). Could you try adding the user to the video group?

The docker user was indeed not in the video group, however after adding the user to the group and verifying with cat /etc/group | grep video I got the same errors as above.

Ok, and If you use the default zed docker image such as stereolabs/zed:3.6-devel-cuda11.4-ubuntu20.04 do you have the same issue as non-root user?

Could you also try to run something that would open the ZED as a webcam in your docker image? If you don't have a GUI, maybe a simple Opencv VideoCapture program or something to check if the camera can be opened, including taking an image from the camera as a file to make sure.

Ok, and If you use the default zed docker image such as stereolabs/zed:3.6-devel-cuda11.4-ubuntu20.04 do you have the same issue as non-root user?

Could you also try to run something that would open the ZED as a webcam in your docker image? If you don't have a GUI, maybe a simple Opencv VideoCapture program or something to check if the camera can be opened, including taking an image from the camera as a file to make sure.

I do have it displaying GUI so I installed cheese and had no video input there either. I tried using --device=/dev/video0 and I also had no video show up. See my issue Issue#42 they are similar in many ways.

@GiteZz It just occurs to me but you may need to call newgrp video for the group change to take effect, depending on how you added the user to the group.

Hi,
A recent update in V4L driver could cause such issue.
Make sure you use the ZED SDK 3.6.5 that supports it , or in case of Docker, make sure you force-pull the last version of 3.6

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days

Hello, encountered a problem with.
Description 1: lsusb not detected - camera [2b03:f880]
Description 2: During use or the next boot, this condition will appear lsusb can not be the camera [as follows]
speculation: whether it is a hardware problem
Used four monocular cameras and a zed, my IPC has six usb3.0
Thank you very much for your help!
image