-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c787d28
commit 047b7e2
Showing
1 changed file
with
77 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,84 @@ | ||
# AutoDRIVE Simulator Containerization | ||
# AutoDRIVE Simulator: RZR AEB Function | ||
|
||
This repository provides the necessary files to build a docker image for AutoDRIVE Simulator. | ||
This branch hosts the necessary codebase to run a parameter sweep for verification and validation (V&V) of autonomous emergency braking (AEB) functionality of the [RZR digital twin](https://youtu.be/PLW1-sYW6Hw) using [AutoDRIVE Simulator](https://youtu.be/t0CgNR_LgrQ). | ||
|
||
It is assumed that if the docker container is to take advantage of an NVIDIA GPU, the host machine has been properly configured by installing the necessary NVIDIA drivers, [Docker](https://docs.docker.com/engine/install/), and the | ||
[NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/index.html). | ||
This branch, in conjunction with others such as the [palmetto](https://github.com/AutoDRIVE-Ecosystem/AutoDRIVE-Simulator-HPC/tree/palmetto) and [palmetto-webviewer](https://github.com/AutoDRIVE-Ecosystem/AutoDRIVE-Simulator-HPC/tree/palmetto-webviewer) or the [rancher](https://github.com/AutoDRIVE-Ecosystem/AutoDRIVE-Simulator-HPC/tree/rancher) and [rancher-webviewer](https://github.com/AutoDRIVE-Ecosystem/AutoDRIVE-Simulator-HPC/tree/rancher-webviewer), can deploy the said V&V framework on the respective high-performance cloud computing resources. | ||
|
||
## Building an AutoDRIVE Simulator Docker Image | ||
## SETUP | ||
|
||
In order to build a docker image for AutoDRIVE Simulator, run | ||
1. Clone `rzr-aeb` branch of the `AutoDRIVE-Simulator-HPC` repository. | ||
```bash | ||
$ git clone --single-branch --branch rzr-aeb https://github.com/AutoDRIVE-Ecosystem/AutoDRIVE-Simulator-HPC.git | ||
``` | ||
2. Give executable permissions to all the Python scripts. | ||
```bash | ||
$ cd <path/to/cloned/repo> | ||
$ sudo chmod +x *.py | ||
``` | ||
4. Install the necessary dependencies as mentioned below. | ||
[AutoDRIVE Devkit's Python API](https://github.com/Tinker-Twins/AutoDRIVE/tree/AutoDRIVE-Devkit/ADSS%20Toolkit/autodrive_py) has the following dependencies (tested with Python 3.8.10): | ||
- Websocket-related dependencies for communication bridge between [AutoDRIVE Simulator](https://github.com/Tinker-Twins/AutoDRIVE/tree/AutoDRIVE-Simulator) and [AutoDRIVE Devkit](https://github.com/Tinker-Twins/AutoDRIVE/tree/AutoDRIVE-Devkit) (version sensitive): | ||
| Package | Tested Version | | ||
|---------|----------------| | ||
| eventlet | 0.33.3 | | ||
| Flask | 1.1.1 | | ||
| Flask-SocketIO | 4.1.0 | | ||
| python-socketio | 4.2.0 | | ||
| python-engineio | 3.13.0 | | ||
| greenlet | 1.0.0 | | ||
| gevent | 21.1.2 | | ||
| gevent-websocket | 0.10.1 | | ||
| Jinja2 | 3.0.3 | | ||
| itsdangerous | 2.0.1 | | ||
| werkzeug | 2.0.3 | | ||
```bash | ||
$ pip3 install eventlet==0.33.3 | ||
$ pip3 install Flask==1.1.1 | ||
$ pip3 install Flask-SocketIO==4.1.0 | ||
$ pip3 install python-socketio==4.2.0 | ||
$ pip3 install python-engineio==3.13.0 | ||
$ pip3 install greenlet==1.0.0 | ||
$ pip3 install gevent==21.1.2 | ||
$ pip3 install gevent-websocket==0.10.1 | ||
$ pip3 install Jinja2==3.0.3 | ||
$ pip3 install itsdangerous==2.0.1 | ||
$ pip3 install werkzeug==2.0.3 | ||
``` | ||
- Generic dependencies for data processing and visualization (usually any version will do the job): | ||
| Package | Tested Version | | ||
|---------|----------------| | ||
| numpy | 1.13.3 | | ||
| pillow | 5.1.0 | | ||
| opencv-contrib-python | 4.5.1.48 | | ||
```bash | ||
$ pip3 install numpy | ||
$ pip3 install pillow | ||
$ pip3 install opencv-contrib-python | ||
``` | ||
`docker build -t autodrive_simulator .` | ||
## USAGE | ||
This will automatically pull the latest AutoDRIVE Simulator release version. To use a specific release version instead, use the VERSION command line argument. For instance, you may run | ||
1. Download, unzip and launch the AutoDRIVE Simulator by referring to the detailed instructions given [here](https://github.com/AutoDRIVE-Ecosystem/AutoDRIVE/tree/AutoDRIVE-Simulator?tab=readme-ov-file#download-and-run): | ||
- Download the latest release of the standalone application of AutoDRIVE Simulator for RZR AEB scenario from [here](). | ||
- Set the execution rights of the standalone application: | ||
```bash | ||
$ cd <path/to/AutoDRIVE Simulator.x86_64> | ||
$ sudo chmod +x AutoDRIVE\ Simulator.x86_64 | ||
``` | ||
- Run the standalone simulator by double-clicking the standalone executable or via command line interface (CLI): | ||
```bash | ||
$ cd <path/to/AutoDRIVE Simulator.x86_64> | ||
$ ./ AutoDRIVE\ Simulator.x86_64 | ||
``` | ||
`docker build -t autodrive_simulator . --build-arg VERSION=Simulator-0.2.0` | ||
|
||
For testing purposes, you may want to use a local version of AutoDRIVE Simulator, as opposed to pulling a release version from github. In this case, | ||
update the Dockerfile with the folder name containing your AutoDRIVE Simulator application, and run | ||
|
||
`docker build -t autodrive_simulator . --build-arg VERSION=local` | ||
3. Execute the [`rzr_aeb`](https://github.com/AutoDRIVE-Ecosystem/AutoDRIVE-Simulator-HPC/blob/rzr-aeb/rzr_aeb.py) Python3 script to run the autonomous emergency braking (AEB) function with RZR, employing the AutoDRIVE Python API. | ||
```bash | ||
$ cd <path/to/rzr_aeb.py> | ||
$ python3 rzr_aeb.py | ||
``` |