Hello, i’m running into an issue when i try to run some ros2 nodes that subscribes to zed_wrapper
topics, all zed_wrapper
topics frame rate drops from 20Hz to 5Hz max, and the /zed/zed_node/depth/depth_registered
topic drops below 0.5Hz on average. Before going deeper on my debug results, here is a quick overview on the setup i am using:
Setup and configuration
- i’m running everything on an
Nvidia Jetson Xavier NX
withJetpack 5.11
- I am using two separate docker containers:
1- One that runs only the zed SDK and the zed ros2 wrapper, the container is based on thezed_ros2_l4t_35.3.1_sdk_5.0.3
docker image.
2- One that runsros2 Humble
and the nodes i’m using for my applications - I have followed the DDS Middleware configuration described in this article DDS Middleware and Network tuning, and i have set up the
cyclonedds
config for both docker containers. - Both container’s network setting have been set to
host
. - I have changed the
common_stereo.yaml
file to havepub_resolution: 'NATIVE'
andpub_frame_rate: 20.0
withgrab_resolution: 'VGA'
andgrab_frame_rate: 20
.
Faced Issue in Details
When running the command ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zed2i
on the zed container, i receive on the other container all the topics with no problem and the command ros2 topic hz /zed/zed_node/depth/depth_registered
outputs average rate: 20
. But when i display the topics using Foxglove on a remote machine in the same subnet, or when i use ros2 topic echo
the command ros2 topic hz
on the image topic or the depth topic ouputs average rate: 5
and the display is a bit laggy. When i shut the display down the average rate gets back to 20. When i run nodes on the second container on the Jetson
, nodes that subscribes to /zed/zed_node/depth/depth_registered
, or /zed/zed_node/left/image_rect_color
i get these results:
ros2 topic hz /zed/zed_node/depth/depth_registered
ouputs something likeaverage rate: 0.3 min: 0.180s max: 10s
. The min value get stuck above 1 second sometimes.ros2 topic hz /zed/zed_node/left/image_rect_color
ouputsaverage rate: 5 min: 0.160s max: 0.230s
.
I assume that the Nvidia Jetson Xavier NX
is powerful enough to run both zed nodes and other nodes at the same time, especially with VGA
resolution, therefore i’m stunned and have no idea where this issue come from or how to solve it, any suggestion would be more than welcome.
Thank you in advance.