Skip to content

Commit c5a46b2

Browse files
author
James Cyriac
committed
Added License and Readme. Repository cleanup
1 parent 5faf55f commit c5a46b2

File tree

199 files changed

+166
-7023370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+166
-7023370
lines changed

FaultLocalization.ipynb

-234
This file was deleted.

README.md

+32-90
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,43 @@
1-
Conditional Imitation Learning at CARLA
1+
AVFI: Fault Injection for Autonmous Vehicles using CARLA
22
===============
33

4-
Repository to store the conditional imitation learning based
5-
AI that runs on carla. The trained model is the one used
6-
on "CARLA: An Open Urban Driving Simulator" paper.
4+
We have provided the Dockerfile which will build an image with all
5+
the required packages and dependencies installed. Using this image
6+
is the easiest way to run the CARLA client with the Fault Injection
7+
campaign.
78

8-
Requirements
9-
-------
10-
tensorflow_gpu 1.1 or more
9+
The self driving agent with the fault injector will run from within
10+
the docker container. The server (world simulator with the AV) has
11+
to be started separately before running the agent from the docker
12+
container.
1113

12-
numpy
14+
Make sure both the server and the client are using CARLA 0.8.1
15+
https://github.com/carla-simulator/carla/releases/tag/0.8.1
1316

14-
scipy
17+
To start the fault injection campaign using the client, run
18+
`python /av_il_fi/run_CIL.py --host [serverhostname] -p [serverport] -c [citymap]`
1519

16-
carla 0.7.1
20+
The server and the client should have matching port and city parameters
21+
For more information on how to run the client and the server, check the
22+
README_CARLA_IL.md and the CARLA manual online.
1723

18-
future
24+
UIUC FI Codebase
25+
---------
26+
1. **UIUC_FI_Benchmark.py** - This file sets up the experiments that the self-driving
27+
agent will execute alongside the fault injection campaign. It also logs the metrics
28+
from the AV and Fault Injector
1929

20-
PIL
30+
2. **/agents/imitation/fault_injector.py** - Given an input and output fault model,
31+
this file is reponsible for perturbing the input measurements from the AV sensors
32+
and the output controls from the self driving agent. Takes as argument objects from
33+
classes defined in `input_fault_model` and `output_fault_model`.
2134

35+
3. **/agents/imitation/input_fault_model.py** - Defines the CameraFaultModel,
36+
MeasureFaultModel and CommandFaultModel classes as input fault models.
2237

