http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&user=Xice&feedformat=atomPaparazziUAV - User contributions [en]2024-03-29T10:51:28ZUser contributionsMediaWiki 1.37.1http://wiki.paparazziuav.org/w/index.php?title=GCS&diff=10639GCS2011-11-22T15:58:40Z<p>Xice: /* Features */</p>
<hr />
<div>Ground Control Station<br />
<br />
{|<br />
|-valign="top"<br />
|__TOC__<br />
|<br />
[[Image:gcs.jpg|frame|right|The Paparazzi Ground Control Station is the heart of the system and the user's primary interaction interface.]]<br />
|}<br />
<br />
== Intro ==<br />
<br />
The versatile Paparazzi Ground Control Station is an operator control unit ground control software for micro air vehicles. It allows to visualize and control a micro air vehicle during development and operation, both indoors and outdoors. With a flexible software architecture it supports multiple MAV types/autopilot projects. The purpose of the GroundControlStation is real-time monitoring of an UAS.<br />
<br />
== Features== <br />
<br />
The Paparazzi GroundControlStation is a feature-rich application with fully customizable views, each containing a collection of the most useful interface components for a particular purpose.<br />
<br />
* Simultaneous flying multi UAS support<br />
* Multi-system support (multiple procotols, multiple autopilots/projects) by writing a IVY Plugin<br />
* 2D Map capable of displaying Google Satellite, OpenStreetMaps Images and Microsoft Satellite Maps<br />
* Mission planning <br />
* Realtime movable waypoints<br />
* Realtime flightplan adjustments if needed<br />
* System status overview<br />
* Realtime Airframe in Air tuning and calibration<br />
* Supports rotary and fixed-wing e.g. Airplanes, helicopters, coaxial and quadrotors<br />
* Definable Hotkeys for quick simple in the fieled control<br />
* Voice status output<br />
* Full freely configurable GUI layout<br />
<br />
== Strips ==<br />
<br />
Each A/C has an associated strip that displays information about the A/C and provides buttons for common commands. The strip has the following layout by default. Paparazzi GCS is very flexible and the strip can have more or less buttons according to your configuration.<br />
<br />
[[Image:strip.png|Aircraft information strip]]<br />
<br />
=== Displayed information ===<br />
<br />
* Left: Flight information<br />
* Center: Navigation information<br />
* Right: Navigation control<br />
* Bottom: Custom navigation and setting buttons<br />
<br />
=== Actions ===<br />
<br />
Every change in the waypoints (position or/and altitude) must be confirmed with the dialog box that appears after the move. A modified waypoint remains animated on the map and the GCS continues to re-send the move request until confirmation is received from the aircraft.<br />
When clicked, the '''Mark''' button places a mark on the map at the A/C position. A snapshot from the video plugin is associated to this mark and can be viewed by moving the mouse over the mark. A click on the mark opens a dialog box allowing to delete the mark.<br />
A click on the colored bar at the top selects the corresponding A/C in the [[#notebook|Notebook]].<br />
<br />
== Map ==<br />
<br />
[[Image:GCSmap.png|thumb|400px|Sample map showing the various features]]<br />
<br />
=== Display ===<br />
<br />
The map display contains the following information:<br />
* The A/C track: it can be erased ''via'' the ''Clear track'' option from the A/C menu.<br />
* The A/C label (in clear blue near the A/C) contains the name of the A/C (Plaster), it's altitude (218 m) and it's ground speed (11.99 m/s). This option default is off. It can be activated with the ''A/C label'' option from the A/C menu.<br />
* The carrot (the orange triangle). This is the point the A/C is following during autonomous navigation.<br />
* The waypoints defined in the flight plan (blue diamonds).<br />
* The intended trajectory is shown as a green line, in this example a circle around waypoint 2.<br />
* The default background is black. [[Maps|Maps]] can be loaded to provide navigation reference.<br />
* The camera footprint (the grey polygon) is representative of the swath of land currently seen by the onboard camera. This option default is off. It can be activated with the ''Cam footprint'' option from the A/C menu. see also [[Pan_Tilt_Camera]]<br />
* The WGS84 coordinates of the mouse cursor are displayed at the top right hand corner (43.462019 1.270474).<br />
* A UTM kilometric grid can be added to the background ''via'' the ''UTM grid'' option from the ''Nav'' menu.<br />
* The height Above Ground Level (AGL) displays the ground altitude of the mouse near the geographic position in the top right hand corner. The [http://srtm.usgs.gov/ SRTM] option must be enabled in the ''Nav'' menu and the height data must be downloaded as described [[Maps#Height_Data|here]].<br />
<br />
=== Navigation ===<br />
<br />
You can pan/zoom the map using the following:<br />
* Pan with the blue arrows on the map or use the arrow keys on the keyboard<br />
* zoom in/out with the mouse scroll wheel, the page up/page down buttons or the small up/down buttons at the top right hand corner where the zoom factor is displayed<br />
* fit the map to the window, in order to see all the waypoints and A/C, with the '''f''' key or the ''Fit'' option from the ''Nav'' menu;<br />
* center the map on an A/C with the ''Center A/C'' option from the corresponding A/C menu.<br />
<br />
=== Map Photo Tiles ===<br />
The default black background can be automatically filled with calibrated satellite photo tiles from Openstreetmaps, Google Maps or MS Maps. Note: If you download too much map data from Google into the GCS you may be blocked for downloading further map data for 24 hours. With OpenStreetmaps data and MS data there is no such limitation.<br />
<br><br />
See the [[Maps]] page for more info.<br />
<br />
=== Waypoint Editing ===<br />
<br />
The properties of any waypoint in the currently loaded flight plan can be modified by two methods:<br />
* Drag and drop the waypoints to a new location (a confirmation dialog will appear).<br />
* A single left click on a waypoint opens a dialog box where you can edit the waypoint's coordinates and altitude.<br />
<br />
Waypoint edits are sent to the aircraft immediately upon confirmation in the dialog box. The GCS will re-send the data and the waypoint will animate until the aircraft confirms receipt of the move request. New waypoints cannot be added during flight.<br />
<br><br />
See the [[Flight_Plans|Flight plans]] and [[Flight_Plan_Editor|Flight Plan Editor]] pages for more information on waypoints.<br />
<br />
== Notebook ==<br />
<br />
The notebook frame contains one page for each running aircraft. Each aircraft page is itself divided into subpages displaying telemetry data and giving access to the autopilot tuning parameters.<br />
<br />
Note that the colored tabs at the top of this section allow the user to select among multiple aircraft.<br />
<br />
=== Flight Plan ===<br />
<br />
<center><br />
[[Image:GCSfp.png|Flight plan tree]]<br />
</center><br />
<br />
The full tree of the flight plan is given in this page. The current block and the current stage are highlighted. A double-click on a block allows the operator to immediately switch navigation to this block.<br />
<br><br />
See the [[Flight_Plans|Flight plans]] and [[Flight_Plan_Editor|Flight Plan Editor]] pages for more information on flight plans.<br />
<br />
=== Settings ===<br />
<center><br />
[[Image:GCSsettings.png|Settings tab]]<br />
</center><br />
The setting page allows the operator to change variable values during flight. The layout of the page is generated from the <tt>dl_settings</tt> section of the settings.xml file, one tab is associated to every section and sub-section.<br />
<br />
On each line is displayed (from left to right), the name of the variable, its current value (periodically sent by the A/C), a slider or radio buttons for user input, and commit/undo buttons. Also note, clicking on the current value will send a request to obtain the current value from the aircraft.<br />
<br><br />
See the [[Telemetry#Settings|Telemetry]] page for more information on settings.<br />
<br><br />
The save button of this tab opens the following popup which proposes to the user to save the current values in the airframe file (according to the <tt>param</tt> attribute in the [[Telemetry#Settings|setttings]] configuration file). The values of the checked rows will be saved in the airframe file (or any other file) for further use. Units (e.g. deg or rad) are taken into account. '''It is recommended to backup the airframe file before overwriting it with this utility''' (even if time-stamped copy of the airframe file is actually automatically done).<br />
<br />
Symetrically, the Upload button of this dialog button will send all the checked values of the airframe file to the live aircraft.<br />
<center><br />
[[Image:Save settings.png|Settings tab]]<br />
</center><br />
<br />
=== PFD ===<br />
<br />
[[Image:GCSpfd.png|Primary Flight Display]]<br />
<br />
The Primary Flight Display contains an artificial horizon and two scales displaying the current ground speed (left side) and the altitude (right side). Minimum and maximum speeds are shown under and above the speed scale. A click on the scale resets these values to the current speed value.<br />
<br />
=== GPS, Infrared, Wind ===<br />
<br />
The '''GPS''' page gives the list of satellites tracked by the receiver and their respective signal strengths in dB.<br />
(35 is low, 45 is excellent) and if they are used to compute the fix (green: used, red:not used). This page may help to tune the position of the receiver on the aircraft relatively to other components (e.g. datalink and video transmitters).<br />
<br />
The '''Infrared''' page is only used for aircraft not equipped with the vertical infrared sensor. This page reports the required pre-flight calibration value as well as the evolution of the in-flight calibration correction factor (from hybridization with the GPS information).<br />
<br />
The '''Misc''' page displays the estimated wind velocity computed by the ground station during flight and relayed back to the aircraft. Wind velocity is estimated by vector addition of the GPS-measured ground speed in many different directions during level flight. This computation may soon be performed by the autopilot instead of the ground station.<br />
<br />
== Video Plugin ==<br />
<br />
The <tt>-mplayer</tt> option of GCS allows the user to display a video stream in this window. The video window can also be exchanged with the map by clicking anywhere inside the frame or from the menu.<br />
Use the following line in your [[Control_panel.xml|control panel]] to enable the video window.<br />
<tt>path_to_ground_segment/cockpit/gcs -mplayer rtsp://localhost:7070/video -layout appropriate_layout.xml</tt><br />
Note that a <tt>plugin</tt> widget must be specified in the used layout:<br />
<tt> <widget size="300" name="plugin"/></tt><br />
A useful example of how to configure the GCS to show video from a USB DVB-T tuner with composite input follows:<br />
<br />
If you have an Avermedia DVB-T usb tuner like the Aver-Tv Hybrid Volar HX (Avermedia finally released Ubuntu Linux drivers)<br />
then in order to use the usb tuner as video input to the GCS you have to complete the following steps:<br />
<br />
First download and install the drivers and check that the Usb tuner works well by connecting a video signal to the composite input<br />
and then opening a console window and typing: <br />
<br />
'''mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=1:device=/dev/video1:noaudio'''<br />
<br />
Remember to change the "device=/dev/video1" in the above line with whatever your new usb tuner is registered with (if needed).<br />
Type "dmesg" in a console immediately after you connect the usb tuner and you should see a line stating the video device your usb tuner got registered with.<br />
If it says video0 change "device=/dev/video1" with "device=/dev/video0"<br />
Mine is registered as "video1" because "video0" is the built in laptop camera.<br />
If everything is ok then a blue or similar LED on the usb tuner dongle should light up indicating that the tuner driver is loaded<br />
and you should be able to watch the video on the pc screen (no audio yet).<br />
Now close the console and remove the Usb tuner as it is time to configure the control_panel.xml file by editing the GCS command line.<br />
Locate the line in the "control_panel.xml" file, usually located in "/Your Paparazzi directory/conf/" (mine is in "/paparazzi/conf/"),<br />
that starts with "<program name="GCS" command="sw/ground_segment/cockpit/gcs......".<br />
For example let's say that the complete line looks like this: <br />
<br />
'''<program name="GCS" command="sw/ground_segment/cockpit/gcs -layout horizontal.xml">'''<br />
<br />
Now add the below line at the end (before the quotes) of the original line:<br />
<br />
'''-mplayer 'tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=1:device=/dev/video1:alsa:adevice=hw.2,0:amode=1:audiorate=48000:forceaudio:volume=100:immediatemode=0''''<br />
<br />
The original line should look now like this:<br />
<br />
'''<program name="GCS" command="sw/ground_segment/cockpit/gcs -layout horizontal.xml -mplayer 'tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=1:device=/dev/video1:alsa:adevice=hw.2,0:amode=1:audiorate=48000:forceaudio:volume=100:immediatemode=0'">'''<br />
<br />
The above line is one complete and uninterrupted line but it is just too long to show it in one line here.<br />
Please remember to change the "NTSC" with "PAL" if you do not use the NTSC video system (if your airborne camera is PAL for example). <br />
This will load the mplayer, select the composite video input of the tuner and enable the sound input.<br />
Read the mplayer documentation so you can tweak the resolution etc. later to suit your particular setup.<br />
The resolution above is set to 320x240 here but you can set it to 640x480 by replacing the numbers in the command line above.<br />
<br />
Finally you have to add the plugin widget to your GCS layout configuration file.<br />
If you noticed the GCS command line in the "control_panel.xml" file, it has a part that reads "-layout horizontal.xml" <br />
so our layout configuration file is the "horizontal.xml" which is located always in "/Your Paparazzi directory/conf/gcs/" <br />
(mine is in "/paparazzi/conf/gcs/").<br />
Open the file and add or uncomment the below line (in "horizontal.xml" the plugin widget is there but commented out):<br />
<br />
'''<widget NAME="plugin" SIZE="300"/>'''<br />
<br />
Now the file should look like this:<br />
<br />
'''<br />
<rows><br />
<widget size="500" name="map2d"/><br />
<columns><br />
<rows size="375"><br />
<widget size="200" name="strips"/><br />
</rows><br />
<widget size="400" name="aircraft"/><br />
<widget name="alarms"/> <br />
<widget NAME="plugin" SIZE="300"/> <br />
</columns><br />
</rows><br />
'''<br />
<br />
That's it, Enjoy!!! (Tested in Ubuntu 10.04 LTS but probably the same method should work fine on different versions too.)<br />
<br />
See this [http://www.youtube.com/watch?v=7OCcMA4vluM screen capture] as an example of the resulting GCS (Y-UAV).<br />
<br />
<br />
The <tt>-plugin</tt> option is another way to use the plugin widget: the X subwindow id is given to the provided command:<br />
<tt>path_to_ground_segment/cockpit/gcs -plugin "mplayer video_stream -wid " -layout appropriate_layout.xml</tt><br />
<tt>path_to_ground_segment/cockpit/gcs -plugin "cvlc video_stream --drawable-xid=" -layout appropriate_layout.xml</tt><br />
The <tt>--vout-event=3</tt> option can be used for vlc to disable mouse and keyboard events handling<br />
<br />
== Altitude graph widget ==<br />
<center><br />
[[Image:altgraph.png|400px|The GCS with the altitude graph]]<br />
</center><br />
<br />
An altitude graph can be displayed in the GCS by adding the widget ''altgraph'' in the layout configuration (See the [[GCS_Configuration|GCS configuration]] page). An example is provided in conf/gcs/alt.xml. To use this layout add -layout alt.xml to the /conf/control_panel.xml file. This type of layout is more suited to a multi UAV set up. The Papget ruler is a much less intrusive and better tool when you are only flying a single aircraft.<br />
<br />
==Papgets==<br />
Graphical objects can be added to 2D maps: text, rule, gauge, buttons, .... These objects are named ''papgets''. The following snapshot<br />
shows an example with buttons (left side), gauges (lower left corner), text (upper right corner) and ruler (right side). This example<br />
has been produced with a layout file provided in the distribution:<br />
<br />
.../gcs -layout papgets.xml <br />
<br />
<center><br />
[[Image:papgets.png|516px|A 2D map augmented with papgets]]<br />
</center><br />
<br />
===Telemetry data report===<br />
The easiest way to create a papget displaying telemetry data is to drag&drop a message field from the Messages window onto the 2D map of the GCS. The default rendering is then a string of text. Clicking on it allows the user to change its type (currently text, ruler or gauge) and some of its attributes (color, size, range for a gauge, format for a text ...). A papget can be moved by simply dragging it.<br />
<br />
<center><br />
[[Image:papget_editor.png|Main characteristics of a papget can be dynamically edited]]<br />
</center><br />
<br />
Papgets can be saved in the layout of the GCS (from the Nav menu). The description is saved in an XML file (in <tt>conf/gcs/</tt> folder) which can be manually edited:<br />
<br />
<pre><br />
<papget type="message_field" display="gauge" x="47" y="414"><br />
<property name="field" value="BAT:voltage"/><br />
<property name="scale" value="0.1"/><br />
<property name="min" value="0."/><br />
<property name="max" value="15."/><br />
<property name="size" value="50."/><br />
<property name="text" value="Bat(V)"/><br />
</papget><br />
</pre><br />
<br />
The file is used later by giving it to the gcs process:<br />
<br />
<pre><br />
.../gcs -layout my_fancy_papgets.xml<br />
</pre><br />
<br />
===Buttons===<br />
In the same way, user buttons from the strip can be dragged&dropped on the 2D map. However, they currently cannot be directly edited, and<br />
attributes changes have to be done in the XML file. Two types of button are provided to jump to a block or to set a value:<br />
<br />
<papget type="goto_block" display="button" x="10" y="300"><br />
<property name="block_name" value="Standby"/><br />
<property name="icon" value="home.png"/><br />
</papget><br />
<papget type="variable_setting" display="button" x="10" y="250"><br />
<property name="variable" value="launch"/><br />
<property name="value" value="1."/><br />
<property name="icon" value="launch.png"/><br />
</papget><br />
<br />
===Video===<br />
A video stream can be rendered in a <tt>video_plugin</tt> papget, using the mplayer player:<br />
<papget type="video_plugin" display="mplayer" x="300" y="250"><br />
<property name="video_feed" value="my video source"/><br />
<property name="width" VALUE="320"/><br />
<property name="height" VALUE="240"/><br />
</papget><br />
or any video player which takes in option the X window id :<br />
<papget type="video_plugin" display="plugin" x="300" y="250"><br />
<property name="command" value="cvlc video_source --drawable-xid="/><br />
<property NAME="width" VALUE="320"/><br />
<property NAME="height" VALUE="240"/><br />
</papget><br />
<br />
===Development===<br />
Graphical appearence of papgets is defined in <tt>sw/lib/ocaml/papget_renderer.ml</tt>. A renderer must implement the Papget_renderer.t class type interface (<tt>canvas_text</tt> is probably the simpler example) and listed in the <tt>renderers</tt> list to be available<br />
in the edit popup box.<br />
<br />
The XML configuration is parsed in <tt>sw/ground_segment/cockpit/papgets.ml</tt>: a new created papget identifier must listed here.<br />
<br />
== Alarms ==<br />
<br />
The alarm window displays a list of recent errors such as:<br />
* Low battery warning<br />
* Low altitude warning<br />
* Autopilot mode changes (i.e. Manual, Auto2)<br />
* Flight plan block changes<br />
<br />
These alarms can be provided via the speaker using the [[speech]] function.<br />
<br />
== Configuration Options ==<br />
The GCS is highly configurable and modules can be added, removed, or resized as needed. In addition to this the gcs has many command line options which can be used when launching the GCS<br />
<br><br />
See the [[GCS_Configuration|GCS configuration]] page for details.<br />
<br />
== Simulation of Flightplan ==<br />
Complex flight plans should always be carefully tested prior to flight. See the [[Simulation|simulation]] page for details.<br />
<br />
==Related Links:==<br />
<br />
[[Category:Software]] [[Category:User_Documentation]]</div>Xice