zed-ros2-wrapper: Launchin 2 ZEDX Cams doesn't work

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 tried to start to camera nodes with ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx zed_id:=0 camera_name:=zed_0 and ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx zed_id:=1 camera_name:=zed_1 and the first node always comes up without any problems but when I start the second node it causes the first node (almost always) to stop with this error : [zed_wrapper-2] [ERROR] [1709824226.481411052] [zed.zed_node]: Critical camera error: CAMERA NOT INITIALIZED. Node stopped. On very rare occasions I can start both cameras but it is not reproducible 😞

I tried this on a Jetson AGX Orin with ROS2 Foxy as well as on the same Jetson with a Docker Container with Humble.

I’m also aware of this tutorial but on Humble it didn’t build and on Foxy it failed with RuntimeError: Included launch description missing required argument 'cam_poses' (description: 'An array containing the array of the pose of the cameras with respect to the base frame link, e.g. [[0.5,0.0,0.0,0.0,0.0,0.0],[0.0,0.2,0.0,0.0,1.571,0.0]],[0.0,-0.2,0.0,0.0,-1.571,0.0],[-0.5,0.0,0.0,0.0,0.0,3.142]]]'), given: [cam_names, cam_models, cam_serials] and including this argument was not possible because it always resulted in [INFO] [launch.user]: The size of the posesparam array must be equal to the size ofnames` even after I adjusted the example to the righ amount of brackets.

Steps to Reproduce

  1. Get a Jetson AGX Orin
  2. Install Foxy or Humble
  3. Install zed-ros2-wrapper
  4. run ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx zed_id:=0 camera_name:=zed_0 and ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx zed_id:=1 camera_name:=zed_1

Expected Result

Both cameras should start and don’t stop until I stop the node.

Actual Result

One camera starts and the second camera starts but it crashes the first one.

ZED Camera model

ZED

Environment

OS: UBUNTU 20.04.6 LTS
CPU: ARM
GPU: 2048-core NVIDIA Ampere architecture GPU with 64 Tensor Cores
ZED SDK Version: 4.0.8
ROS: ROS2 Foxy / Humble

Anything else?

I cannot specify ZEDx camera in the drop down.

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

Hey @adriandavidauer ,thanks very much,your solution worked out for me! Getting data from 2 zedx cams simultaneously.

If you want to use rviz2 in the same container you need to use dustynv/ros:humble-desktop-l4t-r35.2.1 as base image and make sure that the l4t version is the same for the image and your Jetson. Maybe you need a different version. Note that the command I gave you will start the container detached. You could probably start rviz2 with docker exec or you start a new container for rviz2 or you can just run rviz2 on your host system if already installed. If you havn’t set up a URDF file for the Cams make sure to use Image instead of Camera in rviz otherwise it won’t show because it does not know the tf of teh cams.