NGSIM freeway | openDD roundabout |
---|---|
- Handmade maps for CARLA that mimic real-world roads
- 7 roundabouts (https://arxiv.org/abs/2007.08463)
- 2 freeways (US101, I-80)
- Code that transfers real-world traffic from datasets into CARLA
- Scenario API similar to OpenAI Gym
We've also trained and benchmarked policies on lane change maneuvers and roundabout navigation tasks.
More details, our article and videos of trained policies are published on our website.
git clone https://github.com/deepsense-ai/carla-real-traffic-scenarios.git && cd carla-real-traffic-scenarios
pip install -r requirements.txt
If working on remote servers with no desktop, use gdown to download from Google Drive links, e.g.
pip install gdown
gdown --id 1FCHL7YJk12AwfxuMPmwXPJj71n3mwSxE
Download and extract CARLA (0.9.9.4 download link). Then, add PythonAPI wheel to your PYTHONPATH
:
cd ~/Downloads
wget https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.9.4.tar.gz
export CARLA_ROOT=/home/$USER/Downloads/CARLA_0.9.9.4
mkdir -p $CARLA_ROOT;
tar zxvf CARLA_0.9.9.4.tar.gz --directory $CARLA_ROOT
export PYTHONPATH=$CARLA_ROOT/PythonAPI/carla/dist/carla-0.9.9-py3.7-linux-x86_64.egg:$PYTHONPATH
Download and import our CARLA package with new maps: 7 roundabout, 2 freeways: Google Drive download link
mv ~/Downloads/carla-package-NGSIM-openDD.tar.gz $CARLA_ROOT/Import/
$CARLA_ROOT/ImportAssets.sh
Download and extract: NGSIM, opendDD
sudo apt install p7zip-full
# no space after -o
7z x ~/Downloads/openDD.7z -oopenDD
mkdir NGSIM && tar zxvf ~/Downloads/NGSIM.tgz --strip-components 1 --directory NGSIM
cd $CARLA_ROOT
./CarlaUE4.sh -benchmark -fps=10
Wait until server boots up. Feel free to play with the code.
# Directory which contains "rdb1to7.sqlite" and "image_georeferenced/"
export OPENDD_DIR=~/Downloads/openDD
# Directory which contains "i80/" and "us101/"
export NGSIM_DIR=~/Downloads/NGSIM
python examples/runnable_template.py --dataset opendd --num-episodes 5
We encourage you send us any kind of feedback on what should be improved, what's not working etc.
Code for interfacing with NGSIM dataset was based on https://github.com/Atcold/pytorch-PPUU
Authors (cannot be disclosed yet):
- Anonoymous 1 ([email protected])
- Anonoymous 2 ([email protected])
- Anonoymous 3 ([email protected])
- Anonoymous 4 ([email protected])
- Anonoymous 5 ([email protected])
- Anonoymous 6 ([email protected])