GithubHelp home page GithubHelp logo

carla-real-traffic-scenarios's Introduction

CARLA real traffic scenarios

readme-main

NGSIM freeway openDD roundabout
readme-ngsim readme-opendd

Features

  1. Handmade maps for CARLA that mimic real-world roads
  2. Code that transfers real-world traffic from datasets into CARLA
  3. 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.

Prerequisites

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

1. CARLA

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

2. Maps

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

3. Datasets

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

Quickstart

Terminal I
cd $CARLA_ROOT
./CarlaUE4.sh -benchmark -fps=10
Terminal II

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

Feedback

We encourage you send us any kind of feedback on what should be improved, what's not working etc.

Credits

Code for interfacing with NGSIM dataset was based on https://github.com/Atcold/pytorch-PPUU

Authors (cannot be disclosed yet):

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.