Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lupinjia committed Dec 26, 2024
1 parent a8fd6d1 commit dc05e51
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 53 deletions.
56 changes: 27 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,36 @@

A [legged_gym](https://github.com/leggedrobotics/legged_gym) based framework for training legged robots in [genesis](https://github.com/Genesis-Embodied-AI/Genesis/tree/main)

## Table of Contents

- [🦿 Legged Robotics in Genesis](#-legged-robotics-in-genesis)
- [Table of Contents](#table-of-contents)
- [Updates](#updates)
- [🌟 Features](#-features)
- [🧪 Test Results](#-test-results)
- [🛠 Installation](#-installation)
- [👋 Usage](#-usage)
- [🚀 Quick Start](#-quick-start)
- [🖼️ Gallery](#️-gallery)
- [Acknowledgements](#acknowledgements)
- [TODO](#todo)

---
## Updates

<details open>
<summary>2024/12/26</summary>

- add terrain support, optional terrain type: ["plane", "heightfield"].
- move test results to [tests.md](./test_resources/tests.md)

</details>

- 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)
---

> All the tests below are conducted on a desktop with RTX 3080 10GB graphics memory.

## 🌟 Features

Expand All @@ -20,37 +41,13 @@ A [legged_gym](https://github.com/leggedrobotics/legged_gym) based framework for

- **Faster and Smaller**

For a go2 walking on the plane task with 4096 envs, the training speed is approximately **1.3x** compared to [Isaac Gym](https://developer.nvidia.com/isaac-gym).

- Training speed in genesis:
![](./test_resources/genesis_rl_speed.png)

- Training speed in isaac gym:
![](./test_resources/isaacgym_speed.png)

While the graphics memory usage is roughly **1/2** compared to IsaacGym.

- Graphics memory usage in genesis:
![](./test_resources/genesis_memory_usage.png)

- Graphics memory usage in isaac gym:
![](./test_resources/isaacgym_memory_usage.png)
For a go2 walking on the plane task with 4096 envs, the training speed in Genesis is approximately **1.3x** compared to [Isaac Gym](https://developer.nvidia.com/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

- Simulation

For a go2 walking on the plane task, training a policy with 10000 envs for 600 ites(which is 144M steps) takes about 12mins. The play result is as below:

![](./test_resources/go2_flat_play.gif)

- Real Robot

Also for a go2 walking on the plane task, training policy+explicit estimator with 10000 envs for 1k ites takes about 23mins. Deployment result is as below:
## 🧪 Test Results

![](./test_resources/genesis_deploy_test.gif)
For tests conducted on Genesis, please refer to [tests.md](./test_resources/tests.md)

## 🛠 Installation

Expand Down Expand Up @@ -110,4 +107,5 @@ Then, run `play.py` to visualize the trained model:

- [x] Add domain randomization
- [x] Verify the trained model on real robots.
- [ ] Add Heightfield support
- [x] Add Heightfield support
- [ ] Add meausre_heights support
24 changes: 0 additions & 24 deletions test_resources/log.md

This file was deleted.

62 changes: 62 additions & 0 deletions test_resources/tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Tests on prallel simulation in Genesis

> All the tests below are conducted on a desktop with RTX 3080 10GB graphics memory.
## Training performance for a basic task

For a go2 walking on the plane task with 4096 envs, the training speed is approximately **1.3x** compared to [Isaac Gym](https://developer.nvidia.com/isaac-gym).

- Training speed in genesis:
![](./genesis_rl_speed.png)

- Training speed in isaac gym:
![](./isaacgym_speed.png)

While the graphics memory usage is roughly **1/2** compared to IsaacGym.

- Graphics memory usage in genesis:
![](./genesis_memory_usage.png)

- Graphics memory usage in isaac gym:
![](./isaacgym_memory_usage.png)

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

## Attempts on training a decent policy for simulation and deployment

- Simulation

For a go2 walking on the plane task, training a policy with 10000 envs for 600 ites(which is 144M steps) takes about 12mins. The play result is as below:

![](./go2_flat_play.gif)

- Real Robot

Also for a go2 walking on the plane task, training policy+explicit estimator with 10000 envs for 1k ites takes about 23mins. Deployment result is as below:

![](./genesis_deploy_test.gif)

## Heightfield tests

**embedded terrain can't specify difficulty, not practical to use.**

### Time Test

Compilation takes **2min 45s**, with the below params:

| Parameter | Value |
| --- | --- |
| task | go2 |
| headless | False |
| num_envs | 100 |
| horizontal_scale | 0.1 |
| vertical_scale | 0.005 |
| terrain_length | 6.0 |
| terrain_width | 6.0 |
| border_size | 5.0 |
| num_rows | 4 |
| num_cols | 4 |

for headless=True with other params the same, it takes **2min 30s**.

Maybe because that Genesis needs to first compile then execute, it speeds less graphics memory but takes longer time to compile.

0 comments on commit dc05e51

Please sign in to comment.