Skip to content

feat: Native LeRobot integration via make_env() + DDS #83

Description

@MiaoDX

Context

Sub-issue of #74. This is the "final form" — using LeRobot's official make_env() factory with full DDS communication, replacing our standalone LeRobotG1Env.

Current state (SDK-free path, working)

# Our current approach: load model directly, bypass DDS
env = LeRobotG1Env(model_path=xml_path, num_motors=29)
ctrl = GrootLocomotionController()  # our ONNX wrapper

Target state (native LeRobot)

# Official LeRobot approach: full digital twin via DDS
from lerobot.envs.factory import make_env
env = make_env("lerobot/unitree-g1-mujoco", trust_remote_code=True)
# LeRobot's own controller handles locomotion via DDS internally

Blockers

  • SDK compatibility resolved (see sub-issue: unitree_sdk2_python_uv)
  • cyclonedds installs on Python 3.12+ (LeRobot requires >=3.12)
  • Verify make_env() returns an env with render_camera() or only render()

Tasks

  • Create examples/lerobot_g1_native.py using make_env()
  • Wrap with RobotHarnessWrapper — validate Gymnasium API compatibility
  • Document full setup (conda env, SDK install, Python version)
  • Test in CI (at least one Python version)
  • Compare with SDK-free approach: rendering quality, camera support, control fidelity

When to do this

After the SDK fork (#81) is stable and tested. The SDK-free path (#78, #79, #80) is sufficient for now.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions