Cannot list zed_wrapper nodes or components in localhost but they are listable in remote hosts.

Hello,

I am using the zed_ros2_wrapper to bring up the zed camera and use the depth map in another docker for post-processing.

My configuration is the following:

  • Jetson: AGX Orin, JetPack 6.0
    • This is the localhost
  • Camera: ZED 2
  • ROS: Humble
  • ZED: SDK 5.0
  • RMW: rmw_fastrtps_cpp
  • Environment: Docker container
  • Remote host: Ubuntu 20.04 container with ROS2 humble and CUDA support
  • All the containers are running using --network host and --ipc host

What is running properly:

  • zed_ros2_wrapper and zed_ros2_examplesin the dockerized environment:
    • Builds correctly
    • Executes correctly
  • In a remote docker container (the post-processing docker) with our software to subscribe to the topics and receive the depth map.
      • ros2 component list → zed components
      • ros2 node list → zed nodes
      • ros2 topic list→ zed topics
      • Subscribing to topic → successful and receiving data
  • Using zed_display_rviz2 in the same docker image is successful both local and remote.

Issues we are facing:

  • Inside the docker where zed_ros2_wrapper is running (in the Jetson Orin) executing the following commands delivers the following outputs:
    • ros2 component list → empty output
    • ros2 node list → empty output
    • ros2 topic list→ zed topics
    • Subscribing to topic using rviz2 → successful but without any data
    • Subscribing to topic using a custom node → successful but without any data
  • Using another ROS2 docker such as Isaac ROS or dustynv’s ros-humble
    • Same results as above.
  • Using RVIZ2 both in the zed wrapper container or another outputs no tf data, fixed frame map does not exist

Any help is much appreciated!

Hi @matialmar
Welcome to the StereoLabs community.

I recommend you read the content of the Docker README file in the ZED ROS2 Wrapper GitHub repository:

Please also check that the ROS_DOMAIN_ID is the same for all the environments.

I recommend you also read this guide: DDS Middleware and Network tuning - Stereolabs

Thank you Myzhar for your quick response!

I checked that ROS_DOMAIN_ID is the same for all nodes. (ROS_DOMAIN_ID = 0)
After tinkering with ROS and docker I found the solution to my problem. It is not a ZED SDK problem but a FastDDS one.

Using the ros pub/sub example in different containers I encountered the same issue. After just removing the –network host option I was able to discover and communicate between the nodes in the different containers. Yet now I cannot use in a remote node, so after searching the web a found this Stack Exchange post wich explained the following:

Using --net=host implies both DDS participants believe they are in the same machine and they try to communicate using SharedMemory instead of UDP. Fast-DDS team will work in to implement a mechanism to detect this kind of situation.

However mapping /dev/shm into the docker container while using –network host did not work. Which is rare because just removing the –network host worked perfectly in the local container, the reason for this behaviour is yet unknown to me.

The comment bellow pointed about setting the FastDDS transport to UDP

Setting FASTDDS_BUILTIN_TRANSPORTS=UDPv4 can be helpful.

Using this as an environment variable did the trick and allowed me to use them both in local containers and remote ones. But i guess at the expense of losing the performance boost of using shared memory.

I hope someone finds this useful if they are in the same use case.

1 Like