Skip to content

QGroundControl Guide

adrienp edited this page Apr 9, 2015 · 3 revisions

A Guide to Using QGroundControl

The ground station we will be using for communication and monitoring of your UAV is called QGroundControl. The installers for QGroundControl (for each operating system) can be found here on the aa241x website.

This guide provides a bit of an explanation of the different aspects of QGroundControl. It has been split up by main window and then tabs or elements within the window. The different windows can be accessed by selected their respective title in the top bar:

You will need to have the correct drivers installed in order to be able to connect to the pixhawk, and this of course once again depends on operating system.

Windows:

Mac:

Communications Link

In order to connect to your Pixhawk, you need to make sure to configure the communication link. If you have already set up the link, then simply connect by hitting the connect button. Note: you need 2 different connections for wired and wireless connections as they communicate with different baud rates and on different devices.

In the top right, select on add link, or go to File -> Manage Communications Links to open the comms link manager. On the following screen select add

Then fill out the information for your link.

Notes on link connections:

  • Link menu should automatically fill in the correct COM port (usb-modem for you mac folks), if it does not, you can find it in the device manager
  • Make sure you have selected the correct baud rate
    • Hardwired connections to the pixhawk have baud rates of 115200
    • Wireless connections to the pixhawk (through the 3DR radio) have baud rates of 57600
  • QGroundControl may sometimes take a while to display all the information once a link is established

Setup

This is the window where you can change configurations on the Pixhawk. Everything you set from here changes settings onboard the Pixhawk.

  • Summary - a quick overview of the status of the hardware and software
  • Firmware - used to upload default PX4 firmware to the Pixhawk, not for uploading the AA241x firmware!
  • Airframe - define the airframe configuration being flown
  • Radio - configure the r/c radio
  • Flight Modes - configure flight mode switches on the r/c radio
  • Sensors - calibrate sensors
  • Power - define battery information being used
  • Safety - safety
  • Parameters - list of all parameters that can be modified and sent to autopilot that are used as constants

Summary

This tab simply displays the current status of the Pixhawk hardware and the PX4 software. It also shows many of the important configuration and parameter settings and status of the required calibrations.

Firmware

This tab is where you can upload (or reupload) the default PX4 firmware to the Pixhawk. A guide for uploading the default PX4 firmware is located here. At this point all teams should be migrating you use the AA241x PX4 code, which is uploaded to the board different and a guide to how to setup and install the PX4 code is located here.

Airframe

This tab is where you chose the desired airframe you want to fly. For this class, make sure you have selected fixed wing and chosen the HobbyKing Bixler 1/2 model from the dropdown. Once selected, click the Apply and Restart button in the bottom right on the screen.

To confirm your airframe selection was completed, make sure that along the top bar, you see a small plane icon when connected to your Pixhawk.

Any time you change the Airframe model, you will have to redo your sensor and radio calibration!

Selecting the airframe tells the Pixhawk how to map your desired output to the servos. In the case of the HobbyKing Bixler 1/2 model it will do the following mapping:

  • Main 1 -> Aileron
  • Main 2 -> Elevator
  • Main 3 -> Rudder
  • Main 4 -> Throttle

If you plan to design a flying wing airframe, please change the airframe you selected to be the flying wing picture, as this will correctly map your set outputs to the servos. If you need any help with this please come talk to me. Also note, if you change your configuration to a flying wing, if you put the Pixhawk back into the Bixler you will need to change it back to a fixed wing!

Radio

This tab is where you calibrate your radio (aka, remote control, transmitter). This tells the Pixhawk what the endpoints of each of your control inputs are, so it can correctly map it from -1..1 (0..1 in the case of the throttle) for use inside the code.

On the radio you will only need to use 5 of the channels (but are welcome to set up more than that if you choose). The 5 channels of interest will be the 2 sticks (in all 4 directions) and a 2 or 3 position switch that will be used for the main mode.

The main mode switch will be set up in the flight modes tab and is required to be setup by the PX4 software. This is the switch that will allow you to switch between manual mode (you having control) and auto mode (your software having control).

To calibrate the radio, simple click the Calibrate button and follow the steps.

You are not required to set up the following, so you can press skip for the following:

  • flaps
  • aux1
  • aux2

Flight Modes

This is the tab where you setup the Flight Mode switch. As mentioned above, the Main Mode switch is required to be configured by the PX4 software. It also seems to have an affinity to being set to Channel 5, so please make sure you configure it for Channel 5. If you would like to change which switch is channel 5 on your transmitter, please come ask me and I can show you how to do that.

