Giter Club home page Giter Club logo

autointersection's Introduction

autointersection

A distributed solution to let autonomous vehicles cross an intersection without relying on a central server.

Requirements

  1. OS: Ubuntu 18.04 LTS (or above), Fedora 30 (or above), MacOS Mojave (or above).
  2. Erlang/OTP 21 or 22.

Scripts won't run on a non Unix-like OS while the Erlang code will.

Intro

The idea is to solve the problem for a generic intersection. Autonomous vehicles can not rely on a central server, they have to cooperate with each other to cross the intersection by taking decisions which ensure a fair and safe policy. In particular there are two components: vehicles and the environment. The latter is necessary in this context in order to simulate sensors that are usually inside autonomous vehicles which allows them to interact with the environment (e.g. proximity sensors, GPS, cameras, etc\dots). The system is fault tolerant, but neither byzantine processes nor cybersecurity hazards are taken in consideration.

A detailed description of the whole system with test cases and how to run them can be found in the report.pdf (report/repot.pdf)

Getting started

Clone (or download) the repository: git clone https://github.com/GabVenturato/autointersection.git

Move to the repository location: cd path-to-repository

Move into the repository root (all scripts must be run from the repo root!): cd autointersection

Compile code and give execution permissions to scripts: make all

Start the environment: ./test/start_environment.sh

Start a vehicle: ./test/start_vehicle.sh 1 R_1 R_30 The first parameter is the index of the vehicle, second and third are start and destination positions. See figure 4.1 at page 20 in the report: report/report.pdf for more available positions.

Automated vehicle generator

In order to spawn multiple vehicles at random locations run the following command (from the repository root, as always): ./test/start_generator.sh <vehicle number> <fail ratio> [relaive sw fail ratio] [max fail timeout (ms)]

Where:

  1. <vehicle number\> is mandatory and represents the number of vehicles that will be generated.
  2. <fail ratio> is mandatory and represents the percentage (expressed as a number 0 <= x <= 1) of failures that will be generated.
  3. [relaive sw fail ratio] is optional and represents the ratio of software failures caused by the generator. (e.g. if set to 0.5, half of the faults will be software and the other half will be mechanical).
  4. [max fail timeout (ms)] represents the maximum time in milliseconds within which the fault will be caused, considering the moment when the vehicle starts. (e.g. if set to 20000, the vehicle can fail after a maximum of 20s from its start).

To stop the execution press ctrl+C and then (a)bort. The information is all printed in the same shell, so it is less clear as what is happening. The logs for each vehicle can be found in the log/ directory.

Tests with Docker can also be performed, see Chapter 5 (Validation) in the report for more information.

Known bugs

  • Causing a badarith exception on a component does not cause the whole supervision tree to be terminated, and so the application won't be killed.
  • On MacOS the script start_vehicle.sh does not work. Probably due to parameters parsing problem.

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.