ROS ate my network bandwidth! [closed]

asked 2017-03-03 07:39:17 -0500

ZOU Lu gravatar image

updated 2017-03-03 07:43:25 -0500

Sorry for the title, no offence. I'm just crazy about the problem.

I have 2 computers, A and B connected via a 1000Mbps network connection, 3 network cameras were connected to this network.

I was trying to capture images in computer A, and publish the images via ROS, so the computer B could receive a copy simultaneously.

Here is the weird thing I've encountered:

If the IN-COMING bandwidth of B is ~400Mbps, then the OUT-GOING bandwidth of A would be ~800Mbps, that said, A is sending twice as much data as needed by B. What's wrong with it??? I've tested the bandwidth usage by the command rostopic bw /the_image_topic, and the result on both A and B are all ~400Mbps.

I'm very sure that there's no other subscriber on the network, as when I stop the subscriber on B, the network traffic drops down to nearly zero immediately.

In case there's some bugs lie in the camera driver, I wrote a very simple program to publish some Lidar data from pre-recorded Lidar files. And I could observe the same issue is still there, or even worse, this time the ratio of out-going/in-coming is very near to 3/1 ...

Can anyone help me with this problem? The bandwidth is far from sufficient to support 3 cameras simultaneously, it's currently the bottleneck of my system. Many thanks for any kinds of help!

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2019-02-21 18:43:42.122293

Comments

ROS uses the lo interface to send msgs between nodes on the same machine. Can you verify that however you are measuring your utilised bw does not include lo as well?

gvdhoorn gravatar image gvdhoorn  ( 2017-03-03 08:13:23 -0500 )edit

@gvdhoorn, thank you. I used nload eth0 to measure the specific traffic on the interface eth0, so lo is not taken into account. When I used all the 3 cameras, the network load was pushed to its limit very quickly, then the camera capturing node died because of couldn't connect to master node

ZOU Lu gravatar image ZOU Lu  ( 2017-03-03 11:07:32 -0500 )edit

I've tested the bandwidth usage by the command rostopic bw /the_image_topic

I don't know if this is the cause of what you're seeing, but rostopic is just another subscriber, so that would count as another 400Mbps in your nload output.

gvdhoorn gravatar image gvdhoorn  ( 2017-03-04 04:27:16 -0500 )edit

I stoped other subscribers before rostopic bw, and that command is issued on the same box of the publisher, which means this portion of traffic would go to lo instead of eth0, am I right?

ZOU Lu gravatar image ZOU Lu  ( 2017-03-04 05:17:53 -0500 )edit

Yes. Nodes on the same machine should use lo to communicate.

Could you please reword your question a bit? Perhaps include a table that shows who is publishing what, who is subscribing and what the resulting bw utilisation is versus the expected one.

gvdhoorn gravatar image gvdhoorn  ( 2017-03-04 06:38:36 -0500 )edit

Hey, were u able to resolve this issue or figure out why this was happening?

aditi741997 gravatar image aditi741997  ( 2019-05-08 01:45:04 -0500 )edit