If you screen looks like the following: drag and drop the Main Mode box to Channel 5. Your screen should look like the following:

The main mode switch allows you to toggle between the 2 modes you will be using:

  • Manual - you are in control
  • Auto - your control law script is running and in control

For those of you who set up your main mode switch on a 3 position switch, you will find going to the middle position enables a mode call ALT CTL. For the AA241x version of the code, that will be no different than the manual mode, so you will still have complete manual control.

For a more detailed understand of the flight modes used in the default PX4 firmware and why the switch is the way it is read this explanation from the PX4 developers

Sensors

This tab allows you to calibrate all the onboard sensors. For each sensor click on that sensor and follow the onscreen instructions for calibration. Do this once the pixhawk has been installed into your airframe! Sensor calibration teaches the autopilot the orientations of your sensors and their behavior characteristics, in order to provide accurate state estimations.

Note: Make sure to recalibrate the Accelerometer once you mount your Pixhawk into your airframe

  • Compass - more of an art than anything, here is a great video
  • Gryoscope - just let it sit flat face up
  • Accelerometer - set the Pixhawk on each side as instructed. Here, you must rest the vehicle on each of its six sides. First, let it sit normally on the table or floor. When it indicates that this is complete, put it in any of the remaining five orientations. The order in which you do these is not important. You want to put the vehicle upside down, and let it calibrate. Then nose down (hold it up), nose up, right side up, left side up.
  • Airspeed - calibrates static and dynamic pressure. You will first let it sit in an area with no airflow and then once prompted you will have to create airflow for the sensor.

Power

This tab allows you to configure when the low voltage alarm will sound for the PX4. For the Bixler batteries make sure the cell count is 3, the max voltage is 4.2 and the min voltage is 3.4V.

For your airframes, make sure the cell count is 2, the max voltage is 4.2V (you are entering a per cell value) and the min voltage is 3.2V (this is a per cell number you are entering)

Safety

This tab allows you to configure what the Pixhawk will do for different failsafes. None of these are active in the AA241x version of the code, so nothing is needed to be done here.

Parameters

This tab allows you to set different parameters onboard the Pixhawk. Parameters act basically as settable constants in your code that can be used for purposes such as control gains. In the AA241x code you will be creating parameters in 2 different folders: AAH and AAL which you will then be able to adjust from the ground.

A safety note: make sure you don't change any of the parameters while you are in auto mode (your control law running the plane) as this can potentially have disastrous results. It is advisable to switch back into manual, make the parameter change, then switch back to auto (being ready to take back control if needed) to see what happens.

To set a parameter, change the value of it on the screen, which should highlight the row orange. Then hit set parameters to send it over to the Pixhawk. To write the newly changed parameter to memory for subsequent flights you must then also hit write. Any changes you make and only set will not persist if you power cycle the Pixhawk!

Plan

For the default PX4 code this allows you to set waypoints to fly, etc. We are not using any of this functionality, so you can ignore this window.

Fly

This is the main window where you can see all the important information about your UAV in real time during a flight. This should always be the first window you navigate to when you connect to your Pixhawk.

Here is just a quick overview of different elements of the fly window.

The default window is the following:

The main view on this window is your horizon.

  • AS and GS on left hand side are airspeed and ground speed
  • h on right hand side is your altitude (absolute or above ground depending on gps connection)
  • the horizontal lines in the center give you pitch angle
  • the angled marks at the top give you your roll angle
  • the compass wheel at the bottom gives you heading

Up along the top bar you also have some important information. From left to right:

  • the bull horn is a list of messages from the autopilot
  • the little plane tells you your autopilot is configured for a plane (if this is a quadcopter, you need to revisit your initial setup!)
  • the satellite icon is the GPS status: green for connected and red for not connected (when it is connected it also tells you the number of satellites it is connected to)
  • the battery icon is the current battery voltage
  • text next to it tells you the arming status of the autopilot
  • Finally the last bit of text tells you the flight mode you are in

I recommend adding 2 important "widgets" from the Advanced -> Tool Widgets -> menu:

  • Mavlink Inspector - allows you to see all of the mavlink messages live (you will eventually have 32 variables you can see here)
  • Map view - just shows you a map of your location

Analyze

This window allows you to plot the data coming down from the Pixhawk in real time. This data includes pretty much all of the values you are looking at in the dataflash logs you are looking at. I recommend just playing around with it to get a feel for how it all works. The last time I used it, it was not able to plot all the data, but things have changed.

Clone this wiki locally