Context
LeRobot's Unitree G1 MuJoCo environment uses a digital twin architecture — even in pure simulation, it communicates via DDS (Data Distribution Service) through unitree_sdk2py. This is by design: controllers written for the real robot work identically in sim.
In #65 we validated the wrapper with a simplified model. The sibling issue covers loading the real 29-DOF model without SDK. This issue tracks full, native LeRobot integration.
The challenge: SDK dependency chain
lerobot/unitree-g1-mujoco (HuggingFace repo)
└── unitree_sdk2py >= 1.0.0
└── cyclonedds == 0.10.2 ← hard-pinned, binary wheel availability varies
Key constraints discovered in #65 investigation:
unitree_sdk2py claims python_requires='>=3.8', but cyclonedds==0.10.2 may lack wheels for newer Python versions
- LeRobot main repo requires
python >= 3.12, yet commented out the SDK from [unitree_g1] extras: # "unitree-sdk2==1.0.1"
- LeRobot main code (
src/lerobot/robots/unitree_g1/unitree_g1.py) already has conditional imports for the SDK, but the HuggingFace sim repo does unconditional module-level imports throughout simulator_factory.py, base_sim.py, unitree_sdk2py_bridge.py
- The sim uses DDS on loopback (
INTERFACE: "lo") — ChannelFactoryInitialize(DOMAIN_ID, "lo") — even in pure simulation
Proposal
Full integration with the native LeRobot G1 environment:
- Use
lerobot.envs.factory.make_env() to create the env the official way:
from lerobot.envs.factory import make_env
env = make_env("lerobot/unitree-g1-mujoco", trust_remote_code=True)
- Wrap with
RobotHarnessWrapper — the returned UnitreeG1Env inherits from gym.Env
- Document the full dependency setup (conda env, SDK install, Python version)
- Handle the SDK availability gracefully in the example
Known blockers to investigate
Acceptance criteria
Relationship to other issues
Context
LeRobot's Unitree G1 MuJoCo environment uses a digital twin architecture — even in pure simulation, it communicates via DDS (Data Distribution Service) through
unitree_sdk2py. This is by design: controllers written for the real robot work identically in sim.In #65 we validated the wrapper with a simplified model. The sibling issue covers loading the real 29-DOF model without SDK. This issue tracks full, native LeRobot integration.
The challenge: SDK dependency chain
Key constraints discovered in #65 investigation:
unitree_sdk2pyclaimspython_requires='>=3.8', butcyclonedds==0.10.2may lack wheels for newer Python versionspython >= 3.12, yet commented out the SDK from[unitree_g1]extras:# "unitree-sdk2==1.0.1"src/lerobot/robots/unitree_g1/unitree_g1.py) already has conditional imports for the SDK, but the HuggingFace sim repo does unconditional module-level imports throughoutsimulator_factory.py,base_sim.py,unitree_sdk2py_bridge.pyINTERFACE: "lo") —ChannelFactoryInitialize(DOMAIN_ID, "lo")— even in pure simulationProposal
Full integration with the native LeRobot G1 environment:
lerobot.envs.factory.make_env()to create the env the official way:RobotHarnessWrapper— the returnedUnitreeG1Envinherits fromgym.EnvKnown blockers to investigate
cyclonedds==0.10.2install on Python 3.11/3.12/3.13? (Our CI tests 3.10-3.13)make_env()return an env withrender_camera()or onlyrender()?Acceptance criteria
examples/lerobot_g1_native.pyusingmake_env()from LeRobotRelationship to other issues
lerobot/unitree-g1-mujoco(conditional SDK imports)