Skip to content

Seeed-Projects/reachy-mini-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Reachy Mini Starter Kit

Python Development Framework for Reachy Mini Robot

Python License

A clean, well-documented Python framework for controlling Reachy Mini robots with basic motion and audio interfaces.

ไธญๆ–‡ๆ–‡ๆกฃ | English


โœจ Features

  • ๐ŸŽฏ Unified Configuration - Configure once, use everywhere
  • ๐ŸŽฎ Complete Demos - Audio control, body rotation, head motions, video streaming
  • ๐Ÿ“š Comprehensive Docs - Full API reference and usage guides in EN/CN
  • ๐Ÿš€ Ready for AI - Extensible interfaces for Agent and LLM integration

๐Ÿ“ Project Structure

reachy-mini-starter/
โ”œโ”€โ”€ src/                          # Core library
โ”‚   โ”œโ”€โ”€ connection.py             # Connection management
โ”‚   โ”œโ”€โ”€ config.py                 # Configuration management
โ”‚   โ”œโ”€โ”€ logger.py                 # Logging system
โ”‚   โ””โ”€โ”€ utils.py                  # Utility functions
โ”œโ”€โ”€ demos/                        # Basic control demos
โ”‚   โ”œโ”€โ”€ config_loader.py          # Config loader
โ”‚   โ”œโ”€โ”€ robot_config.yaml.template # Config template
โ”‚   โ”œโ”€โ”€ 01_basic_audio_control/   # ๐Ÿ”Š Audio control
โ”‚   โ”œโ”€โ”€ 02_basic_body_rotation/   # ๐Ÿ”„ Body rotation
โ”‚   โ”œโ”€โ”€ 03_basic_nod_head/        # ๐Ÿซก Nod head motion
โ”‚   โ”œโ”€โ”€ 04_basic_shake_head/      # ๐Ÿ“ข Shake head motion
โ”‚   โ”œโ”€โ”€ 05_webrtc_video_stream/   # ๐Ÿ“น WebRTC video streaming
โ”‚   โ”œโ”€โ”€ 06_zenoh_basic_control/   # โšก Zenoh protocol control
โ”‚   โ”œโ”€โ”€ 07_audio_player/          # ๐ŸŽต Local audio player
โ”‚   โ”œโ”€โ”€ 08_audio_stream_api/      # ๐ŸŽถ REST API audio streaming service
โ”‚   โ”œโ”€โ”€ 09_mic_stream_to_pc/      # ๐ŸŽ™๏ธ Microphone stream to PC
โ”‚   โ”œโ”€โ”€ 10_vision_algorithms/     # ๐Ÿ‘๏ธ OpenCV vision algorithms (face/motion/edge/color/corner detection)
โ”‚   โ”œโ”€โ”€ 11_yolo_robot_control/    # ๐Ÿค– YOLO detection + Zenoh robot control
โ”‚   โ”œโ”€โ”€ 12_antenna_angle_monitoring/ # ๐Ÿ“ก Antenna servo angle monitoring
โ”‚   โ”œโ”€โ”€ 13_head_look_around/      # ๐Ÿ‘€ Head look around motion
โ”‚   โ”œโ”€โ”€ 14_head_track_red_object/ # ๐ŸŽฏ Track red object with head
โ”‚   โ”œโ”€โ”€ 15_web_realtime_control/  # ๐ŸŒ Web-based real-time control
โ”‚   โ”œโ”€โ”€ 16_bidirectional_audio/   # ๐ŸŽ™๏ธ๐Ÿ”Š Bidirectional audio service
โ”‚   โ”œโ”€โ”€ 17_web_remote_camera/     # ๐ŸŒ Web-based remote camera control
โ”‚   โ””โ”€โ”€ 18_webrtc_to_http_stream/ # ๐Ÿ“ก WebRTC to MJPEG video streaming
โ”œโ”€โ”€ docs/                         # Documentation
โ”‚   โ”œโ”€โ”€ API_REFERENCE.md          # API reference (EN)
โ”‚   โ”œโ”€โ”€ USAGE_GUIDE.md            # Usage guide (EN)
โ”‚   โ”œโ”€โ”€ NETWORK_GUIDE.md          # Network guide (EN)
โ”‚   โ”œโ”€โ”€ GSTREAMER.md              # GStreamer installation (EN)
โ”‚   โ”œโ”€โ”€ API_REFERENCE_CN.md       # API reference (ไธญๆ–‡)
โ”‚   โ”œโ”€โ”€ USAGE_GUIDE_CN.md         # Usage guide (ไธญๆ–‡)
โ”‚   โ”œโ”€โ”€ NETWORK_GUIDE_CN.md       # Network guide (ไธญๆ–‡)
โ”‚   โ””โ”€โ”€ GSTREAMER_CN.md           # GStreamer ๅฎ‰่ฃ…ๆŒ‡ๅ— (ไธญๆ–‡)
โ”œโ”€โ”€ configs/                      # Configuration files
โ”œโ”€โ”€ scripts/                      # Utility scripts
โ””โ”€โ”€ requirements.txt              # Dependencies

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.7+
  • Reachy Mini robot (connected to same network)

