06-litewing-ml-autonomy-plan

LiteWing ML autonomy — phased plan

Goal: turn the LiteWing + Positioning Module into a machine-learning robotics project, culminating in vision-based "hover around me" following.

Hardware on order: LiteWing drone (ASIN B0GNN1MGC7) · Positioning Module (ASIN B0GNN2L81Z: VL53L1X downward ToF + PMW3901 optical flow) · still needed: 1S 650mAh 30C LiPo + charger.

Architecture (locked): off-board brain. The drone cannot see and cannot run models; a PC on the drone's WiFi runs perception + planning in Python and streams setpoints via cflib (the firmware speaks Crazyflie CRTP over UDP). The drone's only jobs: hold attitude, hold height (ToF), hold position (flow), obey setpoints.

flowchart LR
    CAM[Webcam / phone cam] --> ML[PC: detection + pose\nYOLO / MediaPipe]
    ML --> PLAN[Relative-position planner]
    PLAN -->|cflib setpoints, WiFi UDP| DRONE[LiteWing\nflow + ToF hold]
    DRONE -->|telemetry: battery, height, flow| PLAN

Phase gates

Phase Deliverable Gate to pass before next
P0 Manual flight stable hover + landing (see first-flight checklist) 3 clean sessions logged
P1 Module bring-up positioning module installed; height-hold flight in app 30 s hands-off height hold
P2 Python link cflib connects; telemetry read; scripted takeoff→hover→land script runs 5/5 times
P3 A→B flights scripted waypoint runs (relative moves) over textured floor ≤30 cm landing error over a 2 m leg, 3/5 runs
P4 Follow-me (the ML piece) webcam + person detection → drone holds station ~1.5 m in front of user, tracks slow walking 60 s continuous track without manual takeover
P5 Stretch: floor mapping grid flight logging flow XY + ToF height → 2D elevation/occupancy plot one rendered map of a room

Phase notes (annotations)

P1 — Module bring-up

P3 — A→B

P4 — Follow-me (ML)

P5 — Floor mapping (stretch)

Routing note (poor-mans-ai)

Open/educational content throughout — no Fable-lock. Suggested delegation when executing: cflib example-porting → Codex; perception-script scaffolding → Sonnet/Codex; any live "current best tiny person-detection model" checks → Comet; phase reviews + safety-critical control code review → Fable/Opus inline.

Log

Date Phase Result Notes
2026-07-12 plan written hardware in transit; battery still to buy