Skip to content

lupinjia/genesis_lr

Repository files navigation

🦿 Legged Robotics in Genesis

A legged_gym based framework for training legged robots in genesis

Table of Contents


πŸ“… Updates

2025/02/23
  • find some bugs in genesis. The environments can return nan values without knowing why (Genesis-Embodied-AI/Genesis#625), which can hinder long-time training where nan values may suddenly come out and terminates your training.

2025/02/10
  • add measure_heights support, and provide a demo of exteroceptive locomotion (go2_rough)

2024/12/28
2024/12/26
  • add terrain support, optional terrain type: ["plane", "heightfield"].

  • move test results to tests.md

2024/12/24
  • add a new demo environment bipedal_walker
2024/12/23
  • divide main and deploy branches, deploy branch should be used with a custom rsl_rl(which will be open-source soon)

🌟 Features

  • Totally based on legged_gym

    It's easy to use for those who are familiar with legged_gym and rsl_rl

  • Faster and Smaller

    For a go2 walking on the plane task with 4096 envs, the training speed in Genesis is approximately 1.3x compared to Isaac Gym, while the graphics memory usage is roughly 1/2 compared to IsaacGym.

    With this smaller memory usage, it's possible to run more parallel environments, which can further improve the training speed.

πŸ§ͺ Test Results

For tests conducted on Genesis, please refer to tests.md

πŸ›  Installation

  1. Create a new python virtual env with python>=3.9
  2. Install PyTorch
  3. Install Genesis following the instructions in the Genesis repo
  4. Install rsl_rl and tensorboard
    # Install rsl_rl.
    git clone https://github.com/leggedrobotics/rsl_rl
    cd rsl_rl && git checkout v1.0.2 && pip install -e . --use-pep517
    
    # Install tensorboard.
    pip install tensorboard
  5. Install genesis_lr
    git clone https://github.com/lupinjia/genesis_lr
    cd genesis_lr
    pip install -e .

πŸ‘‹ Usage

πŸš€ Quick Start

By default, the task is set to go2(in utils/helper.py), we can run a training session with the following command:

cd legged_gym/scripts
python train.py --headless # run training without rendering

After the training is done, paste the run_name under logs/go2 to load_run in go2_config.py:

Then, run play.py to visualize the trained model:

πŸ“– Instructions

For more detailed instructions, please refer to the wiki page

πŸ–ΌοΈ Gallery

Go2 Bipedal Walker

πŸ™ Acknowledgements

TODO

  • Add domain randomization
  • Verify the trained model on real robots.
  • Add Heightfield support
  • Add meausre_heights support
  • Add go2 deploy demos and instructions (vanilla and explicit estimator)
  • Add teacher-student implementation

About

Legged Robot environments for reinforcement learning in Genesis

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages