Subscription to depth topic slows down pose publishing rate?

I am using zed-ros2-wrapper docker container and another one to launch my ros2 humble nodes on orin NX. When I turn on zed wrapper and measure pose and depth alone with ros2 topic hz, i get 60 for pose and 24 for depth on 60grab rate and 60 pub rate. As soon as my ros2 node subscribes to depth topic, pose topic publishing rate falls down to 20.

Is this expected? Jtop shows 50% gpu usage and 40% cpu usage so its not that

Hi @tyrellcorp
unfortunately, this highly depends strongly on the size of the data.
We noticed that the ROS 2 DDS Middleware infrastructure suffers when transmitting big-size data and research papers confirmed this feeling.
We suggest you reduce the publish resolution to improve the performance.

I’ve now tried running all commands from a single zed docker container, so one terminal is launching zed with ros2 launch zed_wrapper , and the other two are doing ros2 topic hz /zed2i/zed_node/pose and ros2 topic echo --field header /zed2i/zed_node/depth/depth_registered , the hz reported for pose drops from 60 to around 31 when using cyclone dds and to around 23 when using fastdds. If I just do topic hz /zed2i/zed_node/depth/depth_registered the fps is around 25fps. The camera settings are grab and pub rate 60, resolution 720, depth: performance

any ideas how to get it to perform better?

You can try to tune the DDS, there are guides on the internet according to the middleware that you use.
Can you also check the Diagnostic with rqt (Plugins → Robot Tools → Runtime Monitor)?
We provide all the available statistics to understand how well is the node performing with respect to message-receiving performance.

ok, will check it out! Thanks! will pub resolution affect the accuracy of pose?

No, the ZED SDK internally works with grab resolution

Will grab resolution/frequency impact pose accuracy? Is there a difference between 720p and VGA?

Do you have some numbers/benchmarks for pose accuracy vs resolution?

Sure it does, higher resolution → more precise results

We have no public available information for this.