Package: loco-mujoco
LocoMuJoCoLocoMuJoCois animitation learning benchmarkspecifically targeted towardslocomotion. It encompasses a diverse set of environments, including quadrupeds, bipeds, and musculoskeletal human models, each accompanied by comprehensive datasets, such as real noisy motion capture data, ground truth expert data, and ground truth sub-optimal data,
enabling evaluation across a spectrum of difficulty levels.LocoMuJoCoalso allows you to specify your own reward function to use this benchmark forpure reinforcement learning! Checkout the example below!Key Advantages✅ Easy to use withGymnasiumorMushroom-RLinterface✅ Many environments including humanoids and quadrupeds✅ Diverse set of datasets --> e.g., noisy motion capture or ground truth datasets with actions✅ Wide spectrum spectrum of difficulty levels✅ Built-in domain randomization✅ Many baseline algorithms for quick benchmarkingInstallationYou have the choice to install the latest release via PyPI by runningpipinstallloco-mujocoor you do an editable installation by cloning this repository and then running:cdloco-mujoco
pipinstall-e.Download the DatasetsYou have the choice of downloading all datasets available or only the ones you need.To install all datasets run:loco-mujoco-downloadTo install only the real (motion capture, no actions) datasets run:loco-mujoco-download-realTo install only the perfect (ground-truth with actions) datasets run:loco-mujoco-download-perfectInstalling the BaselinesIf you also want to run the baselines, you have to install our imitation learning libraryimitation_lib. You find example files for training the baselines for any LocoMuJoCo taskhere.To verify that everything is installed correctly, run the examples such as:pythonexamples/simple_mushroom_env/example_unitree_a1.pyTo replay a dataset run:pythonexamples/replay_datasets/replay_Unitree.pyEnvironments & TasksYou want a quick overview of allenvironments,tasksanddatasetsavailable?Hereyou can find it.And stay tuned! There are many more to come ...ExamplesLocoMuJoCo is very easy to use. Just choose and create the environment, and generate the dataset belonging to this task and you are ready to go!importnumpyasnpimportloco_mujocoimportgymnasiumasgymenv=gym.make("LocoMujoco",env_name="HumanoidTorque.run")dataset=env.create_dataset()You want to use LocoMuJoCo for pure reinforcement learning? No problem! Just define your custom reward function and pass it to the environment!importnumpyasnpimportloco_mujocoimportgymnasiumasgymimportnumpyasnpdefmy_reward_function(state,action,next_state):return-np.mean(action)env=gym.make("LocoMujoco",env_name="HumanoidTorque.run",reward_type="custom",reward_params=dict(reward_callback=my_reward_function))LocoMuJoConativelysupportsMushroomRL:importnumpyasnpfromloco_mujocoimportLocoEnvenv=LocoEnv.make("HumanoidTorque.run")dataset=env.create_dataset()You can find many more exampleshereCitation@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}
}CreditsBoth Unitree models were taken from theMuJoCo menagerie