legion1581/unitree_webrtc_connect

Unitree Go2 / G1 / R1 WebRTC driver

What it solves

Unitree WebRTC Connect provides a Python WebRTC driver for Unitree robots (Go2, G1, and R1) to enable high-level control and streaming without needing a robot firmware modification or jailbreak.

How it works

It connects to the robot via WebRTC using local access points, local networks, or remote cloud connections through Unitree's servers. Newer firmware variants requiring per-device AES-128 keys are supported via bundled tools and automated cloud lookup helpers.

Who it’s for

Developers and roboticists who want to programmatically control Unitree Go2, G1, or R1 robots using Python for tasks like movement, state subscription, video/audio streaming, and sensor data collection.

Highlights

  • Supports multiple connection modes: local AP, local STA network, and remote cloud via TURN server.
  • Handles data channels for pub/sub and RPC, sport/arm-action control, and FSM states.
  • Allows receiving video streams, sending/receiving audio, and decoding LiDAR point clouds (depending on the robot model).
  • Includes a built-in CLI and Python helpers to fetch per-device AES-128 keys for newer firmware versions.
  • Provides typed exceptions for common errors like rejected keys, busy robots, or connection timeouts.

Related

  • Project
  • Project
  • Project
  • Project
  • Project