SDKPython SDK

API reference

Object and method summary, plus the data and result models.

Current version · 1.4.0

API reference

The Python SDK does not provide a context manager for Sdk. Use try/finally for explicit cleanup:

sdk = Sdk(devices=(...))

try:
    ...
finally:
    sdk.close()

When using only the glove functionality, you can call glove.close() in finally. After closing, existing objects cannot continue to read data or use an existing GloveDevice and subscription, otherwise ClosedHandleError is raised.

close() reclaims subscriptions that are still valid. Call subscription.unsubscribe() only when the SDK must keep running but needs to stop a certain callback early; before the final close you do not need to unsubscribe one by one.

Recommended cleanup order:

  1. When running in the background, call request_stop() to stop producing new data.
  2. When running in the background, call join() to wait for the thread to finish.
  3. If vibration was set, call clear() as required by your application.
  4. Call glove.close() or sdk.close() to reclaim the remaining subscriptions in a unified way.

The public command-line example ends the process directly with Ctrl+C; when a production program needs to stop actively, use background mode to perform the above order.

Sdk.close() can be called repeatedly. Glove.close() stops and closes all configured gloves and should be called once in the normal cleanup path. The destructor only serves as a fallback in exceptional cases and must not replace explicit closing.

Object and method summary

For methods without parameters, the "Parameters, types and defaults" column says "None".

Top-level functions

APIPurposeParameters, types and defaultsReturn valueWhen to callMain errors
discover_gloves()Views the currently discoverable glovesNonetuple[DiscoveredGlove, ...]Before creating the SDKTop-level discovery errors; per-port errors are in the result

Sdk

APIPurposeParameters, types and defaultsReturn valueWhen to callMain errors
Sdk.glove()Enters the glove functionalityNoneGloveSDK not closedClosedHandleError, capability unavailable
Sdk.start()Starts the configured functionality and device data streamsNoneNoneAfter preparing data reading and subscriptionConnection, identity, data stream or lifecycle errors
Sdk.update()Performs one round of SDK task scheduling in the current loopNoneUpdateResultStarted and no other run mode in useLifecycleError
Sdk.run_forever()Continuously advances SDK scheduling tasks in the current threadNoneNoneStarted and no other run mode in useLifecycleError
Sdk.run_background()Advances SDK scheduling tasks in the backgroundNoneNoneStarted and no other run mode in useLifecycleError, background running errors
Sdk.request_stop()Requests the running scheduling task to stopNoneNoneDuring foreground or background runningLifecycleError
Sdk.join()Waits for the background scheduling thread to finishNoneNoneAfter a background stop has been requestedLifecycleError, background errors
Sdk.stop()Stops running and disconnects the devicesNoneNoneSDK has been startedErrors during stopping
Sdk.close()Finally closes the SDK and releases resourcesNoneNoneWhen the SDK is no longer usedErrors during closing; the object becomes invalid after closing
Sdk.health()Views the health status of the entire SDKNoneHealthSDK not closedClosedHandleError

Glove

APIPurposeParameters, types and defaultsReturn valueWhen to callMain errors
Glove.device(name=None, *, side=None)Selects one device from the configured glovesname: str | None = None or side: Side | None = None, the two are mutually exclusiveGloveDeviceAfter the SDK is createdNotFoundSelectionError, AmbiguousSelectionError
Glove.sync_time(reference_time_ms)Sets one external absolute time reference for every Glove sourcereference_time_ms: float, a finite Unix-millisecond valueNonePrefer before start(); may be called again while running to resynchronizeInvalidArgumentError, ClosedHandleError, or native synchronization errors
Glove.start()Starts all configured gloves and functionalityNoneNoneAfter preparing data reading and subscriptionConnection, identity, data stream or lifecycle errors
Glove.update()Performs one round of SDK task scheduling in the current loopNoneUpdateResultStarted and no other run mode in useLifecycleError
Glove.run_forever()Continuously advances SDK scheduling tasks such as Retargeting and recovery in the current threadNoneNoneStarted and no other run mode in useLifecycleError
Glove.run_background()Advances SDK scheduling tasks such as Retargeting and recovery in the backgroundNoneNoneStarted and no other run mode in useLifecycleError, background running errors
Glove.request_stop()Requests the running scheduling task to stopNoneNoneDuring foreground or background runningLifecycleError
Glove.join()Waits for the background scheduling thread to finishNoneNoneAfter a background stop has been requestedLifecycleError, background errors
Glove.stop()Stops all gloves and disconnects the devicesNoneNoneGlove has been startedErrors during stopping
Glove.close()Finally closes the glove functionality and releases resourcesNoneNoneWhen the Glove is no longer usedErrors during closing; the object becomes invalid after closing
Glove.health()Views the health status of all configured glovesNoneHealthGlove not closedClosedHandleError

