ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Ros2 humble bandwidth usage limited to 3MiB/s

asked 2023-07-25 06:35:56 -0500

krzo gravatar image

updated 2023-07-25 07:05:44 -0500

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-07-25 08:55:35 -0500

Timothée gravatar image

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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-07-25 06:34:54 -0500

Seen: 255 times

Last updated: Jul 25 '23