🌎English | 🇨🇳中文
RoboMimic Deploy is a multi-policy robot deployment framework based on a state-switching mechanism. Currently, the included policies are designed for the Unitree G1 robot (29-DoF).
-
This deployment framework is only applicable to G1 robots with a 3-DOF waist. If a waist fixing bracket is installed, it must be unlocked according to the official tutorial before this framework can be used normally.
-
It is recommended to remove the hands, as dance movements may cause interference.
It is recommended to run training or deployment programs in a virtual environment. We suggest using Conda to create one.
Use the following command to create a virtual environment:
conda create -n robomimic python=3.8
conda activate robomimic
PyTorch is a neural network computation framework used for model training and inference. Install it with the following command:
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=12.1 -c pytorch -c nvidia
Clone the repository via git:
git clone https://github.com/ccrpRepo/RoboMimic_Deploy.git
Navigate to the directory and install:
cd RoboMimic_Deploy
pip install numpy==1.20.0
pip install onnx onnxruntime
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
cd unitree_sdk2_python
pip install -e .
python deploy_mujoco/deploy_mujoco.py
Mode Name | Description |
---|---|
PassiveMode | Damping protection mode |
FixedPose | Position control reset to default joint values |
LocoMode | Stable walking control mode |
Dance | Charleston dance routine |
KungFu | Martial arts movement |
KungFu2 | Failed martial arts training |
Kick | Bad mimic policy |
SkillCast | Lower body + waist stabilization with upper limbs positioned to specific joint angles (typically executed before Mimic strategy) |
SkillCooldown | Lower body + waist continuous balancing with upper limbs reset to default angles (typically executed after Mimic strategy) |
- Connect an Xbox controller.
- Run the simulation program:
python deploy_mujoco/deploy_mujoco.py
-
Press the Start button to enter position control mode.
-
Hold R1 + A to enter LocoMode, then press BACKSPACE in the simulation to make the robot stand. Afterward, use the joystick to control walking.
-
Hold R1 + X to enter Dance mode—the robot will perform the Charleston. In this mode:
- Press Select at any time to switch to damping protection mode.
- Hold R1 + A to return to walking mode (not recommended).
- Press Start to return to position control mode.
-
The terminal will display a progress bar for the dance. After completion, press R1 + A to return to normal walking mode.
-
In LocoMode, pressing R1 + Y triggers a Martial arts movement — use only in simulation.
-
In LocoMode, pressing L1 + Y triggers a Martial arts movement(Failed) — use only in simulation.
-
In LocoMode, pressing R1 + B triggers a Kick movement(Failed) — use only in simulation.
-
Power on the robot and suspend it (e.g., with a harness). and then hold L2+R2
-
Run the deploy_real program:
python deploy_real/deploy_real.py
- Press the Start button to enter position control mode.
- Subsequent operations are the same as in simulation.
The current framework does not natively support deployment on G1 robots equipped with Orin NX platforms. Preliminary analysis suggests compatibility issues with the unitree_python_sdk
on Orin systems. For onboard Orin deployment, we recommend the following alternative solution:
- Replace with unitree_sdk2 (official C++ SDK)
- Implement a dual-node ROS architecture:
- C++ Node: Handles data transmission between robot and controller
- Python Node: Dedicated to policy inference
The Mimic policy does not guarantee 100% success rate, particularly on slippery/sandy surfaces. In case of robot instability:
- Press
F1
to activate PassiveMode (damping protection) - Press
Select
to immediately terminate the control program
Currently the only verified stable policy on physical robots:
- Palm Removal Recommended: The original training didn't account for palm collisions (author's G1 lacked palms)
- Initial/Final Stabilization: Brief manual stabilization may be required when starting/ending the dance
- Post-Dance Transition: While switching to Locomotion/PositionControl/PassiveMode is possible, we recommend:
- First transition to PositionControl or PassiveMode
- Provide manual stabilization during transition
All other movements are currently not recommended for physical robot deployment.
Always master operations in simulation before attempting physical robot deployment.