Howdy_Friend / README.md
RickDakan's picture
feat: howdy friend static Space
bdced15
|
Raw History Blame Contribute Delete
2.11 kB
---
title: Howdy Friend
emoji: 👋
colorFrom: yellow
colorTo: green
sdk: static
pinned: false
hf_oauth: true
short_description: Reachy tracks your face and gets happy when you wave.
tags:
- reachy_mini
- reachy_mini_js_app
---
# Howdy Friend
Reachy Mini watches its camera, keeps its head (and body) pointed at the nearest face, gives a quick nod and chirp when it first notices you, and plays a happy clip from the Reachy Mini emotions library when you wave at it.
Everything runs in the browser. The robot only streams video and receives motion commands over WebRTC, so this works on a Wireless Reachy Mini without loading the onboard computer.
## How it works
- **Face tracking**: MediaPipe Face Detector runs on the robot's video stream in the browser. The largest face drives a smoothed proportional controller on head yaw and pitch, sent with `setTarget()` at ~15 Hz. If the face drifts far to the side, the body turns to follow so the head never hits its yaw limit.
- **Wave detection**: MediaPipe Hand Landmarker finds an open hand. The wrist's horizontal position is tracked over a 1.2 s window; two or more direction reversals with enough travel counts as a wave. A 5 s cooldown prevents double triggers.
- **Reactions**: On first sight of a face, a short synthesized nod + chirp. On a wave, a random clip from a curated happy set in `pollen-robotics/reachy-mini-emotions-library`, played daemon-side with `playMove()` so motion and audio stay in sync. The clip is shifted by the current body yaw so the robot keeps facing you during the reaction.
## Deploying
No build step. Push these files to the Space:
```
git init -b main
git remote add space https://huggingface.co/spaces/RickDakan/howdy_friend
git add -A && git commit -m "feat: howdy friend"
git push -u space main
```
Open the Space URL, sign in with Hugging Face, pick your robot.
## Tuning
Constants at the top of `app.js`: tracking gain, deadband, smoothing, body-follow threshold, wave sensitivity, cooldowns, and the list of reaction clips. Sign conventions for yaw/pitch are noted there in case your camera mount differs.