GloveDevice

APIPurposeParameters, types and defaultsReturn valueWhen to callMain errors
GloveDevice.name / GloveDevice.source_idReads the configuration name and runtime source identifierNone, propertystr | None / strSDK not closedClosedHandleError
GloveDevice.get_device_info()Reads the verified device information snapshotNoneDeviceInfoAfter the SDK is created, can be before startUnavailableFeatureError (identity not verified)
GloveDevice.start() / GloveDevice.stop()Starts or stops only the selected gloveNoneNoneWhen a single device needs to be controlled separatelyConnection, identity, data stream or lifecycle errors
GloveDevice.health()Reads health for the selected gloveNoneHealthWhile the device is openClosedHandleError
GloveDevice.close()Releases the selected device scopeNoneNoneWhen this device is no longer needed; it cannot be restarted afterwardClosedHandleError
GloveDevice.pose()Reads the raw glove poseNoneReadChannel[GlovePose]After the SDK is created; recommended to call before startLifecycle or close errors
GloveDevice.imu()Reads the raw IMU data of a gloveNoneReadChannel[GloveImu]After the SDK is created; recommended to call before startLifecycle, close or not-supported errors; experimental feature
GloveDevice.status()Reads the device connection and recovery statusNoneReadChannel[GloveStatus]After the SDK is created; recommended to call before startLifecycle or close errors
GloveDevice.skeleton()Enables and accesses Skeleton dataNoneSkeletonMust be called before startLifecycleError, capability unavailable
GloveDevice.skeleton().joint_angles()Reads Skeleton joint anglesNoneReadChannel[HandJointCommand]After skeleton is enabledThe owning object is closed or the capability is unavailable
GloveDevice.skeleton().pose()Reads OpenXR skeleton node posesNoneReadChannel[HandSkeletonPose]After skeleton is enabledThe owning object is closed or the capability is unavailable
GloveDevice.output(name=None)Reads the dexterous hand output of the specified targetname: str | None = None; when omitted, the target must be uniqueReadChannel[HandJointCommand]After the SDK is createdTarget not found or ambiguous
GloveDevice.haptics()Obtains the fingertip vibration control entry pointNoneStateChannel[Haptics]After a serial device is selectedNot supported or rejected when external, wireless or disconnected
GloveDevice.push_frame(frame)Submits one frame of hand data to the external input sourceframe: ExternalGloveFrame, requiredGlovePoseThe external device has been startedParameter, timestamp or lifecycle errors
GloveDevice.calibration_status(name=None)Views the calibration status of the specified targetname: str | TargetName | None = None; when omitted, the target must be uniqueCalibrationReadinessAfter the SDK is createdTarget not found or ambiguous
GloveDevice.capture_status(...)Checks whether manual capture can startpackage_ids, operator_id are requiredCaptureReadinessBefore creating a Capture SessionInvalidArgumentError, WorkflowError
GloveDevice.start_capture(...)Starts manual captureThe above parameters; force: bool = FalseCaptureSessionWhen ready to start captureInvalidArgumentError, WorkflowError
GloveDevice.start_calibration(...)Starts calibration using a completed capturecompleted_capture_session: CaptureSession; targets is a non-empty target sequence, all requiredCalibrationSessionCapture completed and the Session remains openSession or target validation errors
GloveDevice.capture_progress()Reads the current Capture progressNoneReadChannel[CaptureProgress]External interaction flowLifecycle or close errors
GloveDevice.capture_control()Submits a Capture confirm, skip, retry or cancelNoneCaptureControlExternal interaction flowLifecycle or control request errors
GloveDevice.calibration_progress(name=None)Reads the Calibration progress of the specified targetname: str | TargetName | None = None; when omitted, the target must be uniqueReadChannel[CalibrationProgress]During calibration observationTarget not found or ambiguous

