zendo-protocol
The wire-protocol definitions for the Zendo motion-tracking WebSocket stream: port range, message-type tags, the joint and landmark vocabularies, and the pure decode/encode routines.
This crate is the single source of truth for the protocol. It has no
dependencies, performs no I/O, never allocates, and is no_std by
disabling the default std feature. Most users want
zendo-sdk (Rust) or the
zendo-sdk PyPI package (Python), which
build a connection on top of this crate. Depend on zendo-protocol directly
only if you bring your own transport.
Frame layout
Every frame is one binary WebSocket message: byte 0 is the type tag, the rest is
the payload. All numeric values are little-endian f64.
| Message | Tag | Payload |
|---|---|---|
| Hello | 0x01 |
protocol version (u16 LE) |
| Body quaternions | 0x02 |
13 joints × (w, x, y, z) |
| Body landmarks | 0x03 |
19 landmarks × (x, y, z, confidence) |
| Hand quaternions | 0x04 |
1 side byte + 16 joints × (w, x, y, z) |
| Hand landmarks | 0x05 |
1 side byte + 21 landmarks × (x, y, z, confidence) |
The server sends the hello frame first on every connection, carrying
PROTOCOL_VERSION; clients require an exact match. The side byte is 0 for the
right hand and 1 for the left. Body messages stream in body-tracking mode;
hand messages stream in hand-tracking mode; the two never appear in the same
session.
Example
use ;
License
Licensed under either of Apache-2.0 or MIT at your option.