MPD-S generates batches of B-spline trajectory candidates in as few as one neural-network evaluation, with optional parallel refinement using collision and smoothness costs.
MPD-S replaces iterative diffusion sampling in Motion Planning Diffusion with a shortcut model trained using supervised and self-consistency losses. This repository includes data generation, training, and evaluation for 2D point and L-shaped robots, alongside classical planning baselines.
Requirements: Python ≥3.10 and uv. An NVIDIA GPU is recommended for the full experiments; CPU execution is supported by setting runtime.device: cpu in the configs.
git clone https://github.com/justermak/mpd-s.git
cd mpd-s
uv syncThe default PyTorch wheels target CUDA 13.0. For another CUDA version or a CPU-only installation, adjust the PyTorch wheel index in pyproject.toml. Install FFmpeg to generate MP4 visualizations.
Choose the settings in configs/ for your experiment, using matching dataset names, robot/trajectory settings and model paths across generation, training and evaluation. The default configs are examples for different experiments, not a matched pipeline. Then run:
uv run python scripts/generate_data.py --config configs/generate_data.yaml
uv run python scripts/train.py --config configs/train.yaml
uv run python scripts/evaluate.py --config configs/evaluate.yamlDatasets and pretrained models will be released separately after publication. By default, datasets and checkpoints are saved under artifacts/datasets/ and artifacts/models/. Text logs are written to artifacts/logs/text/, and training metrics can be viewed with TensorBoard:
uv run tensorboard --logdir artifacts/logs/tensorboardEvaluation includes learned planners, RRT-Connect, GPMP2, gradient optimization, and their spline and hybrid variants. Each run saves its configuration, per-query results and metric summary under artifacts/runs/. Set visualization.save_trajectory_animation: true to generate trajectory plots and MP4 animations.
Detailed experiment tables are available in Results.
Reference generation, training and evaluation configurations are provided in configs/reproduce/, including MPD-S and the MPD reimplementation baseline.
For example, generate Dense2D point-robot demonstrations and train MPD-S:
uv run python scripts/generate_data.py --config configs/reproduce/generate_data/point.yaml
uv run python scripts/train.py --config configs/reproduce/train/diffusion_shortcut_point.yamlTo evaluate the model trained above, set planner.model_name: diffusion_shortcut__EnvDense2D_2000_50 in configs/reproduce/evaluate/mpd_s.yaml, then run:
uv run python scripts/evaluate.py --config configs/reproduce/evaluate/mpd_s.yamlThe manuscript “MPD-S: Efficient Robot Motion Planning via Diffusion Shortcut Models” is currently under review. The paper link and BibTeX entry will be added upon publication.
This project builds on the authors' Motion Planning Diffusion repository. We thank them for releasing their implementation.