Skip to content

The repository provides scripts to extract road user behavior distribution out of datasets.

License

Notifications You must be signed in to change notification settings

fzi-forschungszentrum-informatik/quantification_road_user_behavior

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantification of Actual Road User Behavior on the Basis of Given Traffic Rules

Code and supplementary materials

Repository of the paper Quantification of Actual Road User Behavior on the Basis of Given Traffic Rules at IV 2022. The first authors are strong supporters of the Public Money, Public Code idea and happy to contribute to it with this repository.

It provides two scripts to extract and learn the rule conformity of two traffic rules out of the Waymo Open Dataset Motion:

  • Distance keeping
  • Speed limitation

Each rule conformity is a percentage, that indicates how strongly a rule is followed among every driver in the dataset.

Results of both rules:

📋 Distance Keeping average rule conformity: 0.867

Statistics
Settings
  • latency = 3
  • step_size = 10
  • size = None
  • save_detail = True
  • min_speed = 5.0
  • anlge_range = 20.0

📋 Speed Limitation average rule conformity: 0.967

Statistics
Settings
  • dist = 10.0
  • step_size = 10
  • size = None
  • save_detail = True
  • min_speed = 0.8

Install Repository

Install inside of a virtual environment (recommended)

pip install --upgrade pip
git clone https://github.com/fzi-forschungszentrum-informatik/quantification_road_user_behavior.git
pip install -r requirements.txt

Distance Keeping

For extracting the distance rule conformity run:

cd scripts
python DistanceRule.py --path path/to/dataset

which provides the following flags:

Flag Description Default
--path Path to dataset data/dataset/
--latency Time of latency for the three-second rule 3
--step_size Extract every [number]th state 10
--min_speed Ignore drivers below this threshold 5.0
--angle_range Prevent rule violation of a driver that
is not facing an other vehicle among (+/-)
[angle_range] (degree). Prevents violation in curves.
10
--size Extract only a certain amount of files None (=all files)
--save_freq Update and save overall file 100
--save_detail If True, save every state and the average file of all scenarios True
--sample If True, plot a random scenario with visualizations False

Visualization of a random file among the dataset:

screen-gif

Speed Limitation

For extracting the Speed Limit rule conformity run:

cd scripts
python VelocityRule.py --path path/to/dataset

which provides the following flags:

Flag Description Default
--path Path to dataset data/dataset/
--dist Maximum distance between driver and closest lane_center 10.0
--step_size Extract every [number]th state 10
--min_speed Percentage of the assigned speed limit. Discard drivers below this threshold 0.8
--size Extract only a certain amount of files None (=all files)
--save_freq Update and save overall file 100
--save_detail If True, save every state and the average file of all scenarios True
--sample If True, plot a random scenario with visualizations False

Visualization of a random file among the dataset:

screen-gif


Citation

If you find this code useful for your research, please cite our paper:

@InProceedings{Bogdoll_Quantification_2022_IV,
  author    = {Bogdoll, Daniel and Nekolla, Moritz and Joseph, Tim and Z\"{o}llner, J. Marius},
  title     = {{Quantification of Actual Road User Behavior on the Basis of Given Traffic Rules}},
  booktitle = {IEEE Intelligent Vehicles Symposium (IV)},
  year      = {2022}
}

About

The repository provides scripts to extract road user behavior distribution out of datasets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages