Toru Lin*,
Zhao-Heng Yin*,
Haozhi Qi,
Pieter Abbeel,
Jitendra Malik
This repo contains the code and instructions to train and evaluate the bimanual twisting policy as introduced in paper "Twisting Lids Off with Two Hands".
-
Download IsaacGym Preview 4 from the NVIDIA website
-
Extract and install IsaacGym:
cd isaacgym/python
pip install -e .
- Create and setup the environment:
mamba create -n twist python=3.8
mamba activate twist
mamba install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia -y
cd path/to/twist/project/
pip install -e .
pip install hydra-core gym wandb termcolor tensorboardX pytorch3d numpy==1.19.5
After installation, the environment can be viewed by running the following command.
python ./env_utils/view_env.py num_envs=8 headless=False
python ./minimal_stable_PPO/train.py num_envs=8192 train.ppo.minibatch_size=8192 headless=True pipeline=gpu
# Visualize the trained policy in Isaac GUI
python ./minimal_stable_PPO/train.py test=True num_envs=4 headless=False checkpoint=/path/to/checkpoint
# Record videos of the trained policy
python ./minimal_stable_PPO/eval.py task.env.enableCameraSensors=True train.ppo.num_video_envs=4 num_envs=4 headless=True eval_root_dir=/path/to/save/videos checkpoint=/path/to/checkpoint
If you find our paper or this codebase helpful in your research, please consider citing:
@article{lin2024twisting,
author={Lin, Toru and Yin, Zhao-Heng and Qi, Haozhi and Abbeel, Pieter and Malik, Jitendra},
title={Twisting Lids Off with Two Hands},
journal={arXiv:2403.02338},
year={2024}
}