Skip to content

Commit 7dfad23

Browse files
committed
assets: bundle short excited move (enthusiastic1) for the emotion button code + CI guard
1 parent 61b5d63 commit 7dfad23

4 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Handshake emotion move
2+
3+
`excited.json` (+ `excited.wav`) is the single fixed "excited" move played by
4+
the torque-ON emotion antenna-button code (left, right, left, right external;
5+
see `daemon/backend/secret_handshake.py` and the design spec
6+
`docs/superpowers/specs/2026-07-07-antenna-button-handshakes-design.md`).
7+
8+
It is bundled here so it ships in the wheel and works offline (no network
9+
fetch at play time). Loaded via `RecordedMove` and played with a short
10+
`initial_goto_duration` so the robot eases into the move's start pose.
11+
12+
Provenance: `enthusiastic1` from `pollen-robotics/reachy-mini-emotions-library`
13+
(HF dataset, snapshot 152e84b8f46b88c4b52dd34bbef6975637366177), ~2.73 s,
14+
"A movement to celebrate incredible news." Renamed to `excited` for its role
15+
here. To swap the move, drop in another library move's JSON (+ optional WAV)
16+
under this name.

src/reachy_mini/assets/handshake_moves/excited.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
703 KB
Binary file not shown.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""The bundled handshake emotion move must ship and load as a RecordedMove.
2+
3+
Guards the asset the torque-ON emotion button code plays (see
4+
docs/superpowers/specs/2026-07-07-antenna-button-handshakes-design.md). If the
5+
file is missing or malformed the daemon skips the emotion gracefully, but it
6+
should ship valid, so this is a hard check.
7+
"""
8+
9+
import json
10+
from importlib import resources
11+
12+
from reachy_mini.motion.recorded_move import RecordedMove
13+
14+
15+
def test_bundled_excited_move_loads_and_is_short():
16+
base = resources.files("reachy_mini") / "assets" / "handshake_moves"
17+
move_file = base / "excited.json"
18+
assert move_file.is_file(), "excited.json must ship under assets/handshake_moves"
19+
20+
data = json.loads(move_file.read_text())
21+
move = RecordedMove(data, None)
22+
23+
assert move.duration > 0.0
24+
# A fixed SHORT excited move (some library moves are very long).
25+
assert move.duration < 6.0
26+
# The move can be sampled across its span without raising (evaluate()
27+
# rejects t at/after the final timestamp by design, so stop just short).
28+
move.evaluate(0.0)
29+
move.evaluate(move.duration * 0.99)

0 commit comments

Comments
 (0)