Multi ZedX Inconsistent Behavior - ROS2

I have been trying to get multi camera setup working in ROS2(Humble) and I have been having a lot of issues.

The first problem is that everytime I launch the cameras for the first time after starting the computer the node dies almost immediately. I don’t understand what is causing this failure, but there is a lot of errors/warnings saying that they failed to load different image_transport plugins. I have tried installing the various plugins both as system packages and building from source (after removing them system wide) neither has proven to help at all. Attached is a log over everything that is dumped to terminal when launching for the first time.

Now when I try to launch a second time the cameras do appear to open, but I still a lot of these image_transport plugin warnings/errors. I don’t know if the following behavior is a result of that or I have multiple issues going on. The topics which get published appear to be pretty random. Sometimes I will get everything, sometimes only one or two cameras appear to work, sometimes I will get a mix of topics from each, but not everything.

To launch the cameras I have used the multi-camera example from ros2-examples and modified it to open them from network streams rather than serial numbers. I have attached the launch file as well.

For what it is worth both the streaming and receiving computers have just been updated to SDK5.1, though this issue was present before that. Streamer is Jetson Orin AGX on JP6.0 and receiver is x64 Ubuntu 22.

Also running ros2 run image_transports list_transports shows:

ros2 run image_transport list_transportsts
Declared transports:
image_transport/compressed
image_transport/compressedDepth
image_transport/ffmpeg
image_transport/foxglove
image_transport/raw
image_transport/theora

Details:

“image_transport/compressed”

  • Provided by package: compressed_image_transport

  • Publisher:
    This plugin publishes a CompressedImage using either JPEG or PNG compression.

  • Subscriber:
    This plugin decompresses a CompressedImage topic.


“image_transport/compressedDepth”

  • Provided by package: compressed_depth_image_transport

  • Publisher:
    This plugin publishes a compressed depth images using PNG compression.

  • Subscriber:
    This plugin decodes a compressed depth images.


“image_transport/ffmpeg”

  • Provided by package: ffmpeg_image_transport

  • Publisher:
    This plugin encodes frames into ffmpeg compressed packets

  • Subscriber:
    This plugin decodes frames from ffmpeg compressed packets


“image_transport/foxglove”

  • Provided by package: foxglove_compressed_video_transport

  • Publisher:
    This plugin encodes frames into foxglove compressed video packets

  • Subscriber:
    This plugin decodes frames from foxglove compressed video packets


“image_transport/raw”

  • Provided by package: image_transport

  • Publisher:
    This is the default publisher. It publishes the Image as-is on the base topic.

  • Subscriber:
    This is the default pass-through subscriber for topics of type sensor_msgs/Image.


“image_transport/theora”

  • Provided by package: theora_image_transport

  • Publisher:
    This plugin publishes a video packet stream encoded using Theora.

  • Subscriber:
    This plugin decodes a video packet stream encoded using Theora.

So it does seem they are recognized. Is there something I am doing wrong? Are these issues related or are the other things I should be looking at?

Thank You!

zed_multi_camera.launch.py (9.0 KB)

first_launch.txt (150.8 KB)

Hi @benijohn
We are trying to understand if this problem was introduced with a recent upgrade of Humble because it’s not something that we can attribute to a recent modification of the wrapper.

Hi @Myzhar thanks for your reply. Any updates on this? It seems to be increasingly difficult to get cameras to all open and consistently publish point clouds. For example:

^Crzr-admin@rzr-admin:~/auto-rzr$ ros2 topic list | grep point
/clicked_point
/zed_multi/front/point_cloud/cloud_registered
/zed_multi/front/point_cloud/cloud_registered/zstd
/zed_multi/left/point_cloud/cloud_registered
/zed_multi/left/point_cloud/cloud_registered/zlib
/zed_multi/rear/point_cloud/cloud_registered
/zed_multi/right/point_cloud/cloud_registered
/zed_multi/right/point_cloud/cloud_registered/draco

all showing different topics. Sometimes none of them show up. I have done a little more digging and this same warning is thrown even when launching just a single camera. Let me know if there is any further info I can provide.

Cheers,

Benjamin

Please post the full warning log to verify it.

@Myzhar Here are the logs for the first launch after start up and the second. Sometimes, even the second time launching will fail. Usually launching more than twice is necessary to get all topics to publish.

Cheers,

Benjamin

first_launch.log (147.9 KB)

second_launch.log (8.4 MB)

The fact that the problem appears only at the first run, confirms that this is not a bug in the ZED ROS 2 Wrapper, but something related to ROS 2 Humble.

For some reason, in a component container is not possible to load the image_transport plugins from multiple components using it.

Can you share the launch file to check it?
I noticed that you are using multiple streaming inputs.

@Myzhar Here is the launch file. I am using the multi-camera example modified to use streams instead of serial numbers. The cameras are opened remotely on a Jetson Orin AGX.

As for it only happening on the first launch, in this case the second launch was successful, meaning the node did not die immediately. But the Error about loading plugins is still present.

Cheers,

Benjamin

zed_multi_camera.launch.py (9.3 KB)

Does it appear only with multi-camera configurations using composition?
What does it happen if you launch each node separately?

I am not sure I understand to proper way to launch each camera in a single node.

I did:
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx stream_address:=192.168.16.175 stream_port:=30004 camera_name:=left

And I changed the port and camera_name. This seems to work. I get all topics.

The transforms are wrong when doing it this way, but I can look how to override each one individually. The logs for the launches are attached here.

Thank you!

single_cam.log (38.1 KB)

second_single_cam.log (38.1 KB)

third_single_cam.log (37.7 KB)

It’s not required that you open each camera in the same ROS 2 container if you do not plan to use IPC.
You can avoid this while we try to understand what’s the problem with image_transport

You can modify the multi-camera launch to create different processes, by simply commenting out these lines:

and this:

In this way, each camera launcher that is included will create its own separate component container

So this is working to launch the cameras and the get the topics to consistently show up. It still seems there is an issue with the image_transport plugins. That should be ok for now. I am mostly interested in the point clouds at this time. I will mark this as resolved, but I will be interested to know if you find this issue.

Cheers,

Benjamin

launch.log (9.1 KB)

1 Like