Skip to main content
AI tutorials

Train and Replay Humanoid Motion Trackers with SuperMimic

This tutorial shows how to install SuperMimic alongside mjlab_research, select a coordinate representation, train a world model and policy on a chosen GPU, and replay a trained run using its Weights & Biases path.

Train and Replay Humanoid Motion Trackers with SuperMimic

What Is SuperMimic?

SuperMimic is a research project for training a humanoid whole-body motion tracker with a single differentiable world model. It is built on mjlab and provides training tasks for two different coordinate representations.

You can find additional project information on the SuperMimic project page and in the research paper.

Key Features

  • Whole-body humanoid tracking: The project trains a policy for humanoid motion tracking.
  • Differentiable world model: Training uses one differentiable world model together with the policy.
  • Two task representations: SuperMimic supports generalized-coordinate and maximal-coordinate tasks for G1.
  • Training and playback scripts: Separate commands are provided for starting training and replaying a trained model.
  • GPU selection: Training can be assigned to a specific GPU through CUDA_VISIBLE_DEVICES.

Install SuperMimic

1. Install uv

SuperMimic uses uv to run its scripts. Install it with the command provided in the project README:

curl -LsSf https://astral.sh/uv/install.sh | sh

2. Create a workspace

The SuperMimic and mjlab_research repositories must be cloned as sibling directories. Create a shared workspace, enter it, and clone both repositories:

mkdir supermimic_ws && cd supermimic_ws
git clone git@github.com:HybridRobotics/supermimic.git
git clone git@github.com:HybridRobotics/mjlab_research.git
cd supermimic

The resulting layout places supermimic and mjlab_research at the same directory level. Run the remaining commands from inside the supermimic directory.

Choose a Training Task

SuperMimic exposes two task IDs:

  • SuperMimic-GenCoord-G1 uses a generalized coordinates representation.
  • SuperMimic-MaxCoord-G1 uses a maximal coordinates representation.

Use the exact task ID in both the training and playback commands. Choose the representation that matches the experiment you want to run.

Train a World Model and Policy

The training script accepts a task ID and a descriptive run name. It can be launched on a selected GPU with the following template:

CUDA_VISIBLE_DEVICES=<GPU_ID> uv run src/supermimic/scripts/train.py \
  <TASK_ID> --runner.run_name <description>

Replace <GPU_ID> with the GPU index, <TASK_ID> with one of the supported task IDs, and <description> with a meaningful name for the run.

For example, the following command selects GPU 0 and starts the generalized-coordinate task:

CUDA_VISIBLE_DEVICES=0 uv run src/supermimic/scripts/train.py \
  SuperMimic-GenCoord-G1 --runner.run_name g1_generalized_coordinates

To train with the maximal-coordinate representation instead, change the task ID:

CUDA_VISIBLE_DEVICES=0 uv run src/supermimic/scripts/train.py \
  SuperMimic-MaxCoord-G1 --runner.run_name g1_maximal_coordinates

Play Back a Trained Model

Use the playback script with the original task ID and the Weights & Biases run path for the trained model:

uv run src/supermimic/scripts/play.py \
  <TASK_ID> --wandb-path <RUN_PATH>

For a generalized-coordinate run, the command has this form:

uv run src/supermimic/scripts/play.py \
  SuperMimic-GenCoord-G1 --wandb-path <RUN_PATH>

Replace <RUN_PATH> with the applicable run path. Keep the playback task ID consistent with the representation used during training.

Advanced Workflow Tips

Keep the repositories as siblings

Preserve the workspace structure shown in the setup instructions. Do not place mjlab_research inside the supermimic repository or vice versa.

Use descriptive run names

The --runner.run_name value should identify the experiment clearly. Including the coordinate representation in the name makes generalized-coordinate and maximal-coordinate runs easier to distinguish.

Select the GPU explicitly

On a multi-GPU machine, set CUDA_VISIBLE_DEVICES before the training command to choose the desired GPU. For example, use CUDA_VISIBLE_DEVICES=1 to expose GPU 1 to the process.

Match task IDs during playback

When replaying a model, use the same coordinate-representation task ID that was used to train it. This keeps the playback command aligned with the original experiment.

Project Credits and License

SuperMimic contains code inspired by ControlVAE, robotic_world_model, and DreamerV3. Those projects use BSD-3-Clause, Apache-2.0, and MIT licenses, respectively.

SuperMimic is released under the Apache License 2.0. Copyright 2026 The SuperMimic Authors.

Conclusion

SuperMimic provides a focused workflow for training and replaying a humanoid whole-body motion tracker using a differentiable world model. After installing uv and cloning the two required sibling repositories, choose a coordinate representation, launch training on the appropriate GPU, and use the resulting Weights & Biases run path for playback.