US Trends

how to import g1 1humanoid into mujoco

Here’s the practical way to import the Unitree G1 humanoid into MuJoCo: use an existing G1 MJCF model, then either open it directly in the MuJoCo viewer or adapt it into your own project structure. Public examples point to the official-style model in Google DeepMind’s MuJoCo menagerie and to Unitree- specific simulator repos that already include G1-ready scene files.

Fastest path

  1. Clone or download a G1 MuJoCo model package.
  2. Open the G1 XML/MJCF file in MuJoCo Viewer.
  3. Add a ground plane if the model falls through the scene.
  4. If you need control, connect it to the matching Unitree SDK / DDS setup or your own controller code.

What people are using

The most straightforward public G1 setup I found is the MuJoCo menagerie G1 model, which is specifically called out as “Unitree G1 in MuJoCo Menagerie”. Another route is the Unitree MuJoCo repo, where users switch the robot config to g1 and point the scene to the G1 XML scene file. There is also a newer simulator package on Hugging Face that loads the G1 model and starts MuJoCo with DDS communication on domain 0.

Minimal setup example

A common starting point is to load the G1 XML directly in the viewer, then add a simple ground geom if the robot drops due to missing support.

xml

<geom name="ground" type="box" size="2 2 0.1" pos="0 0 0" />

Then run the model with the MuJoCo viewer using the G1 XML file from the model folder.

If you want control

If your goal is not just viewing but actually commanding the robot, the Unitree-based examples show two common patterns: MuJoCo simulation plus DDS message exchange, or a custom controller that publishes low-level motor commands. One example notes that the G1 has 29 motors, so code written for other Unitree robots often needs motor-count and scene-path updates.

Common gotchas

  • The robot may fall immediately if the scene lacks a ground plane or joint limits are incomplete.
  • Some examples are built for specific SDK versions or DDS domains, so matching the repo’s environment matters.
  • G1 assets may come with separate hand or scene XML files, so make sure you load the top-level scene file, not just the robot body file.

Suggested route

If you just want G1 visible in MuJoCo, start with the menagerie model and open its XML directly. If you want simulation plus control, use the Unitree G1 MuJoCo repo or the DDS-based simulator package, because those include the glue code and scene configuration already wired up.

TL;DR: The easiest import path is to grab the G1 MuJoCo XML from the menagerie or a Unitree G1 simulator repo, open it in MuJoCo, add a ground plane if needed, then wire up control through the repo’s SDK/DDS setup.