/DroneSimulation-Part1

A 3D-simulation of a drone in a virtual testbed

Primary LanguageJava

DroneSimulation-Part1 - Overview

A simulation of a drone which will fly in a three dimensional virtual testbed. An array of unit cubes will be loaded inside the virtual testbed, the main objective of the drone is to collect all cubes as fast as possible (no order specified).

Run the Project

To run the project, and thus open the testbed's Graphical User Interface, go to 'Virtual Testbed' -> 'src' -> 'main' -> 'MainLoop' and run 'MainLoop' as a Java Application.

Virtual Testbed

The virtual testbed will provide a clear representation of the drone and its 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's configuration
  • Configure Path - Configure a given or custom path to load in the testbed

Autopilot

In this version (the first one) the autopilot will perform its actions purely based on its camera-view. This means that if the drone must go up based on its input image, the drone will go up. There is no PID-controller in this part (for that see Part 2) so the drone will not fly very stable. A solution of this problem can be found in the next parts of the project.

Automatic Running Tests

It is possible to test the drone on randomly generated paths. Go inside the testbed's GUI to 'Run' -> 'Run tests', a new window will pop up. Within the testing frame you can manage the tests: change the amount of tests, change the speed of the drone during the tests, change the maximum time the drone has to accomplish one testing path, and more.

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.

History of the Project

This project is the seccond part of a larger whole: