-
Notifications
You must be signed in to change notification settings - Fork 519
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
CBOR encoding #364
CBOR encoding #364
Conversation
Switched to rosdepped CBOR library, now depends on ros/rosdistro#19377 |
7d72a88
to
2b28d7d
Compare
Extract message values once per message.
Was using big-endian tags and encoding little-endian. Always use little-endian for now since Intel is prevalent for desktop. Add some comments to this effect.
More information about draft typed arrays and when to use CBOR.
Use an actual 64-bit format.
Did some more testing and found that CBOR is fastest for large numeric arrays. 64-bit integers may be an exception because JavaScript does not support them natively. PNG can result in a smaller wire size but at great expense on both ends. Per-message deflate at the websocket level is a better way to reduce wire size for browser clients. |
@mvollrath the rosdistro PR was merged. Can you re-trigger the Travis build? Not sure how to do this though, maybe closing and re-opening the PR will do |
Add "cbor" compression type, which produces binary messages encoded with CBOR. For large messages with stochastic data like point clouds, this is more efficient than JSON or PNG encodings. Decoding byte arrays is very fast in Chrome.
Draft typed array tags are implemented for fast decoding of homogeneous numeric arrays.
A roslibjs patch is on the way.