DREAM: Defensive Risk-Aware Enhanced Maneuver Planning for Autonomous Vehicles in Heterogeneous Traffic
DREAM is an occlusion-aware, safety-critical planning framework that couples dynamic PDE risk transmission with maneuver-level decision-making and MPC-CBF control, explicitly capturing heavy-vehicle asymmetry and blind-zone hazards in heterogeneous traffic.
Preliminary risk field modeling is based on DRIFT: Dynamic Risk Inference via Field Transmission for Human-like Autonomous Driving.
Step 1: Install required packages; Run Visualization Simulation based on the BEV dataset trajectories
cd src
pip install -r requirements.txt
python drift_dataset_visualization.pyOutput:
- Frames saved to
figsave_DRIFT_dataset/
# You may change the file name every epoch you run the simulation and then save the video
python video_generation.pypython risk_analysis_utils.py figsave_risk_viz/risk_at_ego.npyOutput:
risk_timeline.png- Risk over time with threshold linesrisk_histogram.png- Distribution of risk levelsrisk_analysis.png- Comprehensive multi-panel analysisrisk_events.csv- High-risk events exported to CSV
Edit emergency_test_with_risk_viz.py, add after imports:
from risk_viz_config import RiskVizConfig as viz_cfg
# Choose a preset
viz_cfg.preset_subtle() # Low-contrast, clean
viz_cfg.preset_dramatic() # High-contrast, emphasizes risk
viz_cfg.preset_scientific() # Publication-ready with colorbar
viz_cfg.preset_highcontrast() # For presentations
# Then replace hardcoded values
RISK_ALPHA = viz_cfg.RISK_ALPHA
RISK_CMAP = viz_cfg.RISK_CMAP
# ... etcEdit these variables in emergency_test_with_risk_viz.py (around line 140):
RISK_ALPHA = 0.4 # Transparency (0.0-1.0)
RISK_CMAP = 'hot' # Colormap: 'hot', 'YlOrRd', 'plasma', 'inferno'
RISK_LEVELS = 15 # Number of contour levels
RISK_VMAX = 3.0 # Max risk value for color scale
SHOW_CONTOUR = True # Show contour lines?
SHOW_HEATMAP = True # Show filled heatmap?Colormap Options:
'hot'- Black β Red β Yellow β White (classic heat)'YlOrRd'- Yellow β Orange β Red (warning colors)'Reds'- White β Red (simple gradient)'plasma'- Purple β Pink β Yellow (perceptually uniform)'inferno'- Black β Purple β Orange β Yellow'RdYlGn_r'- Red β Yellow β Green (reversed)
- Grid: From
config.py(default: 400m Γ 60m, 1m resolution) - PDE Substeps: 3 (for numerical stability)
- Timestep: 0.1s (matches IDEAM)
- Horizon: 400 timesteps (40 seconds)
- Frame generation: ~2-3 seconds per frame (depends on grid size)
- Full simulation: ~15-20 minutes for 400 frames
python emergency_test_prideam.py \
--integration-mode conservative \
--steps 120 \
--scenario-file file_save/120_100 \
--save-dir outputs/emergency_run01 \
--save-dpi 300 \
--save-frames truepython uncertainty_merger_DREAM.py \
--integration-mode conservative \
--steps 120 \
--save-dir outputs/uncertainty_merger_run01 \
--save-dpi 300 \
--save-frames truepython dream_dataset_benchmark.py \
--dataset-dir data/rounD \
--recording-id 01 \
--ego-track-id 254 \
--save-dir outputs/dataset_benchmark_run01 \
--steps 120 \
--integration-mode conservative \
--save-frames true \
--frame-dpi 150python video_generation.py \
--image-folder outputs/dataset_benchmark_run01 \
--video-name outputs/dataset_benchmark_run01/benchmark.mp4 \
--fps 20# All 5 arms (default)
python uncertainty_test_DREAM.py
# Specific arms
python uncertainty_test_DREAM.py --models DREAM IDEAM
python uncertainty_test_DREAM.py --models OA-CMPC IDEAM
python uncertainty_test_DREAM.py --models DREAM ADA APF OA-CMPC IDEAM
# Override run mode too
python uncertainty_test_DREAM.py --models DREAM IDEAM --mode batch
demonstration of LC for emergency vehicle with safety-critical considerations (IDEAM-based planning).
Set 1 Experimental Snapshots across baselines and DREAM:

