MASPlanes++ is a well-controlled UAV simulator, desgined to aid in the development and testing of UAV Search and Rescue mission. MASPlanes++ is implemented in Java on top of the open source simulator (MASPlanes)which is bacically used for simulating simple rescue missions where locations of survors are know in advance, so no search is required, the main problem addressed by this tool is finding a suitable UAV for each rescu task.
MASPlanes++ is developed in java 1.6
, and it should run on any of the major platforms. You need the following dependencies to compile and run the project:
Windows installation
1- java JDK EE 7 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2- Maven 3.2.3 from http://maven.apache.org/download.cgi
- Unzip the distribution archive apache-maven-3.2.3-bin.zip then apache-maven-3.2.3 will be created. Copy this folder to C:Program FilesApache Software Foundation
- Add the M2_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the M2_HOME variable in the user variables with the value C:Program FilesApache Software Foundationapache-maven-3.2.3
- In the same dialog, add the M2 environment variable in the user variables with the value %M2_HOME%bin
- In the same dialog, update/create the Path environment variable in the user variables and prepend the value %M2% to add Maven available in the command line.
- In the same dialog, make sure that JAVA_HOME exists in your user variables or in the system variables and it is set to the location of your JDK
- Open a new command prompt and run mvn --version to verify that it is correctly installed
MASPlanes ++ is under heavy development. Thus, there are no binary releases of the
software. However, executable scripts can be generated by running the maven package
target:
cd /path/to/project mvn package
In the remainder of this guide we assume that you are using a UNIX-like system. If you are on windows, replace the sh bin/program part at the beggining of the execution commands by call bin/program.bat.
In order to test the algorithm's behavior in a particular scenario, the said scenario must be first generated. This is, MASPlanes++ does not randomly generate scenarios when running. Instead, it includes a scenario generator that produces scenario descriptions. These descriptions can be saved to a file and then "solved" by MASPlanes++ using any of the implemented strategies.
You can create different simulator scenarios used to test out different algorithms (LIAM, auction-based, max-sum, etc.). It is simply a text file generated by the MASPlanes++ code that is later read to generate the environment and simulation variables. To run the scenarios for test1 generated file as following:
sh bin/simulator test1
The simulator includes a simple GUI to visualize what is happening in the simulation while it runs. The GUI has three distinct sections, as shown in this figure:
First, there is a top bar that contains a few controls:
- The Tasks button toggles the displaying of all tasks (past, present and future) in the simulation area. This is useful to quickly see how the tasks are spatially distributed in this scenario.
- The Speed slider controls how fast to run the simulation. Setting it all the way to the left makes the simulation run at 1 tenth of a second of simulated time per second of real time. The maximum speed is capped by the maximum processing capability of your machine.
- The Time label shows the current simulation time in tenths of seconds.
Second, there is a bottom bar that displays some time-related information about tasks. The whole bar is actually a histogram displaying how many tasks are introduced at each point in time. Moreover, the histogram's bars are colored according to which crisis period introduces those tasks. For example, the leftmost (purple) peakshows that there is a crisis period at the beginning of the simulation. Additionally, it shows that tasks from this crisis are gaussian distributed along a short time period. The strong blue vertical line is not related to the tasks. Instead, it marks the current point in time.
Third, there is the simulator's main display area, that depicts the simulated world. In this area you can see the planes moving as they try to service tasks. Each plane is painted in a different color, and surrounded by a circle that represents its communication range. Likewise, the light blue circular area in the lower-center of the display represents the range of an operator, depicted here as a big strong blue dot. Tasks are repented as smaller dots, painted in the same color than the plane that currently owns them.
By default, the display shows the complete plan (sequence of requests to service) of each plane, provided that the coordination algorithm computes such plan. When the algorithm does not compute the full plan, only the next task to be serviced is shown for each plane. The plans are visualized by connecting the plane to its next request, then that request to the next one, and so on and so forth.
Additionally, you can click on any plane to focus on that plane. When a plane is focused, all other planes and their tasks are painted grey, so that your focused plane stands out of the rest. Additionally, you can no longer see the full plans of other planes. Instead, you can see the focused plane's plan as well as a trail of the last tasks it has serviced. When in focused mode, click any empty space of the display to go back to the normal mode.
At some point, you probably want to generate customized problems that represent different scenarios. With MASPlanes++, you can generate such problems using the included problem generator:
To update a previous problem/scenario or write a new scenario for the simulator, execute the following command AFTER you have changed and saved the settings file, and once you are in the main directory:
cd /path/to/project sh bingenerator problem
This command generates an example scenario using defaults for all settings, and
saves it to a file named problem
under the main directory, which you can then move to whatever folder is desirable.