Skip to content

Commit f11113c

Browse files
Merge pull request #3351 from anupras-mohapatra-arm/cross-platform
Reachy robot app editorial review
2 parents df77c03 + 489b3e3 commit f11113c

7 files changed

Lines changed: 152 additions & 122 deletions

File tree

content/learning-paths/cross-platform/build-a-reachy-robot-app-on-pi/_index.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
---
2-
title: Build an Edge AI Reachy Mini App with Raspberry Pi, MediaPipe, and MuJoCo
3-
4-
draft: true
5-
cascade:
6-
draft: true
2+
title: Build an edge AI Reachy Mini app with Raspberry Pi, MediaPipe, and MuJoCo
73

84
description: Run MediaPipe gesture inference on a Raspberry Pi 5, connect to a Reachy Mini MuJoCo simulation on a development machine, and use a browser dashboard to decide Reachy's fate with a thumbs-up or thumbs-down.
95

@@ -17,7 +13,7 @@ learning_objectives:
1713
- Use MediaPipe and TensorFlow Lite gesture recognition on Raspberry Pi 5.
1814
- Connect an edge inference node to a robot daemon over the network.
1915
- Display results over a web dashboard.
20-
- (Optional) Extend the project toward a physical Reachy Mini, audio or multimodal interaction, or your own app.
16+
- Optionally extend the project toward a physical Reachy Mini, audio or multimodal interaction, or your own app.
2117

2218
prerequisites:
2319
- A Raspberry Pi 5, ideally with 16 GB RAM.

content/learning-paths/cross-platform/build-a-reachy-robot-app-on-pi/extend.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: (Optional) Extend the project
3+
description: Explore approaches you can take to extend Reachy Gladiator with new gestures, audio output, physical Reachy Mini support, and custom Reachy Mini app packaging.
34
weight: 7
45

56
### FIXED, DO NOT MODIFY
@@ -38,10 +39,10 @@ Some game-themed ideas:
3839

3940
The gladiator theme is a good fit for sound. Try adding audio cues such as:
4041

41-
- a crowd cheer during victory,
42-
- a dramatic sound during defeat,
43-
- a short drum hit before each move,
44-
- a spoken move name before Reachy performs it.
42+
- a crowd cheer during victory
43+
- a dramatic sound during defeat
44+
- a short drum hit before each move
45+
- a spoken move name before Reachy performs it
4546

4647
Keep audio output separate from `moves.py` at first. For example, create an
4748
`audio.py` helper and call it from `main.py` when the state changes. This keeps
@@ -52,34 +53,35 @@ robot motion and sound effects easy to change independently.
5253
The vision-based verdict is one edge AI input modality. You can replace
5354
or complement it with audio. Many webcams include microphones, or you can use a USB microphone.
5455

55-
- say "yes" for victory and "no" for defeat,
56-
- clap once for victory and twice for defeat,
56+
Try adding audio inputs such as:
57+
58+
- say "yes" for victory and "no" for defeat
59+
- clap once for victory and twice for defeat
5760

5861
A lightweight keyword-spotting model can map spoken commands to the same game states currently triggered by MediaPipe gestures.
5962

6063
## Try the packaged app on a physical Reachy
6164