Sdk, Glove and GloveDevice still provide connect() and disconnect(). connect() is kept only for compatibility with old code and does not open the device; disconnect() is equivalent to stop(). New code should use start() and stop() directly.

Data reading and subscription

StateChannel[T] inherits the reading capability of ReadChannel[T], likewise supports latest(), subscribe(), next() and async iteration, and additionally provides set() and clear().

APIPurposeParameters, types and defaultsReturn valueWhen to callMain errors
ReadChannel.latest()Reads the most recent piece of data without waitingNoneSample[T] | NoneThe owning object is not closedClose errors
ReadChannel.subscribe(callback)Executes the callback each time new data is receivedcallback: Callable[[Sample[T]], None], requiredSubscriptionRecommended to register before startParameter or close errors
ReadChannel.next() / async iterationAsynchronously waits for the next item or continuously reads dataNoneawaitable Sample[T] / AsyncIterator[Sample[T]]While the owning object is runningCancellation, close or data stream errors
StateChannel.set(value)Updates the current vibration settingvalue: Haptics, requiredNoneThe device is connected and the capability is supportedParameter, rejection or disconnection errors
StateChannel.clear()Clears the current vibration settingNoneNoneThe device is connected and the capability is supportedRejection or disconnection errors
Subscription.unsubscribe()Stops one callback earlyNoneNoneWhen the SDK keeps running but the callback is no longer neededSynchronous unsubscription inside the callback is not safe

Capture/Calibration Session

APIPurposeParameters, types and defaultsReturn valueWhen to callMain errors
CaptureControl.confirm() / CaptureControl.skip() / CaptureControl.cancel()Confirms, skips or cancels the current Capture requestrequest_id: str, requiredNoneAfter the external interaction receives the current requestEmpty, expired or not-applicable-to-the-current-state requests
CaptureControl.retry()Re-executes one Capture stagestage_id: str, requiredNoneWhen the external interaction needs to retry a stageEmpty, unknown or currently non-retryable stages
CaptureSessionControls manual capture and reads the status or resultconfirm(request_id), skip(request_id), retry(stage_id), cancel(), snapshot(), result(), close()Status, result or NoneWhile the Session is openExpired requests, invalid stages, close errors
CalibrationSessionControls manual calibration and reads or waits for resultssnapshot(), result(), wait(), cancel(), close()Status, optional result or result tupleWhile the Session is openWorkflow, cancellation or close errors

Parameters of GloveDevice.capture_status(...):

ParameterTypeRequired/DefaultDescription and constraints
package_idsSequence[str]RequiredA non-empty sequence of algorithm package IDs; when querying multiple packages at the same time, pass them according to what is actually needed this time
operator_idstrRequiredA non-empty wearer identifier, used to find captures reusable by that wearer

Parameters of GloveDevice.start_capture(...):

ParameterTypeRequired/DefaultDescription and constraints
package_idsSequence[str]RequiredA non-empty sequence of algorithm package IDs, which determines the capture plan that needs to be completed this time
operator_idstrRequiredA non-empty wearer identifier; subsequent calibration results are associated with that wearer
forceboolDefaults to FalseFalse reuses available captures; True ignores reusable captures and re-completes the current plan

Parameters of GloveDevice.start_calibration(...):

ParameterTypeRequired/DefaultDescription and constraints
completed_capture_sessionCaptureSessionRequiredMust have been created by the same Sdk, already completed, and still open
targetsSequence[str | TargetName | None]RequiredNon-empty and must not contain duplicates; a name selects a configured target, None selects the unique unnamed target, and Skeleton uses TargetName.SKELETON

