Skip to content

aldeW64/LoopSR

Repository files navigation

LoopSR: Looping Sim-and-Real for Lifelong Policy Adaptation of Legged Robots

Paper Conference Project WebPage License

Pipeline

LoopSR: Looping Sim-and-Real for Lifelong Policy Adaptation of Legged Robots
Peilin Wu, Weiji Xie, Jiahang Cao, Hang Lai, Weinan Zhang*
IROS 2025

Installation

  1. Create a new python virtual env with python 3.8 (3.8 recommended). i.e. with conda:

    • conda create -n isaacgym python==3.8
    • conda activate isaacgym
  2. 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

    For GTX4050 or Higher, install pytorch 2.0.1 with cuda-11.7:

    • pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
  3. Install Isaac Gym, copy the isaacgym folder (with a backup in /NAS2020/Share/Robotics/legged_gym_env) to your own path, i.e., ~/, and:

    • cd isaacgym/python && pip install -e .
  4. Install other dependence

    • pip install -r requirements
  5. Troubleshooting

    • sudo apt-get update

    • sudo apt-get install build-essential --fix-missing

    • pip install setuptools==59.5.0

Train the Base Policy

  1. run the command:
    • python legged_gym/scripts/train.py --task=go2_amp --headless --sim_device=cuda:0 --run_name=collect_policy

Check the Base Policy

  1. run the command:
    • python legged_gym/scripts/play.py --task=a1_amp --sim_device=cpu

Refine Process

  1. Collect Dataset
    • python legged_gym/scripts/collect.py --task=go2_amp --data_path=go2
  2. Train LoopSR Encoder
    • python encoders/train_encoder.py
  3. Use the Encoder in Sim-to-sim Experiments
    • python legged_gym/scripts/refine_sim.py --encoder=path/to/your/encoder/checkpoint --data_path=go2
  4. Use the Encoder in Sim-to-real Experiments
    • Collect data in the real scene and put it in the record/ directory
    • python legged_gym/scripts/refine_real.py --encoder=path/to/your/encoder/checkpoint --data_path=go2

Citation

If you find this code or find the paper useful for your research, please consider citing:

@article{wu2024loopsr,
  title={LoopSR: Looping Sim-and-Real for Lifelong Policy Adaptation of Legged Robots},
  author={Wu, Peilin and Xie, Weiji and Cao, Jiahang and Lai, Hang and Zhang, Weinan},
  journal={arXiv preprint arXiv:2409.17992},
  year={2024}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages