/AdaptSim

Code Release for AdaptSim: Task-Driven Simulation Adaptation for Sim-to-Real Transfer

Primary LanguagePythonMIT LicenseMIT

AdaptSim

AdaptSim: Task-Driven Simulation Adaptation for Sim-to-Real Transfer

Conference on Robot Learning (CoRL), 2023

[Webpage] | [Arxiv]

Allen Z. Ren1, Hongkai Dai2, Benjamin Burchfiel2, Anirudha Majumdar1

1Princeton University 2Toyota Research Institute

Please raise an issue or reach out at allen dot ren at princenton dot edu if you need help with running the code.

Installation

Install the conda environment with dependencies (tested with Ubuntu 20.04):

conda env create -f environment_linux.yml
pip install -e .

AdaptSim is based on Drake, a physically-realistic simulator suited for contact-rich manipulation tasks. Follow the Source Installation instructions here, but use the branch here instead of the Master one.

Usage

Test the double pendulum, pushing, and scooping environment.

python test/test_double_pendulum_linearized.py
python test/test_push.py --gui
python test/test_scoop.py --gui

We also provide other environments including AcrobotEnv, PendulumEnv, and DoublePendulumEnv that are not used in the paper.

Open Drake Visualizer / Meldis for visualization (especially the contacts).

cd ~/drake && bazel run //tools:drake_visualizer
cd ~/drake && bazel run //tools:meldis

Train the adaptation policies.

python script/run_adapt.py -cf cfg/pretrain_dp.yaml
python script/run_adapt_trainer.py -cf cfg/pretrain_push.yaml
python script/run_adapt_trainer.py -cf cfg/pretrain_scoop.yaml

Acknowledgement

Russ Tedrake's manipulation course materials

Ben Agro's Panda environment in Drake

Citation

@inproceedings{ren2023adaptsim,
title = {AdaptSim: Task-Driven Simulation Adaptation for Sim-to-Real Transfer},
author = {Ren, Allen Z. and Dai, Hongkai and Burchfiel, Benjamin and Majumdar, Anirudha},
booktitle={Proceedings of the Conference on Robot Learning (CoRL)},
year = {2023},
}