Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ros.js cannot handle very large messages #36

Open
rctoris opened this issue Apr 15, 2013 · 4 comments
Open

Ros.js cannot handle very large messages #36

rctoris opened this issue Apr 15, 2013 · 4 comments

Comments

@rctoris
Copy link
Contributor

rctoris commented Apr 15, 2013

Migrated from https://github.com/RobotWebTools/rosjs/issues/27

@baalexander :

Very large messages, like some point cloud streams, cause the browser to freeze. This was originally reported by @jihoonl, who emailed me example code to reproduce (I uploaded it here, but haven't checked it out yet).

If the issue is blocking the main thread, one thing could be using webworkers to process the messages. Still need to investigate.

@rctoris rctoris mentioned this issue Apr 15, 2013
@rctoris
Copy link
Contributor Author

rctoris commented Apr 15, 2013

Web Worker

Migrated from #34

@rctoris :

@jihoonl :
Web worker allows to have use background thread in the browser.
It may help to keep the interface responsive while it receives the high volume of data from socket.

@rctoris :
Could address things like https://github.com/RobotWebTools/map2djs/issues/5

@syrnick
Copy link

syrnick commented Jul 11, 2014

The link to original example https://github.com/downloads/RobotWebTools/rosjs/example.tar.gz. It doesn't have a data bag with :( I'll have to generate a large point cloud to reproduce.

@btwolfe
Copy link

btwolfe commented Nov 4, 2014

Thought I'd add further insight on this issue. It appears that the ROS.Topic.subscribe code does not implement queue_size on the client side, so data piles up if the listener function can't process data as quickly as it comes it. I implemented a workaround to provide a queue size of 1 by using a separate display "thread" to process the data, leaving the listener.subscribe function to just copy the latest message to a globally shared variable and exit. The display thread is set up using the setInterval() call.

I don't know if I should report the queue_size problem as a separate issue or not, but the fact that queue_size is a parameter to ROSLIB.Topic but not used makes it seem like a good candidate.

@rctoris
Copy link
Contributor Author

rctoris commented Jul 7, 2015

related: RobotWebTools/rosbridge_suite#190

k-aguete pushed a commit to k-aguete/roslibjs that referenced this issue Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants