Skip to content

AutoDRIVE-Ecosystem/AutoDRIVE-AVLDC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoDRIVE       Autoware

SETUP

  1. Clone this repository.

    $ git clone https://github.com/Tinker-Twins/AutoDRIVE-AVLDC.git
  2. Give executable permissions to all the Python scripts.

    $ cd <path/to/cloned/repo>
    $ sudo chmod +x *.py
  3. Install the necessary dependencies as mentioned below. AutoDRIVE Devkit's Python API has the following dependencies (tested with Python 3.8.10):

    • Websocket-related dependencies for communication bridge between AutoDRIVE Simulator and 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
      $ 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
      scipy 1.10.1
      $ pip3 install numpy
      $ pip3 install pillow
      $ pip3 install opencv-contrib-python
      $ pip3 install scipy

USAGE

OpenCAV AEB Demo

  1. Download, unzip and launch the AutoDRIVE Simulator by referring to the detailed instructions given here:

  2. Launch AutoDRIVE Devkit to execute AEB script (a) or (b), which also creates a shared memory for the AVL Model.CONNECT project.

    (a) Execute the aeb_emulation Python3 script for demonstrating the "emulated" autonomous emergency braking (AEB) function with OpenCAV, employing the AutoDRIVE Python API. This algorithm uses ground truth distance to collision (DTC) metric to trigger AEB.

     $ cd <path/to/aeb_emulation.py>
     $ python3 aeb_emulation.py

    (b) Execute the aeb_stimulation Python3 script for demonstrating the "stimulated" autonomous emergency braking (AEB) function with OpenCAV, employing the AutoDRIVE Python API. This algorithm uses camera-based perception for object detection and classification, and triggers the AEB based on the class, size and confidence of the detection.

     $ cd <path/to/aeb_stimulation.py>
     $ python3 aeb_stimulation.py
  3. Launch and run the AVL Model.CONNECT project, which connects to the shared memory created by the AutoDRIVE Devkit using AVL Python API.

    Notes:

    • Launching AutoDRIVE Devkit alone will print the default value for all the bytes that haven't yet been written to (since they are written by the AVL Model.CONNECT project). The bytes written by the AutoDRIVE Devkit itself will be updated and printed accordingly.
    • Launching the AVL Model.CONNECT project before the AutoDRIVE Devkit will throw an error since the shared memory has not yet been created.
OpenCAV AEB Demo Result: Emulation Mode
AutoDRIVE Simulator AutoDRIVE Devkit AVL Model.CONNECT
OpenCAV AEB Demo Result: Stimulation Mode
AutoDRIVE Simulator AutoDRIVE Devkit AVL Model.CONNECT