| name | reachy-mini |
| description | Complete SDK for controlling Reachy Mini robot - head movement, antennas, camera, audio, motion recording/playback.
Covers architecture (daemon/client), deployment modes (USB, wireless, simulation, on-Pi), and app distribution.
Also includes advanced application patterns: MovementManager, layered motion, audio-reactive movement, face tracking,
LLM tool systems, and OpenAI realtime integration.
Use when: (1) Writing code to control Reachy Mini, (2) Moving the robot head or antennas, (3) Accessing camera/video,
(4) Playing/recording audio, (5) Recording or playing back motions, (6) Looking at points in image or world space,
(7) Understanding robot capabilities, (8) Connecting to real or simulated robot, (9) Building conversational AI apps,
(10) Integrating with LLMs/OpenAI, (11) Deploying apps to robot, (12) Any robotics task with Reachy Mini.
|
Reachy Mini SDK
Quick Start
from reachy_mini import ReachyMini
from reachy_mini.utils import create_head_pose
import numpy as np
with ReachyMini() as robot:
robot.wake_up()
pose = create_head_pose(x=0, y=0, z=0, roll=0, pitch=10, yaw=20, degrees=True)
robot.goto_target(head=pose, antennas=[0.3, -0.3], duration=1.0)
frame = robot.media.get_frame()
robot.goto_sleep()
Connection Options
ReachyMini()
ReachyMini(localhost_only=False)
ReachyMini(use_sim=True)
ReachyMini(spawn_daemon=True)
ReachyMini(
robot_name="reachy_mini",
localhost_only=True,
spawn_daemon=False,
use_sim=False,
timeout=5.0,
automatic_body_yaw=True,
log_level="INFO",
media_backend="default"
)
Head & Antenna Control
Creating Poses
from reachy_mini.utils import create_head_pose
pose = create_head_pose(x=0, y=0, z=0, roll=0, pitch=15, yaw=-10, degrees=True)
pose = create_head_pose(pitch=0.26, yaw=-0.17, degrees=False)
pose = create_head_pose(x=50, y=0, z=30, mm=True)
Moving the Robot
from reachy_mini.motion.goto_move import InterpolationTechnique
robot.set_target(head=pose, antennas=[0.5, -0.5], body_yaw=0.1)
robot.goto_target(
head=pose,
antennas=[0.5, -0.5],
duration=1.0,
method=InterpolationTechnique.MIN_JERK,
body_yaw=0.0
)
Interpolation methods:
LINEAR - Linear interpolation
MIN_JERK - Default, smoothest motion
EASE_IN_OUT - Smooth start and end
CARTOON - Exaggerated animation style
Look-At Functions
robot.look_at_image(u=320, v=240, duration=0.5)
robot.look_at_world(x=0.5, y=0.1, z=0.3, duration=0.5)
pose = robot.look_at_image(u=320, v=240, perform_movement=False)
Antenna Values
Antennas are [right_angle, left_angle] in radians:
0.0 = antennas down/closed
- Positive = antennas up/open
- Typical range:
-0.5 to 1.0 radians
State Queries
pose = robot.get_current_head_pose()
head_joints, antenna_joints = robot.get_current_joint_positions()
antennas = robot.get_present_antenna_joint_positions()
Motor Control
robot.enable_motors()
robot.disable_motors()
robot.enable_motors(ids=["right_antenna", "left_antenna"])
robot.disable_motors(ids=["body_rotation"])
Motor IDs: "body_rotation", "stewart_1" through "stewart_6", "right_antenna", "left_antenna"
robot.enable_gravity_compensation()
robot.disable_gravity_compensation()
Behaviors
robot.wake_up()
robot.goto_sleep()
Camera
frame = robot.media.get_frame()
width, height = robot.media.camera.resolution
fps = robot.media.camera.framerate
K = robot.media.camera.K
D = robot.media.camera.D
from reachy_mini.media.camera.camera_constants import CameraResolution
robot.media.camera.set_resolution(CameraResolution.R1920x1080at30fps)
Common resolutions: R1280x720at30fps, R1280x720at60fps, R1920x1080at30fps, R1920x1080at60fps, R3840x2160at30fps
Audio
robot.media.play_sound("wake_up.wav")
robot.media.start_recording()
sample = robot.media.get_audio_sample()
robot.media.stop_recording()
robot.media.start_playing()
robot.media.push_audio_sample(audio_data)
robot.media.stop_playing()
sample_rate = robot.media.get_input_audio_samplerate()
channels = robot.media.get_input_channels()
angle, valid = robot.media.get_DoA()
Motion Recording & Playback
Recording
robot.start_recording()
recorded_data = robot.stop_recording()
Playing Recorded Moves
from reachy_mini.motion.recorded_move import RecordedMoves
moves = RecordedMoves("pollen-robotics/reachy-mini-dances-library")
print(moves.list_moves())
move = moves.get("dance_name")
robot.play_move(move, initial_goto_duration=1.0, sound=True)
await robot.async_play_move(move)
Kinematics
Three engines available:
| Engine | Install | Speed | Features |
|---|
| AnalyticalKinematics | Default | Fast | Always available |
| PlacoKinematics | pip install reachy_mini[placo_kinematics] | Medium | Collision checking, gravity compensation |
| NNKinematics | pip install reachy_mini[nn_kinematics] | Very fast | Neural network based |
from reachy_mini.kinematics.analytical import AnalyticalKinematics
kin = AnalyticalKinematics()
joint_angles = kin.ik(pose, body_yaw=0.0)
pose = kin.fk(joint_angles)
Simulation
robot = ReachyMini(use_sim=True)
Common Patterns
Face Tracking
robot.look_at_image(u=face_center_x, v=face_center_y, duration=0.3)
Expressive Movements
robot.goto_target(antennas=[0.8, 0.8], duration=0.3)
robot.goto_target(antennas=[-0.3, -0.3], duration=0.5)
pose = create_head_pose(roll=15, pitch=10, degrees=True)
robot.goto_target(head=pose, duration=0.4)
Idle Animation Loop
import time
while True:
robot.goto_target(head=create_head_pose(yaw=10, degrees=True), duration=2.0)
time.sleep(2.0)
robot.goto_target(head=create_head_pose(yaw=-10, degrees=True), duration=2.0)
time.sleep(2.0)
Reference Documentation
- Architecture & Deployment - Daemon/client split, deployment modes (USB, wireless, simulation), running code, app distribution
- API Reference - Complete method signatures, all parameters and return types
- Motion Reference - Interpolation details, Move classes, GotoMove, RecordedMove
- Media Reference - All camera resolutions, audio specs, backend options
- Application Patterns - Advanced patterns: MovementManager, layered motion, audio-reactive movement, face tracking, LLM tool systems, OpenAI realtime integration