Skip to content

usfinea/xDeploy_SimRealToolBox

Repository files navigation

Introduction

This codabase is used for sim2mujoco and sim2real within one standard code.

We assemble Unitree G1 SDK for mujoco and real in one toolbox to accomplish sim2mujoco and sim2real work within one standard code, and remove complex and repetitive coding. This codebase is based on "unitree_mujoco" and "unitree_sdk_python".

Now we release the code specially for PBHC and GMT frameworks.

Installation

Install unitree_mujoco first as commands:

sudo apt install python3-pip
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
cd unitree_sdk2_python
pip install -e .
pip install mujoco
pip install pygame

File Interpretation

In script, a pair of files accomplish the sim2sim2real work named xdeploy_*.py and config_*.py.

xdeploy_*.py writes the aligned policy deployment code.

config_*.py writes the configuration file.

GMT means the GMT motion tracking framework we used. Cited as: https://github.com/zixuan417/humanoid-general-motion-tracking.git

PBHC means the PBHC motion tracking framework we used. Cited as: https://github.com/TeleHuman/PBHC.git

RPG is an assemble of PBHC ckpt and transfering work.

The basic locomotion comes from RoboMimic. Cited as: https://github.com/ccrpRepo/RoboMimic_Deploy.git

Modify Configuration

In config_*.py file:

RUN_MODE: confirm run in mujoco or real

MOTOR_ENABLE: confirm if motors are enabled for real deployment, you can set it as "False" for debug while reality deployment.

KEY_LIST_keyboard and KEY_LIST_remotor: use to transfer existing policy. The running sequences are same as defined in policy_path or motion_file.

KEY_LIST_keyboard is only used for sim-to-mujoco. And you should press the key in the glfw window.

KEY_LIST_remotor is only used for sim-to-real.

Run the Code

Run the command:

python scripts/xdeploy_*.py

or

python scripts/xdeploy_*.py [ip_name]

You can hold the keys defined in KEY_LIST_keyboard or KEY_LIST_remotor to run the specific policy.

RoboMimic Locomotion framework works without any keys were pressed.

About

Deployment code for sim2mujoco and sim2real works within one standard code on Unitree G1.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages