/DroneSimulation-Part3

A 3D simulation of multiple drones that try to land at the same airport (intermediate project)

Primary LanguageJava

DroneSimulation-Part3 - Overview

A simulation of a multiple drones which will fly in a three dimensional virtual testbed. The main object of the drones is to bring packages from one airport to another as fast as possible. This (intermediary) project will demonstrate a worst case example of the next project (DroneSimulation-Part4) of a series of projects.

Run the Project

To run the project, go to 'Virtual Testbed' -> 'src' -> 'main' -> 'MainLoopStack' and run 'MainLoopStack' as a Java Application. To run the Stack-example within the testbed do the following:

  • 'Run' -> 'Start Simulation' (the time will start running but all drones will stay steady since they do not have any packaging-requests yet)
  • Go to the 'Configure Path' menu
  • Press the 'Test Stack' button to auto-start the stack example

In this example it will be possible to go to the view of all the drones that are flying, this can be done using the Configuration panel by selecting a different drone (default drone is Drone 0). The camera view will be by default Custom which means that you can change the view on the drone using your mouse: scroll in and out to zoom, drag around in the screen to change viewing points on the drone, and press space-bar to release focus on the drone or get the focus back to the drone.

Virtual Testbed

The virtual testbed will provide a clear representation of all the drones and their actions. Inside the GUI there are multiple windows which will add a corresponding functionality to the project. A quick overview of these windows are:

  • File - Add a custom path to the testbed
  • Settings - Change the drone or the testbed settings
  • Run - Manage the flow of the program (start, reset, run tests, ...)
  • Window - Change the drone-view
  • Inputs - Standard information and settings of the testbed and drone
  • Configuration - Change the drone you are currently watching and modify its configuration, it is possible to add new drones to the testbed
  • Configure Path - Configure a given or custom path to load in the testbed

Autopilot

In this version (the third one) multiple drones will work together as a distributed system to deliver packages at the requested airport. The drones will communicate with each other to make sure that they do not crash into each other. The drones will also communicate with the airports to know if they have the permission to land. Part3 will use the same autopilot-system as Part4.

Airport

The airports all have two gates where they can have a drone. It is not possible to have two drones at the same airport. The airports have the control to grant permissions to drones and distrubute drones that are within the airport to other airports to make place for other drones within this airport. You can consider an airport as a part within the distributed system.

Changing the AutoPilot

When changes are made within the AutoPilot, you have to export the whole AutoPilot file as a jar and place this jar in the Virtual Testbed file on the following location: 'Virtual Testbed' -> 'lib' -> 'jar'. You must name this jar 'autopilot.jar' otherwise the testbed will not recognize the jar. At the moment there is no functionality to toggle between multiple jars, and thus it will not be possible to test or compare two or more autopilots at the same time.

Usefullness of this Project

The only reason that this project was made was for testing and demonstration purposes. There are still some bugs in this version of the project, which will not be fixed. For a (hopefully) bug-free project go to DroneSimulation-Part4 (https://github.com/RubenPants/DroneSimulation-Part4). This project will demonstrate how the distributed system handels a worst case scenario as a whole. This worst case scenario is the scenario where all the drones within the virtual testbed try to deliver a package to one given (central placed) airport. This will create a waiting stack at this airport. The airport will handle the drones in a First In First Out order.

History of the Project

This project is the seccond part of a larger whole: