mini_fleet / README.md
jonathanberi's picture
Neutral author credit
c8be8af verified
|
Raw History Blame Contribute Delete
2.91 kB
metadata
title: Mini Fleet
emoji: 🤖
colorFrom: yellow
colorTo: gray
sdk: static
pinned: false
short_description: Dashboard and one-tap reset for many Reachy Minis
tags:
  - reachy_mini
  - reachy_mini_python_app
  - fleet
  - classroom

Mini Fleet

A teacher's view of a room full of Reachy Minis. It shows which robots are online, their daemon version, current app, motor state and installed apps. One button returns every robot to a known state.

Built and tested against simulated robots only (reachy-mini-daemon --mockup-sim, SDK 1.14.0). I don't have hardware yet. By Jonathan Beri.

Two ways to run it

As a robot app. Install it from the Reachy Mini dashboard and open the app's page (port 8042). The host robot nods when a fleet reset succeeds and shakes its head if one fails. Fleet actions skip the host, so it never stops itself.

On a laptop, without tying up a robot:

uv pip install reachy-mini "git+https://huggingface.co/spaces/jonathanberi/mini_fleet"
mini-fleet --robot 192.168.1.20 --robot reachy-mini.local --open

The robot list is saved to ~/.config/mini_fleet/robots.json.

Try it with simulated robots

scripts/sim_fleet.sh start 3     # sim-1..3 on localhost:8000-8002
mini-fleet --robot localhost:8000 --robot localhost:8001 --robot localhost:8002 --open
scripts/sim_fleet.sh stop

On one machine, apps launched by any of these daemons connect to the daemon on :8000. Daemons started from the same venv also share installed apps.

What "reset to known state" does

  1. Stop the current app, if one is running
  2. goto_sleep and wait for the move to finish (this disables the motors)
  3. Re-enable the motors (wake_up over REST does not)
  4. wake_up and wait
  5. Optionally start a baseline app, chosen in the dashboard

How it works

Everything runs server-side with httpx against each robot's daemon REST API: /api/daemon/status, /api/apps/*, /api/move/*, /api/motors/*. A browser page can't do this itself. The daemon only allows cross-origin reads from localhost and rejects cross-origin state-changing requests. The dashboard page talks only to Mini Fleet's own backend. Actions are limited to robots on your list, and app names are validated before they go into a URL.

File What
mini_fleet/fleet.py Polling, reset sequence, actions (no web framework dependency)
mini_fleet/api.py /api/fleet routes, shared by both modes
mini_fleet/main.py ReachyMiniApp wrapper and host-robot gestures
mini_fleet/cli.py mini-fleet laptop command
mini_fleet/static/ Dashboard page (plain HTML/JS, no build step)
scripts/sim_fleet.sh Start and stop N simulated daemons

Next

  • mDNS discovery of reachy-mini.local robots
  • Update apps across the fleet via /api/apps/check-updates
  • Test on real Lite and Wireless robots