xr_ai_tools.tracking#

Native tools backed by the typed OpenXR tracking service.

Classes#

HeadPose

Head pose and orientation reported by the OpenXR service.

OpenXRHealth

OpenXR service health and session state.

TrackingTools

Own the OpenXR-service client and current-user-frame tool.

Module Contents#

class xr_ai_tools.tracking.HeadPose#

Head pose and orientation reported by the OpenXR service.

is_valid: bool#

Whether the remaining pose fields describe a valid tracked pose.

position: xr_ai_tools.types.Vector3#

World-space head position.

forward: xr_ai_tools.types.Vector3#

World-space forward direction.

right: xr_ai_tools.types.Vector3#

World-space right direction.

up: xr_ai_tools.types.Vector3#

World-space up direction.

yaw_deg: float#

Head yaw in degrees.

pitch_deg: float#

Head pitch in degrees.

ts: int#

Service-provided pose timestamp.

error: str | None = None#

Tracking failure detail when the pose is invalid.

class xr_ai_tools.tracking.OpenXRHealth#

OpenXR service health and session state.

status: str = 'ok'#

Service health status label.

session_open: bool#

Whether an OpenXR session is currently open.

open_attempts: int#

Number of attempts made to open an OpenXR session.

last_open_error: str | None = None#

Most recent session-open failure, if any.

class xr_ai_tools.tracking.TrackingTools(endpoint: str, *, timeout_s: float = 10.0)#

Own the OpenXR-service client and current-user-frame tool.

async get_health() OpenXRHealth#

Return detailed OpenXR service and session health.

async health() bool#

Return whether the service is reachable with an open XR session.

async close() None#

Close the underlying service connection.