Ask Your Question
0

Extremely large network traffic using RosLibJs - possible solutions

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

mneumann gravatar image

Hello!

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

Comments

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 imagegvdhoorn ( 2019-06-13 14:55:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

This would be a good use for a throttle node (http://wiki.ros.org/topic_tools/throttle). 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

Comments

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 118 times

Last updated: Jun 13