Robotics StackExchange | Archived questions

Ros2 humble bandwidth usage limited to 3MiB/s

Hello,

I have a turtlebot4-lite (ran by rPi4, ubuntu 22.04, ros2 humble), from which I'm streaming rgb and depth images (from oak-d lite camera).

Whenever I'm streaming only the rgb image to a remote PC, it works perfectly. However, whenever I try to stream depth as well, fps of rgb image slows down. After a bit of inspecting I figured out that the max network usage (when subscribing to one, 2 or 3,.. topics) is always 3Mb/s. So If i just stream the depth image, the network usage is 3Mb/s. If I also subscribe to RGB image, the rate of depth images falls down, so the bandwidth is still 3Mb/s. No matter how many topics I subscribe to, the network usage is always 3Mb/s. I tried copying files from rPi to remote PC, and the data rate was much higher than 3Mbps, so I the problem must be related to ROS2.

The processor on rPi is used only around 20%, so the bottleneck can't be rPi. I also changed the routers, and the result is the same. Does ROS2 have some setting that limits the max bandwidth used?

Thanks for your help!

EDIT: I'm using fastDDS.

EDIT 2: when I switch the network to 5Ghz, the data rate climbs to 6Mbps. Better but still way too little.

Asked by krzo on 2023-07-25 06:34:54 UTC

Comments

Answers

A thing that really held back my connection on my robot (not the same as yours) is power saver for WiFi. I recommend you check if you have it enabled and disable it if so.

To check :

sudo -i gedit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Then if you see wifi.powersave = 3, change the 3 to a 2 (it disable powersave), save the file, close gedit and restart your bot. I recommend doing it on your computer too.

It should help with your bandwidth problem.

Else if it doesn't help, you might want to install cycloneDDS, in my small experience it seemed to work better over WiFi, there is a good tutorial on ROS2 humble official install guide. And if you have trouble installing you can always ask me back.

Asked by Timothée on 2023-07-25 08:55:35 UTC

Comments