Skip to content

Software

LocoMuJoCo

From github.com/robfiras/loco-mujoco (opens in a new tab)

  • Humanoids and robot learning
  • Library
  • MIT

An imitation learning benchmark for whole-body control, with humanoid, quadruped and musculoskeletal human environments built on MuJoCo and JAX, plus datasets of motion capture data.

Facts

GitHub stars
1,504read on 28 Nov 2026
Last update
26 Nov 2026Newest commit on master
Maintenance
Activea commit in the last 90 days
Difficulty
Intermediate

Checked on GitHub on 28 Nov 2026.

Licenses

Code
MIT (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (MIT) at commit 663605c (opens in a new tab), on 28 Nov 2026.

Commercial use
Yes

At a glance

What it is
  • Provides a single MuJoCo environment and parallel MJX/MJWarp environments for training.
  • Includes 12 humanoid and 4 quadruped environments, four of them biomechanical human models.
  • Offers clean single-file JAX implementations of PPO, GAIL, AMP and DeepMimic for benchmarking.
  • Ships over 22,000 motion capture datasets (AMASS, LAFAN1 and native) retargeted to each humanoid.
  • Supports retargeting datasets from one robot to another and comparing trajectories with DTW and discrete Fréchet distance.
  • Exposes a Gymnasium interface, built-in domain and terrain randomization, and modular reward and observation components.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
MIT. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's website (opens in a new tab)
Maintenance
Active, last commit on 26 Nov 2026.

Use it

How to install it, in the creator's words: The project's website (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit 663605c

Robotheca read the repository at two versions: the summary at 3921fed and the facts and the README at 663605c (read on 28 Nov 2026).

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by @robfiras, at commit 663605c, under MIT (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

Image: Documentation Status (opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab)

🚀 Latest News: A new release (v1.2) just dropped! 🎉
New: LocoMuJoCo now includes SuperMimic and supports real-robot deployment on the AgiBot X2 Ultra and the Unitree G1 through LocoMuJoCo Real (opens in a new tab).

LocoMuJoCo is an imitation learning benchmark specifically designed for whole-body control. It features a diverse set of environments, including quadrupeds, humanoids, and (musculo-)skeletal human models, each provided with comprehensive datasets. Although primarily focused on imitation learning, it also supports custom reward functions, making it suitable for pure reinforcement learning as well.

Picture: main_lmj.gif

Documentation (opens in a new tab) · Get started (opens in a new tab) · Environments (opens in a new tab) · Training (opens in a new tab) · Sim-to-real (opens in a new tab) · API (opens in a new tab)

Key Advantages

✅ Supports MuJoCo (single environment) and MJX/MJWarp (parallel environments)
✅ Includes 12 humanoid and 4 quadruped environments, featuring 3 biomechanical human models
✅ Clean single-file JAX algorithms for quick benchmarking (SuperMimic, PPO, GAIL, AMP, DeepMimic)
✅ Combined training and environment into one JIT‑compiled function for lightning‑fast training 🚀
✅ Motion capture datasets (AMASS, LAFAN1, native LocoMuJoCo) retargeted for each humanoid
✅ Robot-to-robot retargeting allows to retarget any existing dataset from one robot to another
✅ Powerful trajectory comparison metrics including dynamic time warping and discrete Fréchet distance, all in JAX
✅ Built-in domain and terrain randomization
✅ Real-robot deployment with LocoMuJoCo Real (opens in a new tab): deployable training setups for PPO and SuperMimic, and the tools to take a policy to the robot
✅ Modular design: define, swap, and reuse components like observation types, reward functions, terminal state handlers, and domain randomization
✅ Documentation (opens in a new tab)


Installation

LocoMuJoCo requires Python 3.10 or newer. We recommend a fresh environment, for example with conda:

conda create -n loco-mujoco python=3.11
conda activate loco-mujoco

Install the latest release from PyPI:

pip install loco-mujoco

Or, to run the examples, change the code or use the SMPL/AMASS extras, clone this repo and do an editable installation:

git clone https://github.com/robfiras/loco-mujoco.git
cd loco-mujoco
pip install -e .

By default, this installs the CPU version of JAX. To use JAX on the GPU:

pip install "jax[cuda12]<=0.10.1,!=0.10.0"

The robot models (about 200 MB) are downloaded automatically the first time you create an environment. The installation guide (opens in a new tab) covers the optional extras, offline use, the MyoSkeleton model and the AMASS setup (opens in a new tab).

Quick start

Replay motion capture data on a humanoid robot:

from loco_mujoco.task_factories import ImitationFactory, LAFAN1DatasetConf, DefaultDatasetConf

env, traj = ImitationFactory.make("UnitreeH1",
                                  default_dataset_conf=DefaultDatasetConf(["squat"]),
                                  lafan1_dataset_conf=LAFAN1DatasetConf(["dance2_subject4", "walk1_subject1"]))

env.play_trajectory(n_episodes=3, n_steps_per_episode=500, render=True)

Train a policy that tracks a motion with PPO and a DeepMimic-style reward on thousands of parallel MJX environments:

cd examples/training_examples/jax_rl_mimic
python experiment.py

Picture: unitree_h1_walk_anydir.gif

The getting-started guide (opens in a new tab) walks through these steps, and the tutorials folder (opens in a new tab) and the training examples folder (opens in a new tab) contain runnable scripts for every feature and algorithm.


Environments

LocoMuJoCo includes nine humanoid robots, three (musculo-)skeletal human models and four quadrupeds. The environment gallery (opens in a new tab) lists them with their observation and action spaces.

Picture: lmj_envs.gif


Real Robot Deployment

The AgiBot X2 Ultra running a tracking policy, on the robot and in simulation

LocoMuJoCo Real (opens in a new tab) is the companion repository for taking policies trained in LocoMuJoCo to a real robot. It currently covers the Unitree G1 and the AgiBot X2 Ultra and provides deployable training setups for PPO and SuperMimic and the tools to export, validate and run a policy on the robot. The video shows a SuperMimic tracking policy on the AgiBot X2 Ultra, on the robot and in simulation. The sim-to-real guide (opens in a new tab) explains the stages from training to the robot.


Contributing

Contributions are welcome. See CONTRIBUTING.md (opens in a new tab) for how to report issues, set up a development environment and open a pull request, and CHANGELOG.md (opens in a new tab) for the release history.

Citation

If you use LocoMuJoCo in your research, please cite the paper on the current version:

@article{alhafez2026locomujoco,
title={LocoMuJoCo: A Comprehensive Imitation Learning Benchmark for Whole-Body Control},
author={Firas Al-Hafez and Davide Tateo and Oleg Kaidanov and Aditya Bhatt and Artur Zelik and Zhengyi Luo and Jan Peters},
journal={arXiv preprint arXiv:2611.26293},
year={2026}
}

and the original paper, which describes version 0.1.0 (arXiv:2311.02496 (opens in a new tab)):

@inproceedings{alhafez2023b,
title={LocoMuJoCo: A Comprehensive Imitation Learning Benchmark for Locomotion},
author={Firas Al-Hafez and Guoping Zhao and Jan Peters and Davide Tateo},
booktitle={6th Robot Learning Workshop, NeurIPS},
year={2023}
}

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.