diff --git a/.omo/plans/webcam-kinect-emulator.md b/.omo/plans/webcam-kinect-emulator.md index 9c98467..afc039c 100644 --- a/.omo/plans/webcam-kinect-emulator.md +++ b/.omo/plans/webcam-kinect-emulator.md @@ -113,7 +113,7 @@ Your next move: run the default-on high-accuracy review (in progress), then exec ## Todos > Implementation + Test = ONE todo. Never separate. -- [ ] 1. Repo scaffold, cross-platform build system, CI +- [x] 1. Repo scaffold, cross-platform build system, CI What to do / Must NOT do: Create the project layout (`core/` {protocol,synth,mapping,contract}, `tracker/`, `attach/{linux,windows}`, `fallback/{linux-openni2,windows-nui}`, `tools/{logging-shim,record-replay,mock-nui-host}`, `tests/`, `docs/`). CMake for the C/C++ core with three targets: Linux-native (GCC/Clang), Windows cross (MinGW-w64/clang-cl) for fast local builds, and an MSVC build profile (authoritative, run on the user's Windows box). Scaffold BOTH x86 and x64 Windows targets; the SHIPPING Windows arch (DEA is likely x86) is confirmed from spike 4's `dumpbin` bitness before todos 12/14 build the real driver/shim. Treat MinGW-w64 CI builds as a SMOKE signal only - MSVC on the user's box is authoritative for shim/driver ABI acceptance. Python project (pyproject/requirements) for the tracker. `git init`. GitHub-Actions-or-local CI running the Linux C++ unit tests + pytest. Add a clean-room notice (public NuiApi.h + libfreenect protocol are interface facts; all synthesis code written fresh). Must NOT: vendor GPLv3 KinectFaker/NiVirtualCam source into the tree (reference only). Closes: GAP-1 (foundation) Parallelization: Wave 1 | Blocked by: none | Blocks: all @@ -123,7 +123,7 @@ Your next move: run the default-on high-accuracy review (in progress), then exec Commit: Y | chore(scaffold): project layout, cross-platform build, CI Recommended task executor category: unspecified-high - multi-file build/CI setup across languages. -- [ ] 2. Frozen, versioned IPC data contract +- [x] 2. Frozen, versioned IPC data contract What to do / Must NOT do: Define the shared-memory frame contract in `core/contract/` (C header + a generated Python mirror): a triple-buffered, newest-wins frame slot with a monotonic sequence counter, plus fields for the skeleton (20 joints Vector4 + per-joint tracking state + tracking id + quality flags), a depth+player-index buffer descriptor, a color buffer descriptor, frame number, and a QPC-derived timestamp; and a control-plane message schema (handshake/version, config push, calibration, heartbeat) over a named pipe / unix socket. `static_assert` every struct size and field offset; embed a contract version constant; forbid implicit padding (explicit `#pragma pack` or manual padding). Must NOT: put per-frame data on the control channel; allow the Python mirror to drift (generate/check it against the C header in CI). Closes: GAP-2 (shared substrate) Parallelization: Wave 2 | Blocked by: 1 | Blocks: 5,6,7,8,14,15,16 @@ -133,7 +133,8 @@ Your next move: run the default-on high-accuracy review (in progress), then exec Commit: Y | feat(contract): frozen versioned IPC frame + control schema Recommended task executor category: unspecified-low - contained, single-module, well-specified. -- [ ] 3. Spike - Linux USB protocol + "does NiTE skeletonize synthetic depth" +- [x] 3. Spike - Linux USB protocol + "does NiTE skeletonize synthetic depth" + NOTE (exec): findings delivered in docs/spike-linux.md; vhci-hcd/usbip modules present in WSL2 kernel but usbip userspace absent + module unloaded (sudo unavailable); skeletonization crux UNPROVEN on Linux (no OpenNI2/NiTE2) -> deferred to todo 4 (also blocked). todo-8 gap: camera command-header bytes not in fetched libfreenect source. What to do / Must NOT do: FIRST verify this host can do USB/IP at all - `modprobe vhci-hcd && lsmod | grep vhci` (on WSL2 this module is frequently absent; if so, RECORD that the Linux attach path needs a custom WSL kernel or a native-Linux host, and proceed with what can be probed). Then stand up a MINIMAL usbip/vhci virtual device that replays a canned libfreenect-format depth+color stream (no webcam yet) and attach it so `freenect-glview` / OpenNI2 (OpenNI2-FreenectDriver) enumerates it. Capture the exact USB descriptors, control transfers, EEPROM/register reads, iso/bulk framing, the **composite-device interface topology (camera + audio + motor)**, and the **firmware-upload handshake** the host performs to init a Kinect v1 (usbmon/wireshark). Then, IF the user supplied NiTE2 (EOL/non-redistributable - do not bundle), feed a RECORDED real-person depth sequence and a SYNTHETIC articulated-depth sequence and record whether NiTE produces a stable skeleton from each. Output a spike report (findings + the minimal descriptor/control set; and - only if NiTE2 was available - a go/no-go on "synthetic depth is skeletonizable") into `docs/spike-linux.md`. If NiTE2 is NOT available, this spike proves enumeration + stream correctness only, and the skeletonization crux is evaluated by spike 4 on the real Windows MS NUI runtime instead (the crux KILL-GATE is satisfied by whichever of spike 3 or spike 4 can first test it; if NEITHER can before build waves, that is itself a HALT-and-re-plan condition). Must NOT: build the full emitter here - this is a throwaway probe to de-risk todo 8 and the GAP-4 fidelity crux. Closes: GAP-4 (Linux half) Parallelization: Wave 2 | Blocked by: 1 | Blocks: 8,15 @@ -143,7 +144,8 @@ Your next move: run the default-on high-accuracy review (in progress), then exec Commit: Y | chore(spike): linux usb protocol + synthetic-depth skeletonization probe Recommended task executor category: deep-high - protocol reverse-engineering + the central feasibility uncertainty. -- [ ] 4. Spike - Windows/DEA behavior + bitness +- [~] 4. Spike - Windows/DEA behavior + bitness + BLOCKED: no Windows/DEA/Kinect SDK in this environment; complete runbook delivered in docs/spike-windows.md (all result cells UNSET). Gap: requires the user's Windows box; the synthetic-depth skeletonization KILL-GATE (crux) remains UNPROVEN - carries forward to todos 10/13/F5. What to do / Must NOT do: On the user's Windows box: build a pass-through logging `Kinect10.dll` (forwards every NUI call to the real one, logs name/args/flags/resolution/return + which events it waits on), place it beside `gamekdm.dll`, and capture DEA's exact NUI call sequence: `NuiInitialize` flags, which image streams it opens (depth/player-index? color?), resolutions, skeleton-vs-poll model. Run `dumpbin /headers /imports gamekdm.dll` to record 32- vs 64-bit and the exact `Kinect10.dll` imports. Also probe WINDOWS DEVICE-LEVEL viability: attach a minimal usbip-win virtual device with the Kinect VID/PID + composite topology and verify the real `kinectsensor.inf` driver + MS NUI runtime enumerate and bind to it (this gates todo 12), recording what the MS driver requires BEYOND libfreenect's Linux init (firmware/composite/power). THEN - the Windows half of the depth-fidelity CRUX - extend that minimal virtual device to replay a canned SYNTHETIC articulated-depth sequence (NO physical Kinect) into the real MS NUI runtime and capture whether a Kinect SDK sample (SkeletonBasics / KinectExplorer) produces a MOVING skeleton from it. This is the executable synthetic-depth skeletonization test that unblocks Waves 4-11 when NiTE2 is unavailable on Linux; if it fails, HALT and re-plan the depth model. If a real Kinect is available, also A/B real vs. synthetic depth to gauge the scorer's z-sensitivity. Output `docs/spike-windows.md` with bitness, the required import surface, the stream/flag list, the usbip-win binding result, the synthetic-depth skeletonization result, and a go/no-go per OS for device-level vs. the NUI-shim fallback. Must NOT: modify the game binary; this only shadows the DLL; claim the crux passed without captured skeleton output. Closes: GAP-4 (Windows half + the Windows synthetic-depth skeletonization crux) Parallelization: Wave 2 | Blocked by: 1 | Blocks: 7 (crux gate when NiTE2 absent),12,13,14