Data and result models

The following tables describe the public data received or returned by the public API. "Nullable" in the tables indicates whether the field can be None; empty sequences or empty mappings are pointed out separately in the description.

TelemetryMeta

TelemetryMeta is the source and frame information attached to raw glove data, appearing as fields such as GlovePose.meta and GloveImu.meta. It covers both physical glove data and external input submitted through ExternalConnection, making it easy to associate the source, device time and frame identifier.

FieldTypeNullableDescription
sourcestrNoThe source ID that produced this data
timestampfloatNoData timestamp
sequenceint | NoneYesThe sequence number provided by the device or data source
frame_idstr | NoneYesThe frame identifier provided by the device or data source

Sample[T]

latest() and next() obtain a Sample[T]; subscribe() returns a Subscription, and the registered callback receives a Sample[T]. T is a concrete data type such as GlovePose, GloveImu, HandJointCommand or GloveStatus; value holds that data, and the remaining fields describe the SDK publish sequence and time.

FieldTypeNullableDescription
valueTNoCurrent business data
sequenceintNoMonotonically increasing SDK sequence number within the same kind of data
source_timefloat | NoneYesData source time; None when the data source does not provide it
observed_atfloatNoThe time when the SDK received the data

Neither source_time nor observed_at is a system calendar time.

DiscoveredGlove

DiscoveredGlove is a single discovery result returned by discover_gloves(), used to view a candidate device's port, left/right hand, SN and the discovery error of that port.

FieldTypeNullableDescription
portstrNoThe discovered serial port path
handSide | NoneYesThe successfully identified left/right hand; may be absent when identification fails
snstr | NoneYesThe successfully read device SN
errorGloveDiscoveryIssue | NoneYesThe discovery error of this port; None on success

GloveDiscoveryIssue

GloveDiscoveryIssue appears as DiscoveredGlove.error and explains why a candidate port did not complete identity reading. Programs should classify and handle by the stable code; message is only used for display or logging.

FieldTypeNullableDescription
codeGloveDiscoveryErrorCodeNoA stable error classification; use it to determine the failure reason
messagestrNoAn error description for log or UI display, not used for program branching

DeviceInfo

DeviceInfo is returned by get_device_info() and is a verified device identity snapshot saved during SDK creation. It is used to display or record the device's canonical SN, model, firmware version and left/right hand information.

FieldTypeNullableDescription
canonical_snstrNoThe canonical SN that passed device identity verification
device_typestrNoDevice type
modelstrNoDevice model
firmware_versionstrNoFirmware version
handSideNoThe left/right hand of the device
hand_sourcestrNoThe source of the left/right hand information

GloveNodePose

GloveNodePose represents the position and rotation of one hand node. It is used both to construct the fingertip input of ExternalGloveFrame and as the field type of the root node and fingertip poses in GloveFeaturePayload.

FieldTypeNullableDescription
positiontuple[float, float, float]NoThree-dimensional position, in meters
quaternion_xyzwtuple[float, float, float, float]NoRotation quaternion in XYZW order

ExternalGloveFrame

ExternalGloveFrame is the external hand frame passed to push_frame(), used to submit the poses of five fingertips and an optional timestamp when there is no physical glove input.

FieldTypeNullableDescription
thumbGloveNodePoseNoThumb fingertip pose
indexGloveNodePoseNoIndex fingertip pose
middleGloveNodePoseNoMiddle fingertip pose
ringGloveNodePoseNoRing fingertip pose
pinkyGloveNodePoseNoPinky fingertip pose
timestamp_msfloat | NoneYesPreferred input; a finite millisecond timestamp. When omitted, the current shared time reference is used; see Timestamps & external time sync for the time semantics
timestamp_secfloat | NoneYesDeprecated compatibility input; the SDK multiplies it by 1000, and it must not be set together with timestamp_ms

GloveFeaturePayload

GloveFeaturePayload is the content of GlovePose.payload, holding the root node, five-finger poses and validity information in one frame of raw glove pose.

FieldTypeNullableDescription
glove_idstrNoGlove data identifier
timestamp_msfloatNoDevice data time, in milliseconds
root_poseGloveNodePoseNoHand root node pose
fingertip_worlddict[GloveFinger, GloveNodePose]NoThe poses of the five fingertips in the world coordinate system
fingertip_localdict[GloveFinger, GloveNodePose]NoThe local poses of the five fingertips relative to the root node
hand_sidestrNoThe left/right hand reported in the frame
finger_namestuple[GloveFinger, ...]NoThe order of the fingers included in the current frame
raw_valid_maskdict[GloveFinger, bool]NoWhether the raw data of each finger is valid
held_maskdict[GloveFinger, bool]NoWhether each finger reuses the previous valid value
quality_flagstuple[str, ...]NoThe quality flags of the current frame; can be an empty sequence

GlovePose

GlovePose is the raw glove pose published by device.pose() and also the parsed result returned after push_frame() accepts an external frame. It combines source information, pose content and extensible quality information.

FieldTypeNullableDescription
metaTelemetryMetaNosource, time and frame identifier
payloadGloveFeaturePayloadNoRoot node, fingertips and quality status
qualitydict[str, object]NoExtensible quality information; can be an empty mapping

GloveImuPayload

GloveImuPayload is the content of GloveImu.payload, holding the validity status, three-axis gyroscope counts and three-axis accelerometer counts of one IMU frame.

FieldTypeNullableDescription
validboolNoWhether the current raw IMU counts are valid
gyroscope_rawtuple[int, int, int]NoThree-axis gyroscope raw counts
accelerometer_rawtuple[int, int, int]NoThree-axis accelerometer raw counts

GloveImu

GloveImu is the raw IMU data published by device.imu(), combining source information, six-axis raw counts and extensible quality information.

FieldTypeNullableDescription
metaTelemetryMetaNosource, time and frame identifier
payloadGloveImuPayloadNoValidity status and six-axis raw counts
qualitydict[str, object]NoExtensible quality information; can be an empty mapping

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.

FieldTypeNullableDescription
targetstrNoTarget identifier
jointsdict[str, float]NoMapping from joint names to target positions
timestampfloatNoOutput timestamp
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.

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 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.

FieldTypeNullableDescription
strengthsdict[GloveFinger, int]NoMapping from fingers to an integer vibration strength in 0..100; can be an empty mapping, and fingers not listed are not included in the current vibration setting

GloveStatus

GloveStatus is the device status published by device.status(), used to observe the current connection, whether the data is stale, the most recent error and the number of successful recoveries.

FieldTypeNullableDescription
device_typestrNoDevice type
connectedboolNoWhether it is currently connected
staleboolNoWhether the current data is already stale or has not started flowing yet
timestampfloatNoStatus timestamp
last_errorstr | NoneYesThe most recent device error; None when there is no error
reconnect_countintNoThe cumulative number of successful connection recoveries
fieldsdict[str, object]NoAdditional status related to the device type; can be an empty mapping

DeviceHealth

DeviceHealth is the device health summary corresponding to each source in Health.devices, used to view the connection, data freshness and most recent error of multiple gloves at the same time.

FieldTypeNullableDescription
connectedboolNoWhether the device is connected
staleboolNoWhether the device data is stale or has not started flowing yet
last_errorstr | NoneYesThe most recent device error

Health

Health is returned by sdk.health() or glove.health() and is used to summarize the warnings, errors, device status and scheduling status of the SDK or all gloves.

FieldTypeNullableDescription
okboolNoWhether the current summary status is healthy
warning_countintNoThe number of warnings in the current summary
error_countintNoThe number of errors in the current summary
devicesdict[str, DeviceHealth]NoMapping from source ID to device health status
last_errorstr | NoneYesThe most recent SDK error
runtime_overrunboolNoWhether SDK scheduling has ever overrun
topic_callback_errorboolNoWhether an unhandled exception has ever occurred in a callback

CalibrationReadiness

