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:
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.
@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.
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.
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.