ZEDXMini disconnecting and not coming back

Description

Using ZEDXMini camera with GMSL connection on a Jetson Orin AGX 64Gb devkit connected via the Nvidia GMSL Extention board.
I am using ROS2 nodes provided in zed-ros2-wrapper and running withing a docker container.

The camera works fine and I get good streams as expected.

Sometimes, after a “dirty” shutdown or after a long time the cameras are running, they randomly disconnect and the ZED services cannot detect the cameras.
I was using 2 cameras, but went down to just one camera to help debug the problem. The same thing happens with duel cameras as well as with a single camera.
These are the logs I get:

  • ROS2 Node logs:
mtb_camera_local-1  | [component_container_isolated-2] [2025-02-25 09:37:31 UTC][ZED][INFO] [Init]  Depth mode: PERFORMANCE
mtb_camera_local-1  | [component_container_isolated-2] [ZED-X][Warning] Failed to connect to zed_x_daemon.
mtb_camera_local-1  | [component_container_isolated-2] [2025-02-25 09:37:51 UTC][ZED][ERROR] [ZED] Cannot initialize the camera.
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)
mtb_camera_local-1  | [component_container_isolated-2] [WARN] [1740476332.518005608] [zed.zed_node]: Error opening camera: CAMERA FAILED TO SETUP
mtb_camera_local-1  | [component_container_isolated-2] [2025-02-25 09:38:52 UTC][ZED][WARNING] CAMERA FAILED TO SETUP in sl::ERROR_CODE sl::Camera::open(sl::InitParameters)
mtb_camera_local-1  | [component_container_isolated-2] [INFO] [1740476332.518149192] [zed.zed_node]: Please verify the camera connection
mtb_camera_local-1  | [component_container_isolated-2] [ERROR] [1740476332.518186024] [zed.zed_node]: Camera detection timeout
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)
mtb_camera_local-1  | [component_container_isolated-2] (Argus) Error InvalidState: Argus client is exiting with 5 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)
mtb_camera_local-1  | [ERROR] [component_container_isolated-2]: process has died [pid 10147, exit code 1, cmd '/opt/ros/humble/lib/rclcpp_components/component_container_isolated --ros-args -r __node:=zed_container -r __ns:=/zed'].

  • The camera/s are not detected under ZED_Diagnostic -c:
root@tegra-ubuntu:/home/menteebot# ZED_Diagnostic -c
ZED Diagnostic Tool

- Running ZED SDK Diagnostic : OK  
    ZED SDK version: 4.2.2
    CUDA version: V12.6.68
- Running Processor Diagnostic : OK  
    Processor:   ARMv8 Processor rev 1 (v8l)
    Motherboard:  Jetson, NVIDIA
Error: unable to open display stic : 50%
- Running Graphics Card Diagnostic : OK  
    Graphics card:  Orin
- Running AI Models Diagnostic : OK  
    MULTI CLASS DETECTION is not optimized
    MULTI CLASS MEDIUM DETECTION is not optimized
    MULTI CLASS ACCURATE DETECTION is not optimized
    HUMAN BODY FAST DETECTION is not optimized
    HUMAN BODY MEDIUM DETECTION is not optimized
    HUMAN BODY ACCURATE DETECTION is not optimized
    HUMAN BODY 38 FAST DETECTION is not optimized
    HUMAN BODY 38 MEDIUM DETECTION is not optimized
    HUMAN BODY 38 ACCURATE DETECTION is not optimized
    PERSON HEAD DETECTION is not optimized
    PERSON HEAD ACCURATE DETECTION is not optimized
    REID ASSOCIATION is not optimized
    NEURAL PLUS DEPTH is not optimized
    NEURAL DEPTH is optimized
- Running Camera Test Diagnostic : Failed
    Camera already in use  Several program cannot use the ZED at the same time, make sure to close them.
- Running Devices Diagnostic : Warning
    No GMSL driver found. USB camera are not impacted by this.	
  • The camera/s are detected under ZED_Explorer --all, but camera is not available:
root@tegra-ubuntu:/home/menteebot# ZED_Explorer --all
## Cam  0  ##
 Model :  "ZED-X Mini"
 S/N :  <some actial serial number>
 State :  "Camera Not Available"
 Path :  /dev/i2c-11
 ID :  0
 Type :  "GMSL2"
********************
  • Sometimes running sudo systemctl restart nvargus solves the problem, but most of the time it does not.

  • nvargus service logs:

Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: (NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 111)
Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: NvPclStartPlatformDrivers: Failed to start module drivers
Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: NvPclStateControllerOpen: Failed ImagerGUID 7. (error 0xA000E)
Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: NvPclOpen: PCL Open Failed. Error: 0xf
Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 725)
Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 455)
Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 382)
Feb 25 09:35:36 tegra-ubuntu nvargus-daemon[1379]: SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 554)

Setup

Device: Nvidia Jetson AGX Orin 64GB devkit.
Camera: ZED X Mini
Ubuntu: Ubuntu 22.04.4 LTS
Jetpack version: 6.1
ZED SDK Version: 4.2.2
CUDA Version: 12.6.68

You should use the command sudo service zed_x_daemon restart to recover cameras that are in a connection pending status.

I recommend updating to the newest ZED SDK v4.2.5 to take advantage of enhancements in GMSL2 connectivity.