Use Quest as Move calibration witness

This commit is contained in:
Meta Vens 2026-06-12 15:04:51 +01:00
commit 0616d21a5b
7 changed files with 61 additions and 35 deletions

View file

@ -69,7 +69,7 @@ a named invariant that the native runtime cannot protect yet.
for Mimir-fused controller input.
- `MimirMoveCalibrationProtocol` publishes the typed calibration preflight for
Starfire/Nightwing Moves: required Muninn evidence streams, optional
Periwinkle motion/camera witnesses, stillness/sweep/validation phases, and
Quest headset/controller pose witnesses, stillness/sweep/validation phases, and
the four derived calibration outputs Mimir must produce before IMU
orientation can become authority.
- `scripts/start-nightwing-move-tracking.ps1` is the narrow live Nightwing

View file

@ -13,8 +13,9 @@ resolved poses after Mimir has earned them.
stream address is `muninn:nightwing:move-evidence`.
- Mimir on Starfire publishes resolved pose frames at
`mimir:starfire:move-controller-poses`.
- Periwinkle can participate through Eve sensor observations:
`periwinkle:eve:motion` and optionally `periwinkle:eve:camera`.
- Quest can participate as an external tracked VR reference over USB:
`quest:usb:headset-pose`, `quest:usb:left-controller-pose`, and
`quest:usb:right-controller-pose`.
- Starfire ASIO/Scarlett loopback can provide cue timing, but it is not a Move
pose authority.
@ -36,11 +37,25 @@ lowers to local UDP for OBS compatibility.
frame, and optical angular consistency.
5. `figure-eight`: broad figure-eight motion; fit magnetometer hard/soft iron
and cross-axis coupling.
6. `periwinkle-witness`: optional phone motion/camera witness near the active
Move for independent body and clock evidence.
6. `quest-reference`: optional Quest headset/controller reference with the Move
between the two Quest controllers in front of the headset.
7. `validation-pass`: held-out free motion; promote only if triangulated optical
residuals and IMU prediction residuals pass.
## Quest USB Preflight
The Quest must be authorized for USB debugging before Starfire can query it.
Check it with:
```powershell
adb devices -l
```
If it reports `unauthorized`, put on the headset and accept the USB debugging
prompt. The current calibration protocol can still run without Quest, but Quest
poses are the preferred external reference when the headset and both
controllers are sitting around the Move.
## Data Products
- `mimir.move_fusion_rig_calibration.v1`: camera intrinsics/extrinsics, clock

View file

@ -141,10 +141,12 @@ artifacts\move-calibration\protocol.cc` writes
`mimir.move_calibration_protocol.v1` for
`mimir-move-calibration-starfire-nightwing-v1`. The protocol requires
`muninn:starfire:move-evidence`, `muninn:nightwing:move-evidence`, and
`mimir:starfire:move-controller-poses`; optionally drinks Periwinkle motion and
camera witnesses; and requires Mimir to derive rig calibration, IMU calibration,
controller identity mapping, and a calibration receipt before orientation can
stop being `orientation:imu-unresolved`.
`mimir:starfire:move-controller-poses`; optionally drinks Quest headset and
left/right controller poses over USB as an external VR reference; and requires
Mimir to derive rig calibration, IMU calibration, controller identity mapping,
and a calibration receipt before orientation can stop being
`orientation:imu-unresolved`. ADB currently sees the Quest over USB, but it must
be authorized in-headset before Starfire can query it.
Live Nightwing bring-up uses `scripts/start-nightwing-move-tracking.ps1`.
Starfire starts `Mimir.EveSensorReceiver` on `/eve/periwinkle`, stages

View file

@ -1901,7 +1901,7 @@ static async Task<int> RunMoveCalibrationProtocolSmokeAsync(string outputPath)
var optionalStreams = protocol.StreamRequirements.Length - requiredStreams;
var totalDuration = protocol.Phases.Sum(phase => phase.DurationSeconds);
Console.WriteLine(
$"move-calibration-protocol-smoke path={outputPath} protocol={protocol.ProtocolId} requiredStreams={requiredStreams} optionalStreams={optionalStreams} phases={protocol.Phases.Length} durationSeconds={totalDuration:0.0} outputs={protocol.Outputs.Length} periwinkleOptional={protocol.StreamRequirements.Any(stream => stream.StreamId.StartsWith("periwinkle:", StringComparison.Ordinal))}");
$"move-calibration-protocol-smoke path={outputPath} protocol={protocol.ProtocolId} requiredStreams={requiredStreams} optionalStreams={optionalStreams} phases={protocol.Phases.Length} durationSeconds={totalDuration:0.0} outputs={protocol.Outputs.Length} questOptional={protocol.StreamRequirements.Any(stream => stream.StreamId.StartsWith("quest:", StringComparison.Ordinal))}");
return requiredStreams >= 3 &&
protocol.Phases.Length == 7 &&

View file

@ -48,7 +48,7 @@ public sealed record MimirMoveCalibrationOutput(
public sealed record MimirMoveCalibrationAcceptance(
[property: Key(0)] int MinimumControllerStateSamplesPerMove,
[property: Key(1)] int MinimumOpticalSamplesPerCamera,
[property: Key(2)] int MinimumPeriwinkleMotionSamples,
[property: Key(2)] int MinimumExternalPoseSamples,
[property: Key(3)] double MaximumClockSkewMilliseconds,
[property: Key(4)] double MaximumStillGyroRadiansPerSecond,
[property: Key(5)] double MinimumTriangulatedPoseConfidence,
@ -90,21 +90,29 @@ public static class MimirMoveCalibrationProtocol
Required: true,
"The calibration run must prove Mimir can republish resolved poses."),
new(
"periwinkle:eve:motion",
"periwinkle",
"Periwinkle Eve client",
"phone IMU/motion witness",
"CultMesh observation ledger through Mimir Eve sensor intake",
"quest:usb:headset-pose",
"starfire",
"Quest USB/OpenXR witness",
"Quest headset pose near the Move/controllers calibration cluster",
"USB ADB/OpenXR witness bridged into Mimir calibration capture",
Required: false,
"Independent body/clock witness for staged motions and operator cues."),
"External tracked VR frame for validating Mimir's optical/IMU pose frame."),
new(
"periwinkle:eve:camera",
"periwinkle",
"Periwinkle Eve client",
"phone camera/media witness",
"CultMesh observation ledger through Mimir Eve sensor intake",
"quest:usb:left-controller-pose",
"starfire",
"Quest USB/OpenXR witness",
"Quest left controller pose",
"USB ADB/OpenXR witness bridged into Mimir calibration capture",
Required: false,
"Optional visual record of calibration poses and sweep compliance."),
"External tracked controller reference sitting beside the Move."),
new(
"quest:usb:right-controller-pose",
"starfire",
"Quest USB/OpenXR witness",
"Quest right controller pose",
"USB ADB/OpenXR witness bridged into Mimir calibration capture",
Required: false,
"External tracked controller reference sitting beside the Move."),
new(
"starfire:scarlett:loopback",
"starfire",
@ -120,7 +128,7 @@ public static class MimirMoveCalibrationProtocol
"preflight-streams",
"Stream liveness and clock edge check",
10.0,
"Hold both Moves still and visible. Confirm Starfire, Nightwing, and optional Periwinkle streams are fresh.",
"Hold both Moves still and visible. Confirm Starfire, Nightwing, and optional Quest pose streams are fresh.",
["muninn:starfire:move-evidence", "muninn:nightwing:move-evidence"],
["stream-freshness", "clock-skew-estimate", "controller-id-map"]),
new(
@ -148,16 +156,16 @@ public static class MimirMoveCalibrationProtocol
"figure-eight",
"Magnetometer and cross-axis motion",
20.0,
"Move each controller through a broad figure-eight. Keep Periwinkle nearby if it is being used as the phone witness.",
"Move each controller through a broad figure-eight. Leave the Quest headset/controllers stationary as the external VR reference cluster.",
["muninn:starfire:move-evidence", "muninn:nightwing:move-evidence"],
["magnetometer-hard-soft-iron-fit", "cross-axis-coupling-check"]),
new(
"periwinkle-witness",
"Optional Periwinkle body witness",
"quest-reference",
"Optional Quest headset/controller reference",
12.0,
"Hold Periwinkle rigidly near the active Move for a short synchronized sweep if the phone is available.",
["periwinkle:eve:motion"],
["independent-motion-witness", "phone-clock-offset-estimate"]),
"Keep the Move between the two Quest controllers in front of the headset. Capture the static Quest controller/headset frame while Mimir observes the Move.",
["quest:usb:headset-pose", "quest:usb:left-controller-pose", "quest:usb:right-controller-pose"],
["external-vr-pose-frame", "quest-to-mimir-frame-fit", "quest-clock-offset-estimate"]),
new(
"validation-pass",
"Held-out tracking validation",
@ -192,7 +200,7 @@ public static class MimirMoveCalibrationProtocol
Acceptance: new(
MinimumControllerStateSamplesPerMove: 600,
MinimumOpticalSamplesPerCamera: 300,
MinimumPeriwinkleMotionSamples: 120,
MinimumExternalPoseSamples: 120,
MaximumClockSkewMilliseconds: 20.0,
MaximumStillGyroRadiansPerSecond: 0.035,
MinimumTriangulatedPoseConfidence: 0.65,
@ -207,7 +215,7 @@ public static class MimirMoveCalibrationProtocol
[
"Mimir owns fusion and calibration promotion. Muninn only publishes source-local evidence and executes local Move light commands.",
"CultCache receipts are durable evidence; CultMesh stream frames are the hot path.",
"Do not promote orientation until gyro bias/scale, gravity alignment, optical residuals, and held-out validation all pass."
"Do not promote orientation until gyro bias/scale, gravity alignment, optical residuals, external Quest reference residuals when available, and held-out validation all pass."
]);
public static string[] Validate(MimirMoveCalibrationProtocolDocument protocol)

View file

@ -136,3 +136,4 @@
{"ts": "2026-06-11T20:26:19+01:00", "type": "correction", "status": "ok", "note": "Corrected the Move witness live path from CultCache polling to CultMesh streaming: MimirMuninnMoveEvidenceAdapter now creates/consumes Muninn Move shared-memory stream frames, BufferSmoke --muninn-move-cultmesh-stream-smoke proves a CultMesh latest-frame read lease normalizes into native move_evidence, and CultCache remains receipt/debug state rather than the hot tracking feed."}
{"ts": "2026-06-12T14:08:32+01:00", "type": "implementation", "status": "ok", "note": "Added MimirMoveFusion as the first calibrated Move pose owner and MimirMovePoseStream as the realtime output frame: native Muninn Move evidence samples are associated against USB controller state, calibrated multi-camera orb rays triangulate position into mimir.move_controller_pose.v1, controller buttons/trigger/gyro are carried forward, orientation is explicitly marked imu-unresolved, and BufferSmoke --move-fusion-smoke proves the positive calibrated pose path, the negative no-calibration/no-pose guard, and a CultMesh pose-stream roundtrip."}
{"ts": "2026-06-12T14:45:00+01:00", "type": "implementation", "status": "ok", "note": "Added typed Move calibration preflight state as mimir.move_calibration_protocol.v1. BufferSmoke --move-calibration-protocol-smoke writes artifacts/move-calibration/protocol.cc and proves the Starfire/Nightwing protocol requires both Muninn Move evidence streams plus Mimir pose output, includes optional Periwinkle motion/camera witnesses, defines stillness/sweep/validation phases, and names the four required derived outputs before IMU orientation can become authority."}
{"ts": "2026-06-12T15:05:00+01:00", "type": "correction", "status": "ok", "note": "Updated the Move calibration preflight witness from Periwinkle to the USB-connected Quest headset plus left/right controllers. ADB sees serial 1WMHHB68PG1515 but reports unauthorized, so headset-side USB debugging approval is required before Quest pose capture can become live evidence. The protocol treats Quest poses as an optional external VR reference frame around the Move, not as a Mimir fusion owner."}

View file

@ -115,9 +115,9 @@ accepted_design:
not own calibration or fusion decisions.
- `MimirMoveCalibrationProtocol` defines the runnable Starfire/Nightwing Move
calibration preflight as typed state: required Muninn Move evidence streams,
optional Periwinkle motion/camera witnesses, stillness/sweep/validation
phases, and the calibration outputs Mimir must derive before orientation
can stop being `orientation:imu-unresolved`.
optional Quest headset/controller pose witnesses over USB,
stillness/sweep/validation phases, and the calibration outputs Mimir must
derive before orientation can stop being `orientation:imu-unresolved`.
- Starfire should have Muninn for source-local Move HID control and local
sensor publication, but some Starfire audio/video paths still enter Mimir
through local Mimir producers or diagnostic process bridges while native