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

Extremely large network traffic using RosLibJs - possible solutions

asked 2019-06-13 10:15:09 -0500

mneumann gravatar image


I am using RosLibJs for a web GUI that shows robot data like position, battery status, map etc.

Unfortunately, it uses a lot of network traffic (around 20 GBytes per day!). I am thinking this is due to the direct subscriptions to topics and the high frequency the robot emits data on those topics (like at 10 Hz, for example).

Now, I am unsure how to solve this problem. I thought of 2 possible solutions, maybe you people can help me with it:

  1. Create specialized nodes that only publish data when needed and not in the frequency the robot requires it internally,
  2. Request data periodically from JS side and offer a service from ROS side.

Do you have other ideas? Is there maybe a simpler way?

Thank you!

edit retag flag offensive close merge delete



20 GB a day would seem to equal around 240 KB/sec. That is quite some traffic. Would make sense to try and figure out what contributes most to that 240 KB/sec and start from there.

gvdhoorn gravatar image gvdhoorn  ( 2019-06-13 14:55:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-20 09:47:04 -0500

This would be a good use for a throttle node ( What it does is subscribe to a topic and then republishes it on "<originaltopic>_throttle" at a given rate or bandwidth cap. It is just a single command to run and really easy to add to a launch file. Then in your javascript web page you subscribe to the throttled topic.

edit flag offensive delete link more


This sounds like a great solution. I will try it and let you know!

mneumann gravatar image mneumann  ( 2019-06-21 04:03:42 -0500 )edit

Question Tools



Asked: 2019-06-13 10:15:09 -0500

Seen: 283 times

Last updated: Jun 13 '19