This is the official codebase for Skill-Augmented Imitation Learning with prior Retrieval (SAILOR), from the following paper:
Learning and Retrieval from Prior Data for Skill-based Imitation Learning
Soroush Nasiriany, Tian Gao, Ajay Mandlekar, Yuke Zhu
UT Austin Robot Perception and Learning Lab
Conference on Robot Learning (CoRL), 2022
[Paper] [Project Website]
- Download MuJoCo 2.0 (Linux and Mac OS X) and unzip its contents into
~/.mujoco/mujoco200
, and copy your MuJoCo license key~/.mujoco/mjkey.txt
. You can obtain a license key from here. - (linux) Setup additional dependencies:
sudo apt install libgl1-mesa-dev libgl1-mesa-glx libglew-dev libosmesa6-dev software-properties-common net-tools xpra xserver-xorg-dev libglfw3-dev patchelf
- Add MuJoCo to library paths:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.mujoco/mujoco200/bin
- Download code:
git clone https://github.com/UT-Austin-RPL/sailor
- Create the conda environment:
cd sailor; conda env create --name sailor --file=sailor.yml
- (if above fails) edit
sailor.yml
to modify dependencies and then resume setup:conda env update --name sailor --file=sailor.yml
- Activate the conda environment:
conda activate sailor
- Finish setup:
pip install -e .
- Download code:
git clone --recurse-submodules https://github.com/snasiriany/calvin.git
- Setup tacto:
cd calvin/calvin_env/tacto; pip install -e .
- Setup calvin_env:
cd ..; pip install -e .
- Download all calvin datasets and store under
{sailor_path}/datasets/calvin
directory
- Download code (use the
sailor
branch):git clone -b sailor https://github.com/snasiriany/d4rl
- Setup d4rl:
cd d4rl; pip install -e .
- Download all Franka kitchen datasets and store under
{sailor_path}/datasets/franka_kitchen
directory
Generate the configs for pre-training the skill model: python robomimic/scripts/config_gen/sailor_pt.py --env {calvin or kitchen}
Note: you can add the --debug
flag for a small test run. Run the resulting command that is printed.
Once the previous stage finishes, add the skill model checkpoints in robomimic/scripts/config_gen/sailor_ft.py
under the algo.policy.skill_params.model_ckpt_path
entry.
Then generate the configs for target task learning: python robomimic/scripts/config_gen/sailor_ft.py --env {calvin or kitchen}
Note: you can add the --debug
flag for a small test run. Run the resulting command that is printed.
@inproceedings{nasiriany2022sailor,
title={Learning and Retrieval from Prior Data for Skill-based Imitation Learning},
author={Soroush Nasiriany and Tian Gao and Ajay Mandlekar and Yuke Zhu},
booktitle={Conference on Robot Learning (CoRL)},
year={2022}
}