This repository contains the code to our L4DC 2025 paper Diffusion Predictive Control with Constraints. We build upon the temporal U-Net implementation from Diffuser and use the Avoiding environment from D3IL.
Clone the repo and run:
conda create -n dpcc python=3.10
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txtYou also need to install D3IL for the simulation environment.
To train the diffusion policy, run:
python scripts/train.pyYou can also visualize the training data without constraints and the novel test-time constraints:
python scripts/visualize_data_constraints/train.pyTo evaluate DPCC and reproduce the results reported in the paper, run:
python scripts/eval.py
python scripts/load_results.pyIf you find this work useful, please cite our paper:
@InProceedings{romer2025diffusion,
title = {Diffusion Predictive Control with Constraints},
author = {R{\"o}mer, Ralf and Rohr, Alexander von and Schoellig, Angela},
booktitle = {Proceedings of the 7th Annual Learning for Dynamics \& Control Conference},
pages = {791--803},
year = {2025},
publisher = {PMLR},
}
