Skip to content
prediction_bas…
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Prediction-Based Reachability for Collision Avoidance in Autonomous Driving

This is the codebase for the paper "Predicion-Based Reachability for Collision Avoidance in Autonomous Driving". In this codebase, we provide the code to cluster trajectory data into driving modes, to compute reachable tubes for each mode, and to simulate the two-car collision avoidance using safety controller.

This codebase is built on optimized_dp toolbox, PythonRobotics codebase, and uses Interaction dataset.

Setup

Please first read the setup procedure for optimized_dp toolbox.

Besides, please install the below packages using conda.

pickle
numpy
matplotlib
scikit-learn
pandas
pillow
shutil
json

Content

This codebase contains three parts:

  1. Process the predicted trajectory data and cluster it into different driving mode, which includes:
prediction/

  1. Simulate the two-car collision avoidance
simulation/
  1. Compute reachable tubes for each driving mode
reachable_tube/

Trajectory processing, driving mode clustering and mode prediction

First, configure the data path in "def init(self): " in both prediction/process_prediction.py and prediction/predict_mode.py.

  1. Process the predicted trajectory data and obtain actions:
python prediction/process_prediction.py

  1. Cluster the action into driving mode
python prediction/clustering.py

  1. Predict driving mode giving a new trajectory
python prediction/predict_mode.py

Reachable tube computation

  1. Compute reachable tube for 5d relative dynamics In reachable_tube/user_definer.py, comment the bicycle4D part and leave reldyn5D part, then
python reachable_tube/solver_reldyn5d.py

  1. Compute reachable tube for 4d bicycle dynamics (for curbs) In reachable_tube/user_definer.py, comment the reldyn5D part and leave bicycle4D part, then
python reachable_tube/solver_bicycle4d.py

Simulation

Configure the data path in "def init(self):" in simulation/simulator_stanley_helper.py.

Configure the scenario and trial that you want to simulate in "def reset_trial(self, trial_name, scenario):" in simulation/simulator_stanley.py.

Run the simulation:

python simulation/simulator_stanley.py

Citing This Work

If you use this work in your research please cite:

@article{li2020prediction,
  title={Prediction-Based Reachability for Collision Avoidance in Autonomous Driving},
  author={Li, Anjian and Sun, Liting and Zhan, Wei and Tomizuka, Masayoshi and Chen, Mo},
  journal={arXiv preprint arXiv:2011.12406},
  year={2020}
}

About

For the paper "Prediction-Based Reachability for Collision Avoidance in Autonomous Driving"

Resources

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •