Home

Awesome

D3IL_Benchmark

Paper, Project Page, ICLR 2024

Xiaogang Jia<sup>1</sup><sup>2</sup>, Denis Blessing<sup>1</sup>, Xinkai Jiang<sup>1</sup><sup>2</sup>, Moritz Reuss<sup>2</sup>, Atalay Donat<sup>1</sup>, Rudolf Lioutikov<sup>2</sup>, Gerhard Neumann<sup>1</sup>

<sup>1</sup>Autonomous Learning Robots, Karlsruhe Institute of Technology

<sup>2</sup>Intuitive Robots Lab, Karlsruhe Institute of Technology

<p align="center"> <img width="100.0%" src="figures/github_readme.gif"> </p>

This project encompasses the D3IL Benchmark, comprising 7 robot learning tasks: Avoiding, Pushing, Aligning, Sorting, Stacking, Inserting, and Arranging. All these environments are implemented using Mujoco and Gym. The D3IL directory includes the robot controller along with the environment implementations, while the Agents directory provides 11 imitation learning methods encompassing both state-based and image-based policies.

Installation

# assuming you already have conda installed
bash install.sh

Usage

File System

D3IL_Benchmark
└── agents # model implementation
    └── models
    ...
└── configs # task configs and model hyper parameters
└── environments
    └── d3il    
        └── d3il_sim    # code for controller, robot, camera etc.
        └── envs        # gym environments for all tasks
        └── models      # object xml files
        ...
    └── dataset # data saving folder and data process
        └── data
        ...
└── scripts # running scripts and hyper parameters
    └── aligning
    └── stacking
    ...
└── simulation # task simulation
...

Download the dataset

Donwload the zip file from https://drive.google.com/file/d/1SQhbhzV85zf_ltnQ8Cbge2lsSWInxVa8/view?usp=drive_link

Extract the data into the folder environments/dataset/data/

Reproduce the results

We conducted extensive experiments for imitation learning methods, spanning deterministic policies to multi-modal policies, and from MLP-based models to Transformer-based models. To reproduce the results mentioned in the paper, use the following commands:

Train state-based MLP on the Pushing task

bash scripts/aligning/bc_benchmark.sh

Train state-based BeT on the Aligning task

bash scripts/aligning/bet_benchmark.sh

Train image-based DDPM-ACT on the sorting task

bash scripts/sorting_4_vision/ddpm_encdec_benchmark.sh

Train your models

We offer a unified interface for integrating new algorithms:

Creating Custom Tasks

Our simulation system, built on Mujoco and Gym, allows the creation of new tasks. In order to create new tasks, please refer to the D3il_Guide

After creating your task and recording data, simulate imitation learning methods on your task by following these steps:

Recording your own data

We provide the script environments/d3il/gamepad_control/record_data.py to record data for any task using a gamepad controller. To record data for the tasks we provided, run record_data.py -t <task>. If you made a custom task, you need to add it to the script. Data that you record will be saved in the folder environments/d3il/gamepad_control/data/<task>/recorded_data/. The controls are as follows:

Please note that when record_data.py is first called, it starts recording by default.

Key Components

Acknowledgements

The code of this repository relies on the following existing codebases: