RobotWebTools / roslibjs

The Standard ROS JavaScript Library
https://robotwebtools.github.io/roslibjs
Other
678 stars 378 forks source link

Support rosbridge Fragmentation #557

Open nathanmargaglio opened 2 years ago

nathanmargaglio commented 2 years ago

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.

MatthijsBurgh commented 2 years ago

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).

Rayman commented 2 years ago

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.