kinect-botandsisyphus-dev-ai 1cc8dc3515 feat(tracker): print startup + periodic status lines (no GUI on this path)
The Linux Python tracker is headless by design - no window, no camera
picker, no live preview; those only exist in the Windows-only
tracker-native/ GUI, which cannot run under Wine (docs/linux-wine.md). But
it also produced zero console output during a normal run, so a working
tracker and a silently stuck one looked identical - which is what prompted
"i don't see the window or picker or preview".

Added:
- a startup banner (camera source opening/opened, model loading, shm
  target + resolution + fps) so a terminal run shows the pipeline actually
  came up,
- a periodic "[tracker] frame=N fps=F player=tracked|lost seq=S" status
  line (every 2s by default, Tracker.run(status_interval=...), disableable
  for tests) so a long-running session shows live confirmation it is still
  publishing frames and whether a person is currently detected.

Verified for real: ran the CLI against both a synthetic test video (confirms
the startup banner, mediapipe loads and infers) and a paced fake source
spanning several seconds (confirms the periodic status line fires on
schedule with the right frame/fps/player fields). Full tests/test_tracker.py
suite still passes (10/10, 0.78s) - the fast unit-test runs finish well
under the 2s default interval, so no new output or timing coupling there.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-11-30 10:13:15 -05:00

Webcam-driven virtual Kinect v1

Make an ordinary RGB webcam present itself as a genuine Microsoft Kinect v1 sensor, so unmodified Kinect apps run with no recompile. The primary proof target is DanceEvolution Arcade (DEA) on Windows. We emulate the device (the thing on USB), not the game's API, so the approach is OS-agnostic and the real host Kinect stack (MS NUI on Windows, OpenNI2/NiTE on Linux) computes the skeleton from webcam-derived synthetic depth.

Quickstart

  • Linux (verified path): build the core, run the tracker, see moving synthetic depth through a real OpenNI2 consumer. Follow docs/setup-linux.md.
  • Windows (DEA, verified path): download the player bundle, drop in the Kinect10.dll shim, run the native tracker, and play. Follow docs/setup-windows.md.
  • DEA under Wine on Linux: the native tracker can't run under Wine (Wine's Media Foundation stubs out video capture device enumeration), so this path runs the Linux Python tracker natively and bridges it to the Wine-hosted shim through a real file-backed shared-memory mapping. Follow docs/linux-wine.md.
  • Calibrate the cursor once: docs/calibration.md.
  • Something broken: docs/troubleshooting.md.
  • Limitations & requirements: docs/limitations.md.
  • Build details / toolchain: docs/build.md.
  • Native Windows tracker (current path): docs/native-tracker.md.
  • How DEA works inside + RE jump-start: docs/game-internals.md.

Architecture

The current Windows path uses the self-contained native tracker (tracker-native/, C++ Media Foundation capture + Win32 GUI + ONNX BlazePose), so no Python runtime is needed on the play machine. The original Python tracker (tracker/) remains the reference/Linux path. Both publish the same contract.

  webcam ─► tracker (native tracker-native/ on Windows, or Python tracker/)
                     │   MediaPipe/BlazePose pose + segmentation
                     │   publishes to the frozen shared-memory IPC contract
                     ▼
            core/ (OS-agnostic engine, libnui_core)
            contract · mapping · synth · protocol · calibration
                     │
        ┌────────────┴─────────────────────────────┐
        ▼                                            ▼
  attach/ (per-OS USB attach)              fallback/ (per-OS library surface)
  linux: usbip/vhci device                 linux: OpenNI2 "SynthKinect" driver
  windows: usbip-win VHCI                   windows: clean-room Kinect10.dll shim
                     │
                     ▼
     real host Kinect stack skeletonizes the synthetic depth
     (MS NUI on Windows, OpenNI2 + NiTE on Linux) ─► the game

The shared engine is the OS-agnostic core/, built into libnui_core and unit-tested on Linux. Only the thin attach/ and fallback/ layers are per-OS. One tracker feeds one contract; every surface is a consumer of that one producer, so skeleton and depth stay identical across paths.

Status: what is verified vs blocked

