Solving glove data onto a hand skeleton
The Smartgloves stream per-sensor orientations, not joint angles or a finished pose. To drive a rigged hand you have to solve those orientations onto a skeleton every frame. This guide recaps the steps that solve involves, independent of any particular language or engine, so you can implement it on your own stack. The RGMP v2 Viewer sample is a complete, working reference for everything described here.
The SDK is deliberately low-level: it hands you the raw sensor data and stays out of your way, so the solver is yours to build and tune for your own rig, accuracy, and performance needs. Our sample is here to show one approach and get you started; treat it as a learning reference rather than a drop-in, production-grade implementation, and don’t be shy about doing things differently.
What you receive
Section titled “What you receive”Each glove exposes 8 sensors over the RGMP v2 stream:
- one per finger (5),
- a hub on the back of the hand,
- a forearm sensor, and
- a world-anchored forearm pose, available only when a Coil Pro is tracking.
Every sensor streams an orientation quaternion; some also carry a position and status flags (data-valid, Coil-present). The orientations live in a right-handed, gravity-referenced frame: one axis points along gravity, and the hub references its heading to magnetic north. The finger and forearm sensors are expressed relative to the hub, so you compose them with the hub orientation to get a hand-space pose. See the Smartgloves reference for the exact frames and sensor list.
What you need first
Section titled “What you need first”- A rigged hand skeleton with a known bone hierarchy and a neutral (rest) pose.
- A sensor-to-bone mapping: which bone each sensor drives, and that sensor’s mounting offset: where it physically sits relative to the bone.
- Quaternion math (compose, rotate a vector, build a rotation that aims one axis at a target) and forward kinematics to turn local rotations into world transforms.
The solve, step by step
Section titled “The solve, step by step”Run this each frame, from the latest sample:
- Reset to the rest pose. Start from a known neutral pose (fingers slightly fanned, joints at identity) so the result is deterministic and doesn’t drift.
- Anchor the hand. Orient the hand from the hub sensor and offset the hand root by the hub’s mounting position on the back of the hand.
- Apply calibration. Compose each sensor’s orientation with its per-sensor calibration offset (identity if you aren’t calibrating).
- Aim each finger. For each finger, aim the driven bone’s parent at a target derived from the sensor orientation and that sensor’s mounting offset, then set the driven bone from the sensor orientation itself.
- Constrain to anatomy. Fingers (except the thumb) bend on a hinge: clamp backward hyper-extension to a small limit, and distribute the remaining curl onto the fingertip joint so the chain reads naturally.
- Orient the forearm from the forearm sensor (composed through the hub).
- World-anchor (optional). When a Coil Pro is tracking, re-anchor the whole arm in world space from the world-anchored forearm pose: a single rotation + translation alignment.
- Propagate transforms. Run forward kinematics so every local rotation becomes a world transform your renderer can consume.
Two things that trip people up
Section titled “Two things that trip people up”Where to go next
Section titled “Where to go next”- RGMP v2 Viewer — a complete reference implementation of this solve, with a live 3D hand. Start here, then read its source for the concrete math.
- Web apps overview — how the browser samples connect to the driver through the bridge.
- Streaming data and the RGMP v2 specification — the stream these sensors arrive on.