API referenceVetraGlove ProPython

Skeleton and haptics data

Data models

Current version · 2.0.0

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

FieldTypeNullableDescription
targetstrNoTarget identifier
jointsdict[str, float]NoMapping from joint names to target positions
timestampfloatNoOutput timestamp, in milliseconds
sourcestr | NoneYesThe source ID that produced this output
metadatadict[str, object]NoAdditional 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.

IndexJoint 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

FieldTypeNullableDescription
timestamp_msfloatNoSkeleton output time, in milliseconds
hand_sideSideNoLeft/right hand
coordinate_framestrNoCurrently wrist_local
namestuple[str, ...]NoThe names of the 25 skeleton nodes; the order matches the position and rotation arrays
positions_localtuple[tuple[float, float, float], ...]No25 wrist-local node positions
orientations_local_xyzwtuple[tuple[float, float, float, float], ...]NoXYZW 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

FieldTypeNullableDescription
strengthsdict[GloveFinger, int]NoMapping 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