62-
If you have a physical Reachy Mini, the quickest way to try the finished
63-
experience is to install the packaged [Reachy Gladiator app](https://huggingface.co/spaces/cossinsmatthew/reachy_gladiator) through the [Reachy Mini Control app](https://github.com/pollen-robotics/reachy-mini-desktop-app).
65+
If you have a physical Reachy Mini, you can try the finished
66+
experience by installing the packaged [Reachy Gladiator app](https://huggingface.co/spaces/cossinsmatthew/reachy_gladiator) through the [Reachy Mini Control app](https://github.com/pollen-robotics/reachy-mini-desktop-app).
6467

6568
Install Reachy Mini Control on a supported machine, connect it to your Reachy, and search for the Reachy Gladiator app.
6669

6770
{{% notice Warning %}}
68-
If using a physical Reachy Mini, use caution and ensure the robot is used in an area with appropriate space. The robot has moving parts and could be a health & safety risk. You are responsible for your safety and the safety of others around you when using physical robotic devices.
71+
If you use a physical Reachy Mini, exercise caution and ensure the robot is used in an area with appropriate space. The robot has moving parts and could be a health and safety risk. You're responsible for your safety and the safety of others around you when using physical robotic devices.
6972
{{% /notice %}}
7073

7174
## Adapt this source project for physical Reachy
7275

73-
The main learning path uses the Raspberry Pi USB webcam for perception and a
76+
The main Learning Path uses the Raspberry Pi USB webcam for perception and a
7477
remote MuJoCo daemon for robot motion. A physical Reachy route changes two
7578
things:
7679

77-
- camera frames come from the Reachy daemon instead of the Pi USB webcam,
80+
- camera frames come from the Reachy daemon instead of the Pi USB webcam
7881
- the Pi app connects to the physical Reachy daemon instead of the simulation
79-
daemon.
82+
daemon
8083

81-
The source project exposes these switches as environment variables, so you do
82-
not need to edit the Python source:
84+
The source project exposes these switches as environment variables, so you don't need to edit the Python source:
8385

8486
```bash
8587
REACHY_GLADIATOR_MEDIA_BACKEND=reachy \
@@ -95,9 +97,9 @@ IP address and set `REACHY_GLADIATOR_DAEMON_PORT` to the daemon port.
9597
These variables map to the code in two places:
9698

9799
- `REACHY_GLADIATOR_MEDIA_BACKEND=reachy` lets `ReachyMiniApp` request daemon
98-
camera media.
100+
camera media
99101
- `REACHY_GLADIATOR_CAMERA=reachy` tells `camera.py` to use
100-
`ReachyMediaFrameSource` instead of `OpenCVCameraFrameSource`.
102+
`ReachyMediaFrameSource` instead of `OpenCVCameraFrameSource`
101103

102104
## Build your own Reachy Mini app
103105

@@ -111,7 +113,7 @@ To build a fresh app:
111113
endpoint.
112114
4. Add a dashboard only after the core loop works.
113115
5. Test in simulation before physical hardware.
114-
6. Package the app when it is stable enough for repeated use.
116+
6. Package the app when it's stable enough for repeated use.
115117

116118
The Reachy Mini tooling can scaffold and validate a shareable app:
117119

@@ -120,13 +122,12 @@ reachy-mini-app-assistant create my_app ~/reachy_projects
120122
reachy-mini-app-assistant check ~/reachy_projects/my_app
121123
```
122124

123-
The [Reachy Mini app publishing guide](https://huggingface.co/blog/pollen-robotics/make-and-publish-your-reachy-mini-apps)
124-
explains the packaging and publishing workflow in more detail.
125+
For more information about the packaging and publishing workflow, see the [Reachy Mini app publishing guide](https://huggingface.co/blog/pollen-robotics/make-and-publish-your-reachy-mini-apps).
125126

126127
Use the Reachy Mini SDK documentation and examples to understand available
127128
motion, media, and daemon APIs. If you use an AI coding agent, give it the
128129
Pollen Robotics `AGENTS.md` instructions, provided by the [Reachy Mini project](https://github.com/pollen-robotics/reachy_mini) so it follows the expected app structure.
129130

130-
## What you learned
131+
## What you've learned
131132

132-
You explored options for extending from simulation to a physical Reachy, as well as ideas for changing the project to include audio, new vision gestures, or different behaviors.
133+
You've now explored options for extending from simulation to a physical Reachy, as well as ideas for changing the project to include audio, new vision gestures, or different behaviors.
Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: Learn about Reachy and understand the application
2+
title: Learn about Reachy and the Reachy Gladiator application
3+
description: Learn how the Reachy Gladiator app splits gesture inference, robot control, simulation, and dashboard display between a simulation host and a Raspberry Pi.
34
weight: 2
45

56
### FIXED, DO NOT MODIFY
@@ -8,37 +9,37 @@ layout: learningpathall
89

910
## Reachy Gladiator - Decide Reachy's fate
1011

11-
In this Learning Path, you build a distributed edge AI application where a Raspberry Pi runs local gesture inference and sends robot motion commands to a simulated Reachy Mini. The app follows a gladiator arena theme: Reachy performs a move, and you give a thumbs-up 👍 for **Victory** or thumbs-down 👎 for **Defeat** to trigger a victory or defeat reaction.
12+
In this Learning Path, you'll build a distributed edge AI application where a Raspberry Pi runs local gesture inference and sends robot motion commands to a simulated Reachy Mini. The app follows a gladiator arena theme: Reachy performs a move, and you give a thumbs-up for victory or thumbs-down for defeat to trigger a victory or defeat reaction.
1213

13-
![Illustration of Reachy Mini in a gladiator style pose. The app uses this arena theme for its moves, verdicts, and dashboard.#center](reachy_gladiator.png "Reachy Mini Gladiator App Concept")
14+
![Illustration of Reachy Mini in a gladiator style pose. The app uses this arena theme for its moves, verdicts, and dashboard.#center](reachy_gladiator.png "Reachy Mini Gladiator app concept")
1415

1516
## What is Reachy Mini?
1617

17-
Reachy Mini is a small open robotics platform from Pollen Robotics. It is designed for expressive head, antenna, and body motion, and it can be controlled from Python with the Reachy Mini SDK. The Reachy Mini Wireless version includes an onboard Arm-powered Raspberry Pi 4 Compute Module, and the Lite version is operated with external compute such as a Raspberry Pi, DGX Spark, or Mac/PC.
18+
Reachy Mini is a small open robotics platform from Pollen Robotics. It's designed for expressive head, antenna, and body motion, and it can be controlled with Python using the Reachy Mini SDK. The Reachy Mini Wireless version includes an onboard Arm-powered Raspberry Pi 4 Compute Module, and the Lite version is operated with external compute such as a Raspberry Pi, DGX Spark, or a Mac or PC.
1819

19-
Reachy can also be simulated using MuJoCo software. Most developers do not have a physical Reachy Mini robot on their desk, and it is often useful to develop software before hardware is available. Extrapolating from Reachy to more industrial robotics, it is also important to test applications in simulation in advance for safety.
20+
Reachy can also be simulated using MuJoCo software. Most developers don't have a physical Reachy Mini robot on their desk, and it's often useful to develop software before hardware is available. Extrapolating from Reachy to more industrial robotics, it's also important to test applications in simulation in advance for safety.
2021

2122
{{% notice Warning %}}
22-
If using a physical Reachy Mini, use caution and ensure the robot is used in an area with appropriate space. The robot has moving parts and could be a health & safety risk. You are responsible for your safety and the safety of others around you when using physical robotic devices.
23+
If using a physical Reachy Mini, exercise caution and ensure the robot is used in an area with appropriate space. The robot has moving parts and could be a health and safety risk. You're responsible for your safety and the safety of others around you when using physical robotic devices.
2324
{{% /notice %}}
2425

25-
## What will you build?
26+
## What you'll build
2627

27-
The workflow of this learning path is split across two machines:
28+
The workflow of this Learning Path is split across two machines:
2829

29-
**Laptop/Desktop: macOS, Linux, or Windows with WSL2**
30+
Laptop or Desktop: macOS, Linux, or Windows with WSL2
3031
- Runs the Reachy Mini daemon
3132
- Runs the MuJoCo simulation
3233
- Displays simulated Reachy movement
3334
- Displays the Pi-hosted dashboard at `http://<pi-ip-address>:8042`
3435

35-
**Raspberry Pi 5: Raspberry Pi OS**
36+
Raspberry Pi 5: Raspberry Pi OS
3637
- Captures frames from a USB webcam
3738
- Runs the Edge AI application (local MediaPipe gesture recognition)
3839
- Serves a dashboard on port 8042
3940
- Sends robot movement commands to the simulation host daemon
4041

41-
This split is a common edge/physical AI pattern:
42+
This split is a common edge or physical AI pattern:
4243

4344
- A small edge device handles sensors and inference close to the user.
4445
- A robot API or daemon receives movement commands.
@@ -48,53 +49,53 @@ This split is a common edge/physical AI pattern:
4849
This is similar to how larger industrial robotics systems are often built.
4950
Keeping perception, robot control, and observability as separate pieces makes it easier to test, replace, and deploy parts of the system independently.
5051

51-
## What does the app do?
52+
## What the app does
5253

53-
The app is called Reachy Gladiator. Reachy (in simulation or otherwise) performs a randomly-chosen scripted gladiator move. You provide a 👍 for **Victory**, or a 👎 for **Defeat**. **Victory** makes Reachy celebrate, **Defeat** makes Reachy react sadly.
54+
The app is called Reachy Gladiator. Reachy (in simulation or otherwise) performs a randomly-chosen scripted gladiator move. You provide a thumbs up for victory, or a thumbs down for defeat. Victory makes Reachy celebrate, and defeat makes Reachy react sadly.
5455

55-
This Learning Path starts from the complete [`reachy_gladiator_lp`](https://github.com/matt-cossins/reachy_gladiator_lp) project instead of asking you to create every file from scratch. The simulation host only needs a launcher script, but the Raspberry Pi will clone and run the full project. You will inspect the different parts of the system so you can recreate your own apps running on Reachy or in simulation.
56+
This Learning Path starts from the complete [`reachy_gladiator_lp`](https://github.com/matt-cossins/reachy_gladiator_lp) project, so that you don't have to create every file from scratch. The simulation host needs only a launcher script, but the Raspberry Pi will clone and run the full project. You'll inspect the different parts of the system so you can recreate your own apps running on Reachy or in simulation.
5657

5758
The Reachy Gladiator app runs a repeated loop:
5859

5960
1. Start with a 10-second preparing countdown
6061
2. Randomly pick one gladiator move
6162
3. Repeat the selected move three times
6263
4. Return Reachy to a neutral pose
63-
5. Watch for a 👍 or a 👎
64+
5. Watch for a thumbs up or a thumbs down
6465
6. Run a victory or defeat reaction
6566
7. Repeat with another move
6667

6768
There are four preset moves:
6869

6970
- `Salute`
70-
![Salute Move#center](salute.gif "Salute Move")
71+
![Animated MuJoCo simulation showing Reachy Mini performing the Salute preset move. This shows one of the scripted motions that the app can select during a round.#center](salute.gif "Salute move")
7172
- `Sword Swing`
72-
![Sword Swing Move#center](sword.gif "Sword Swing Move")
73+
![Animated MuJoCo simulation showing Reachy Mini performing the Sword Swing preset move. This demonstrates another scripted gladiator motion sent through the Reachy Mini SDK.#center](sword.gif "Sword swing move")
7374
- `Shield Up`
74-
![Shield Up Move#center](shield.gif "Shield Up Move")
75+
![Animated MuJoCo simulation showing Reachy Mini performing the Shield Up preset move. This confirms that the app can play defensive-themed robot motions in simulation.#center](shield.gif "Shield up move")
7576
- `Battle Cry`
76-
![Battle Cry Move#center](battle-cry.gif "Battle Cry Move")
77+
![Animated MuJoCo simulation showing Reachy Mini performing the Battle Cry preset move. This shows the expressive motion style used before the thumbs-up or thumbs-down verdict.#center](battle-cry.gif "Battle cry move")
7778

7879
The app shuffles all four moves and performs each once before any move repeats. When the bag is empty, it reshuffles and avoids repeating the same move at the shuffle boundary.
7980

80-
## Use a compatible terminal
81+
## Compatible terminals for this project
8182

82-
The commands in this learning path use a Bash-style shell. They work directly on macOS and Linux.
83+
The commands in this learning path use a Bash-style shell and work directly on macOS and Linux.
8384

8485
On Windows, use WSL2 with an Ubuntu distribution for the simulation host commands. This keeps the commands almost identical to the macOS and Linux flow:
8586

8687
- Use the WSL terminal for `python3`, `source .venv/bin/activate`, and `./scripts/start_sim.sh`.
8788
- Keep the browser on Windows if you prefer; open the Pi dashboard from any browser that can reach the Raspberry Pi.
88-
- If the Pi cannot reach a daemon running inside WSL2, check Windows firewall and WSL networking. WSL2 uses virtualized networking, so inbound access from another device on your LAN may require Windows port forwarding.
89+
- If the Pi can't reach a daemon running inside WSL2, check Windows firewall and WSL networking. WSL2 uses virtualized networking, so inbound access from another device on your LAN might require Windows port forwarding.
8990

90-
The rest of this learning path shows the common Bash commands and calls out the one IP-address command that differs by host operating system.
91+
In the rest of this learning path, you'll see common Bash commands and note the one IP-address command that differs by host operating system.
9192

9293
## Project structure
9394

94-
The simulation host does not need the full project checkout. In the next
95-
section, you will download only the simulation launcher script on that machine.
95+
The simulation host doesn't need the full project checkout. In the next
96+
section, you'll download only the simulation launcher script on that machine.
9697

97-
You will clone the full `reachy_gladiator_lp` project on the Raspberry Pi later.
98+
You'll clone the full `reachy_gladiator_lp` project on the Raspberry Pi later.
9899

99100
The key files are:
100101

@@ -116,6 +117,8 @@ reachy_gladiator_lp/
116117
└── static/ # dashboard HTML, CSS, JavaScript, and media
117118
```
118119

119-
## What you learned and what is next
120+
## What you've learned and what's next
120121

121-
You learned what Reachy Mini is, why simulation is useful for edge/physical AI development, and how the app splits work between a simulation host and a Raspberry Pi. You are now ready to start the simulation host with a lightweight launcher script.
122+
You learned what Reachy Mini is, why simulation is useful for edge or physical AI development, and how the app splits work between a simulation host and a Raspberry Pi.
123+
124+
Next, you'll start the simulation host with a lightweight launcher script.

0 commit comments

Comments
 (0)