Installation

# Clone the repository
git clone https://github.com/yourusername/reachy-mini-starter.git
cd reachy-mini-starter

# Install dependencies
pip install -r requirements.txt

# Create configuration file
cp demos/robot_config.yaml.template demos/robot_config.yaml

# Edit the configuration with your robot's IP
# vim demos/robot_config.yaml  (or use your preferred editor)

Configuration file (demos/robot_config.yaml):

robot:
  ip: "10.42.0.75"    # Change to your robot's IP
  port: 8000

Run Demos

# ๐ŸŽต Audio Control - Speaker/microphone volume
python demos/01_basic_audio_control/test_audio_control.py

# ๐Ÿ”„ Body Rotation - Base left/right rotation (ยฑ160ยฐ)
python demos/02_basic_body_rotation/test_body_rotation.py

# ๐Ÿซก Nod Head - Head up/down motion
python demos/03_basic_nod_head/test_nod_head.py

# ๐Ÿ“ข Shake Head - Head left/right motion
python demos/04_basic_shake_head/test_shake_head.py

# ๐Ÿ“น WebRTC Video Stream - Receive video/audio from robot
python3 demos/05_webrtc_video_stream/05.py --signaling-host 10.42.0.75

# โšก Zenoh Control - Low-latency control via Zenoh protocol
python3 demos/06_zenoh_basic_control/test_zenoh_control.py

# ๐ŸŽต Audio Player - Play local/online audio files (runs on robot)
python3 demos/07_audio_player/audio_player.py --file /path/to/audio.wav

# ๐ŸŽถ Audio Stream API - Start REST API service (runs on robot)
python3 demos/08_audio_stream_api/audio_stream_server.py

# ๐ŸŽ™๏ธ Microphone Stream - Stream mic audio to PC (server on robot)
# Step 1: Start server on Reachy Mini
python3 demos/09_mic_stream_to_pc/bidirectional_audio_server.py

# Step 2: Receive stream on PC
python3 demos/09_mic_stream_to_pc/receive_mic_stream.py

# ๐Ÿ‘๏ธ Vision Algorithms - OpenCV vision algorithms on video stream
python3 demos/10_vision_algorithms/10.py --signaling-host 10.42.0.75

# ๐Ÿค– YOLO + Robot Control - YOLO detection with Zenoh robot control
python3 demos/11_yolo_robot_control/11.py --signaling-host 10.42.0.75

# ๐Ÿ“ก Antenna Angle Monitoring - Query antenna servo angles via REST API
python demos/12_antenna_angle_monitoring/test_antenna_rest.py

# ๐Ÿ‘€ Head Look Around - Look around with head motion
python demos/13_head_look_around/13.py

# ๐ŸŽฏ Track Red Object - Track red object with head motion
python demos/14_head_track_red_object/14.py

# ๐ŸŽ™๏ธ๐Ÿ”Š Bidirectional Audio - Stream mic audio from robot to PC (server on robot)
# Step 1: Start server on Reachy Mini
python3 demos/16_bidirectional_audio/bidirectional_audio_server.py

# Step 2: Receive stream on PC
python3 demos/16_bidirectional_audio/receive_mic_stream.py

# ๐ŸŒ Web Remote Camera - Control robot head via browser
python3 demos/17_web_remote_camera/server.py

# ๐Ÿ“ก WebRTC to MJPEG Stream - Watch robot video in browser
python3 demos/18_webrtc_to_http_stream/18.py --signaling-host 10.42.0.75

๐Ÿ“– Configuration

All demos share demos/robot_config.yaml - configure once and use globally.

The configuration file is included in .gitignore to protect your private information.


๐Ÿ”Œ API Interface Coverage

REST API (Implemented โœ…)