CalibrationReadiness is returned by device.calibration_status() and is used to determine whether the specified target requires no calibration, can be used directly or needs recalibration for the current wearer.

FieldTypeNullableDescription
stateCalibrationReadinessStateNoNOT_REQUIRED, READY or NEEDS_CALIBRATION
operator_idstrNoThe wearer identifier used for this determination

UpdateResult

UpdateResult is returned by sdk.update() or glove.update() and is used to view how many tasks this manual scheduling executed and whether there are still subsequent tasks, and to wait for the next task to become due.

FieldTypeNullableDescription
tickintNoCurrent update sequence number
ran_task_countintNoThe number of tasks executed this time
has_next_taskboolNoWhether there are still subsequent scheduling tasks
sleep()() -> SleepResult—Waits for the next task to become due; each result can be called only once

Capture models

The Capture types together describe the capture plan, the readiness state before starting, the running progress, the Session snapshot and the final result.

CapturePlanStage

CapturePlanStage is one action stage in CapturePlan.stages, used to tell the program what action to display, how many samples need to be captured and whether skipping is allowed.

FieldTypeNullableDescription
stage_idstrNoAction stage identifier
promptstrNoThe action prompt displayed to the wearer
required_sample_countintNoThe number of samples needed to complete the stage
optionalboolNoWhether skipping is allowed

CapturePlan

CapturePlan appears as CaptureReadiness.plan and CaptureSessionSnapshot.plan and describes which algorithm packages this Capture involves and the stage execution order.

FieldTypeNullableDescription
package_idstuple[str, ...]NoThe algorithm package IDs covered by this plan
stagestuple[CapturePlanStage, ...]NoThe capture stages executed in order

CaptureStageReadiness

CaptureStageReadiness is the readiness state of one stage in CaptureReadiness.stages, used to determine whether the stage can reuse existing data or needs to be re-captured.

FieldTypeNullableDescription
stage_idstrNoStage identifier
required_sample_countintNoRequired sample count
stateCaptureStageReadinessStateNoREUSABLE or NEEDS_CAPTURE

CaptureReadiness

CaptureReadiness is returned by device.capture_status() and is used to view the overall readiness state, the capture plan and whether each stage needs capture before creating a Capture Session.

FieldTypeNullableDescription
stateCaptureReadinessStateNoNOT_REQUIRED, READY or NEEDS_CAPTURE
planCapturePlanNoThe resolved capture plan
stagestuple[CaptureStageReadiness, ...]NoReadiness state of each stage

CaptureStageProgress

CaptureStageProgress appears as an element of CaptureProgress.stage and CaptureSessionSnapshot.stage_progress, used to drive the action prompt, sample progress and the currently allowed interaction.

FieldTypeNullableDescription
stage_idstrNoCurrent stage identifier
promptstrNoCurrent action prompt
optionalboolNoWhether the current stage allows skipping
stateCaptureStageStateNoCurrent stage state
originCaptureStageOriginNoNew capture or reuse of an existing capture
collected_sample_countintNoNumber of samples collected
required_sample_countintNoRequired sample count
request_idstr | NoneYesThe current confirm or control request identifier

CaptureFailure

CaptureFailure appears as CaptureProgress.failure and CaptureSessionSnapshot.failure, using a stable code and a readable message to describe the failure reason of the Capture Session.

FieldTypeNullableDescription
codestrNoStable failure code
messagestrNoFailure description for display or logging

CaptureProgress

CaptureProgress is published by device.capture_progress() and is used by the external interaction interface to continuously display the current source, wearer, Session state and action stage.

FieldTypeNullableDescription
session_idstrNoCapture Session identifier
session_stateCaptureSessionStateNoSession state
failureCaptureFailure | NoneYesSession failure information
source_idstrNoThe source ID used for capture
sideSideNoThe captured left/right hand
operator_idstrNoWearer identifier
stageCaptureStageProgressNoCurrent stage progress

CaptureSessionSnapshot

CaptureSessionSnapshot is returned by CaptureSession.snapshot() and is the current complete snapshot of a manual Capture Session, used to display progress and decide the next allowed operation.