23-
Running
24-
------
25-
Basically run:
26-
27-
$ python run_CIL.py
28-
29-
Note that you must have a carla server running . <br>
30-
To check the other options run
31-
32-
$ python run_CIL.py --help
33-
34-
35-
Dataset
36-
------
37-
38-
[The dataset can be downloaded here](https://drive.google.com/file/d/1hloAeyamYn-H6MfV1dRtY1gJPhkR55sY/view) 24 GB
39-
40-
The data is stored on HDF5 files.
41-
Each HDF5 file contains 200 data points.
42-
The HDF5 contains two "datasets":
43-
'images_center': <br>
44-
The RGB images stored at 200x88 resolution
45-
46-
'targets': <br>
47-
All the controls and measurements collected.
48-
They are stored on the "dataset" vector.
49-
50-
1. Steer, float
51-
2. Gas, float
52-
3. Brake, float
53-
4. Hand Brake, boolean
54-
5. Reverse Gear, boolean
55-
6. Steer Noise, float
56-
7. Gas Noise, float
57-
8. Brake Noise, float
58-
9. Position X, float
59-
10. Position Y, float
60-
11. Speed, float
61-
12. Collision Other, float
62-
13. Collision Pedestrian, float
63-
14. Collision Car, float
64-
15. Opposite Lane Inter, float
65-
16. Sidewalk Intersect, float
66-
17. Acceleration X,float
67-
18. Acceleration Y, float
68-
19. Acceleration Z, float
69-
20. Platform time, float
70-
21. Game Time, float
71-
22. Orientation X, float
72-
23. Orientation Y, float
73-
24. Orientation Z, float
74-
25. High level command, int ( 2 Follow lane, 3 Left, 4 Right, 5 Straight)
75-
26. Noise, Boolean ( If the noise, perturbation, is activated, (Not Used) )
76-
27. Camera (Which camera was used)
77-
28. Angle (The yaw angle for this camera)
78-
79-
80-
81-
82-
Paper
83-
-----
84-
85-
If you use the conditional imitation learning, please cite our ICRA 2018 paper.
86-
87-
End-to-end Driving via Conditional Imitation Learning. <br> Codevilla,
88-
Felipe and Müller, Matthias and López, Antonio and Koltun, Vladlen and
89-
Dosovitskiy, Alexey. ICRA 2018
90-
[[PDF](http://vladlen.info/papers/conditional-imitation.pdf)]
91-
92-
93-
```
94-
@inproceedings{Codevilla2018,
95-
title={End-to-end Driving via Conditional Imitation Learning},
96-
author={Codevilla, Felipe and M{\"u}ller, Matthias and L{\'o}pez,
97-
Antonio and Koltun, Vladlen and Dosovitskiy, Alexey},
98-
booktitle={International Conference on Robotics and Automation (ICRA)},
99-
year={2018},
100-
}
38+
4. **/agents/imitation/output_fault_model.py** - Defines Control fault models
39+
that perturb control information from the self driving agent to the AV.
10140

41+
5. **/agents/imitation/imitation_learning.py** - Original IL agent code has been
42+
modified to incorporate fault inejction through the FaultInjector class defined
43+
in `fault_injector.py`.

README_CARLA_IL.md

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
Conditional Imitation Learning at CARLA
2+
===============
3+
4+
Repository to store the conditional imitation learning based
5+
AI that runs on carla. The trained model is the one used
6+
on "CARLA: An Open Urban Driving Simulator" paper.
7+
8+
Requirements
9+
-------
10+
tensorflow_gpu 1.1 or more
11+
12+
numpy
13+
14+
scipy
15+
16+
carla 0.7.1
17+
18+
future
19+
20+
PIL
21+
22+
23+
Running
24+
------
25+
Basically run:
26+
27+
$ python run_CIL.py
28+
29+
Note that you must have a carla server running . <br>
30+
To check the other options run
31+
32+
$ python run_CIL.py --help
33+
34+
35+
Dataset
36+
------
37+
38+
[The dataset can be downloaded here](https://drive.google.com/file/d/1hloAeyamYn-H6MfV1dRtY1gJPhkR55sY/view) 24 GB
39+
40+
The data is stored on HDF5 files.
41+
Each HDF5 file contains 200 data points.
42+
The HDF5 contains two "datasets":
43+
'images_center': <br>
44+
The RGB images stored at 200x88 resolution
45+
46+
'targets': <br>
47+
All the controls and measurements collected.
48+
They are stored on the "dataset" vector.
49+
50+
1. Steer, float
51+
2. Gas, float
52+
3. Brake, float
53+
4. Hand Brake, boolean
54+
5. Reverse Gear, boolean
55+
6. Steer Noise, float
56+
7. Gas Noise, float
57+
8. Brake Noise, float
58+
9. Position X, float
59+
10. Position Y, float
60+
11. Speed, float
61+
12. Collision Other, float
62+
13. Collision Pedestrian, float
63+
14. Collision Car, float
64+
15. Opposite Lane Inter, float
65+
16. Sidewalk Intersect, float
66+
17. Acceleration X,float
67+
18. Acceleration Y, float
68+
19. Acceleration Z, float
69+
20. Platform time, float
70+
21. Game Time, float
71+
22. Orientation X, float
72+
23. Orientation Y, float
73+
24. Orientation Z, float
74+
25. High level command, int ( 2 Follow lane, 3 Left, 4 Right, 5 Straight)
75+
26. Noise, Boolean ( If the noise, perturbation, is activated, (Not Used) )
76+
27. Camera (Which camera was used)
77+
28. Angle (The yaw angle for this camera)
78+
79+
80+
81+
82+
Paper
83+
-----
84+
85+
If you use the conditional imitation learning, please cite our ICRA 2018 paper.
86+
87+
End-to-end Driving via Conditional Imitation Learning. <br> Codevilla,
88+
Felipe and Müller, Matthias and López, Antonio and Koltun, Vladlen and
89+
Dosovitskiy, Alexey. ICRA 2018
90+
[[PDF](http://vladlen.info/papers/conditional-imitation.pdf)]
91+
92+
93+
```
94+
@inproceedings{Codevilla2018,
95+
title={End-to-end Driving via Conditional Imitation Learning},
96+
author={Codevilla, Felipe and M{\"u}ller, Matthias and L{\'o}pez,
97+
Antonio and Koltun, Vladlen and Dosovitskiy, Alexey},
98+
booktitle={International Conference on Robotics and Automation (ICRA)},
99+
year={2018},
100+
}
101+

UIUC_FI_Benchmark.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Copyright (c) 2019 DEPEND Research Group at
2+
# University of Illinois, Urbana Champaign (UIUC)
3+
# This work is licensed under the terms of the MIT license.
4+
# For a copy, see <https://opensource.org/licenses/MIT>.
5+
16
from carla.benchmarks.corl_2017 import *
27
import csv
38
import math

agents/imitation/fault_injector.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Copyright (c) 2019 DEPEND Research Group at
2+
# University of Illinois, Urbana Champaign (UIUC)
3+
# This work is licensed under the terms of the MIT license.
4+
# For a copy, see <https://opensource.org/licenses/MIT>.
5+
16
import matplotlib
27
matplotlib.use("Agg")
38
import matplotlib.pyplot as plt

agents/imitation/imitation_learning.py

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Copyright (c) 2019 DEPEND Research Group at
2+
# University of Illinois, Urbana Champaign (UIUC)
3+
# Copyright (c) 2018 CARLA
4+
# This work is licensed under the terms of the MIT license.
5+
# For a copy, see <https://opensource.org/licenses/MIT>.
6+
17
from __future__ import print_function
28

39
import os

agents/imitation/input_fault_model.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Copyright (c) 2019 DEPEND Research Group at
2+
# University of Illinois, Urbana Champaign (UIUC)
3+
# This work is licensed under the terms of the MIT license.
4+
# For a copy, see <https://opensource.org/licenses/MIT>.
5+
16
import numpy as np
27
import scipy
38

agents/imitation/output_fault_model.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Copyright (c) 2019 DEPEND Research Group at
2+
# University of Illinois, Urbana Champaign (UIUC)
3+
# This work is licensed under the terms of the MIT license.
4+
# For a copy, see <https://opensource.org/licenses/MIT>.
5+
16
import numpy as np
27

38
class OutputFaultModel(object):

0 commit comments

Comments
 (0)