clvrai / furniture

IKEA Furniture Assembly Environment for Long-Horizon Complex Manipulation Tasks
https://clvrai.com/furniture
MIT License
503 stars 55 forks source link
furniture-assembly imitation-learning reinforcement-learning-environments robot-learning robotics

IKEA Furniture Assembly Environment for Long-Horizon Complex Manipulation Tasks

Youngwoon Lee, Edward S. Hu, Joseph J. Lim at USC CLVR lab
[Environment website (https://clvrai.com/furniture)]
[arXiv Paper]

Sawyer Baxter Cursors Jaco Panda

We are announcing the launch of the IKEA Furniture Assembly environment as a first-of-its-kind benchmark for testing and accelerating the automation of physical assembly processes. An agent (Sawyer, Baxter, Cursor) is required to move, align, and connect furniture parts sequentially. The task is completed when all parts are connected.

The IKEA Furniture Assembly environment provides:


Directories

The structure of the repository:

(0) Installation

Prerequisites

Installation

git clone https://github.com/clvrai/furniture.git
cd furniture
pip install -e .

See docs/installation.md for more detailed instruction and troubleshooting.
If you are on a headless server, make sure you run a virtual display and use --virtual_display to specify the display number (e.g. :0 or :1).

(1) Human control

You can use WASDQE keys for moving and IJKLUO keys for rotating an end-effector of an agent. SPACE and ENTER are closing and opening the gripper, respectively. C key will connect two aligned parts.

python -m furniture.demo_manual

(2) Gym interface

Gym interface for the IKEA Furniture Assembly environment is also provided. The environment parameters, such as furniture, background, and episode length, can be specified via parameters. (see register functions in furniture/env/__init__.py.

import gym
import furniture

# make an environment
env = gym.make('IKEASawyer-v0', furniture_name="table_lack_0825")

done = False

# reset environment
observation = env.reset()

while not done:
    # simulate environment
    observation, reward, done, info = env.step(env.action_space.sample())

(3) Demonstration generation

We provide the demonstration generation script for 10 furniture models.

python -m furniture.env.furniture_sawyer_gen --furniture_name table_lack_0825 --start_count 0 --n_demos 100

(4) Benchmarking

We provide example commands for table_lack_0825. You can simply change the furniture name to test on other furniture models. For evaluation, you can add --is_train False --num_eval 50 to the training command:

IL Training

BC

python -m run --algo bc --run_prefix bc_table_lack_0825 --env IKEASawyerDense-v0 --furniture_name table_lack_0825 --demo_path demos/Sawyer_table_lack_0825

GAIL

mpirun -np 32 python -m run --algo gail --run_prefix gail_table_lack_0825 --env IKEASawyerDense-v0 --furniture_name table_lack_0825 --demo_path demos/Sawyer_table_lack_0825

GAIL + PPO

mpirun -np 32 python -m run --algo gail --run_prefix gailppo_table_lack_0825 --env IKEASawyerDense-v0 --furniture_name table_lack_0825 --demo_path demos/Sawyer_table_lack_0825 --gail_env_reward 0.5

RL Training

SAC

python -m run --algo sac --run_prefix sac_table_lack_0825 --env IKEASawyerDense-v0 --furniture_name table_dockstra_0279

PPO

mpirun -np 32 python -m run --algo ppo --run_prefix ppo_table_lack_0825 --env IKEASawyerDense-v0 --furniture_name table_dockstra_0279


(5) Documentation

See documentation for installation and configuration details.


(6) References

Our Mujoco environment is developed based on Robosuite and Unity implementation from DoorGym-Unity is used.


(7) Citation

@inproceedings{lee2021ikea,
  title={{IKEA} Furniture Assembly Environment for Long-Horizon Complex Manipulation Tasks},
  author={Lee, Youngwoon and Hu, Edward S and Lim, Joseph J},
  booktitle={IEEE International Conference on Robotics and Automation (ICRA)},
  year={2021},
  url={https://clvrai.com/furniture},
}

Contributors

We thank Alex Yin and Zhengyu Yang for their contributions. We would like to thank everyone who has helped IKEA Furniture Assembly Environment in any way.