File size: 8,400 Bytes
a783ac1 bfc4cb9 a783ac1 080389c c8a0aa0 a783ac1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | ---
title: Reachy Mini - Camping AI
emoji: π₯
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
models:
- openbmb/MiniCPM-V-4.6
- openbmb/MiniCPM5-1B
- openai/whisper-large-v3-turbo
- 2noise/ChatTTS
tags:
- robotics
- voice-control
- reachy-mini
- camping-assistant
- track:backyard
- sponsor:openbmb
- sponsor:openai
- achievement:offgrid
- badge-tiny-titan
- award-best-agent
- award-best-demo
---
## ποΈ Camping AI: Reachy Mini Smart Camping Voice & Guard Control Platform
This project is a smart camping assistant system custom-tailored for the **Reachy Mini robot**. It integrates multimodal vision recognition (MiniCPM-V), smart voice dialogue (Whisper / MiniCPM / ChatTTS), security patrol guarding, and GPS location reporting, complete with an intuitive and aesthetic Gradio web control interface.
## Demo & links
- βΆοΈ **Demo video** β https://youtu.be/M9ghm4zdzww
- π¬ **Launch post (X)** β https://x.com/ivan_lee1007/status/2066642941964382668
---
## β οΈ Important Hardware & System Constraints
Before running this project, ensure that your environment meets the following hardware and system requirements:
1. **RAM Constraint**: The computer or server running/hosting the local models (LLM/VLM/TTS) should have **more than 16 GB of RAM**. A dedicated GPU with CUDA support is highly recommended for model acceleration.
2. **GPS Device Constraint**: A **GPS-enabled smartphone** is required (either sharing location with the host Mac or using specific Apple Shortcuts/integrations to send coordinates) to enable the location reporting feature.
3. **Robot Body**: A **Reachy Mini** robot with a stable network connection.
---
## π Project Introduction
This project bridges AI technology and physical robotics. Using Reachy Mini's rich body language (head movements, antenna wiggling) and sensory modules (head camera, microphone, speaker), it provides four core experiences:
- **Smart Voice Dialogue**: Understands user questions and responds using speech synthesis coupled with expressive body gestures.
- **Camping Guard Patrol**: Conducts scheduled or manually triggered patrols, leveraging multimodal vision to detect potential hazards or wild animals (such as snakes) nearby.
- **Wild Species Identification**: Captures photos of objects or plants in front of the robot and details them out loud.
- **Real-Time Location Report**: Integrates phone GPS signals with macOS shortcuts to calculate current latitude/longitude and greets the user.
---
## π οΈ Installation Guide
### 1. System Dependencies
On macOS, certain system utilities are required by the python packages:
```bash
# Install ffmpeg for audio format conversion (WAV/MP3 conversion)
brew install ffmpeg
# Install portaudio for microphone recording and voice monitoring (PyAudio dependency)
brew install portaudio
```
### 2. Virtual Environment & Python Packages
Python 3.8+ is recommended:
```bash
# Create a virtual environment
python3 -m venv .venv
# Activate the virtual environment (macOS / Linux)
source .venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install dependencies
pip install -r requirements.txt
```
> [!NOTE]
> The `reachy_mini` package is the official robot SDK. If it is not publicly hosted on PyPI, please follow Reachy Mini's official setup instructions to install it manually.
> The `ChatTTS` package can also be installed manually via `pip install ChatTTS`.
### 3. Configure Environment Variables (`.env`)
Copy `.env.example` to `.env`:
```bash
cp .env.example .env
```
Edit `.env` to configure your settings:
```env
# IP address of the local or remote model server
server_ip=10.112.5.79 # Update to your actual model server IP
```
---
## π§ Local Model Server Configuration (`llm_server`)
The local model calculations (LLM/VLM/STT/TTS) rely on services hosted under `llm_server`. **The respective model servers must be running for the main application to function properly.**
These model servers are typically launched on a machine equipped with GPU acceleration (refer to [llm_server/README.md](file:///Users/ivan.lee/dev/camping_ai/llm_server/README.md)):
### 1. MiniCPM-V-4.6 Multimodal Vision Service (Port 4000)
Used for image analysis in **Species Identification** and **Guardian Mode**.
```bash
transformers serve openbmb/MiniCPM-V-4.6 --port 4000 --host 0.0.0.0 --trust-remote-code
```
### 2. MiniCPM5-1B Language Model Service (Port 4001)
Used for text generation in **Smart Dialogue** and **Location Integration**.
```bash
transformers serve openbmb/MiniCPM5-1B --port 4001 --host 0.0.0.0
```
### 3. Whisper Speech-to-Text (ASR) Service (Port 4002)
Used to transcribe recorded voice commands.
```bash
# Start STT server
python llm_server/stt_server.py
```
### 4. ChatTTS Text-to-Speech (TTS) Service (Port 4003)
Used to synthesize robot voice responses.
```bash
# Start TTS server
python llm_server/tts_server.py
```
---
## π Starting Services & Function Introduction
### Launch the Gradio Web Application
Run the following command in the project root:
```bash
python app.py
```
This will start the web control panel interface (accessible at `http://127.0.0.1:7860` by default).
---
### Core Web Control Panel Features & Purpose
#### 1. π Connection & Settings
- **Purpose**: Connect the web application to the Reachy Mini robot.
- **Features**:
- Specify the robot's **Host IP** (e.g., `localhost` or its local network IP).
- Configure the connection mode and video backend (WebRTC or default stream).
- Toggle **SSH Tunnel Mode** to resolve remote signaling issues.
#### 2. π· Live Stream Viewer
- **Purpose**: Real-time monitoring of Reachy Mini's head camera.
- **Features**:
- Real-time video feedback from Reachy Mini's head camera (converted to RGB format for web display).
- Capture and save snapshot frames to the `record/` folder via the **Capture Frame & Save** button.
#### 3. ποΈ Camp AI Voice Control System
You can interact using the **Voice Monitoring Mode** (continuous microphone listening) or manually click buttons in **Manual Mode**:
| Feature Name (Manual Mode Button) | Triggered Script | Core Purpose & Workflow |
| :--- | :--- | :--- |
| **π Location Report** | [location.py](file:///Users/ivan.lee/dev/camping_ai/location.py) | **Get GPS Coordinates & Greet User:**<br>1. Triggers macOS shortcuts to fetch GPS latitude/longitude.<br>2. Combines coordinates and sends them to **MiniCPM5-1B** to generate a friendly Chinese response.<br>3. Converts response to audio via **ChatTTS** and plays it while the robot nods. |
| **π¬ Voice Dialogue** | [ask.py](file:///Users/ivan.lee/dev/camping_ai/ask.py) | **Bidirectional Conversational AI:**<br>1. Record your query (manually or via voice activation).<br>2. Transcribe audio via **Whisper** and generate replies via **MiniCPM5-1B**.<br>3. Speak the answer via **ChatTTS** while the robot plays interactive head/antenna gestures. |
| **π‘οΈ Guardian Mode** | [guard.py](file:///Users/ivan.lee/dev/camping_ai/guard.py) | **Security Guard Patrol & Danger Detection:**<br>1. Reachy Mini turns its head (0Β°, 60Β°, -60Β°) to capture snapshots.<br>2. Evaluates the images via **MiniCPM-V-4.6** to detect wild animals (e.g., snakes).<br>3. If danger is found (`danger=1`), it plays a warning audio (`warning_song.mp3`) and wiggles its antennas violently. |
| **π Species Identification** | [look_that.py](file:///Users/ivan.lee/dev/camping_ai/look_that.py) | **Object & Species Identification:**<br>1. Robot moves up, opens its antennas, turns its body 30Β°, and takes a snapshot.<br>2. Image is evaluated by **MiniCPM-V-4.6** to describe the object.<br>3. Plays description via **ChatTTS** and wiggles its antennas in a cute interaction before returning to base. |
> [!TIP]
> **Voice-Activated Commands (Start Camp AI)**:
> When you click **Start Camp AI**, the system continuously monitors the microphone input. When any of the following English phrases are recognized, it triggers the corresponding script automatically:
> - `"what is this"` or `"what's this"` β‘οΈ **Species Identification (`look_that.py`)**
> - `"suggestion"` or `"suggestions"` β‘οΈ **Voice Dialogue (`ask.py`)**
> - `"guard mode"`, `"god mode"`, or `"grad mode"` β‘οΈ **Guardian Mode (`guard.py`)**
> - `"location"` β‘οΈ **Location Report (`location.py`)**
|