Skip to content

Commit ddad219

Browse files
committed
Update readme
1 parent 4826631 commit ddad219

1 file changed

Lines changed: 24 additions & 17 deletions

File tree

README.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
Official implementation of *"SurGE: Surrogate Gradient-guided Evolution for Co-design of Legged Robots with Parallel Elasticity"*.
66

7-
## TODO
8-
- [ ] Make sure we have a script to reproduce the main results in the paper
9-
- [ ] Unify occurrence of naming of hopper e.g. hopper-v2, mups, hopper, mups_v2, etc.
10-
- [ ] Rename `run_meanshift_es.py` to `run_surge.py`
11-
- [ ] Setup website in another branch
127

138
## Overview
149

@@ -22,6 +17,7 @@ To recover gradient information despite this non-differentiability, SurGE differ
2217
## Installation
2318

2419
### Dependencies
20+
The code is tested on the following setup:
2521
* Ubuntu 22.04
2622
* Python 3.8
2723
* Isaac Gym (Preview 4)
@@ -38,8 +34,8 @@ To recover gradient information despite this non-differentiability, SurGE differ
3834
conda env create -f environment.yml
3935
conda activate codesign
4036
```
41-
3. Install Isaac Gym (Preview 4) into this env per [NVIDIA's instructions](https://developer.nvidia.com/isaac-gym).
42-
4. Install the co-design code (editable):
37+
3. Download and install Isaac Gym into this env per [NVIDIA's instructions](https://developer.nvidia.com/isaac-gym).
38+
4. Install the co-design code:
4339
```bash
4440
pip install -e .
4541
```
@@ -49,17 +45,15 @@ The editable install builds all three packages from `src/`: `mups_codesign`, `le
4945

5046
## Quick Start
5147

52-
A pretrained `checkpoints/rainbow_v7` design-aware policy is provided for quick testing.
53-
5448
### Co-design with SurGE
5549
```bash
56-
python scripts/run_meanshift_es.py --seed 1
50+
python scripts/run_surge_codesign.py
5751
```
5852

5953
### Baselines
6054

6155
```bash
62-
python scripts/run_codesign.py # GD
56+
python scripts/run_gd_codesign.py # vanilla gradient descent
6357
python scripts/run_cma_codesign.py # vanilla CMA-ES
6458
```
6559

@@ -69,9 +63,8 @@ python scripts/run_cma_codesign.py # vanilla CMA-ES
6963

7064
```bash
7165
python scripts/collect_landscape.py # collect objective landscape
72-
python scripts/collect_gradient_field.py # collect gradient field
73-
python scripts/collect_gradient_field_fd.py # collect gradient field (finite difference)
7466
python scripts/plot_landscape.py --policy_id rainbow_v7 # plot landscape
67+
python scripts/collect_gradient_field.py # collect gradient field
7568
python scripts/plot_gradient_field.py --grad-magnitude 5 # plot gradient field
7669
```
7770

@@ -80,14 +73,19 @@ python scripts/plot_gradient_field.py --grad-magnitude 5 # plot gradient fie
8073

8174
<img src="docs/policy_arch.png" width=450/>
8275

83-
A pretrained policy ships in `checkpoints/`. To train a new one:
76+
Pretrained checkpoints are shipped in `checkpoints/`.
77+
To visualize a pretrained policy:
78+
```bash
79+
python scripts/play_policy.py --task hopper --load_pretrained_ckpt
80+
```
81+
82+
To train a new one:
8483
```bash
85-
python scripts/train_policy.py --task hopper
86-
python scripts/play_policy.py --task hopper # visualize the latest run
84+
python scripts/train_policy.py --task hopper --headless
8785
```
8886

8987
> [!NOTE]
90-
> To use a freshly trained policy in co-design, set `policy_root="logs/hopper"` and `policy_id` to the new run directory name in `src/mups_codesign/config.py` (defaults: `policy_root="checkpoints"`, `policy_id="rainbow_v7"`).
88+
> To use a newly trained policy in co-design, set `policy_root="logs/<exp_name>"` and `policy_id="<run_name>"` in `src/mups_codesign/config.py`
9189
9290

9391
## Code Structure
@@ -108,6 +106,7 @@ src/legged_gym/ # customized legged-gym (hopper simulation env)
108106
src/rsl_rl/ # customized rsl-rl (RL framework)
109107
```
110108

109+
111110
## Citation
112111

113112
If you find this code useful for your research, please consider citing our paper:
@@ -119,3 +118,11 @@ If you find this code useful for your research, please consider citing our paper
119118
year={2026}
120119
}
121120
```
121+
122+
123+
## Troubleshooting
124+
125+
If you see an error about missing `libpython3.8.so.1.0` when importing Isaac Gym, copy it from conda lib to isaacgym bindings, i.e.
126+
```bash
127+
cp path_to_conda/envs/codesign/lib/libpython3.8.so.1.0 path_to_isaacgym/python/isaacgym/_bindings/linux-x86_64/
128+
```

0 commit comments

Comments
 (0)