/robolearn

Robotic Policy Learning

Primary LanguagePython

BC Policy Learning + sim-to-real transfer

Installation

Prerequisites: Install MUSE Simulator

Follow instructions in MUSE repository to install the simulator.

Install Robolearn

Activate your conda environment. Then, use pip to install robolearn requirements:

pip install -r requirements.txt

Then, install robolearn:

pip install -e .

Data Collection

To collect data for the proxy localization task run the following command:

python -m robolearn.collect.poses --output-dir $DATASET/robolearn/dr_sim_pose/train/ --poses 20000 --dr

Note that --dr flag controls if domain randomization is applied to the data.

To collect demonstrations for a manipulation task e.g., Stack, run the following command:

python -m robolearn.collect.demos --output-dir $DATASET/robolearn/dr_stack/train/ --episodes 2000 --seed 0 --env-name DR-Stack-v0

Training

To train a policy using Behavioural Cloning run:

python -m robolearn.train --task bc --log-dir $OUTPUT_DIR --train-path $DATASET/robolearn/dr_stack/train/ --eval-env DR-Stack-v0 --data-aug iros23_s2r

Evaluation

To evaluate a trained policy run:

python -m robolearn.evaluate.policy --checkpoint $OUTPUT_DIR/checkpoint.pth --env-name Stack-v0 --episodes 250 --checkpoint $OUTPUT_DIR  --record

Note that --record flag will record videos of the policy run for evaluation episodes.

Real Robot Datasets

You can download real robot datasets aligned with simulation datasets for the proxy task and stacking task using the following links:

Stacking dataset

Localization training dataset - default

Localization validation dataset - default

Localization validation dataset - textured table cloth

Localization validation dataset - low lighting

Localization validation dataset - multicolor lighting

Localization validation dataset - object colors variation

Localization validation dataset - camera variation

Pretrained models

Coming soon...

Citations

Please, if you use this repository in you research project, think about properly citing our work:

 @article{garcia2023,
    author    = {Ricardo Garcia and Robin Strudel and Shizhe Chen and Etienne Arlaud and Ivan Laptev and Cordelia Schmid},
    title     = {Robust visual sim-to-real transfer for robotic manipulation},
    journal   = {International Conference on Intelligent Robots and Systems (IROS)},
    year      = {2023}
}