Mirrors the plan's [x]/[~] state. "Verified" means executed and observed in the Linux/WSL2 build environment. [~] means the code is complete but the runtime proof is gated on hardware or an OS this environment lacks (no Windows, no WDK, no usbip userspace, no loaded vhci-hcd).

Capability Surface Status
OS-agnostic core (contract, mapping, synth, protocol, calibration) builds + unit-tests core/ verified (CTest green)
Webcam -> MediaPipe pose/segmentation -> frozen IPC contract tracker/ verified against a recorded video; live --source 0 needs a real camera
Articulated synthetic depth through a real OpenNI2 stack (moving, in-band, spread > 100 mm) fallback/linux-openni2/ + e2e harness verified (depth + enumeration; VERDICT: PASS)
Robustness: player-lost, low-light, mask noise, tracker-crash without host crash tracker/ + core/ verified (fault-injection)
Linux USB device-attach (OS enumerates a Kinect) attach/linux/ [~] blocked: no usbip userspace / loaded vhci-hcd here. Compiles + unit-tests; needs a native-Linux host
Linux skeleton tracking (NiTE2) OpenNI2 + NiTE2 out of scope: NiTE2 is non-redistributable; supply it yourself
Windows device-attach (IS-1 enumerate, IS-2 MS NUI skeletonizes synthetic depth) attach/windows/ [~] blocked: no Windows/WDK. Scripts + topology + signing fully specified
Windows Kinect10.dll NUI shim (IS-3/IS-4 playability only) fallback/windows-nui/ verified loaded in DEA on the user's Windows box (real PE32/PE32+, 21 exports); the game renders our skeleton + menu cursor
Native Windows tracker (MF capture + Win32 GUI + ONNX BlazePose, remembers last camera/resolution) tracker-native/ verified on the user's Windows box
DEA in-game skeleton rendering + menu hand-cursor Windows + fallback/windows-nui/ verified on the user's Windows box (skeleton renders; one-arm cursor covers the screen). See docs/game-internals.md

The authoritative skeleton/fidelity proof is DEA on Windows; the Linux OpenNI2 path proves the depth/synthesis fidelity. The Kinect10.dll shim proves playability only and does not satisfy IS-1 (OS enumeration) or IS-2 (real-runtime skeletonization).

Clean-room notice

All synthesis, mapping, protocol, and shim code here is written fresh. The public Kinect NuiApi.h headers and the libfreenect USB protocol are treated as interface facts only. No GPLv3 source (KinectFaker, NiVirtualCam, NiTE2, etc.) is read or vendored. The MS Kinect 1.8 runtime, NiTE2, and any game assets are never bundled; the docs link to their official sources.

Module map

Path Role
core/contract/ Frozen, versioned IPC frame + control schema
core/mapping/ NUI intrinsics, MediaPipe-33 -> Kinect-20 map, Holt smoothing
core/synth/ Packed depth + player-index + color rasterizer
core/protocol/ Kinect v1 virtual USB device emitter
core/calibration/ One-time T-pose + mirror calibration
tracker/ Python webcam -> MediaPipe pose/segmentation -> IPC (reference/Linux path)
tracker-native/ Native Windows tracker: MF capture + Win32 GUI + ONNX BlazePose -> IPC
attach/linux/ Linux USB attach via usbip/vhci
attach/windows/ Windows virtual USB bus attach + signing scripts
fallback/linux-openni2/ OpenNI2 virtual device / Linux general emulator
fallback/windows-nui/ Clean-room Kinect10.dll NUI shim
tools/e2e_linux_validation/ Recorded-video -> tracker -> OpenNI2 depth e2e harness
tools/record-replay/, tools/mock-nui-host/ Deterministic record/replay + mock NUI host
packaging/ Per-OS runnable-bundle assembly script
tests/ Cross-cutting C++ (CTest) + Python (pytest) tests
docs/ Setup, calibration, troubleshooting, build, native tracker, DEA game internals + RE jump-start

Packaging

packaging/build_bundle.sh assembles a per-OS runnable bundle from the built artifacts. See packaging/README.md.

The full plan lives in .omo/plans/webcam-kinect-emulator.md; the architecture and NUI contract notes in .omo/design/.

S
Description
No description provided
Readme
86 MiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 64.9%
Python 21.1%
Shell 3.6%
PowerShell 3.5%
CMake 2.7%
Other 4.2%