Skeleton and haptics data
Data models
HandJointCommand
HandJointCommand represents a set of joint angle outputs, containing the target, a mapping from joint names to angles, the output time, an optional source and metadata. Both device.output() and skeleton().joint_angles() provide reading of this kind of data; each read obtains a Sample[HandJointCommand], in which sample.value is the HandJointCommand. This type itself does not prescribe fixed joint names or counts.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
target | str | No | Target identifier |
joints | dict[str, float] | No | Mapping from joint names to target positions |
timestamp | float | No | Output timestamp, in milliseconds |
source | str | None | Yes | The source ID that produced this output |
metadata | dict[str, object] | No | Additional algorithm information; can be an empty mapping |
Skeleton fixed joints
When the data comes from skeleton().joint_angles(), HandJointCommand.joints always contains the following 25 active joints. <side> in the names is replaced with left or right; your code should read by joint name and must not rely on the key iteration order of JSON/dictionaries.
| Index | Joint name |
|---|---|
| 0 | <side>_thumb_cmc_abduction |
| 1 | <side>_thumb_cmc_flexion |
| 2 | <side>_thumb_cmc_opposition |
| 3 | <side>_thumb_mcp_abduction |
| 4 | <side>_thumb_mcp_flexion |
| 5 | <side>_thumb_ip_flexion |
| 6 | <side>_index_mcp_abduction |
| 7 | <side>_index_mcp_flexion |
| 8 | <side>_index_pip_flexion |
| 9 | <side>_index_dip_flexion |
| 10 | <side>_middle_mcp_abduction |
| 11 | <side>_middle_mcp_flexion |
| 12 | <side>_middle_pip_flexion |
| 13 | <side>_middle_dip_flexion |
| 14 | <side>_ring_cmc_cup |
| 15 | <side>_ring_mcp_abduction |
| 16 | <side>_ring_mcp_flexion |
| 17 | <side>_ring_pip_flexion |
| 18 | <side>_ring_dip_flexion |
| 19 | <side>_little_cmc_opposition |
| 20 | <side>_little_cmc_cup |
| 21 | <side>_little_mcp_abduction |
| 22 | <side>_little_mcp_flexion |
| 23 | <side>_little_pip_flexion |
| 24 | <side>_little_dip_flexion |
The dexterous hand output provided by device.output() still uses HandJointCommand, but the joint names and counts are defined by the corresponding dexterous hand algorithm package and do not use the above Skeleton fixed list.
HandSkeletonPose
HandSkeletonPose is the OpenXR skeleton node pose published by skeleton().pose(), used to read the names, positions and rotations of 25 nodes by the same index.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
timestamp_ms | float | No | Skeleton output time, in milliseconds |
hand_side | Side | No | Left/right hand |
coordinate_frame | str | No | Currently wrist_local |
names | tuple[str, ...] | No | The names of the 25 skeleton nodes; the order matches the position and rotation arrays |
positions_local | tuple[tuple[float, float, float], ...] | No | 25 wrist-local node positions |
orientations_local_xyzw | tuple[tuple[float, float, float, float], ...] | No | XYZW quaternions of the 25 wrist-local nodes |
Haptics
Haptics is a compatibility alias of GloveHaptics.
Haptics is used both as the input of set() and as the vibration output state obtained by latest() and subscribe(). device.haptics() returns the fingertip vibration control and reading entry point and does not directly return Haptics.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
strengths | dict[GloveFinger, int] | No | Mapping from fingers to an integer vibration strength in 0..127; can be an empty mapping, and fingers not listed are not included in the current vibration setting |