ZED2 ROS2 – Camera stream failure (Clearpath robot)

Hello,

I am using a Clearpath robot (Jackal platform) running Ubuntu 22.04.5 and ROS2 Humble with a preinstalled ZED SDK and zed-ros2-wrapper. The system is headless and accessed via SSH and Discovery Server from an offboard computer.

I am trying to integrate a YOLO-based custom object detection model following the official documentation:
https://www.stereolabs.com/docs/ros2/custom-object-detection

When launching the ZED node with:
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=<camera_model> custom_object_detection_config_path:='<path_to_custom_object_detection.yaml>'

I get the following error:

[zed.zed_node]: ZED SDK Version: 5.0.3
[zed.zed_node]: CAMERA OPENING
[WARNING] Error opening camera: CAMERA STREAM FAILED TO START
sl::Camera::open() returned: CAMERA STREAM FAILED TO START
Please verify the camera connection

I already checked that the camera is detected via lsusb, The device appears to be connected properly at USB level. I tried rebooting the camera using:
/usr/local/zed/tools/ZED_Explorer --reboot

but it fails with:
can't claim interface 0: -6
Unable to access camera

When launching the node, multiple ZED-related nodes and topics are created successfully, including:
/zed/zed_node
/zed/zed_state_publisher
/tf
/tf_static
/joint_states
/robot_description
However, the camera stream fails to initialize, so I cannot proceed with object detection.

Does the combination of:

  • CAMERA STREAM FAILED TO START

  • can't claim interface 0: -6

indicate that the camera is locked by another process or a USB permission issue?

Any guidance would be appreciated.

Hi Nikolaos,
thank you for reaching out to us.

We need more details about your device’s status and system configuration to gain a clearer insight into the cause of your issue.
Could you connect the camera to the USB3 port, launch the ZED Diagnostic tool, and send the report file it produces?

Best regards

Stereolabs Support

Hello,

thank you for your response.

I have attached the ZED Diagnostic report file (ZED_Diagnostic_Results.json) as requested.

I checked the USB connection using lsusb -t and lsusb, and the camera appears to be connected to a USB3.0 port:

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Video, Driver=uvcvideo, 5000M

This indicates that the camera is operating at 5000M (USB 3.0), so it should have sufficient bandwidth. Additionally, the device is detected correctly:

Bus 002 Device 003: ID 2b03:f780 STEREOLABS ZED 2

I tried checking whether a device keeps the camera busy via:

lsof /dev/video*

and Ι got the following output:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
component 1333 administrator mem CHR 81,0 620 /dev/video0
component 1333 administrator 66u CHR 81,0 0t0 620 /dev/video0

and more detailed:

ps -fp 1333
UID PID PPID C STIME TTY TIME CMD
adminis+ 1333 1317 99 15:38 ? 02:47:16 /opt/ros/humble/lib/rclcpp_components/component_container --ros-args -r __node:=image_processing_container

It seems the node named /sensors/camera_0/image_processing_container is already using the camera. Is that the issue? Additionally, during robot boot, several camera-related nodes are started:

/sensors/camera_0/stereolabs_zed
/sensors/camera_0/transform_listener_impl_557303821c40

Could this be the reason for the camera stream failure?
Should I stop this node, and if so, what is the recommended/safe way to do it in this setup?

ZED_Diagnostic_Results.json (5.9 KB)

Hi @node27
it looks like the camera is no longer detected by the host.

Can you please confirm that the camera is directly connected to a USB33 port of the host without USB hubs?

Please send the output of the command lsusb -d 2b03: -v and ZED_Explorer -a.

The ZED Diagnostic report shows that the camera is detected, but the SDK cannot open it.

What type of host are you using? Is it a laptop?

I also recommend you install the latest ZED SDK v5.2.3 because you are using a very old version.

Hello, sorry for the late response.

After further debugging, I managed to start the camera streaming by stopping the ROS2 node (image_processing_container) using kill -SIGINT <PID>. This node was already accessing the camera device, preventing the ZED SDK from opening it.

This workaround is temporary, since the process restarts at every boot with a different PID. I assume this is related to the robot’s launch configuration.

1 Like

If a process keeps a camera open, other processes cannot access it.

You can use the pkill command which takes the name of the process to kill.

In any case, I recommend you ask Clearpath how to disable the automatic launch of the ZED ROS 2 node.