roslibjs icon indicating copy to clipboard operation
roslibjs copied to clipboard

Support rosbridge Fragmentation

Open nathanmargaglio opened this issue 3 years ago • 2 comments

The rosbridge protocol provides the ability to fragment messages. This feature doesn't appear to be present in roslibjs.

Is there any plans to implement this? If not, is there some direction that can be provided in terms of getting this implemented?

For full context, I'm interested in using fragmentation in Foxglove, but they explained that they use roslibjs to handle this so such an update would have to occur here.

nathanmargaglio avatar Aug 01 '22 21:08 nathanmargaglio

I am open to supporting this feature.

Though I do not have the time to implement this. So when you want to implement this, I am willing to assist where I can. But the bulk should be done by you (or someone else).

MatthijsBurgh avatar Aug 05 '22 05:08 MatthijsBurgh

Probably adding code to https://github.com/RobotWebTools/roslibjs/blob/c74032b05537f6d05e701a9562a7e64a94fbb0cc/src/core/SocketAdapter.js#L111 to store fragments and assemble them, and recalling onmessage with the full message.

Make sure it works with and without compression.

Rayman avatar Aug 22 '22 12:08 Rayman