From 5a38bc0664d11f7c4c58eaecc5d1ddb46590a991 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 11 Jun 2026 17:01:19 +0100 Subject: [PATCH] Add Muninn Move controller state schema --- crates/odin-core/src/documents.rs | 34 +++++++++++++++++++++++++++++++ docs/muninn.md | 10 ++++++--- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/crates/odin-core/src/documents.rs b/crates/odin-core/src/documents.rs index 0171935..18166ff 100644 --- a/crates/odin-core/src/documents.rs +++ b/crates/odin-core/src/documents.rs @@ -23,6 +23,7 @@ pub const MUNINN_TELEMETRY_SURFACE_SCHEMA: &str = "muninn.telemetry_surface.v1"; pub const MUNINN_CAPTURE_STREAM_SCHEMA: &str = "muninn.capture_stream.v1"; pub const MUNINN_OBS_STREAM_CATALOG_SCHEMA: &str = "muninn.obs_stream_catalog.v1"; pub const MUNINN_MOVE_MARKER_CANDIDATE_SCHEMA: &str = "muninn.move_marker_candidate.v1"; +pub const MUNINN_MOVE_CONTROLLER_STATE_SCHEMA: &str = "muninn.move_controller_state.v1"; pub const MUNINN_MOVE_LIGHT_COMMAND_SCHEMA: &str = "muninn.move_light_command.v1"; #[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)] @@ -452,6 +453,38 @@ pub struct MuninnMoveMarkerCandidateRecord { pub observed_at: String, } +#[derive(Clone, Debug, PartialEq, DatabaseEntry)] +#[cultcache( + type = "muninn.move_controller_state", + schema = "muninn.move_controller_state.v1" +)] +pub struct MuninnMoveControllerStateRecord { + #[cultcache(key = 0)] + pub stream_id: String, + #[cultcache(key = 1)] + pub host_id: String, + #[cultcache(key = 2)] + pub move_id: String, + #[cultcache(key = 3)] + pub sequence: u64, + #[cultcache(key = 4)] + pub source_timestamp_ns: i64, + #[cultcache(key = 5)] + pub accelerometer_xyz: Vec, + #[cultcache(key = 6)] + pub gyroscope_xyz: Vec, + #[cultcache(key = 7)] + pub magnetometer_xyz: Vec, + #[cultcache(key = 8)] + pub trigger_value: f32, + #[cultcache(key = 9)] + pub buttons: Vec, + #[cultcache(key = 10)] + pub battery01: f32, + #[cultcache(key = 11)] + pub observed_at: String, +} + #[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)] #[cultcache( type = "muninn.move_light_command", @@ -505,6 +538,7 @@ cultmesh_rs::cultmesh_documents!(OdinDocuments { MuninnCaptureStreamRecord => MUNINN_CAPTURE_STREAM_SCHEMA, MuninnObsStreamCatalogRecord => MUNINN_OBS_STREAM_CATALOG_SCHEMA, MuninnMoveMarkerCandidateRecord => MUNINN_MOVE_MARKER_CANDIDATE_SCHEMA, + MuninnMoveControllerStateRecord => MUNINN_MOVE_CONTROLLER_STATE_SCHEMA, MuninnMoveLightCommandRecord => MUNINN_MOVE_LIGHT_COMMAND_SCHEMA, }); diff --git a/docs/muninn.md b/docs/muninn.md index 0a88272..838a1a5 100644 --- a/docs/muninn.md +++ b/docs/muninn.md @@ -71,9 +71,13 @@ candidates only: weighted centroid, radius, area, peak/mean luma, and score for one camera frame. Muninn owns publishing those candidates as `muninn.move_marker_candidate.v1`. -Mimir is a consumer of the resulting sensor stream. Odin may discover and -project the schema, but Odin does not own raw capture, candidate extraction, -calibration, triangulation, IMU fusion, prediction, or final 6DoF pose. +Muninn also publishes USB controller facts as +`muninn.move_controller_state.v1`: accelerometer, gyro, magnetometer, button, +trigger, battery, sequence, and source timestamp. Mimir is the consumer of both +sensor streams. Odin may discover and project the schemas, but Odin does not +own raw capture, candidate extraction, calibration, triangulation, IMU fusion, +prediction, or final 6DoF pose. Muninn does not synthesize wand pose; it +reports what the local body saw and read from USB. ## Move Light Commands