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.

Anomaly detection analysis and labeling tool, specifically for multiple time series (one time series per category)

taganomaly Anomaly detection labeling tool, specifically for multiple time series (one time series per category). Taganomaly is a tool for creating la

Microsoft 272 Dec 17, 2022
ReferFormer - Official Implementation of ReferFormer

The official implementation of the paper: Language as Queries for Referring Video Object Segmentation Language as Queries for Referring Video Object S

Jonas Wu 232 Dec 29, 2022
Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet.

Ravens is a collection of simulated tasks in PyBullet for learning vision-based robotic manipulation, with emphasis on pick and place. It features a Gym-like API with 10 tabletop rearrangement tasks,

Google Research 367 Jan 09, 2023
Repository for code and dataset for our EMNLP 2021 paper - “So You Think You’re Funny?”: Rating the Humour Quotient in Standup Comedy.

AI-OpenMic Dataset The dataset is available for download via the follwing link. Repository for code and dataset for our EMNLP 2021 paper - “So You Thi

6 Oct 26, 2022
Learning to Self-Train for Semi-Supervised Few-Shot

Learning to Self-Train for Semi-Supervised Few-Shot Classification This repository contains the TensorFlow implementation for NeurIPS 2019 Paper "Lear

86 Dec 29, 2022
An implementation of EWC with PyTorch

EWC.pytorch An implementation of Elastic Weight Consolidation (EWC), proposed in James Kirkpatrick et al. Overcoming catastrophic forgetting in neural

Ryuichiro Hataya 166 Dec 22, 2022
A repo to show how to use custom dataset to train s2anet, and change backbone to resnext101

A repo to show how to use custom dataset to train s2anet, and change backbone to resnext101

jedibobo 3 Dec 28, 2022
Equivariant GNN for the prediction of atomic multipoles up to quadrupoles.

Equivariant Graph Neural Network for Atomic Multipoles Description Repository for the Model used in the publication 'Learning Atomic Multipoles: Predi

16 Nov 22, 2022
Boosting Monocular Depth Estimation Models to High-Resolution via Content-Adaptive Multi-Resolution Merging

Boosting Monocular Depth Estimation Models to High-Resolution via Content-Adaptive Multi-Resolution Merging This repository contains an implementation

Computational Photography Lab @ SFU 1.1k Jan 02, 2023
This is the code for Compressing BERT: Studying the Effects of Weight Pruning on Transfer Learning

This is the code for Compressing BERT: Studying the Effects of Weight Pruning on Transfer Learning It includes /bert, which is the original BERT repos

Mitchell Gordon 11 Nov 15, 2022
Using some basic methods to show linkages and transformations of robotic arms

roboticArmVisualizer Python GUI application to create custom linkages and adjust joint angles. In the future, I plan to add 2d inverse kinematics solv

Sandesh Banskota 1 Nov 19, 2021
PyTorch implementation of Towards Accurate Alignment in Real-time 3D Hand-Mesh Reconstruction (ICCV 2021).

Towards Accurate Alignment in Real-time 3D Hand-Mesh Reconstruction Introduction This is official PyTorch implementation of Towards Accurate Alignment

TANG Xiao 96 Dec 27, 2022
Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices

Intro Real-time object detection and classification. Paper: version 1, version 2. Read more about YOLO (in darknet) and download weight files here. In

Trieu 6.1k Dec 30, 2022
Using machine learning to predict undergrad college admissions.

College-Prediction Project- Overview: Many have tried, many have failed. Few trailblazers are ambitious enought to chase acceptance into the top 15 un

John H Klinges 1 Jan 05, 2022
FPSAutomaticAiming——基于YOLOV5的FPS类游戏自动瞄准AI

FPSAutomaticAiming——基于YOLOV5的FPS类游戏自动瞄准AI 声明: 本项目仅限于学习交流,不可用于非法用途,包括但不限于:用于游戏外挂等,使用本项目产生的任何后果与本人无关! 简介 本项目基于yolov5,实现了一款FPS类游戏(CF、CSGO等)的自瞄AI,本项目旨在使用现

Fabian 246 Dec 28, 2022
When Does Pretraining Help? Assessing Self-Supervised Learning for Law and the CaseHOLD Dataset of 53,000+ Legal Holdings

When Does Pretraining Help? Assessing Self-Supervised Learning for Law and the CaseHOLD Dataset of 53,000+ Legal Holdings This is the repository for t

RegLab 39 Jan 07, 2023
Code for "Learning Graph Cellular Automata"

Learning Graph Cellular Automata This code implements the experiments from the NeurIPS 2021 paper: "Learning Graph Cellular Automata" Daniele Grattaro

Daniele Grattarola 37 Oct 26, 2022
A C implementation for creating 2D voronoi diagrams

Branch OSX/Linux Windows master dev jc_voronoi A fast C/C++ header only implementation for creating 2D Voronoi diagrams from a point set Uses Fortune'

Mathias Westerdahl 481 Dec 29, 2022
[NeurIPS'20] Self-supervised Co-Training for Video Representation Learning. Tengda Han, Weidi Xie, Andrew Zisserman.

CoCLR: Self-supervised Co-Training for Video Representation Learning This repository contains the implementation of: InfoNCE (MoCo on videos) UberNCE

Tengda Han 271 Jan 02, 2023
[CVPR 2022 Oral] Versatile Multi-Modal Pre-Training for Human-Centric Perception

Versatile Multi-Modal Pre-Training for Human-Centric Perception Fangzhou Hong1  Liang Pan1  Zhongang Cai1,2,3  Ziwei Liu1* 1S-Lab, Nanyang Technologic

Fangzhou Hong 96 Jan 03, 2023