Mission Planner Automated Missions

Goal

The goal of this project is to write Python scripts to automate the process of setting up missions in Mission Planner (WARG’s Ground Control Station software). The program will scan a QR code with a list of waypoints the drone will need to travel. The list of waypoints will then be uploaded to Mission Planner and sent to the drone via a MAVLink message.

Plan

Unfortunately, Mission Planner uses the Python 2.7 interpreter to run Python Scripts. This means that there is very limited library support and we cannot run the QR Scanner in Mission Planner. To solve this issue we run the QR Scanner outside of Mission Planner and port the information from the QR code to a text file. The script in Mission Planner will read the text file until it reads the list of waypoints and proceed to send the information to the drone. This is a pretty hacky way of solving the issue but it works so it is good enough for us for now.

 

QR Code Scanner Script

The program will scan a QR code with a list of waypoints and output the contents to a text file.

Note: Most of the QR Code Scanner code is already written and available in the common's submodule.

Tasks

  • Create a main_QR.py file to run the QR Code Scanner code

  • Get the output of the QR code and write the list of waypoints to a text file

  • Test the code to ensure it correctly outputs the QR code message and write test cases for your code

 

Mission Planner Script

The script will first continuously poll the text file until it receives a list of waypoints. Once it receives a list of waypoints the script will send a MAVLink message to the drone.

Note: During competition this is the part where the issue occurred. For some reason the waypoints weren’t being uploaded to Mission Planner. This part will need to be debugged.

Tasks

  • Upload the waypoints to Mission Planner

  • Create MAVLink message with waypoints from text file

  • Send the waypoints to the drone

  • Test to ensure the upload and sending MAVLink messages are successful and write test cases for your code