UAV-Networks-Routing is a Python simulator for experimenting routing algorithms and mac protocols on unmanned aerial vehicle networks.

Overview

UAV-Networks Simulator - Autonomous Networking - A.A. 20/21

UAV-Networks-Routing is a Python simulator for experimenting routing algorithms and mac protocols on unmanned aerial vehicle networks. The project requires Python 3, and several dependencies. This code is released for the course of Autonomous Networking - A.A. 2020-2021, to develop and test AI based protocols.

Execution

In order to execute UAV-Networks-Routing project from the terminal, clone the git project and place yourself in UAV-Networks-Routing directory, then and run:

python -m src.main

The simulation will start in a new window, the parameters of the simulation are set in src.utilities.config, have a look at the simulation setup in the configuration file to understand what is going on in the simulation.

Project structure

The project has the following structure:

.
├── README.md
├── data
│   └── tours
│       ├── RANDOM_missions1.json
│       ├── ...
│       └── RANDOM_missions90.json
└── src
    ├── main.py
    ├── drawing
    │   ├── color.py
    │   ├── picture.py
    │   ├── pp_draw.py
    │   └── stddraw.py
    ├── entities
    │   └── uav_entities.py
    ├── experiments
    ├── routing_algorithms
    │   └── georouting.py
    ├── simulation
    │   ├── metrics.py
    │   └── simulator.py
    └── utilities
        ├── config.py
        └── utilities.py

The entry point of the project is the src.main file, from there you can run simulations and extensive experimental campaigns, by setting up an appropriate src.simulator.Simulator object.

On a high level, the two main directories are data and src. The directory data must contain all the data of the project, like drones tours, and other input and output of the project. The directory src contains the source code, organized in several packages.

  • src.drawing it contains all the classes needed for drawing the simulation on screen. Typically you may want to get your hands in this directory if you want to change the aspect of the simulation, display a new object, or label on the area.

  • src.entites it contains all the classes that define the behaviour and the structure of the main entities of the project like: Drone, Depot, Environment, Packet, Event classes.

  • src.experiments it contains classes that handle experimental campaigns.

  • src.routing_algorithms it contains all the classes modelling the several routing algorithms, every routing algorithm should have its own class, see section Adding routing algorithms below.

  • src.simulation it contains all the classes to handle a simulation and its metrics.

  • src.utilities it contains all the utilities and the configuration parameters. In particular use src.utilities.config file to specify all the constants and parameters for a one-shot simulation, ideal when one wants to evaluate the quality of a routing algorithm making frequent executions. Constants and parameters should always be added here and never be hard-coded.

Understand the project

In this section it will be given a high level overview of the project. Before adding any new file to the project, as a contribute, you may want to run some simulations, understand the idea behind the simulator, and the routing algorithm available.

Make some simulations

Run a simulation from src.main, on a new window it will be displayed a live simulation. At the end of the simulation some metrics will be printed. In the main function, a Simulator object is instantiated with default parameters coming from the src.utilities.config. In order to make different executions and simulations, you may want to let the parameters in the config file vary appropriately.

Let us make an example with an excerpt of the configuration file:

SIM_DURATION = 7000   # int: steps of simulation. # ***
TS_DURATION = 0.150   # float: seconds duration of a step in seconds.
SEED = 1              # int: seed of this simulation.

N_DRONES = 5          # int: number of drones. # ***
ENV_WIDTH = 1500      # float: meters, width of environment.
ENV_HEIGHT = 1500     # float: meters, height of environment.

# events
EVENTS_DURATION = SIM_DURATION   # int: steps, number of time steps that an event lasts.
D_FEEL_EVENT = 500               # int: steps, a new packet is felt (generated on the drone) every 'D_FEEL_EVENT' steps. # ***
P_FEEL_EVENT = .25               # float: probability that the drones feels the event generated on the drone. # ***

From this excerpt, one expects a simulation that lasts for 7000 steps of 0.150 seconds each. The executions will run with seed 1, with 5 drones flying over an area of 1500m * 1500m. The events on the map last for the entire duration of the simulation. The drones are set to feel an event every 500 steps, but they feel it with probability 0.25.

Simulator and K-Routing algorithm

In the simulator, time is simulated. A simulation lasts for SIM_DURATION steps, lasting TS_DURATION seconds each. During a single step, as one can see from src.simulator.Simulator.run(), essentially 4 things happen, for every drone:

  1. it feels an event, if it's the right moment and if it is lucky enough to grasp it from the environment.

  2. it updates the packets in its buffer, deleting all the packets that are expired.

  3. it routes its buffer to its neighbours, if it has any.

  4. it sets its next waypoint and moves towards it, it can be either a point in the map, or the depot, depending on what the routing algorithm decides for it.

The UAVs can have any possible path/tour given by a json file (a dict id_drone : list of waypoints). Notice that a waypoint is a 2-tuple (x, y), the coordinate of the point. Events are generated right on the drone. If an event is successfully "felt", the drone generates a packet out of it and it is responsible to bring it to the depot according to the routing algorithm currently running. Packets can expire and have a TTL to avoid infinite pin-pongs, that are seen to be rare.

The routing algorithms in the project go under the directorysrc.routing_algorithms .

Adding routing algorithms

Routing algorithms should be implemented as a class, extending the src.routing_algorithms.BASE_routing class. This will need the definition of required methods, such as: routing().

Once created, the class should be declared in the configuration file, specifically in the RoutingAlgorithm enumeration, in which it suffices to give a name to the enumeration variable and associate it to the class name. For instance if the created routing algorithm class is named MyRouting, then add in src.utilities.config to the RoutingAlgorithm enumeration the enumeration variable MY_ROUTING = MyRouting.

To run a simulation with your new routing algorithms, just set the attribute ROUTING_ALGORITHM in the config file with the enumeration variable of your choice.

Contacts

For further information contact Andrea Coletta at coletta[AT]di.uniroma1.it.

Thanks and License

The current version of the simulator is free for non-commercial use. The simulator was done in collaboration with Matteo Prata, PhD Student at La Sapienza prata[AT]di.uniroma1.it.

Deep deconfounded recommender (Deep-Deconf) for paper "Deep causal reasoning for recommendations"

Deep Causal Reasoning for Recommender Systems The codes are associated with the following paper: Deep Causal Reasoning for Recommendations, Yaochen Zh

Yaochen Zhu 22 Oct 15, 2022
Codebase for Inducing Causal Structure for Interpretable Neural Networks

Interchange Intervention Training (IIT) Codebase for Inducing Causal Structure for Interpretable Neural Networks Release Notes 12/01/2021: Code and Pa

Zen 6 Oct 10, 2022
face2comics by Sxela (Alex Spirin) - face2comics datasets

This is a paired face to comics dataset, which can be used to train pix2pix or similar networks.

Alex 164 Nov 13, 2022
Object Database for Super Mario Galaxy 1/2.

Super Mario Galaxy Object Database Welcome to the public object database for Super Mario Galaxy and Super Mario Galaxy 2. Here, we document all object

Aurum 9 Dec 04, 2022
Testbed of AI Systems Quality Management

qunomon Description A testbed for testing and managing AI system qualities. Demo Sorry. Not deployment public server at alpha version. Requirement Ins

AIST AIRC 15 Nov 27, 2021
This is the official github repository of the Met dataset

The Met dataset This is the official github repository of the Met dataset. The official webpage of the dataset can be found here. What is it? This cod

Nikolaos-Antonios Ypsilantis 35 Dec 17, 2022
Code for HodgeNet: Learning Spectral Geometry on Triangle Meshes, in SIGGRAPH 2021.

HodgeNet | Webpage | Paper | Video HodgeNet: Learning Spectral Geometry on Triangle Meshes Dmitriy Smirnov, Justin Solomon SIGGRAPH 2021 Set-up To ins

Dima Smirnov 61 Nov 27, 2022
A collection of Google research projects related to Federated Learning and Federated Analytics.

Federated Research Federated Research is a collection of research projects related to Federated Learning and Federated Analytics. Federated learning i

Google Research 483 Jan 05, 2023
A more easy-to-use implementation of KPConv based on PyTorch.

A more easy-to-use implementation of KPConv This repo contains a more easy-to-use implementation of KPConv based on PyTorch. Introduction KPConv is a

Zheng Qin 36 Dec 29, 2022
Code, environments, and scripts for the paper: "How Private Is Your RL Policy? An Inverse RL Based Analysis Framework"

Privacy-Aware Inverse RL (PRIL) Analysis Framework Code, environments, and scripts for the paper: "How Private Is Your RL Policy? An Inverse RL Based

1 Dec 06, 2021
Code for Multimodal Neural SLAM for Interactive Instruction Following

Code for Multimodal Neural SLAM for Interactive Instruction Following Code structure The code is adapted from E.T. and most training as well as data p

7 Dec 07, 2022
Code for paper Decoupled Dynamic Spatial-Temporal Graph Neural Network for Traffic Forecasting

Decoupled Spatial-Temporal Graph Neural Networks Code for our paper: Decoupled Dynamic Spatial-Temporal Graph Neural Network for Traffic Forecasting.

S22 43 Jan 04, 2023
Safe Local Motion Planning with Self-Supervised Freespace Forecasting, CVPR 2021

Safe Local Motion Planning with Self-Supervised Freespace Forecasting By Peiyun Hu, Aaron Huang, John Dolan, David Held, and Deva Ramanan Citing us Yo

Peiyun Hu 90 Dec 01, 2022
A small fun project using python OpenCV, mediapipe, and pydirectinput

Here I tried a small fun project using python OpenCV, mediapipe, and pydirectinput. Here we can control moves car game when yellow color come to right box (press key 'd') left box (press key 'a') lef

Sameh Elisha 3 Nov 17, 2022
A Simulation Environment to train Robots in Large Realistic Interactive Scenes

iGibson: A Simulation Environment to train Robots in Large Realistic Interactive Scenes iGibson is a simulation environment providing fast visual rend

Stanford Vision and Learning Lab 493 Jan 04, 2023
Code for Two-stage Identifier: "Locate and Label: A Two-stage Identifier for Nested Named Entity Recognition"

Code for Two-stage Identifier: "Locate and Label: A Two-stage Identifier for Nested Named Entity Recognition", accepted at ACL 2021. For details of the model and experiments, please see our paper.

tricktreat 87 Dec 16, 2022
Pytorch library for seismic data augmentation

Pytorch library for seismic data augmentation

Artemii Novoselov 27 Nov 22, 2022
The source code of the paper "SHGNN: Structure-Aware Heterogeneous Graph Neural Network"

SHGNN: Structure-Aware Heterogeneous Graph Neural Network The source code and dataset of the paper: SHGNN: Structure-Aware Heterogeneous Graph Neural

Wentao Xu 7 Nov 13, 2022
This is the PyTorch implementation of GANs N’ Roses: Stable, Controllable, Diverse Image to Image Translation

Official PyTorch repo for GAN's N' Roses. Diverse im2im and vid2vid selfie to anime translation.

1.1k Jan 01, 2023
Deep Learning GPU Training System

DIGITS DIGITS (the Deep Learning GPU Training System) is a webapp for training deep learning models. The currently supported frameworks are: Caffe, To

NVIDIA Corporation 4.1k Jan 03, 2023