๐Ÿ—๏ธ Reachy Mini Architecture Deep Dive

๐Ÿ“Š System Architecture


โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    REACHY MINI ROBOT                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                           โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚          RASPBERRY PI 4 (Main Computer)          โ”‚    โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค    โ”‚
โ”‚  โ”‚                                                  โ”‚    โ”‚
โ”‚  โ”‚  Web Dashboard (Port 8000)                      โ”‚    โ”‚
โ”‚  โ”‚  โ”œโ”€โ”€ Uvicorn ASGI Server                        โ”‚    โ”‚
โ”‚  โ”‚  โ”œโ”€โ”€ FastAPI Application                        โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€ Static HTML/JS Interface                   โ”‚    โ”‚
โ”‚  โ”‚                                                  โ”‚    โ”‚
โ”‚  โ”‚  Backend Services                               โ”‚    โ”‚
โ”‚  โ”‚  โ”œโ”€โ”€ reachy-sdk-server (NOT auto-started)      โ”‚    โ”‚
โ”‚  โ”‚  โ”œโ”€โ”€ Motor Control Service                      โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€ Camera Service (optional)                  โ”‚    โ”‚
โ”‚  โ”‚                                                  โ”‚    โ”‚
โ”‚  โ”‚  Communication Buses                            โ”‚    โ”‚
โ”‚  โ”‚  โ”œโ”€โ”€ I2C Bus โ†’ Motor Controllers                โ”‚    โ”‚
โ”‚  โ”‚  โ”œโ”€โ”€ USB โ†’ Cameras (if connected)               โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€ GPIO โ†’ Status LEDs                         โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ”‚                           โ”‚                              โ”‚
โ”‚                           โ”‚ I2C/Serial                   โ”‚
โ”‚                           โ†“                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚         DYNAMIXEL MOTOR CONTROLLERS              โ”‚    โ”‚
โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค    โ”‚
โ”‚  โ”‚  โ€ข XL330-M077 Smart Servos (7x)                 โ”‚    โ”‚
โ”‚  โ”‚  โ€ข Daisy-chained communication                  โ”‚    โ”‚
โ”‚  โ”‚  โ€ข Position/Speed/Torque control                โ”‚    โ”‚
โ”‚  โ”‚  โ€ข 1 Mbps serial communication                  โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        

๐Ÿ”Œ Communication Interfaces

1. Web Server (Port 8000)

  • โ€ข Protocol: HTTP/REST API
  • โ€ข Access: http://reachy-mini.local:8000
  • โ€ข Pre-recorded movements only
  • โ€ข Dashboard interface
  • โ€ข Limited real-time control

2. gRPC SDK (Port 50055)

  • โ€ข Protocol: gRPC
  • โ€ข Direct motor control
  • โ€ข Real-time feedback
  • โ€ข Camera access
  • โ€ข Custom movements

3. SSH Access (Port 22)

  • โ€ข Full system control
  • โ€ข Install custom software
  • โ€ข Direct hardware access
  • โ€ข User: pollen
  • โ€ข Password: root

4. Direct Serial

  • โ€ข Dynamixel Protocol 2.0
  • โ€ข 1 Mbps TTL Serial
  • โ€ข Raw motor packets
  • โ€ข /dev/ttyUSB0
  • โ€ข Complete control

๐Ÿ”„ Control Flow

Web Interface Flow:

Browser โ†’ HTTP โ†’ Web Server โ†’ Backend Check โ†’ Pre-recorded Move โ†’ Motors

SDK Control Flow:

Python โ†’ gRPC โ†’ SDK Server โ†’ Direct Commands โ†’ Dynamixel โ†’ Motors

Direct Hardware Flow:

Your Code โ†’ Serial Port โ†’ Dynamixel Protocol โ†’ Motor Response

โš™๏ธ Hardware Components

๐Ÿง  Computing

  • โ€ข Raspberry Pi 4
  • โ€ข 4GB RAM
  • โ€ข 32GB SD Card
  • โ€ข Raspbian OS
  • โ€ข WiFi/Ethernet

๐Ÿฆพ Motors

  • โ€ข 7x Dynamixel XL330
  • โ€ข Smart servos
  • โ€ข Position feedback
  • โ€ข Temperature monitoring
  • โ€ข Daisy-chained

๐Ÿ“น Sensors

  • โ€ข 2x USB Cameras
  • โ€ข Stereo vision
  • โ€ข V4L2 interface
  • โ€ข Microphone (USB)
  • โ€ข Speaker (3.5mm)

๐Ÿ’ก Key Architectural Insights

1. Two-Stage Boot: Web server starts automatically, but motor control backend requires manual activation for safety.
2. Timeout Issue: The backend service (not web server) times out after inactivity. Our keep-alive sends periodic requests to prevent this.
3. Limited Web API: HTTP interface only plays pre-recorded movements. Real robotics requires SDK or direct control.
4. gRPC is Native: The web API is a simplified wrapper. gRPC protocol provides full access to all robot capabilities.
5. Everything is Linux: Full SSH access means you can install anything - custom servers, AI models, computer vision, etc.

๐Ÿš€ Your Control Options

Current: Using web API with keep-alive for basic demos โœ…

Next Level: Install reachy-sdk for direct Python control ๐ŸŽฏ

Advanced: SSH in and deploy custom FastAPI server ๐Ÿš€

Ultimate: Direct Dynamixel protocol for microsecond control ๐Ÿ’ช