Skip to content

fix(webxr): decouple replay from live input and preserve calibration - #1063

Draft
yanziz-nvidia wants to merge 3 commits into
mainfrom
yanziz/fix-cross-session-replay-calibration
Draft

fix(webxr): decouple replay from live input and preserve calibration#1063
yanziz-nvidia wants to merge 3 commits into
mainfrom
yanziz/fix-cross-session-replay-calibration

Conversation

@yanziz-nvidia

@yanziz-nvidia yanziz-nvidia commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Description

JSON replay stops producing motion when live hand or controller input sources disappear. The recorder substitutes recorded poses and controls but depends on live device objects, while CloudXR maintains its active-device sets from session events. This prevents benchmarks from replaying recorded motion without physical hands or connected controllers.

Provide recorded hand and controller sources, joint/grip/aim spaces, and matching inputsourceschange events through the CloudXR tracking adapter. Both replay pacing modes work with no live devices at startup and continue through live tracking loss or controller disconnects. Recorded tracking gaps and device switches remain discrete. Rendering and UI interaction continue using the original browser frame.

New version 1 recordings store optional controller profiles per frame so CloudXR selects the recorded device's button/axis mapping. Older JSON remains compatible and uses the SDK's generic controller mapping when profile data is absent; the original device-specific mapping cannot be recovered from those files. Hand gamepads are distinguished from controller gamepads.

Also make replay alignment explicit and preserve it across known origin resets:

  • Store an optional gravity-aligned viewer pose in new recordings. Legacy recordings without calibration metadata need no calibration step.
  • For cross-session replay, prompt the operator to return the headset to its recording-start position and heading, then select Calibrate. Direct in-memory replay in the original reference space needs no calibration.
  • Apply known reset transforms to the existing alignment instead of recalibrating from a potentially moved headset. Unknown resets or reference-space replacement require recalibration for calibrated recordings, with playback paused and live input suppressed while waiting.
  • Stop recording on an origin change and retain the captured frames for saving, avoiding mixed coordinate systems.

No new replay parameter is required. An active, visible XR session with a valid viewer pose and a CloudXR connection is still required. Calibration assumes the same physical headset pose; it cannot infer world alignment from an arbitrary headset position.

Validation

  • npm test -- --runInBand: 8 suites, 137 tests passed, using the compatible React dependencies on main.
  • npm run build: passed with three webpack asset-size/performance warnings, including local WebXR assets.
  • Targeted ESLint and Prettier checks passed.
  • SKIP=check-copyright-year pre-commit run --all-files: passed.
  • Local harnesses against the actual CloudXR 6.3.0 SDK verified advancing hand joint data with zero live hands, plus both controllers' outgoing pose/button/axis updates with zero live controllers using generic, Quest Touch Plus, and PICO 4 Ultra adapters. These exercise the SDK input-source listener and controller update construction; registration and network transport are stubbed.
  • Full TypeScript checking reports only the pre-existing PerformanceCanvasImage.tsx:260 ref-type error. The production build does not perform full typechecking.

Regression coverage includes absent devices, live connection changes, recorded gaps, profile changes, hand/controller switches, legacy JSON, explicit calibration, translation and rotation resets, paused timing, stopped replay, and interrupted-recording UI state. Physical headset/server benchmark validation remains outstanding.

Checklist

  • Read the contribution guidelines.
  • Ran the relevant tests, build, lint/format checks, and pre-commit.
  • Added regression coverage and calibration guidance in the UI.
  • Signed off commits per the DCO.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@yanziz-nvidia
yanziz-nvidia force-pushed the yanziz/fix-cross-session-replay-calibration branch from f75ba76 to 05f6fd5 Compare September 11, 2026 22:30
@yanziz-nvidia yanziz-nvidia changed the title fix(webxr): align input replays across XR sessions fix(webxr): replay hands without live tracking and preserve alignment Sep 11, 2026
Signed-off-by: Yanzi Zhu <yanziz@nvidia.com>
@yanziz-nvidia
yanziz-nvidia force-pushed the yanziz/fix-cross-session-replay-calibration branch from 48a51f7 to 89d29b7 Compare September 11, 2026 23:48
@yanziz-nvidia yanziz-nvidia changed the title fix(webxr): replay hands without live tracking and preserve alignment fix(webxr): remove live-hand dependency and fix replay calibration Sep 11, 2026
Signed-off-by: Yanzi Zhu <yanziz@nvidia.com>
@yanziz-nvidia yanziz-nvidia changed the title fix(webxr): remove live-hand dependency and fix replay calibration fix(webxr): decouple replay from live input and preserve calibration Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants