Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/manual driving #5

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d705fcc
Refactor if statement
micmarty-deepsense May 8, 2020
ea1349c
Update docstring
micmarty-deepsense May 8, 2020
d2f5f49
Add collision sensor
micmarty-deepsense May 11, 2020
74511fa
Remove unused json
micmarty-deepsense May 11, 2020
8c1b3ae
Rename to RoundaboutScenario
micmarty-deepsense May 11, 2020
c9f244c
CircleArea: location -> center
micmarty-deepsense May 11, 2020
a02071f
Debug drawing function + usage
micmarty-deepsense May 11, 2020
0917d76
Use attrs initialized in parent class
micmarty-deepsense May 11, 2020
4ad97db
Remove libs."...", add missing imports
micmarty-deepsense May 11, 2020
5586b9b
Initialize _route in __init__ (style checker)
micmarty-deepsense May 11, 2020
6385d45
Remove unused json file
micmarty-deepsense May 11, 2020
233dfd5
Disable debug mode
micmarty-deepsense May 11, 2020
ff0fda7
Update docs
micmarty-deepsense May 11, 2020
bd73da0
Remove unused code
micmarty-deepsense May 11, 2020
f6015f6
Add note about synchronous mode
micmarty-deepsense May 11, 2020
dae64af
Refactor synch -> SYNCHRONOUS_MODE
micmarty-deepsense May 11, 2020
b966d17
Fix imports (remove libs.carla_rea....)
micmarty-deepsense May 11, 2020
2748de8
Remove unused imports
micmarty-deepsense May 11, 2020
fc5b55f
Simplify __contains__, remove distance()
micmarty-deepsense May 12, 2020
b5965fa
Replace comment with var name, set life_time to 1/FPS
micmarty-deepsense May 12, 2020
20b303e
Move __main__ to example/
micmarty-deepsense May 12, 2020
c383182
Update readme
micmarty-deepsense May 12, 2020
8224760
Include json files in project package
micmarty-deepsense May 12, 2020
7bf70db
Update README
micmarty-deepsense May 12, 2020
9b22ac9
Add no_rendering_mode.py
micmarty-deepsense May 12, 2020
90b2ee0
Load town03 map
micmarty-deepsense May 12, 2020
b9f880f
Remove print statement
micmarty-deepsense May 12, 2020
1043d28
count episode reward, display messages
micmarty-deepsense May 12, 2020
a2be65e
...
micmarty-deepsense May 12, 2020
ebb96da
Fix
micmarty-deepsense May 12, 2020
4c4880d
Increase resoluion
micmarty-deepsense May 12, 2020
7d57e1e
Merge branch 'master' into feature/manual-driving
micmarty-deepsense May 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include LICENSE
include README.md
include carla_real_traffic_scenarios/roundabouts/Town03/data/*.json
55 changes: 39 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,53 @@
![](https://img.shields.io/badge/release-TODO-brightgreen.svg?style=popout-square)
![](https://img.shields.io/badge/CARLA-0.9.6+-blue.svg?style=popout-square)
![](https://img.shields.io/badge/python-3.6%20|%203.7%20|3.8-blue.svg?style=popout-square)
![](https://img.shields.io/badge/license-MIT-orange.svg?style=popout-square)

CARLA real traffic scenarios
========================

![I80 demo](I80_demo.gif)

### TL:DR
### TL;DR

- We prepared CARLA maps that mimic real-world roads from NGSim dataset (I80 and US101),
- we train and benchmark policies on real-world lane-change manuveurs from NGSim dataset,
- we share code for running NGSim-based scenarios in CARLA. Scenarios interface is similar to open-ai gym interface.
- Custom CARLA maps that mimic real-world roads and human driver behaviors from NGSim dataset (I80 and US101)
- We've trained and benchmarked policies on real-world lane change maneuvers from NGSim dataset
- We provide the source code for running NGSim-based scenarios in CARLA. Scenario interface is similar to [openai gym](https://gym.openai.com/) interface

### How to run examples?
### Prerequisites
1. Download and extract CARLA ([0.9.6 download link](https://github.com/carla-simulator/carla/releases/tag/0.9.6)). Then, add PythonAPI wheel to your `PYTHONPATH`:
```bash
export CARLA_ROOT=/path/to/your/carla/release-folder
export PYTHONPATH=$CARLA_ROOT/PythonAPI/carla/dist/carla-0.9.6-py3.6-linux-x86_64.egg:$PYTHONPATH
```
2. You also need to install our asset packages with two new CARLA maps
- Download archives - **TODO LINK**
- Copy archives to `$CARLA_ROOT/Import`
- Import `cd Import && ./ImportAssets.sh`

1) You need to add CARLA python client whl to your pythonpath:
```
export CARLA_ROOT=/path/to/your/carla/release
export PYTHONPATH=$CARLA_ROOT/PythonAPI/carla/dist/carla-0.9.6-py3.6-linux-x86_64.egg:$PYTHONPATH
```
2) You need to install our asset packs with two new CARLA maps - DOWNLOAD_LINK_TODO
### Quickstart

### Examples:
##### Terminal I
```bash
./CarlaUE4.sh -benchmark -fps=10
```

* `example/example_replay_ngsim_in_carla.py` - shows how to run scenario in training loop.
* `example/example_replay_ngsim_in_carla.py` - shows how to replay NGSim dataset in CARLA. It was used to generated GIF in this README file.
##### Terminal II
```bash
# (wait until server loads)
python example/example_roundabout_scenario_usage.py
```
##### Terminal III
```bash
# (wait until scenario script connects successfully, map rendering may tak a while)
python example/manual_driving.py --res 900x500
```
Code tested with CARLA 0.9.6.

Code is tested with CARLA 0.9.6.
### Real-traffic scenarios
* `python example/example_replay_ngsim_in_carla.py` - shows how to run scenario in training loop.
* `python example/example_replay_ngsim_in_carla.py` - shows how to replay NGSim dataset in CARLA. It was used to generated GIF in this README file.

### Credits

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

This file was deleted.

Loading