Skip to content

[RSS 2025] 💐Official implementation of the paper "Learning Humanoid Standing-up Control across Diverse Postures"

License

Notifications You must be signed in to change notification settings

OpenRobotLab/HoST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HoST: Humanoid Standing-up Control

arXiv License: MIT

This is the official PyTorch implementation of the RSS conference paper "Learning Humanoid Standing-up Control across Diverse Postures" by

Tao Huang, Junli Ren, Huayi Wang, Zirui Wang, Qingwei Ben, Muning Wen, Xiao Chen, Jianan Li, Jiangmiao Pang

📑 Table of Contents

🔥 News

  • [2025-04] We release traning code, evaluation scripts, and visualization tools.
  • [2025-04] HoST was accepted to RSS 2025!
  • [2025-02] We release the paper and demos of HoST.

📝 TODO List

  • Training code of Unitree G1 across prone postures.
  • Training code of Unitree H1.
  • Joint training of supine and prone postures.
  • Joint training over all terrains.

🛠️ Installation Instructions

Clone this repository:

git clone https://github.com/OpenRobotLab/HoST.git
cd HoST

Create a conda environment:

conda env create -f conda_env.yml 
conda activate host

Install pytorch 1.10 with cuda-11.3:

pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html

Download and install Isaac Gym:

cd isaacgym/python && pip install -e .

Install rsl_rl (PPO implementation) and legged gym:

cd rsl_rl && pip install -e . && cd .. 
cd legged_gym &&  pip install -e . && cd .. 

Erorr Catching

Regarding potential installation errors, please refer to this document for solutions.

🤖 Run HoST on Unitree G1

Overview of Main Simulation Motions

Ground
Ground
Platform
Platform
Platform
Wall
Slope
Slope

Policy Training

Train standing-up policies over different terrains:

python legged_gym/scripts/train.py --task g1_${terrain} --run_name test_g1 # [ground, platform, slope, wall]

After training, you may play the resulted checkpoints:

python legged_gym/scripts/play.py --task g1_${terrain} --checkpoint_path ${/path/to/ckpt.pt} # [ground, platform, slope, wall]

Policy Evaluation

We also provide the evaluation scripts to record success rate, feet movement distance, motion smoothness, and consumed energy:

python legged_gym/scripts/eval/eval_${terrain}.py --task g1_${terrain} --checkpoint_path ${/path/to/ckpt.pt} # [ground, platform, slope, wall]

Domain randomization is applied during the evaluation to make the results more generalizable.

Motion Visualization

First, run the following command to collect produced motion:

python legged_gym/scripts/visualization/motion_collection.py --task g1_${terrain} --checkpoint_path ${/path/to/ckpt.pt} # [ground, platform, slope, wall]

Second, plot the 3D trajectories of motion keyframes:

python legged_gym/scripts/visualization/trajectory_hands_feet.py  --terrain ${terrain} # [ground, platform, slope, wall]
python legged_gym/scripts/visualization/trajectory_head_pelvis.py  --terrain ${terrain} # [ground, platform, slope, wall]

Train from Prone Postures

Ground
Left-side Lying
Platform
Prone
Slope
Right-side Lying

We also support the training from prone postures:

python legged_gym/scripts/train.py --task g1_ground_prone --run_name test_g1_ground_prone

The learned policies can also handle side-lying postures. However, when training from posture postures, harder constraints on hip joints and are necessary to prevent violent motions. This issue make the feasibility of joint training from prone and supine postures unclear currently. Address it would be valuable in the future.

🧭 Extend HoST to Other Humanoid Robots: Tips

Lessons Learned from Unitree H1 and H1-2

To try other robots, these steps should be followed to work the algorithm:
  • Add keyframes in urdf: It is suggested to add the same keyframes (including keypoints around ankles) as ours to strengthen the compatibility with new robots. These keyframes are designed for reward computation.
  • Pulling force: ~60% gravity of the robot. Note that we have two torso link (one real, one virtual) in G1's urdf, so the force will be multiplied by 2 during training. Besides, you may modify the condition of applying force, e.g., remove the base orientation condition.
  • Height for curriculum: ~70% height of the robot.
  • Height for stage division: ~35% height of the robot for stage 1 and 2, and ~70% height of the robot for stage 3.
  • Height for reward: ~75% for target_head_height. Regarding the target base height after success a standing up, it depends on your preference.
  • Joint deviation rewards: You can adjust the style reward functions, particularly the joint deviation penalties, to better constrain the motion style. Lightweight robots typically require narrower desired joint angle ranges, as they are more prone to reaching extreme joint angles.
  • Reward group weights: For instance, improving the weight of style rewards may priotirize the optimization on the motion. This is helpful on learning H1-2 or across prone postures.
  • Misc: You should also modify the default/target postures, PD controllers, observation/action spaces, body names, and etc.

As an example, we provied the training code of Unitree H1 over the ground:

python legged_gym/scripts/train.py --task h1_ground --run_name test_h1_ground 

Potential Tips for Hardware Deployment

We found some useful tips for working G1 and H1-2 hardware systems:
  • High stiffness for knee and hip joints: We found that improving the kp coefficients of these joints to ~1.5x of the simulation ones significantly helps. We posit that this is caused by the sim-to-real gap between the joint torques. See more analysis in the paper.
  • High action rescaler: While default action rescaler (0.25) already produces good motions, we found that a slight improvement of this coefficient (0.3) can mitigate jerky motions noticeably.
  • Check collision models: We found that using full meshes as the collision models for ankles will cause huge sim-to-real gap. To solve this issue, we use discrete points to approximate the collision, following the official code of Unitree. That being said, it is highly suggested to be more careful about collision models.

✉️ Contact

For any questions, please feel free to email [email protected]. We will respond to it as soon as possible. Or, you can join our discussion wechat group:

🏷️ License

This repository is released under the MIT license. See LICENSE for additional details.

🎉 Acknowledgments

This repository is built upon the support and contributions of the following open-source projects. Special thanks to:

📝 Citation

If you find our work useful, please consider citing:

@article{huang2025learning,
  title={Learning Humanoid Standing-up Control across Diverse Postures},
  author={Huang, Tao and Ren, Junli and Wang, Huayi and Wang, Zirui and Ben, Qingwei and Wen, Muning and Chen, Xiao and Li, Jianan and Pang, Jiangmiao},
  journal={arXiv preprint arXiv:2502.08378},
  year={2025}
}

About

[RSS 2025] 💐Official implementation of the paper "Learning Humanoid Standing-up Control across Diverse Postures"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages