docs: document on-robot demo-station setup and tuning
Browse files- README.md +45 -4
- agents.local.md +9 -1
README.md
CHANGED
|
@@ -85,10 +85,36 @@ python -m mr_reachy
|
|
| 85 |
Say "what do you see?" to trigger the vision path (once a vision sub-account is funded).
|
| 86 |
Say "bye" / type `quit` to exit.
|
| 87 |
|
| 88 |
-
## On
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
```bash
|
| 94 |
# Run the checker DEACTIVATED β an active venv's $VIRTUAL_ENV breaks its nested temp venv:
|
|
@@ -96,17 +122,32 @@ env -u VIRTUAL_ENV .venv/bin/reachy-mini-app-assistant check .
|
|
| 96 |
reachy-mini-app-assistant publish # requires `hf auth login`
|
| 97 |
```
|
| 98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
The app is registered via the `reachy_mini_apps` entry point
|
| 100 |
(`mr_reachy.main:MrReachy`) in `pyproject.toml`.
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
## Layout
|
| 103 |
|
| 104 |
```
|
| 105 |
mr_reachy/
|
| 106 |
main.py # ReachyMiniApp + conversation loop + CLI
|
| 107 |
og_client.py # 0G Compute: chat / STT / vision (OpenAI-compatible)
|
|
|
|
|
|
|
| 108 |
expressions.py # emotion -> head pose + antenna gestures
|
| 109 |
-
audio.py # mic VAD capture + local TTS
|
| 110 |
config.py # loads .env into typed settings
|
| 111 |
```
|
| 112 |
|
|
|
|
| 85 |
Say "what do you see?" to trigger the vision path (once a vision sub-account is funded).
|
| 86 |
Say "bye" / type `quit` to exit.
|
| 87 |
|
| 88 |
+
## On the robot (demo station β Reachy Mini Wireless)
|
| 89 |
|
| 90 |
+
At the demo station the app runs **on the robot's Pi**, started from the dashboard
|
| 91 |
+
for a short slot. On hardware Mr Reachy uses the robot's **onboard mic, speaker
|
| 92 |
+
and camera** (via the daemon media manager) and **antenna push-to-talk** instead
|
| 93 |
+
of the laptop mic β selected automatically by `RobotBackend` when published, or
|
| 94 |
+
with `--on-robot` when driving a robot from your machine.
|
| 95 |
+
|
| 96 |
+
> β οΈ The on-robot I/O path is built against the SDK API but has **not been tested
|
| 97 |
+
> on a physical robot yet**. Rehearse before the slot and tune the two values below.
|
| 98 |
+
|
| 99 |
+
**1. Speech β install Piper on the robot** (0G has no TTS provider):
|
| 100 |
+
|
| 101 |
+
```bash
|
| 102 |
+
pip install "mr-reachy[robot]" # piper-tts + pillow
|
| 103 |
+
# download a voice once, then point the app at it:
|
| 104 |
+
export PIPER_MODEL=/path/to/en_US-amy-medium.onnx # (+ matching .onnx.json)
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
**2. Internet** β the robot must reach the 0G endpoints
|
| 108 |
+
(`compute-network-*.integratenetwork.work`). Venue Wi-Fi may block this; test early.
|
| 109 |
+
|
| 110 |
+
**3. Antenna push-to-talk** β press an antenna to talk, release to send. Tune the
|
| 111 |
+
sensitivity if needed:
|
| 112 |
+
|
| 113 |
+
```bash
|
| 114 |
+
export MR_ANTENNA_THRESHOLD=0.5 # radians of deflection that counts as a press
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
**4. Publish & install:**
|
| 118 |
|
| 119 |
```bash
|
| 120 |
# Run the checker DEACTIVATED β an active venv's $VIRTUAL_ENV breaks its nested temp venv:
|
|
|
|
| 122 |
reachy-mini-app-assistant publish # requires `hf auth login`
|
| 123 |
```
|
| 124 |
|
| 125 |
+
Then **Install to Robot** from your Hugging Face Space (dashboard URL
|
| 126 |
+
`http://reachy-mini.local:8000`) and start it from the dashboard. The robot
|
| 127 |
+
auto-returns to its rest pose when the app stops.
|
| 128 |
+
|
| 129 |
The app is registered via the `reachy_mini_apps` entry point
|
| 130 |
(`mr_reachy.main:MrReachy`) in `pyproject.toml`.
|
| 131 |
|
| 132 |
+
### Driving a robot from your machine (Lite, or testing Wireless over the network)
|
| 133 |
+
|
| 134 |
+
```bash
|
| 135 |
+
python -m mr_reachy --on-robot # uses robot media + antenna push-to-talk
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
`ReachyMini()` auto-connects to a local daemon, falling back to `reachy-mini.local`.
|
| 139 |
+
For an explicit network connection use `connection_mode="network"`.
|
| 140 |
+
|
| 141 |
## Layout
|
| 142 |
|
| 143 |
```
|
| 144 |
mr_reachy/
|
| 145 |
main.py # ReachyMiniApp + conversation loop + CLI
|
| 146 |
og_client.py # 0G Compute: chat / STT / vision (OpenAI-compatible)
|
| 147 |
+
io_backends.py # Local (laptop) vs Robot (onboard media + antenna push-to-talk)
|
| 148 |
+
tts.py # on-device speech synthesis (Piper / say / espeak)
|
| 149 |
expressions.py # emotion -> head pose + antenna gestures
|
| 150 |
+
audio.py # laptop mic VAD capture + local TTS
|
| 151 |
config.py # loads .env into typed settings
|
| 152 |
```
|
| 153 |
|
agents.local.md
CHANGED
|
@@ -17,7 +17,15 @@
|
|
| 17 |
reachy-mini-daemon --sim --headless --no-media --no-preload-datasets
|
| 18 |
```
|
| 19 |
Use `--no-headless` (drop `--headless`) to open the MuJoCo viewer for demos.
|
| 20 |
-
- Audio is handled **in-app**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## 0G Compute (mainnet, chain 16661)
|
| 23 |
- Secrets live in `.env` (gitignored). Three services, each its own host + `app-sk-` key.
|
|
|
|
| 17 |
reachy-mini-daemon --sim --headless --no-media --no-preload-datasets
|
| 18 |
```
|
| 19 |
Use `--no-headless` (drop `--headless`) to open the MuJoCo viewer for demos.
|
| 20 |
+
- Audio is handled **in-app** via a backend (`io_backends.py`):
|
| 21 |
+
- **LocalBackend** (sim/dev): laptop mic (sounddevice VAD) + macOS `say`/espeak.
|
| 22 |
+
- **RobotBackend** (demo, Wireless): robot onboard mic/speaker/camera via `ReachyMini.media`
|
| 23 |
+
(`start_recording`/`get_audio_sample`, `play_sound`, `get_frame`) + **antenna push-to-talk**.
|
| 24 |
+
Speech is synthesized on-device with **Piper** (`tts.py`); set `PIPER_MODEL`. 0G has no TTS.
|
| 25 |
+
- **Demo station = Reachy Mini Wireless**, app runs ON the Pi (Install to Robot from HF Space).
|
| 26 |
+
Robot needs internet to reach `compute-network-*.integratenetwork.work`. Tune
|
| 27 |
+
`MR_ANTENNA_THRESHOLD` (rad). RobotBackend is **not yet tested on physical hardware** β
|
| 28 |
+
unknowns: antenna press threshold, whether `media.play_sound` blocks, mic samplerate.
|
| 29 |
|
| 30 |
## 0G Compute (mainnet, chain 16661)
|
| 31 |
- Secrets live in `.env` (gitignored). Three services, each its own host + `app-sk-` key.
|