Yuhao Zhang1,
Keisuke Okumura1,2,
Ajay Shankar1,
Amanda Prorok1
1Prorok Lab, University of Cambridge
2AIST Japan
This repository includes code for D4orm and its variants. Built on model-based diffusion, D4orm refines control trajectories through parallel sampling and diffusion denoising to generate kinodynamically feasible, collision-free multi-robot motion. Its decoupled, online receding-horizon, and distributed variants extend this framework to large robot teams, feedback control, and settings with limited computing resources.
Release notice: The current release includes D4orm, D4orm-D (decoupled), and D-D4orm (distributed). Implementations of other variants will be released progressively.
Use Python 3.10 or newer. From the repository root, create an environment and install the package:
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .You can also install into an existing Conda environment. For GPU support, follow the JAX installation guide for your hardware. Check the available devices with:
python -c "import jax; print(jax.devices())"Run a planner and save its trajectory as a GIF and PNG:
d4orm --method d4orm-d --env-name multi2dholo --num-agents 16 --save-imagesAvailable methods are d4orm, d4orm-d, d-d4orm, mppi, and cem.
The module entry point accepts the same options:
python -m d4orm.planners.multi_planner --method d4orm-d| Environment | Description |
|---|---|
multi2d |
Differential-drive robots. |
multi2dholo |
2D holonomic robots. |
multi2dheter |
Mixed holonomic and differential-drive robots. |
multi3dholo |
3D holonomic robots. |
multi2dholo_obsX |
2D holonomic robots with X obstacles, e.g. multi2dholo_obs4. |
multi2dholo_random |
2D holonomic robots with random starts and grid goals. |
Results are saved under results/<method>/<environment>/, named by agent count
and seed. Use --output-dir to choose another location. Repeating the same
settings overwrites those files. Reported planning time excludes JAX warm-up.
| Parameter | Default | Meaning |
|---|---|---|
--method |
d4orm |
Planner to run. |
--env-name |
multi2dholo |
Environment from the table above. |
--num-agents |
16 |
Number of robots. |
--num-samples |
1024 |
Candidate trajectories per optimization step. |
--horizon |
100 |
Number of control timesteps in each trajectory. |
--num-steps |
100 |
Denoising or sampling updates per optimization iteration. |
--dt |
0.1 |
Simulation timestep in seconds. |
--seed |
0 |
Random seed for the environment and planner. |
--direct-path-init |
off | Initialize using direct goal-directed controls for D4orm-D. |
--save-images |
off | Save GIF and PNG trajectories. |
--save-data |
off | Save trajectory arrays (NPZ) and run metadata (JSON). |
--print-info |
off | Print progress after each iteration. |
--output-dir |
results |
Directory for saved output. |
Use d4orm --help for all options.
|
2D Holonomic with 4 Obstacles |
2D Holonomic with Random Positions |
If you find this work to be useful in your research, please consider citing:
@article{zhang2026denoising,
title={Denoising Multi-Robot Trajectories},
author={Zhang, Yuhao and Okumura, Keisuke and Shankar, Ajay and Prorok, Amanda},
journal={arXiv preprint arXiv:2609.35651},
year={2026}
}@inproceedings{zhang2025d4orm,
title={D4orm: Multi-Robot Trajectories with Dynamics-aware Diffusion Denoised Deformations},
author={Zhang, Yuhao and Okumura, Keisuke and Woo, Heedo and Shankar, Ajay and Prorok, Amanda},
booktitle={IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
pages={14118--14123},
year={2025},
doi={10.1109/IROS60139.2025.11246029},
publisher={IEEE}
}