3.1.2) Creating and Editing Mission Plan Files

Overview

Mission plan files are used as input files for the preplanned trajectory sample application. In short, a mission plan file specifies the locations of waypoints (x,y,z) to be traversed, as well as how long to wait at every waypoint, as well as additional details (e.g., the desired yaw at each waypoint and speed between the waypoints).

The easiest and safest way for an Experimenter to use a plan file is to use an existing mission plan file. If none of the existing plan files are appropriate, an Experimenter can create and edit mission plan files is to use QGroundControl, a free, open source, ground control station. To use QGroundControl, Experimenters need to download and install QGroundControl on their local computer.  With a local install of QGroundControl, the Experimenter can then also monitor the execution of the experiment as long as they enable local port forwarding when they ssh into the OEO console.

Phase 1 vs. Phase 2 Geofences

We currently support two different geofences for the UAVs:

Phase 1 geofence is the default geofence and should be used whenever the experiment can be made using the Phase 1 geofence. The advantages of using Phase 1 geofence include a larger range of altitudes (from 20m to 100m), a faster experiment scheduling time, and proximity to three fixed nodes (LW1, LW2, and LW3).

Phase 2 geofence crosses several wooded areas. Therefore, the altitude of waypoints for plan files using the phase 2 geofence is limited between 90m and 100m. Flights with this geofence require more personnel and will be harder to schedule. Do not use this geofence unless your experiment requires it. 

Note that depending on the wireless technology you use, the wireless links may "break" far sooner than the geofence limits. For example, srsRAN LTE links tend to break around 200-250m, while the distance between LW1 and LW2 is about 450m.

Finally, do not take the geofence as a personal invitation to push the boundaries. Instead think of what your experiment needs and, if possible, design a trajectory that stays away from the boundaries of the geofence.

Using QGroundControl to Create and Edit Mission Plan Files

Please follow the QGroundControl instructions for creating and editing mission plan files. At this time we only support the takeoff command and individual wapoints. Each waypoint in the plan file has a variety of options. At this time we only support the following options (in addition to latitude, longitude, and altitude):

Geofence 

It it possible to quickly check if all the waypoints of  a mission plan are located in the geofenced area by downloading the kml file of the AERPAW Geofence.  First download the relevant geofence: 

To display the downloaded geofence, in QGroundControl, in the plan view, click on "Fence" button in the upper right corner in the plan view, then select the "Polygon Fence" button underneath, then the "Load kml/shp" (in the middle top of the window), and navigate to the .kml of the geofence that was just downloaded.  Switch back to Mission in the top right and adjust the location of the waypoints if they fall outside of the geofence.  Any waypoint can be first selected (by clicking on it), and then dragged around. Please do not push the waypoints close to the boundary of the geofence if at all possible.

Rover

For a rover plan, please follow these extra instructions and use the rover geofence. 

Take-Off Location

For creating mission plan files from scratch please use 35.727330, -78.696165, as the starting location. This location is just barely inside of the AERPAW Phase 1 Geofence - go west from there when using the Phase 1 geofence.

Saving Mission Plan Files

After the mission plan file is complete, a mission plan file needs to be saved and transferred to the target E-VM (the E-VM corresponding to the portable node that is attached to the UAV or UGV that needs to execute the plan file. There are two distinct way an Experimenter can save a mission plan file:

Checking Mission Plan Files

For the convenience of the Experimenters there is a script file that will check a mission plan file for compliance with AERPAW MAVLink Filter rules on the movement of UAVs and UGVs. The script is located in /root/AERPAW-Dev/AHN/E-VM/Profile_software/ExperimentScripts/checkPlan.sh and by default it checks the default.plan mission. However, the script takes an optional argument that allows the Experimenter to check any other mission plan file.

Other Ways of Editing Mission Plan Files

Since the mission plan files are using the JSON format, they can also be created and edited using any plain text editor, or a script in any language (which can read and write the plan file). However, we do not recommend changing the files manually, as it is very easy to make a mistake and create a mission plan that will fail when executed. 

Potential Pitfall

Most commonly used autopilots allow a user to create and use a mission plan file to file a preplanned trajectory mission by uploading the mission plan file directly to the autopilot. The AERPAW platform does not support this mode of operation. Instead, in the AERPAW platform, the plan file is used as an input file for the preplanned trajectory sample application, which in turn runs on the companion computer (part of the portable node). The perceived end result is the same: a user creates a mission plan file, and the vehicle eventually follows when executed on the testbed, but the way the implementation is vastly different. AERPAW chose to use a python script to traverse the mission plan file (and issue the commands one after the other) for several reasons, including flexibility, extensibility, and safety.

By the same token do not start missions from QGroundControl (even if QGroundControl will tempt you to do so: resist!). The only way to properly start a mission in AERPAW is through startexperiment.sh in the E-VMs. You may, however, use QGroundControl to arm the UAV once the experiment starts.