main.tex 15.1 KB
Newer Older
Valentin Platzgummer's avatar
Valentin Platzgummer committed
1
\documentclass[]{scrartcl}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
2 3 4 5 6 7 8

\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[utf8]{inputenc}
\usepackage{a4wide}
\usepackage{multicol}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
9 10 11
\usepackage{url}
\usepackage{xcolor}
\usepackage{framed}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
12
\usepackage{wrapfig}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
13
\usepackage{xspace}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
14 15

\definecolor{shadecolor}{rgb}{0.9,0.9,0.9}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
16 17

%opening
Valentin Platzgummer's avatar
Valentin Platzgummer committed
18 19
\subtitle{WiMA-Extension}
\title{User Guide}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
20 21
\author{Valentin Platzgummer}

Valentin Platzgummer's avatar
Valentin Platzgummer committed
22 23
 \input{macros.tex}

Valentin Platzgummer's avatar
Valentin Platzgummer committed
24 25 26
\begin{document}

\maketitle
Valentin Platzgummer's avatar
Valentin Platzgummer committed
27 28 29
\newpage
\tableofcontents
\newpage
Valentin Platzgummer's avatar
Valentin Platzgummer committed
30
\section{Introduction} 
Valentin Platzgummer's avatar
Valentin Platzgummer committed
31 32 33 34
\subsection{Purpose}
The purpose of this document is to introduce the user to \wima (\textbf{Wi}reless \textbf{M}easurement \textbf{A}pplication) integrated in \qgc. \qgc is a ground control station software intended for the remote control of UAVs (\uav). A Documentation of the QGroundControl program can be found under \url{https://docs.qgroundcontrol.com/en/}. The WiMA extends the functionality of QGroundControl to simplify mobile UAV based coverage measurements. 
\subsection{Scope}
The current goal of the \wima is to provide software able to generate flight plans form minimal user input. This guide contains information about how to use \wima.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
35

36

37

38
 
Valentin Platzgummer's avatar
Valentin Platzgummer committed
39

Valentin Platzgummer's avatar
Valentin Platzgummer committed
40 41 42 43 44 45
\section{System Description}

\subsection{Key Features}
The extension can generate flight plans based on minimal user input. This is done by defining different areas on a world map. Additionally \wima offers to partition generated flight plans, which gives more flexibility. Partitioning makes it possibly to execute a subset of a flight plan, which makes it less tedious to cover large areas. As a security feature \wima offers a smart return to launch routine. Most return to launch implementations choose the direct path for return, which can be blocked. \wima can automatically calculate a save return path, based on user defined save areas. \wima also offers fast adaption of flight altitude and speed.   

The folder "deploy" in the QGroundControl root directory (can be cloned from Gitlab) contains a AppImage of the program. QGroundControl can be launched by double-clicking the AppImage. Currently only a Linux version is available.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
46 47 48
\subsection{Structure of QGroundControl with WiMA-Extension}
Figure \ref{fig:QGCMainButtonExplain} shows a detail view of the QGC main window. Relevant for this documentation are the flight view, the plan view and the WiMA main window. Their function will now be briefly summarized.

Valentin Platzgummer's avatar
Valentin Platzgummer committed
49
The \textbf{Plan View Window} is used to create flight plans. They can be stored as \verb|.plan| files or directly be uploaded to a vehicle (either a real one or a simulated one). Flight plans consist of way-points. Each way-point stores, among others, a coordinate (latitude, longitude, altitude) and a command (take off, land, wait for x seconds, etc.). To define a sensible flight plan a sequence of way-points should begin with a take off command and end with a land command. Besides way-points more complex patterns can be defined, which is done by inserting a Survey, a Circular Survey, a Structure Scan or a Corridor Scan. Just try them out! Using the simulator can be very helpful.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
50

Valentin Platzgummer's avatar
Valentin Platzgummer committed
51
The \textbf{Flight View Window} comes in necessary as soon as you want a vehicle to get in action. Once the vehicle established a connection (serial, TCP, UDP, etc.), QGroundControl starts to communicate automatically with it, in most cases. If not, check the settings menu of QGroundControl. A red arrow will appear on the map, showing the vehicles position and orientation. On the top indicator strip, telemetry data will be published. At the left edge a tool strip will be activated, which can be used to command the vehicle.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
52

Valentin Platzgummer's avatar
Valentin Platzgummer committed
53
The \textbf{WiMA Main Window} is used to automatically generate flight paths from minimal user input. The user can define a Measurement Area, a Service Area (for take off, land, supply tasks, etc.) and a Corridor, which connects the previous two areas. Below the WiMA main window will be described in more detail.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
54 55

\begin{figure}[h!]
Valentin Platzgummer's avatar
Valentin Platzgummer committed
56 57
	\includegraphics[width=\textwidth]{pics/QGCMainWindowCroppedRect}
	\centering
Valentin Platzgummer's avatar
Valentin Platzgummer committed
58
	\caption{Detail view of the QGC window, which appears after start-up. Marked in red is the button for switching to the Plan View Window, green indicates the Flight View button (current window) and marked in magenta is the button for switching to the WiMA Main Window.}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
59 60 61
	\label{fig:QGCMainButtonExplain}
\end{figure}

Valentin Platzgummer's avatar
Valentin Platzgummer committed
62

63
\subsection{WiMA Main Window}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
64 65
\subsubsection{WiMA Tool Strip}
\label{sec:wimaToolStrip}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
66
By clicking the wave symbol (see fig. \ref{fig:QGCMainButtonExplain}; magenta square) the WiMA Main Window appears. After entering, at the left edge, the WiMA tool strip will appear (depicted in fig. \ref{fig:WimaToolstrip}). 
Valentin Platzgummer's avatar
Valentin Platzgummer committed
67 68 69 70 71 72 73

\begin{wrapfigure}{r}{0.3\textwidth}
	\centering
	\includegraphics[width=0.3\textwidth]{pics/WiMAToolstrip}
	\caption{WiMA Toolstrip inside WiMA Main Window.}
	\label{fig:WimaToolstrip}
\end{wrapfigure}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
74
Pressing the \textbf{File} button opens a menu which offers saving and loading operations. At one hand all WiMA areas and mission items can be saved using the \verb|.wima| file extension, at the other hand the mission items only can be stored using the \verb|.plan| file extension. The Open button can be used to load previously stored files. Pressing the New button deletes all contents within the WiMA Main Window. Additionally with the Upload, Download and Clear Vehicle Mission button, the mission items (if present) can be uploaded, downloaded or be deleted from the vehicle respectively.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
75

Valentin Platzgummer's avatar
Valentin Platzgummer committed
76
The \textbf{Measure}, \textbf{Service} and \textbf{Corridor} buttons are used to insert a measurement, service and corridor area, respectively. At the time only one of each area can be inserted. To generate a flight plan, at least a measurement and a service area must be defined. Both must be overlapping.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
77

Valentin Platzgummer's avatar
Valentin Platzgummer committed
78
To generate a flight plan the \textbf{Calculate} button must be pressed. Further information about how to display the generated flight plan will follow below. In the future this button might be removed and be replaced by a routine which automatically triggers recalculation. However as the flight plan generation can be time consuming on older devices, this button will remain in the near future, up to the point, underlying routines get optimized. 
Valentin Platzgummer's avatar
Valentin Platzgummer committed
79

Valentin Platzgummer's avatar
Valentin Platzgummer committed
80
As flight generation is manually triggered the flight plans might look wrong (for e.g. after any kind of manual modification), pressing the \textbf{Calculate} button often will remove errors. If not, please report any bugs. 
Valentin Platzgummer's avatar
Valentin Platzgummer committed
81

Valentin Platzgummer's avatar
Valentin Platzgummer committed
82
The last three buttons, \textbf{Center}, \textbf{In} and \textbf{Out} are used to center the view, and for zooming.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
83 84

\subsubsection{WiMA Areas}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
85
As all ready mentioned the three areas, namely the Measurement Area, the Service Area and the Corridor, can be defined using the corresponding buttons of the WiMA Tool Strip (see \ref{sec:wimaToolStrip}).
Valentin Platzgummer's avatar
Valentin Platzgummer committed
86 87 88 89 90 91 92 93 94 95 96 97

\begin{figure}[h!]
	\begin{minipage}{0.3\textwidth}
		\centering
		\includegraphics[width=\textwidth]{pics/WiMAItemEditor}
		\caption{WiMA Item Editor at the right edge of the WiMA Main Window.}
		\label{fig:WimaItemEditor}
	\end{minipage}
    \hfill
	\begin{minipage}{0.3\textwidth}
		\centering
		\includegraphics[width=\textwidth]{pics/optimPath}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
98
		\caption{Flight path of a real vehicle (red line).}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
		\label{fig:optimPaht}
	\end{minipage} 
\end{figure}



\begin{figure}
	\begin{minipage}{0.3\textwidth}
		\centering
		\includegraphics[width=0.75\textwidth]{pics/VertexHandle}
		\caption{Adjust the vertex by dragging it's handle.}
		\label{fig:vertexHandle}
	\end{minipage}
    \hfill
	\begin{minipage}{0.3\textwidth}
		\centering
		\includegraphics[width=0.75\textwidth]{pics/VertexPlus}
		\caption{Add vertices by hitting the plus sign.}
		\label{fig:vertexPlus}
	\end{minipage}
	\hfill
	\begin{minipage}{0.3\textwidth}
		\centering
		\includegraphics[width=0.75\textwidth]{pics/MoveArea}
		\caption{Move any area by dragging its drag handle.}
		\label{fig:moveArea}
	\end{minipage}
\end{figure}





Valentin Platzgummer's avatar
Valentin Platzgummer committed
132
The \textbf{WiMA Measurement Area} defines, as the name indicates, the area of interest within which any measurements are be performed. The area will be displayed as a green shaded rectangle surrounded by a white line, after pressing the Measure button. The area will be listed at the right side within the WiMA Item Editor, after creation (see fig. \ref{fig:WimaItemEditor}). The WiMA Item Editor can be used to modify area parameters.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
133 134

% area parameter description here
Valentin Platzgummer's avatar
Valentin Platzgummer committed
135
The Offset parameter (see fig. \ref{fig:WimaItemEditor}) changes the distance between the measurement area and its surrounding polygon. The surrounding polygon is a helper to provide sufficient clearance between the measurement area and obstacles, like trees or buildings.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
136 137 138 139 140 141 142 143 144

% remove later
All other parameters shown in fig. \ref{fig:WimaItemEditor} don't yet have any impact (intended for future use).

The \textbf{WiMA Service Area} is meant to be the area were takeoff and landing happens as well as battery exchange or (hopefully no) repair work is done, hence the name. 


The \textbf{WiMA Corridor} connects the two previous areas and defines a corridor which the vehicles uses to travel between Service and Measurement Area. 

Valentin Platzgummer's avatar
Valentin Platzgummer committed
145
The flight plan will be generated such that all way-points are within or at least at the edge of the above mentioned areas. However it should be taken in account, that the vehicle could still leave the save area, even under fully functional operation. Depending on software implementation of the vehicles flight stack (firmware), the flight controller could decide to perform any kind of path optimization. Additionally drifts caused by wind gusts could occur. An example can be seen in fig. \ref{fig:optimPaht}.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
146
The vehicles flight controller has no information about any WiMA Areas, they exist exclusively within the QGroundControl application.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
147 148 149 150 151 152


All WiMA areas can be shaped by dragging the vertex handles (see fig. \ref{fig:vertexHandle}). New vertices can be created  by hitting the plus signs at the edges (see fig. \ref{fig:vertexPlus}). The whole area can be moved by dragging its drag handle (see fig. \ref{fig:moveArea}).



Valentin Platzgummer's avatar
Valentin Platzgummer committed
153
A valid configuration including Measurement, Service Area and Corridor could look like in figure \ref{fig:validConfig}.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
154 155 156 157
\begin{figure}
	\includegraphics[width=0.8\textwidth]{pics/validAreas}
	\centering
	\caption{A valid configuration of Measurement, Service Area and Corridor.}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
158
	\label{fig:validConfig}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
159 160 161
\end{figure} 

\subsubsection{The generated Flight Path}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
162 163 164 165 166 167 168 169 170 171 172 173
\begin{figure}
	\includegraphics[width=0.3\textwidth]{pics/wimaRadioButtons}
	\centering
	\caption{Checking the Mission radio button displays the mission items.}
	\label{fig:wimaRadioButtons}
\end{figure}
\begin{figure}
	\includegraphics[width=0.6\textwidth]{pics/flightPath2}
	\centering	
	\caption{The flight path generated from the areas depicted in fig. \ref{fig:validConfig}.}
	\label{fig:flightPath}
\end{figure}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
174
The flight plan can be displayed by checking the mission radio button, as depicted in fig \ref{fig:wimaRadioButtons}. An example of a generated flight path can be seen in figure \ref{fig:flightPath}. Within the green measurement area the program has generated a Circular Survey (see \ref{sec:circularSurvey} for further information). The survey has an entry and an exit point. The program has routed paths from the take off point to the surveys entry point and from the surveys exit point to the landing point. The paths have been chosen to be within the areas and as short as possible. 
Valentin Platzgummer's avatar
Valentin Platzgummer committed
175 176

\subsubsection{Circular Survey}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
177 178 179 180 181 182 183
\label{sec:circularSurvey}
\begin{figure}
	\includegraphics[width=0.8\textwidth]{pics/circularSurvey}
	\centering
	\caption{An example of a Circular Survey pattern.}
	\label{fig:circularSurvey}
\end{figure} 
Valentin Platzgummer's avatar
Valentin Platzgummer committed
184

Valentin Platzgummer's avatar
Valentin Platzgummer committed
185
The Circular Survey (see fig. \ref{fig:circularSurvey}) is a flight pattern provided by the WiMA extension. It is similar to the Survey pattern of the standard QGroundControl application. The Circular Survey was adapted for mobile coverage measurements. It consists of circle segments refereed to as transects. Ideally, the transects are connected with each other such that the path between entry and exit point is as short as possible. Currently this goal is approximated by a heuristics. The solution might not always be the global optimum.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
186

Valentin Platzgummer's avatar
Valentin Platzgummer committed
187
The \textbf{Reference} point (Circle with R symbol and Reference tag, see fig. \ref{fig:circularSurvey}) defines the center of the circle segments. It is supposed to be placed on the base stations position. 
Valentin Platzgummer's avatar
Valentin Platzgummer committed
188

Valentin Platzgummer's avatar
Valentin Platzgummer committed
189 190 191
The Circular Survey editor (on the left side of the window) offers some options. The \textbf{Altitude} input box adjusts the altitude of the survey. The distance between adjacent circle segments can be modified by changing the \textbf{Delta R} value. The circle segments are approximated by polygonal structures, consisting of way-points. Two arbitrary adjacent way-points of a circle segment have a constant angle between them. This angle can be adjusted by editing the \textbf{Delta Alpha} input box. The Delta Alpha value can assume everything between 0.3$^{\circ}$ and 90$^{\circ}$. The higher the value the rougher the circle appears. The survey will contain the less way-points the higher the Delta R and the Delta Alpha value is. The number of way-points impacts how fast the computer can do recalculations and how long the upload to the UAV takes.  In general the following holds: the less way-points the better for the overall performance.
 
Sometimes transects are short (e.g. length of less than 3 m). Such ones are often undesired, because the real vehicle will not follow them correctly. To remove them in advance, the minimal transect length can be adjusted by editing the \textbf{Min. Length} value. Transects with a length smaller than Min. Length will be removed.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
192
The \textbf{Rotate Entry Point} button and the \textbf{Relative altitude} check box don't yet have a function.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
193 194 195 196



\newpage
197
\subsection{ArduPilot Simulator}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
198
For tasks like debugging, program verification or flight plan testing a simulated vehicle can be very useful. It can save time, money and prevent you from excessive sunburns, if you forgot that you are actually outside, starring on your screen, exposed to the hot summer sun.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
199 200 201 202 203 204 205 206 207 208 209 210 211

For this task the ArduPilot simulator can be used. It simulates a vehicle runnig the ArduPilot flight stack (firmware) on your local machine. Data is beeing published by the simulator via UDP and should ideally connect to QGroundControl without any further tweaks.

The simulator is part of the ArduPilot project, which can be downloaded from Github: \url{https://github.com/ArduPilot/ardupilot}.
It is recommanded to fork the repository. After cloning the repository, the submodules must be initialized and updated. Execute the following code to do this.
\begin{shaded*}
	\begin{verbatim}
		git clone https://github.com/ArduPilot/ardupilot
		cd ardupilot
		git submodule init
		git submodule update
	\end{verbatim}	
\end{shaded*}
Valentin Platzgummer's avatar
Valentin Platzgummer committed
212
The simulator is launched by a Python script, thus Python must be installed on your machine. The simulator can be launched from your ArduPilot root directory with the following command.
Valentin Platzgummer's avatar
Valentin Platzgummer committed
213 214 215 216 217 218 219 220 221 222 223 224 225 226
\begin{shaded*}
	\begin{verbatim}
		./Tools/autotest/sim_vehicle.py -v ArduCopter
	\end{verbatim}
	
\end{shaded*}
Thereby the \verb|-v| option specifies the vehicle type. The \verb|-l| option can be used to define a custom start location. See the \verb|sim_vehicle.py --help| option for further information.
After launching, the vehicle should appear inside QGC.

 




Valentin Platzgummer's avatar
Valentin Platzgummer committed
227
\end{document}