FieldTypeNullableDescription
sideSideNoThe captured left/right hand
planCapturePlanNoThe capture plan for this session
stateCaptureSessionStateNoSession state
current_stagestr | NoneYesCurrent stage identifier
request_idstr | NoneYesCurrent control request identifier
collected_sample_countintNoNumber of samples collected in the current stage
required_sample_countintNoRequired sample count for the current stage
remaining_stagestuple[str, ...]NoStages not yet completed
stage_progresstuple[CaptureStageProgress, ...]NoProgress of all stages
allowed_operationstuple[CaptureControlAction, ...]NoCurrently allowed control operations
next_actionstrNoNext action prompt
failureCaptureFailure | NoneYesSession failure information

CaptureStageSamples

CaptureStageSamples is the capture summary of one stage in CaptureResult.stage_samples, used to view how many frames were finally saved for that stage.

FieldTypeNullableDescription
stage_idstrNoStage identifier
frame_countintNoThe number of frames saved for this stage

CaptureResult

CaptureSession.result() returns CaptureResult | None: after the Session completes you get the capture result for this session, and while it is not yet complete you get None. CaptureResult records the wearer, left/right hand, completion time and per-stage frame count summary of this capture.

FieldTypeNullableDescription
operator_idstrNoWearer identifier
sideSideNoThe captured left/right hand
created_atfloatNoCreation time of the capture result
stage_samplestuple[CaptureStageSamples, ...]NoFrame count summary saved for each stage

Values of the capture session enums:

EnumValues
CaptureSessionStateRUNNING, COMPLETED, FAILED, CANCELLED
CaptureStageStatePENDING, AWAITING_CONFIRMATION, COLLECTING, COMPLETED, SKIPPED
CaptureStageOriginNEW_CAPTURE, REUSED
CaptureControlActionCONFIRM, RETRY, SKIP, CANCEL

Calibration models

The Calibration types describe the computation progress per target and provide a snapshot of the entire Session and the final result.

CalibrationJobFailure

CalibrationJobFailure appears as CalibrationJobProgress.failure, using a stable code and a readable message to describe the calibration failure reason of a certain target.

FieldTypeNullableDescription
codestrNoStable failure code
messagestrNoFailure description for display or logging

CalibrationJobProgress

CalibrationJobProgress appears as an element of CalibrationProgress.job and CalibrationSessionSnapshot.jobs, used to view the calibration state and failure information of a single target.

FieldTypeNullableDescription
target_idstrNoTarget identifier
stateCalibrationJobStateNoThe calibration state of the current target
failureCalibrationJobFailure | NoneYesFailure information of the current target

CalibrationProgress

CalibrationProgress is published by device.calibration_progress() and is used by the external interaction interface to continuously display the computation state of one target in the current Calibration Session.

FieldTypeNullableDescription
session_idstrNoCalibration Session identifier
source_idstrNoThe source ID used for calibration
jobCalibrationJobProgressNoCalibration progress of the current target

CalibrationSessionSnapshot

CalibrationSessionSnapshot is returned by CalibrationSession.snapshot() and is used to view the current state of the entire Session and all of its targets at once.

FieldTypeNullableDescription
stateCalibrationSessionStateNoSession state
jobstuple[CalibrationJobProgress, ...]NoTask states arranged in the order of targets

CalibrationResult

CalibrationResult is a single target result in the calibration result collection, used to record the record ID, source, target and creation time of a saved calibration. CalibrationSession.result() returns tuple[CalibrationResult, ...] | None, and wait() returns tuple[CalibrationResult, ...].

FieldTypeNullableDescription
record_idstrNoThe calibration record identifier after saving
source_idstrNoThe source ID used for calibration
target_idstrNoThe target ID corresponding to the calibration
created_atfloatNoCreation time of the calibration result

The values of both CalibrationSessionState and CalibrationJobState are RUNNING, COMPLETED, FAILED, CANCELLED, among which CalibrationJobState also includes PENDING, which is waiting to execute.