Scene 02: GameMod Skeleton¶
Script¶
Goal¶
Receive UDP skeleton packets through UDP In, decode them with Skeleton Decoder, extract a distance feature in Python Script, map it to TCode, and send it through serial output with real-time visualization.
Main Pipeline¶
UDP In -> Skeleton Decoder -> Python Script -> Envelope -> Range Map -> Rate Limiter -> TCode -> Serial Out
Steps¶
- Import the script and start
PyEngine. - Confirm
UDP In.portmatches your sender (39540in this script) and keepUDP In.packet -> Skeleton Decoder.packetwired directly. - Select the target stream via
Skeleton Decoder.selectedKey. - Confirm timing links:
Tick 1.exec -> Python Script.execandTick 1.tickMs -> TCode 1.intervalMs. - Validate value flow in
Python Script.out,Envelope 1.normalized, andRange Map 1.value. - Set
Serial Out 1.portand enable serial output.
Key Parameters¶
Tick 1.tickMs:33(~30Hz)TCode 1.intervalMs:33(recommended to match Tick)Range Map 1.outMax:0.7Rate Limiter 1.maxRateUp/maxRateDown:2.0/2.0
Validation¶
3D Vizshows stable skeleton updates.Wave Vizshows reasonable raw/envelope variation.TCodeVizand serial output are continuous and stable.
Image Placeholders¶
docs/media/images/scenarios/scene-02-overview.pngdocs/media/images/scenarios/scene-02-3dviz.png