Project page: Diffusion-CCSP
-
Clone this repo
git clone https://github.com/zt-yang/diffusion-ccsp.git --recurse-submodules
-
Set up Jacinle following the instructions here. If the directory you installed Jacinle does not share the same parent folder as this repository, put
export PYTHONPATH=/your/path/to/Jacinle:$PYTHONPATH
indiffusion-ccsp/setup.sh
.cd .. git clone https://github.com/vacancy/Jacinle --recursive ## echo "export PYTHONPATH=/your/path/to/Jacinle:$PYTHONPATH" >> diffusion-ccsp/setup.sh ## optional
-
Set up dependencies.
cd diffusion-ccsp conda create --name diffusion-ccsp python=3.9 conda activate diffusion-ccsp pip install -r requirements.txt
-
Source environment variables before running codes (includes
conda activate diffusion-ccsp
).source setup.sh
-
Compile IK for Franka Panda if want to collect and test robot planning.
(cd pybullet_engine/ikfast/franka_panda; python setup.py)
By default, download for task RandomSplitQualitativeWorld
. Download into data/
, logs/
, and wandb/
folder
python download_data_checkpoints.py
python solve_csp.py
Generate data into data/
folder
python envs/data_collectors.py -world_name 'RandomSplitQualitativeWorld' -data_type 'train' -num_worlds 100
python envs/data_collectors.py -world_name 'RandomSplitQualitativeWorld' -data_type 'test' -num_worlds 10 -pngs -jsons
Some frequently used flags
-world_name = RandomSplitWorld | TriangularRandomSplitWorld | RandomSplitQualitativeWorld
: generates different geometric splitting datasets-num_worlds
: number of data-pngs | -jsons
: .png and .json files will be inrender/{dataset_name}
folder
## task 4: packing 3D objects
python 3-panda-box-data.py
## task 3: stacking shapes
python 5-panda-stability-data.py
to add a new task
- run dataset.py to generate the pt files and try evaluation / visualization
- change dims in create_trainer() in train_utils.py
- change init() and initiate_denoise_fns() in ConstraintDiffuser class of denoise_fn.py
- change world.name in Trainer class of ddpm.py
- train with debug=True and visualize=True
- change wandb project name
python train_ddpm.py -timesteps 1000 -EBM 'ULA' -input_mode qualitative
@inproceedings{yang2023diffusion,
title={{Compositional Diffusion-Based Continuous Constraint Solvers}},
author={Yang, Zhutian and Mao, Jiayuan and Du, Yilun and Wu, Jiajun and Tenenbaum, Joshua B. and Lozano-P{\'e}rez, Tom{\'a}s and Kaelbling, Leslie Pack},
booktitle={Conference on Robot Learning},
year={2023},
}