Image publishing over WiFi screeching to < 1FPS when workstation echoes topic

asked 2023-04-02 22:42:02 -0600

coatwolf gravatar image

updated 2023-04-02 22:45:15 -0600


I have the following setup:

  • Main workstation: ThinkPad X1 9th Gen + Ubuntu 22.04 Jammy
  • Raspberry Pi 4 8GB + Ubuntu 22.04
  • Both computers running ROS 2 Humble
  • Computers connected over SSH
  • OAK-D RGBD camera connected to Pi via USB 3.0 with dedicated power supply

First off, I have managed to run the non-ROS MobileNet example for the OAK-D (link) and see the image stream on my main workstation at a decent FPS, all over SSH.

On the ROS 2 side, when running the example OAK-D launch files on the Pi over SSH things seem normal at first: I am able to list the topics and when checking, for instance, the RGB topic (/color/image)'s frequency (still from within the Pi) I see close to 40 Hz.

Things start to fall apart once I try and interact with this topic from my main workstation. If I run ros2 topic hz /color/image on my laptop the publishing rate screeches to either a total halt or a very slow (<1 FPS) rate, and eventually the SSH connection fails.

The same goes for when I try to echo /color/image, or view the image stream in rviz2. As soon as I CTRL+C out of the echo I see the FPS jump back to normal on Pi.

What I have tried: Though I am a novice at this, I tried to tune my cross-vendor settings using this guide. I didn't notice any changes after increasing ipfrag_high_thresh or decreasing ipfrag_time.

I would appreciate some help understanding what may be causing this, if this is expected behavior, etc. Thanks in advance.

edit retag flag offensive close merge delete


The problem probably occur because you are using uncompressed images, try to stream compressed images using the image_transport plugin (some sensors publish also compress images out of the box).

Then you can rostopic echo the compressed version of the topic /color/image/compressed, on Rviz instead you can select the compressed version of the topic from the topic panel

AlessioParmeggiani gravatar image AlessioParmeggiani  ( 2023-04-03 09:35:53 -0600 )edit