Files
kinect/docs/troubleshooting.md
kinect-bot 39876fa97b
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python root tests (pytest, no tracker deps) (push) Canceled after 0s
ci / Python tracker (pytest, tracker/.venv) (push) Canceled after 0s
docs(setup): README + linux/windows setup + calibration/troubleshooting + packaging (wave 11; todo 18 done)
2026-11-25 06:10:54 -05:00

96 lines
5.5 KiB
Markdown

# Troubleshooting
Common failures and what to check. Grouped by symptom.
## The player is mirrored, or moves invert (left/right swapped)
The mirror bit is wrong. A raw camera image is left/right flipped relative to how a Kinect presents
the scene, and the `mirror` flag corrects it.
- Redo the mirror-confirm calibration step (`docs/calibration.md`, step 1): raise only your
anatomical right arm and let the tracker set the flag.
- The mirror toggles map to the Kinect depth/video hflip registers (`0x17` depth, `0x47` video). If
you set them by hand, confirm you flipped the depth stream, not just color.
- If scoring is directionally inverted in DEA but the silhouette looks correct, it is still the
mirror: the skeleton's left/right joints are swapped. Recalibrate mirror, do not touch scale.
## The player drops out / "player lost" mid-session
The tracker lost the subject (left frame, occluded, or poor light). The pipeline is built to hold
the last good frame briefly and recover on its own, event/heartbeat driven, without crashing the
host app (plan todo 17, IS-8).
- Step back into full frame; tracking should re-acquire within a second or two.
- Improve lighting; a low-visibility pose publishes joints marked inferred and holds, rather than
emitting garbage.
- If the tracker process actually died, the emitter keeps serving a safe no-player frame (tracking
id 0), so the game sees "no skeleton" instead of hanging. Restart the tracker; no host restart
needed.
- Persistent dropouts with the subject clearly in frame usually mean the capture resolution or fps
is too low for the model tier. Re-measure fps at your real capture resolution and prefer the
`full` tier.
## Depth is out of range or flat (no articulation)
The host tracker needs articulated depth inside the Kinect band (roughly 800 to 4000 mm), not a
flat wall.
- Run the Linux e2e harness (`tools/e2e_linux_validation/run_e2e.py`). It fails loudly with
"depth is not articulated" if the per-frame spread is under 100 mm, which means depth pegged flat.
- Flat depth at ~800 mm is the old placeholder behavior. Live depth is routed through the
`core/mapping` Z0 + depthGain placement (plan todo 21) so it varies per joint across the body. If
you see flat depth, confirm the tracker is publishing through mapping, not the raw pass-through.
- Out-of-band depth (everything 0, or clipped) usually means Z0 is wrong: recalibrate the T-pose so
your standing distance sets the depth origin inside the 0.8 to 4.0 m clamp.
- The depth packing is 11-bit at 640x480 by default (register `0x12 = 0x03`); a consumer expecting a
different mode reads garbage. Match the consumer's requested mode.
## The OpenNI2 driver is not discovered (Linux)
`libOpenNI2.so` finds drivers only in `<libdir>/OpenNI2/Drivers`, by scanning for `*.so.0` files.
There is no `OPENNI2_DRIVERS_PATH` env var honored by this build.
- Confirm `libSynthKinect.so.0` is in
`~/.local/openni2-root/usr/lib/x86_64-linux-gnu/OpenNI2/Drivers/`. The
`cmake --build fallback/linux-openni2/build` step copies it there automatically; re-run the build
if it is missing.
- Set `LD_LIBRARY_PATH` to the OpenNI2 lib dir when running a consumer:
`LD_LIBRARY_PATH=$HOME/.local/openni2-root/usr/lib/x86_64-linux-gnu`.
- If `OPENNI2_ROOT` is not the default `$HOME/.local/openni2-root`, override the CMake cache var so
the driver deploys into your actual install's `OpenNI2/Drivers`.
## MediaPipe fails to load (Linux)
- `libGLESv2.so.2` missing: stage it user-space (see `docs/setup-linux.md`, step 2b) and prepend
`~/.cache/kinect/gllibs` to `LD_LIBRARY_PATH`.
- No model bundle: fetch the `.task` tiers into `tracker/models/` (step 2a).
- Wrong Python: MediaPipe 1.x has no wheel for system Python 3.14 here; use the `uv`-created
Python 3.12 venv at `tracker/.venv`.
## The Windows device never binds / Device Manager shows usbip, not Kinect
- `Verify-KinectDevice.ps1` reporting the service as `usbip*` means the VHCI stub attached but the
MS Kinect driver did not match the descriptors. Confirm the Kinect for Windows Runtime + SDK v1.8
is actually installed (it provides `kinect*.inf`), and that all three busids (1-1, 1-2, 1-3) are
attached, not just the camera. An incomplete sensor can make `NuiCreateSensorByIndex` reject it.
- If a self-built/test-signed driver will not load: you omitted a signing step. Confirm
`bcdedit /set testsigning on` ran, Secure Boot is OFF in firmware, and the test certificate is
imported into both LocalMachine Root and TrustedPublisher. The "Test Mode" watermark confirms
test-signing is active; its absence after reboot means it did not take. This is exactly the
failure the Windows guide's signing section exists to prevent.
- Prefer the signed usbip-win2 client first; it usually needs no test-signing at all.
## DEA will not boot under test mode / spice2x blocks it
- Enable spice2x's Kinect-bypass option so the game clears its boot-time Kinect presence check.
- Test-signing plus an injected `Kinect10.dll` shim can trip anti-tamper. Confirm spice2x tolerates
the virtual device before concluding the driver or shim failed.
## Isochronous framing rejected on Windows
The shared USB/IP server models the camera ISO IN endpoints as single packets without the
`iso_packet_descriptor` array. If the Windows VHCI + MS Kinect driver reject that, the fix is in the
shared `core/` + `attach/linux` ISO path (reused by Windows), not a Windows-only change. See
`attach/windows/docs/approach.md` section 5. If USB/IP cannot carry the ISO streams at all, drop to
the `Kinect10.dll` NUI shim for playability (it does not prove enumeration).