🇨🇳 中文 | 🌎 English
A multi-policy robot deployment framework based on state-switching mechanism for Unitree G1 robot (29-DoF), with enhanced GAE_Mimic motion tracking capabilities.
This repository is an enhanced version based on the excellent work from ccrpRepo/RoboMimic_Deploy.
We sincerely thank the original authors for their outstanding contribution to the robotics community. Their work has provided a solid foundation for multi-policy deployment on humanoid robots.
Original Repository: https://github.com/ccrpRepo/RoboMimic_Deploy
We have integrated GAE_Mimic (Generalized Action Encoding Mimic), a state-of-the-art motion tracking and imitation learning policy, into this deployment framework.
- Motion Retargeting: Advanced motion tracking from reference trajectories
- Generalized Encoding: Robust motion representation using quaternion-based transformations
- Real-time Execution: ONNX model inference for efficient deployment
- Multi-motion Support: Compatible with various motion datasets (LAFAN1, etc.)
Before running GAE_Mimic, you need to manually place the following files:
ONNX Model:
- Location:
policy/gae_mimic/model/ - Default filename:
policy.onnx
Motion Data:
- Location:
policy/gae_mimic/motion/lafan1/ - Default filename:
walk1_subject2.npz - Required data format:
joint_pos: (num_frames, num_joints)joint_vel: (num_frames, num_joints)body_pos_w: (num_frames, num_bodies, 3)body_quat_w: (num_frames, num_bodies, 4)body_lin_vel_w: (num_frames, num_bodies, 3)body_ang_vel_w: (num_frames, num_bodies, 3)
In MuJoCo Simulation:
python deploy_mujoco/deploy_mujoco.py
# Press B + L1 on Xbox controllerKeyboard Control (No Joystick):
python deploy_mujoco/deploy_mujoco_keyboard_input.py
# Type command: b+l1On Real Robot:
python deploy_real/deploy_real.py
# Press B + L1 on controller| Command | Function | Description |
|---|---|---|
l3 |
Passive mode | Damping protection |
start |
Position reset | Reset to default pose |
a+r1 |
Locomotion mode | Walking mode |
x+r1 |
Skill 1 | Dance |
y+r1 |
Skill 2 | KungFu |
b+r1 |
Skill 3 | Kick |
y+l1 |
Skill 4 | BeyondMimic |
b+l1 |
Skill GAE | GAE_Mimic ⭐ |
vel x y z |
Set velocity | e.g., vel 0.5 0 0.2 |
exit |
Exit program | Quit simulation |
For detailed installation, configuration, and usage instructions, please refer to:
- English Tutorial - Complete setup and operation guide
- 中文教程 - 完整安装和使用指南
- GAE_Mimic Migration Notes - Technical details of GAE_Mimic integration
RoboMimic_Deploy/
├── policy/
│ ├── passive/ # Passive damping mode
│ ├── fixedpose/ # Fixed position reset
│ ├── loco_mode/ # Locomotion policy
│ ├── dance/ # Charleston dance
│ ├── kungfu/ # Martial arts motion
│ ├── kungfu2/ # Alternative kungfu
│ ├── kick/ # Kick motion
│ ├── beyond_mimic/ # BeyondMimic tracking
│ └── gae_mimic/ # ⭐ GAE_Mimic tracking (NEW)
│ ├── config/ # Configuration files
│ ├── model/ # ONNX models (user-provided)
│ └── motion/ # Motion data (user-provided)
├── FSM/ # Finite State Machine controller
├── deploy_mujoco/ # MuJoCo simulation deployment
├── deploy_real/ # Real robot deployment
└── common/ # Shared utilities
| Policy Name | Description | Status |
|---|---|---|
| PassiveMode | Damping protection mode | ✅ Stable |
| FixedPose | Position control reset | ✅ Stable |
| LocoMode | Stable walking | ✅ Stable |
| Dance | Charleston dance | ✅ Verified on real robot |
| KungFu | Martial arts | |
| KungFu2 | Alternative kungfu | |
| Kick | Kick motion | |
| BeyondMimic | Motion tracking | |
| GAE_Mimic | Advanced motion tracking | ⭐ NEW |
- This framework is designed for Unitree G1 robots with 3-DOF waist
- If waist fixing bracket is installed, unlock it following official instructions
- Remove hands to avoid collision during dance movements
- ALWAYS test in simulation (Sim2Sim) thoroughly before real robot deployment
- Ensure proper safety measures are in place (emergency stop, safety harness, clear workspace)
- This code comes with NO SAFETY GUARANTEES - use at your own risk
- The developers assume no liability for any damage or injury resulting from the use of this software
- Test in simulation first before deploying on real robot
- Press
F1orSelectfor emergency stop (Passive Mode) - Charleston Dance (R1+X) is the most stable policy for real robot
- Other motions are recommended for simulation only
- Not compatible with Orin NX platform directly (use unitree_sdk2 + ROS instead)
- Mimic policies may not guarantee 100% success on complex terrains
- Manual stabilization may be needed at dance start/end
# Create virtual environment
conda create -n robomimic python=3.8
conda activate robomimic
# Install PyTorch
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=12.1 -c pytorch -c nvidia
# Clone repository
git clone https://github.com/YOUR_USERNAME/RoboMimic_Deploy.git
cd RoboMimic_Deploy
# Install dependencies
pip install numpy==1.20.0
pip install onnx onnxruntime
# Install Unitree SDK
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
cd unitree_sdk2_python
pip install -e .For detailed instructions, see TUTORIAL.md.
This project maintains the same license as the original repository.
We welcome contributions! If you find issues or want to add new features, please:
- Fork the repository
- Create your feature branch
- Submit a pull request
For questions or support regarding:
- Original framework: Refer to ccrpRepo/RoboMimic_Deploy
- GAE_Mimic enhancement: Open an issue in this repository