# plan.md — Reachy Mini "Wave Hello" app ## What you want A Reachy Mini app that: 1. Watches the robot's camera for faces and keeps the head pointed at the nearest/largest face. 2. Detects when a person waves at the robot. 3. Responds to a wave by wagging its antennae and making happy noises. Robot: **Wireless** (onboard CM4). Reaction source: **prebuilt emotions library** (`pollen-robotics/reachy-mini-emotions-library`). ## App flavor: JS / Hugging Face Space Chosen over Python because the Wireless CM4 is CPU- and memory-constrained. In the JS flavor all vision runs in the browser on your laptop or phone, the robot only streams video and receives motion commands. This matches the pattern used by the official `hand_tracker_v2` and `reachy_mini_telepresence` reference apps. Cost of this choice: WebRTC adds roughly 100-300 ms of latency between what the camera sees and the head command. Face tracking will feel slightly laggy compared to an on-robot loop. This is acceptable for social tracking; it would not be for fast target following. Graduating to Python later is easy if you decide you want tighter tracking. ## Technical approach **Scaffold** - Clone `pollen-robotics/reachy_mini_telepresence` (React + Vite, already handles the video stream) and trim it. Alternative: `reachy_mini_minimal_conversation` (vanilla TS) if you prefer no React. I lean telepresence because the camera plumbing is already correct. - Pin `@pollen-robotics/reachy-mini-sdk@1.8.0`. - Standard host shell: `mountHost()` for OAuth, robot picker, top bar; `connectToHost()` in the embed. - `enableMicrophone: false` (no user-to-robot audio needed). - Mobile-first layout, per the guide. **Vision (in browser)** - `@mediapipe/tasks-vision` from npm: Face Detector (short-range, lightweight) and Hand Landmarker (1 hand). Both run in the browser via WebGL/WASM. Frames come from the `