This repository provides the code for the paper entitled 'A Hybrid Pushing Policy for Total Singulation in Dense Clutter'.
Create a virtual environment and install the package.
virtualenv ./venv --python=python3
source ./venv/bin/activate
pip install -e .
Install PytTorch 1.9.0
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/cu111/torch_stable.html
This demo runs our pre-trained model with a UR5 robot arm in simulation on an environment with 8-13 objects. The objective is to singulate the target object (red one) from its surrounding clutter by reaching the target goal. Note that the goal is illustrated with a black circle. The video on the visualizes the L-Hybrid (local) policy while on the right the G-Hybrid (global) policy.
Download the pretrained models:
To train the hybrid pushing policy from scratch with random goals in simulation run the following command:
python run.py --exp_name hybrid --goal --n_episodes 10000 --episode_max_steps 10 --seed 0 --save_every 100
To train without the goal run the following command:
python run.py --exp_name rl --n_episodes 10000 --episode_max_steps 10 --seed 0 --save_every 100
For training in the environment with the walls just run the above commands with the flag --walls True.
To test your own trained model, simply change the location of --snapshot_file:
python run.py --is_testing --policy g-hybrid --snapshot_file 'YOUR-SNAPSHOT-FILE-HERE' --test_trials 100 --episode_max_steps 10 --seed 10
To evaluate on the challenging scenes:
python run.py --is_testing --policy g-hybrid --test_preset_cases --episode_max_steps 15
To evaluate all models:
python run.py --eval_all True --exp_name hybrid_policy --seed 1