Endpoint Method Description Demo
/move/goto POST Smooth motion to target Body Rotation, Nod Head, Shake Head
/move/set_target POST Set target immediately -
/move/goto_joint_positions POST Joint space motion -
/move/stop POST Stop motion All motion demos
/motors/set_mode/{mode} POST Set motor mode All motion demos
/volume/current GET Get speaker volume Audio Control
/volume/set POST Set speaker volume Audio Control
/volume/test-sound POST Play test sound Audio Control
/volume/microphone/current GET Get mic gain Audio Control
/volume/microphone/set POST Set mic gain Audio Control
/state/present_antenna_joint_positions GET Get antenna angles Antenna Monitoring
/state/full GET Get full state Antenna Monitoring
/ws/signaling WS WebRTC signaling Video Stream

WebSocket (Implemented โœ…)

Endpoint Description Demo
/move/ws/set_target Real-time control (60Hz+) โณ Planned
/state/ws/full State streaming โณ Planned
/move/ws/updates Motion events โณ Planned

Zenoh (Implemented โœ…)

Topic Description Demo
reachy_mini/command Command interface Zenoh Control

BLE (Planned โณ)

Command Description Demo
PIN verification Authentication โณ Planned
Status query Get device status โณ Planned
Hotspot reset Reset network โณ Planned

ROS2 (Planned โณ)

Note: This is a community-developed ROS2 middleware that converts native APIs to ROS2 topics, not an official interface.

Topic Message Type Description Demo
/reachy_mini/head_command geometry_msgs/PoseStamped Head pose command โณ Planned
/reachy_mini/joint_command sensor_msgs/JointState Joint position command โณ Planned
/reachy_mini/joint_states sensor_msgs/JointState Current joint states โณ Planned
/reachy_mini/audio/play std_msgs/String Audio file to play โณ Planned
/reachy_mini/audio/volume std_msgs/UInt8 Speaker volume (0-100) โณ Planned

๐ŸŽฏ Demo Overview

Demo Description API Endpoints
๐Ÿ”Š Audio Control Speaker/microphone volume & testing /api/volume/*
๐Ÿ”„ Body Rotation Base rotation (ยฑ160ยฐ) /api/move/goto, /api/motors/*
๐Ÿซก Nod Head Head pitch motion /api/move/goto, /api/motors/*
๐Ÿ“ข Shake Head Head yaw motion /api/move/goto, /api/motors/*
๐Ÿ“น WebRTC Video Real-time video/audio streaming /ws/signaling
โšก Zenoh Control Low-latency protocol control reachy_mini/command
๐ŸŽต Audio Player Play local/online audio files (on robot) N/A (runs on robot)
๐ŸŽถ Audio Stream API REST API for remote audio control & streaming Custom API (port 8001)
๐ŸŽ™๏ธ Mic Stream Stream mic audio from robot to PC WebSocket (port 8002)
๐Ÿ‘๏ธ Vision Algorithms OpenCV algorithms (face/motion/edge/color/corner) N/A (PC only)
๐Ÿค– YOLO + Control YOLO detection + Zenoh robot control reachy_mini/command
๐Ÿ“ก Antenna Monitor Query antenna servo angles via REST API /api/state/*
๐Ÿ‘€ Head Look Around Head look around motion /api/move/goto
๐ŸŽฏ Track Red Object Track red object with head motion /api/move/goto
๐ŸŽ™๏ธ๐Ÿ”Š Bidirectional Audio Bidirectional audio service via WebSocket WebSocket (port 8002)
๐ŸŒ Web Real-time Control Web-based real-time robot head control WebSocket + REST API
๐ŸŒ Web Remote Camera Web-based head control via browser WebSocket + REST API
๐Ÿ“ก WebRTC to MJPEG Watch robot video stream in browser MJPEG HTTP stream

๐Ÿ“š Documentation

English

ไธญๆ–‡


๐Ÿ—บ๏ธ Roadmap

Current version provides basic control interfaces. Future plans:

  • ๐Ÿ‘๏ธ Vision System - Camera-based visual recognition
  • ๐Ÿค– YOLO Integration - Object detection with robot control
  • ๐Ÿ“ก State Monitoring - Antenna servo angle monitoring
  • ๐Ÿค– Agent Integration - AI Agent for intelligent decision-making
  • ๐Ÿง  LLM Integration - Natural language interaction
  • ๐ŸŽค Voice Interaction - Speech recognition and synthesis
  • ๐Ÿ˜Š Emotional Expression - Emotion-based motion expressions

๐Ÿ“„ License

This project is licensed under the MIT License - see LICENSE for details.


๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Built with โค๏ธ for the Reachy Mini community

Powered by Seeed Studio

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors