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.
📋 Distance Keeping average rule conformity: 0.867
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
Settings
- dist = 10.0
- step_size = 10
- size = None
- save_detail = True
- min_speed = 0.8
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
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:
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:
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}
}