Spaces:
Running
Running
metadata
title: Reachy Mini Basic Example
emoji: π
colorFrom: green
colorTo: green
sdk: static
tags:
- reachy_mini
- reachy_mini_js_app
license: apache-2.0
short_description: Basic standalone HTML example for Reachy Mini
pinned: false
Basic Example
A simple, standalone single-file HTML example demonstrating core Reachy Mini functionality.
No npm install required! Uses the published package directly from CDN (unpkg).
Quick Start
Download
index.html(just this one file!)Start a local server (required for ES modules):
# Using Python python3 -m http.server 8080 # Or using npx npx http-server -p 8080 # Or using npm start npm startOpen in browser:
http://localhost:8080/index.htmlConnect your robot:
- Ensure Reachy Mini is connected via USB, OR
- Start the WebSocket server on
ws://localhost:8000
Click "Connect to Robot" and start controlling!
How It Works
The example loads reachy-mini directly from unpkg CDN:
import init, { ... } from 'https://unpkg.com/reachy-mini@0.5.2/index.js';
No build tools, no npm install, just one HTML file!
What This Example Shows
- β Connecting to Reachy Mini (WebSerial or WebSocket)
- β Enabling/disabling motor torque
- β Forward kinematics (joint angles β pose)
- β Inverse kinematics (pose β joint angles)
- β Recording and replaying movements
- β Real-time console output
Browser Requirements
- Chrome 89+ or Edge 89+ (for WebSerial support)
- Must be served over HTTP/HTTPS (file:// won't work due to ES modules)
Troubleshooting
"Failed to resolve module specifier"
- Make sure you ran
npm installfrom the project root - Verify you're accessing via a web server (not file://)
"WebSerial not available"
- Use Chrome or Edge browser
- Check that you're on HTTPS or localhost
"Connection failed"
- Check USB connection
- Try unplugging/replugging the adapter
- If using WebSocket, ensure server is running on port 8000
Next Steps
Check out the other examples:
examples/simple-test/- Full-featured control interfaceexamples/blockly/- Visual programming interface