CoolFace
Apppublic

AlanaSky/g1_mujoco

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes
App README

Unitree G1 MuJoCo sim (headless) on a Docker Space

Runs the self-contained lerobot/unitree-g1-mujoco simulator headless, mirrors its geometry into a browser-based Meshcat viewer, and exposes the robot's ZMQ control surface. Built server-side by HF from this repo (no image push), the same way as lerobot/visualize_dataset.

The public Space URL shows the live 3D sim (a proxy on app_port serves the meshcat viewer). Control the robot over the Dev Mode SSH tunnel.

The robot behaves exactly like a physical G1, so the lerobot client command is identical — only robot_ip differs (127.0.0.1 through the SSH tunnel).

Control via SSH (Dev Mode)

Dev Mode SSH is free on Team/Enterprise orgs. Enable it, then forward the ports:

bash
# 1. add your SSH key: https://huggingface.co/settings/keys
# 2. enable Dev Mode:
hf spaces dev-mode <org>/<space>
# 3. SSH with the ZMQ ports forwarded:
ssh <org>-<space>@ssh.hf.space \
  -L 6000:localhost:6000 -L 6001:localhost:6001 \
  -L 6002:localhost:6002 -L 6003:localhost:6003

Then, on your laptop — same command as a real G1:

bash
lerobot-teleoperate --robot.type=unitree_g1 --robot.is_simulation=false \
  --robot.robot_ip=127.0.0.1 --robot.controller=GrootLocomotionController \
  --teleop.type=unitree_g1
# viewer: just open the public Space URL in a browser

Ports

6000 lowcmd · 6001 lowstate · 6002 gripper ({"L":0/1,"R":0/1}) · 6003 sim control · 7000 meshcat (internal; proxied to the public app_port).

Source: docker/space/ in the lerobot repo.