Key features of GMR:
- Real-time high-quality retargeting, unlock the potential of real-time whole-body teleoperation, i.e., TWIST.
- Carefully tuned for good performance of RL tracking policies.
- Support multiple humanoid robots and multiple human motion data formats (See our table below).
NOTE: If you want this repo to support a new robot or a new human motion data format, send the robot files (.xml, .urdf, and meshes) / human motion data to Yanjie Ze or create an issue, we will support it as soon as possible.
This repo is licensed under the MIT License.
- 2025-08-06: GMR now supports HighTorque Hi, the 6th humanoid robot in the repo.
- 2025-08-04: Initial release of GMR. Check our twitter post.
Demo 1: Retargeting LAFAN1 dancing motion to 5 different robots (Unitree G1, Booster T1, Stanford ToddlerBot, Fourier N1, and ENGINEAI PM01):
GMR.mp4
Demo 2: Screen recording of my one command line usage.
GMR_screen_record.mp4
| Robot/Data Format | Robot DoF | SMPLX (AMASS, OMOMO) | BVH ( LAFAN1) | FBX ( OptiTrack) | More formats coming soon |
|---|---|---|---|---|---|
Unitree G1 unitree_g1 |
Leg (2*6) + Waist (3) + Arm (2*7) = 29 | ✅ | ✅ | ✅ | |
Booster T1 booster_t1 |
TBD | ✅ | ✅ | TBD | |
Stanford ToddlerBot stanford_toddy |
TBD | ✅ | ✅ | TBD | |
Fourier N1 fourier_n1 |
TBD | ✅ | ✅ | TBD | |
ENGINEAI PM01 engineai_pm01 |
TBD | ✅ | ✅ | TBD | |
HighTorque Hi hightorque_hi |
Head (2) + Arm (2*5) + Waist (1) + Leg (2*6) = 25 | ✅ | TBD | TBD | |
Kuavo S45 kuavo_s45 |
TBD | TBD | TBD | TBD | |
| More robots coming soon |
The code is tested on Ubuntu 22.04/20.04.
# create conda env
conda create -n gmr python=3.10 -y
conda activate gmr
# install GMR
pip install -e .
# NOTE: after install SMPLX, change `ext` in `smplx/body_models.py` from `npz` to `pkl` if you are using SMPL-X pkl files.
# to resolve some possible rendering issues
conda install -c conda-forge libstdcxx-ng -y[SMPLX body model] download SMPL-X body models to assets/body_models from SMPL-X and then structure as follows:
- assets/body_models/smplx/
-- SMPLX_NEUTRAL.pkl
-- SMPLX_FEMALE.pkl
-- SMPLX_MALE.pkl[AMASS motion data] download raw SMPL-X data to any folder you want from AMASS.
[OMOMO motion data] download raw OMOMO data to any folder you want from this google drive file. And process the data into the SMPL-X format using scripts/convert_omomo_to_smplx.py.
[LAFAN1 motion data] download raw LAFAN1 bvh files from the official repo, i.e., lafan1.zip.
To better use this library, you can first have an understanding of the human motion data we use and the robot motion data we obtain.
Each frame of human motion data is formulated as a dict of (human_body_name, 3d global translation + global rotation).
Each frame of robot motion data can be understood as a tuple of (robot_base_translation, robot_base_rotation, robot_joint_positions).
NOTE: after install SMPL-X, change ext in smplx/body_models.py from npz to pkl if you are using SMPL-X pkl files.
Retarget a single motion:
# single motion
python scripts/smplx_to_robot.py --smplx_file <path_to_smplx_data> --robot <path_to_robot_data> --save_path <path_to_save_robot_data.pkl> --rate_limitBy default you should see the visualization of the retargeted robot motion in a mujoco window.
If you want to record video, add --record_video and --video_path <your_video_path,mp4>.
--rate_limitis used to limit the rate of the retargeted robot motion to keep the same as the human motion. If you want it as fast as possible, remove--rate_limit.
Retarget a folder of motions:
python scripts/smplx_to_robot_dataset.py --src_folder <path_to_dir_of_smplx_data> --tgt_folder <path_to_dir_to_save_robot_data> --robot <robot_name>By default there is no visualization for batch retargeting.
Retarget a single motion:
# single motion
python scripts/bvh_to_robot.py --bvh_file <path_to_bvh_data> --robot <path_to_robot_data> --save_path <path_to_save_robot_data.pkl> --rate_limitBy default you should see the visualization of the retargeted robot motion in a mujoco window.
--rate_limitis used to limit the rate of the retargeted robot motion to keep the same as the human motion. If you want it as fast as possible, remove--rate_limit.
Retarget a folder of motions:
python scripts/bvh_to_robot_dataset.py --src_folder <path_to_dir_of_bvh_data> --tgt_folder <path_to_dir_to_save_robot_data> --robot <robot_name>By default there is no visualization for batch retargeting.
We provide the script to use OptiTrack MoCap data for real-time streaming and retargeting.
Usually you will have two computers, one is the server that installed with Motive (Desktop APP for OptiTrack) and the other is the client that installed with GMR.
Find the server ip (the computer that installed with Motive) and client ip (your computer). Set the streaming as follows:
And then run:
python scripts/optitrack_to_robot.py --server_ip <server_ip> --client_ip <client_ip> --use_multicast False --robot unitree_g1You should see the visualization of the retargeted robot motion in a mujoco window.
python scripts/vis_robot_motion.py --robot <robot_name> --robot_motion_path <path_to_save_robot_data.pkl>If you want to record video, add --record_video and --video_path <your_video_path,mp4>.
| CPU | Retargeting Speed |
|---|---|
| AMD Ryzen Threadripper 7960X 24-Cores | 60~70 FPS |
| 13th Gen Intel Core i9-13900K 24-Cores | 35~45 FPS |
| TBD | TBD |
If you find our code useful, please consider citing our papers:
@article{ze2025twist,
title={TWIST: Teleoperated Whole-Body Imitation System},
author= {Yanjie Ze and Zixuan Chen and João Pedro Araújo and Zi-ang Cao and Xue Bin Peng and Jiajun Wu and C. Karen Liu},
year= {2025},
journal= {arXiv preprint arXiv:2505.02833}
}and this github repo:
@software{ze2025gmr,
title={GMR: General Motion Retargeting},
author= {Yanjie Ze and João Pedro Araújo and Jiajun Wu and C. Karen Liu},
year= {2025},
url= {https://github.com/YanjieZe/GMR},
note= {GitHub repository}
}Designing a single config for all different humans is not trivial. We observe some motions might have bad retargeting results. If you observe some bad results, please let us know! We now have a collection of such motions in TEST_MOTIONS.md.
Our IK solver is built upon mink and mujoco. Our visualization is built upon mujoco. The human motion data we try includes AMASS, OMOMO, and LAFAN1.
The original robot models can be found at the following locations:

