Transform your Unitree GO2 into an intelligent AI companion with real-time WebRTC control, computer vision, and conversational AI.
Princess Peach is not just a robot controller - it's a complete AI companion system that brings your Unitree GO2 to life with:
- ๐ญ AI Personality: Chat with Princess Peach using natural language
- ๐๏ธ Computer Vision: Real-time object detection and scene analysis
- ๐ค Voice Synthesis: Natural female voice with royal personality
- ๐ฎ Multi-Input Control: Touch, keyboard, Xbox controller, and mouse
- ๐ฑ Mobile Optimized: Works perfectly on phones and tablets
- ๐ Secure WebRTC: Direct peer-to-peer connection with your robot
# Clone and run in 3 commands
git clone https://github.com/tfoldi/go2-webrtc.git
cd go2-webrtc/javascript
python3 server.py
# Open http://your-pi-ip:8000- Touch Controls: Mobile-optimized directional pad and action buttons
- Keyboard: WASD movement + QE rotation
- Xbox Controller: LB + analog sticks for precise control
- Smart Mouse: Wheel/click controls with safety zones
- Emergency Stop: Double-click anywhere for immediate halt
- Object Detection: Real-time recognition of 80+ object types
- Text Recognition: OCR for reading signs and text
- Scene Analysis: GPT-4 Vision for intelligent environment understanding
- Princess Peach AI: Conversational companion with royal personality
- LIDAR Mapping: Real-time 3D point cloud visualization
- 36 Robot Commands: From basic moves to complex acrobatics
- Natural Conversation: Chat with Princess Peach via text
- Voice Responses: High-quality female voice synthesis
- Trick Performance: AI automatically performs requested actions
- Personality: Elegant, charming, and playful royal character
- WebRTC: Low-latency real-time video and control
- Responsive Design: Works on any screen size
- Smart UI: Glassmorphism design with intuitive controls
- Safety Features: Multiple failsafes and emergency stops
- Cross-Platform: Runs on any modern browser
You: "Hello Princess Peach!"
Peach: "Oh my! Hello there, your majesty! How delightful to see you!"
*waves gracefully*
You: "Can you dance for me?"
Peach: "Of course! I shall perform my royal dance just for you!"
*performs elegant dance routine*
You: *clicks Vision button*
Peach: "I observe a lovely living room with a comfortable sofa,
a coffee table with books, and beautiful natural lighting
streaming through the windows. How delightful!"
You: "What do you see now?"
Peach: "I can see a person sitting at a desk with a computer.
There are also some plants nearby - how lovely!"
- Unitree GO2 (Air, Pro, or Edu)
- Raspberry Pi 4 (2GB+ RAM)
- Same Network (Pi and robot)
# On Raspberry Pi
git clone https://github.com/tfoldi/go2-webrtc.git
cd go2-webrtc
pip3 install -r python/requirements.txt
cd javascript
python3 server.py# Open browser to:
http://your-raspberry-pi-ip:8000
# Configure in settings:
- Robot IP: 192.168.1.xxx
- OpenAI API Key: sk-... (optional)
- Connect: Click "Connect to Robot"
- Control: Use touch, keyboard, or controller
- Chat: Type messages to Princess Peach
- Vision: Click ๐๏ธ for AI scene analysis
- LIDAR: Click ๐บ๏ธ for 3D mapping visualization
- ๐ Complete Setup Guide - Detailed installation and configuration
- ๐ฎ Features Guide - All capabilities and use cases
- ๐ง API Reference - Python backend documentation
- ๐จ Troubleshooting - Common issues and solutions
- Interactive pet that responds to voice and gestures
- Security monitoring with AI scene analysis
- Entertainment with dances, tricks, and conversations
- Educational tool for learning robotics and AI
- WebRTC application development
- Computer vision experimentation
- AI integration testing
- Custom command development
- STEM learning with hands-on robotics
- AI and machine learning demonstrations
- Programming and software development
- Human-robot interaction research
| Method | Description | Best For |
|---|---|---|
| ๐ฑ Touch | Mobile-optimized directional pad | Phones, tablets |
| โจ๏ธ Keyboard | WASD + QE controls | Desktop, laptop |
| ๐ฎ Xbox Controller | LB + analog sticks | Gaming, precision |
| ๐ฑ๏ธ Mouse | Wheel + click controls | Desktop (optional) |
| Feature | Technology | Description |
|---|---|---|
| ๐๏ธ Object Detection | TensorFlow.js | Real-time recognition of 80+ objects |
| ๐ Text Recognition | Tesseract.js | OCR for reading signs and text |
| ๐ง Scene Analysis | GPT-4 Vision | Intelligent environment understanding |
| ๐ฌ Conversation | GPT-4o | Natural language chat with Princess Peach |
| ๐ค Voice Synthesis | Web Speech API | High-quality female voice responses |
- Stand - Basic standing position
- Sit - Sitting position
- Hello - Greeting wave
- Bow - Royal curtsy
- Dance - Elegant dance routine
- Stretch - Graceful stretching
- Acrobatics: Flips, jumps, somersaults
- Social: Handshakes, heart gestures
- Playful: Tail wagging, head movements
- Custom: 36 total commands available
See FEATURES.md for complete command list
go2-webrtc/
โโโ javascript/ # Web interface (Princess Peach UI)
โ โโโ index.html # Main application
โ โโโ index.js # Core functionality
โ โโโ go2webrtc.js # WebRTC connection
โ โโโ constants.js # Robot commands
โ โโโ server.py # WebRTC signaling server
โโโ python/ # Backend API
โ โโโ go2_webrtc/ # Python package
โโโ docs/ # Documentation
We welcome contributions! Here's how you can help:
- ๐ Bug Reports: Found an issue? Create a GitHub issue
- ๐ก Feature Requests: Have an idea? Let us know!
- ๐ง Code Contributions: Submit pull requests
- ๐ Documentation: Help improve our guides
- ๐จ UI/UX: Design improvements welcome
git clone https://github.com/your-username/go2-webrtc.git
cd go2-webrtc
# Make your changes
# Test thoroughly
# Submit pull request- go2_webrtc_connect by @legion1581 - Alternative Python API with additional features
- Unitree SDK - Official Unitree development resources
- Unitree Robotics - For creating amazing robots
- @legion1581 - For the original
go2_webrtc_connectinspiration - OpenAI - For GPT-4 Vision API
- TensorFlow.js - For browser-based AI
- WebRTC Community - For real-time communication standards
This project is licensed under the BSD 2-Clause License - see the LICENSE file for details.
- ๐ค Voice Commands: Speech-to-text control
- ๐บ๏ธ Autonomous Navigation: AI-powered pathfinding
- ๐ Home Integration: IoT device control
- ๐ฑ Mobile App: Native mobile application
- ๐ค Multi-Robot: Control multiple GO2 units
Ready to meet Princess Peach? Get Started Now! ๐๐คโจ