A browser-based control interface for the Unitree Go2 robot dog, communicating over WebRTC. Built with TypeScript, Three.js, and Vite.
- Real-time 3D visualization — Go2 model with live joint angles, lidar spinning animation, and voxel point cloud (SLAM)
- Camera feed — Live video with PIP view swap (camera/voxel)
- Dual joystick control — Move and rotate the robot
- Action bar — Roll over, stretch, shake hand, dance, flips, and more (customizable carousel)
- Mode switching — Damping, free walk, sit, crouch, run, walk stair, hand stand, bound, cross step, etc.
- Robot status — Battery, motor data (temp, position, torque, lost packets), IMU, LiDAR state, network info
- Service manager — View all running services, start/stop with protection handling
- Connection modes:
- Local Network (STA-L) — Direct connection via IP on same network
- Access Point (AP) — Direct connection at 192.168.12.1
- Remote — Cloud connection via Unitree account (email/password or token)
- Network scanner — UDP multicast auto-discovery of robots on the network
- Firmware info — Package version fetched via bashrunner
- Node.js >= 18
- npm >= 9
- Unitree Go2 robot (firmware v1.1.x+)
git clone https://github.com/legion1581/unitree_go2_ui.git
cd unitree_go2_ui
npm installnpm run devOpen http://localhost:5173 in Chrome (recommended).
The dev server includes:
- Hot module replacement
- Built-in UDP multicast scanner (no separate process needed)
- Proxy for robot API and Unitree cloud API (avoids CORS)
npm run build
npm run preview- Connect your computer to the same network as the Go2
- Select Local Network mode
- Click Scan to auto-discover the robot, or enter the IP manually
- Click Connect
- Connect to the Go2's WiFi hotspot
- Select Access Point mode (IP is auto-filled to 192.168.12.1)
- Click Connect
- Select Remote mode
- Enter the robot's serial number
- Either enter your Unitree account email/password, or paste an access token
- Click Connect
| Connection | Hub | Status | Services |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Browser | Status |
|---|---|
| Chrome | Tested, fully working |
| Firefox | Experimental (WebRTC data channel timing differences) |
| Safari | Not tested |
src/
connection/ # WebRTC, local/remote connectors, network scanner
crypto/ # AES-ECB, RSA, AES-GCM for auth and SDP exchange
protocol/ # Data channel handler, topics, sport commands
ui/
components/ # Action bar, PIP camera, status/services pages, nav bar
scene/ # Three.js scene, robot model, voxel map
proxy-plugin.ts # Vite plugin: robot proxy, scanner, cloud API proxy
public/
icons/ # Action and mode SVG icons
sprites/ # UI sprites and backgrounds
models/ # Go2.glb 3D model
server/
scanner.mjs # Standalone UDP multicast scanner (optional)
Actions and modes use the MCF sport API IDs matching firmware v1.1.11:
| Action | ID | Mode | ID |
|---|---|---|---|
| Roll Over | 1021 | Damping | 1001 |
| Stretch | 1017 | Free Walk | 2045 |
| Shake Hand | 1016 | Sit Down | 1009 |
| Heart | 1036 | Crouch | 1005 |
| Pounce | 1032 | Run | 1011 |
| Jump Forward | 1031 | Walk Stair | 1049 |
| Greet | 1029 | Lock On | 1004 |
| Dance 1 | 1022 | Static Walk | 1061 |
| Dance 2 | 1023 | Endurance | 1035 |
| Front Flip | 1030 | Leash | 2056 |
| Back Flip | 2043 | Hand Stand | 2044 |
| Left Flip | 2041 | Free Avoid | 2048 |
| Bound | 2046 | ||
| Jump | 2047 | ||
| Stand | 1006 | ||
| Cross Step | 2051 |
MIT