Set 2 Experimental Snapshots across baselines and DREAM:

Compared with the baseline planner, DREAM enables the ego stay away from the agent group ahead and find the appropriate spaces with no agents around, where the risk score is minimal. However, the progress was sacrificed.
We compare the trajectories of (1): the ground truth ego trajectories from BEV datasets; (2): the baseline planner trajectories; (3): the DREAM planner trajectories. The results show that baseline planner is over aggressive as near collision with the truck rear, and our planner is more conservative but sacrifice the progress. (The selected scenario include the occlusion-aware planning from the truck-trailer that may block the visibility of the ego)
higher-density (near-collision behavior from baseline):

The standalone ROS 2 Humble package for arbitrary RViz-goal navigation,
LiDAR-derived occlusion risk, sudden-merger tracking, and the matched
nominal/OACP-VB/DREAM comparison is in
src/dream_limo. The OACP-VB implementation,
scientific scope, calibration utility, and timing artifact are indexed at
src/dream_limo/dream_limo/OACP/.
The platform is open-sourced from
agilexrobotics.
@article{shu2025agile,
title={Agile Decision-Making and Safety-Critical Motion Planning for Emergency Autonomous Vehicles},
author={Shu, Yiming and Zhou, Jingyuan and Zhang, Fu},
journal={IEEE Transactions on Intelligent Transportation Systems},
year={2025},
publisher={IEEE}
}
(Referenced coding package: IDEAM)
@inproceedings{shu2023safety,
title={Safety-critical decision-making and control for autonomous vehicles with highest priority},
author={Shu, Yiming and Zhou, Jingyuan and Zhang, Fu},
booktitle={2023 IEEE Intelligent Vehicles Symposium (IV)},
pages={1--8},
year={2023},
doi={10.1109/IV55152.2023.10186772},
organization={IEEE}
}
(Referenced coding package: SODM)
@article{gao2025trajectory,
title={Trajectory Planning Algorithm Considering Obstacle Risk in Dynamic Traffic Scenarios},
author={Gao, Aiyun and Zhang, Wei and Fu, Zhumu and Tao, Fazhan},
journal={IEEE Transactions on Vehicular Technology},
year={2025},
publisher={IEEE}
}
(Referenced coding package: Artificial-Potential-Field)
@article{hu2025socially,
title={Socially Game-Theoretic Lane-Change for Autonomous Heavy Vehicle based on Asymmetric Driving Aggressiveness},
author={Hu, Wen and Deng, Zejian and Yang, Yanding and Zhang, Pingyi and Cao, Kai and Chu, Duanfeng and Zhang, Bangji and Cao, Dongpu},
journal={IEEE Transactions on Vehicular Technology},
year={2025},
publisher={IEEE}
}
@article{zhengocclusion,
title={Occlusion-Aware Contingency Safety-Critical Planning for Autonomous Driving},
author={Zheng, Lei and Yang, Rui and Zheng, Minzhe and Peng, Zengqi and Wang, Michael Yu and Ma, Jun},
journal={IEEE transactions on cybernetics},
pages={1-14},
year={2026},
publisher={IEEE}
}
@article{zianDREAM,
title={DREAM: Defensive Risk-Aware Enhanced Maneuver Planning for Autonomous Vehicles in Heterogeneous Traffic},
author={Zian, Wang and Yiming, Shu and Zejian, Deng and Guoshun, Cai and Jiahui, Xu and Jiwei, Tang and Dongpu, Cao and Sun, Chen},
year={2026},
doi={https://doi.org/10.2139/ssrn.6500569},
journal={SSRN Preprint}
}


.gif)

