Prevent rosbridge buffering unsent messages

asked 2018-06-22 10:07:17 -0500

h66 gravatar image

updated 2018-07-03 12:54:44 -0500

Hi,

I'm using rosbridge to send usb_cam images from a ROS setup in Linux to a computer running the ROSSharp package. I'm performing several network tests, reducing bandwidth and increasing network errors to simulate a slow/bad internet connection, for example.

We perceive that somehow the image frames that were not sent due network problems from the Linux host are "buffered" at the rosbridge package and then sent when the network is fast again. It seems that rosbridge is buffering all messages, as we can see an important increase in memory with the process.

Is there a way to stop buffering unsent messages with the rosbridge package? For example, drop messages older than 2 seconds at the queue? I didn't find any info about this at the docs.

The docs have something related to "throttle_rate" and "queue_length" ( https://github.com/RobotWebTools/rosb... ) when client initiate a subscriber connection, but after messing around with those parameters I didn't see any improvement with the buffering of messages at the server.

I'm using Ros Kinetic with Ubuntu 16.04.

Thanks!

edit retag flag offensive close merge delete

Comments

Just a note: the official repository for rosbridge_suite is RobotWebTools/rosbridge_suite, not the one you link.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-22 15:11:34 -0500 )edit

You can trying adding a queue_size argument to the Subscriber constructed in the rosbridge_library. The change needs to be made at https://github.com/RobotWebTools/rosb... .

kartikmohta gravatar image kartikmohta  ( 2018-06-22 22:19:21 -0500 )edit

@gvdhoorn Thanks! Just updated the link.

h66 gravatar image h66  ( 2018-07-03 12:54:59 -0500 )edit

@kartikmohta, I just manually set the queue_size to 1 at the rosbridge source but still has some buffering issues. There must be other parameters to define!

h66 gravatar image h66  ( 2018-07-03 12:56:16 -0500 )edit

oh man... having this issue since a few days. Didn't find any solution yet. Also tried to reduce the queue_size and queue_length on the subscriber side

var listener = new ROSLIB.Topic({...queue_size:1,queue_length:1 ...})

mojovski gravatar image mojovski  ( 2018-08-29 09:18:11 -0500 )edit

Also having this issue. Has the problem been solved by anyone?

JeffHu7 gravatar image JeffHu7  ( 2019-02-12 18:12:46 -0500 )edit
1

I'm experiencing a similar issue with too many pointclouds getting buffered. I'd love for it to throw out the data if the network is still uploading. Is it the socket itself that's storing up all the data to be transmitted or is the rosbridge hanging on to it all and sending when free?

CodeMonkey gravatar image CodeMonkey  ( 2019-02-22 14:40:43 -0500 )edit

Has any progress been made on this?

kosmastsk gravatar image kosmastsk  ( 2021-04-03 08:06:22 -0500 )edit