ROS Subscribing is very slow over cellular connection

asked 2018-05-09 11:15:37 -0500

updated 2018-05-09 13:02:21 -0500

Hi,

I'm trying to create a GUI application to monitor robots that are in the field. The robots communicate via 4G cell modem with decent bandwidth(10-20Mbps) and okay latency(80-150ms). When I start my GUI up it subscribes to 20 topics. When this happens on local host is connects in under 1s, but when I connect over the cellular connection each subscriber takes ~2s so my GUI freezes for about 40s :(

I naively tried to put subscribers in different threads to speed things up but it had no effect on the amount of time the subscribers take. Any suggestions on how I could speed up the time that its taking?

I'm using ROS Kinetic on Ubuntu16.04 I'm also using roscpp, here is an example of one of my subscribers ros::Subscriber sub = n.subscribe("example/topic", 1, topicCallback);

edit retag flag offensive close merge delete

Comments

I naively tried to put subscribers in different threads to speed things up but it had no effect.

no effect on what? On the UI freeze, or on the total time taken to subscribe? If the former, something is not setup correctly with your UI.

gvdhoorn gravatar imagegvdhoorn ( 2018-05-09 12:53:36 -0500 )edit

Any suggestions on how I could speed up the time that its taking?

the first thing would be to figure out what exactly is taking so long.

Run wireshark or some other monitoring tool and try to figure out whether there is something abnormal going on. If you have lots of packet loss, that would ..

gvdhoorn gravatar imagegvdhoorn ( 2018-05-09 12:54:24 -0500 )edit

.. probably be a problem.

gvdhoorn gravatar imagegvdhoorn ( 2018-05-09 12:54:52 -0500 )edit
1

I updated the question to clarify that the threading had no effect on the amount of time subscribing takes.

shoemakerlevy9 gravatar imageshoemakerlevy9 ( 2018-05-09 13:03:26 -0500 )edit