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

CBOR encoding #364

Merged
merged 6 commits into from
Dec 5, 2018
Merged

CBOR encoding #364

merged 6 commits into from
Dec 5, 2018

Conversation

mvollrath
Copy link
Contributor

@mvollrath mvollrath commented Nov 4, 2018

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.

@mvollrath
Copy link
Contributor Author

Switched to rosdepped CBOR library, now depends on ros/rosdistro#19377

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.
@mvollrath
Copy link
Contributor Author

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.

@achim-k
Copy link
Contributor

achim-k commented Nov 9, 2018

@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

@viktorku viktorku requested a review from jihoonl December 4, 2018 12:55
@jihoonl jihoonl merged commit d77f7e0 into RobotWebTools:develop Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants