Skip to content

amznhacker/go2-webrtc

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– GO2 WebRTC - Princess Peach AI Robot Controller

Transform your Unitree GO2 into an intelligent AI companion with real-time WebRTC control, computer vision, and conversational AI.

Version License Platform

โœจ What Makes This Special

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

๐Ÿš€ Quick Demo

# 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

๐ŸŽฏ Core Features

๐ŸŽฎ Advanced Control Systems

  • 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

๐Ÿค– AI & Computer Vision

  • 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

๐ŸŽญ Interactive Companion

  • 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

๐Ÿ› ๏ธ Technical Excellence

  • 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

๐ŸŽช What Can Princess Peach Do?

Basic Interactions

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*

Advanced AI Features

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!"

๐Ÿš€ Quick Start

1. Hardware Setup

  • Unitree GO2 (Air, Pro, or Edu)
  • Raspberry Pi 4 (2GB+ RAM)
  • Same Network (Pi and robot)

2. Software Installation

# 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

3. Web Interface

# Open browser to:
http://your-raspberry-pi-ip:8000

# Configure in settings:
- Robot IP: 192.168.1.xxx
- OpenAI API Key: sk-... (optional)

4. Start Playing!

  • 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

๐Ÿ“š Documentation

๐ŸŽฏ Use Cases

๐Ÿ  Home Companion

  • 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

๐Ÿ”ฌ Development Platform

  • WebRTC application development
  • Computer vision experimentation
  • AI integration testing
  • Custom command development

๐ŸŽ“ Educational

  • STEM learning with hands-on robotics
  • AI and machine learning demonstrations
  • Programming and software development
  • Human-robot interaction research

๐ŸŽฎ Control Methods

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)

๐Ÿค– AI Capabilities

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

๐ŸŽญ Princess Peach Commands

Popular Commands

  • Stand - Basic standing position
  • Sit - Sitting position
  • Hello - Greeting wave
  • Bow - Royal curtsy
  • Dance - Elegant dance routine
  • Stretch - Graceful stretching

Advanced Tricks

  • 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

๐Ÿ› ๏ธ Technical Architecture

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

๐Ÿค Contributing

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

Development Setup

git clone https://github.com/your-username/go2-webrtc.git
cd go2-webrtc
# Make your changes
# Test thoroughly
# Submit pull request

๐Ÿ”— Related Projects

๐ŸŒŸ Acknowledgments

  • Unitree Robotics - For creating amazing robots
  • @legion1581 - For the original go2_webrtc_connect inspiration
  • OpenAI - For GPT-4 Vision API
  • TensorFlow.js - For browser-based AI
  • WebRTC Community - For real-time communication standards

๐Ÿ“„ License

This project is licensed under the BSD 2-Clause License - see the LICENSE file for details.

๐Ÿš€ What's Next?

  • ๐ŸŽค 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! ๐Ÿ‘‘๐Ÿค–โœจ

About

WebRTC API for Unitree GO2 Robots

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 35.6%
  • HTML 33.3%
  • JavaScript 30.6%
  • Shell 0.5%