Software User Guide

From Quadshot Wiki
Jump to: navigation, search

The autopilots included with Quadshots are designed to be compatible with Paparazzi.

Installing Paparazzi

PLEASE USE UBUNTU 13.04 OR EARLIER. WE RECOMMEND 12.04 LTS.

Install Paparazzi

Install Paparazzi on Mac OS X or Linux following the instructions in the Paparazzi Wiki.

Get the Toytronics Paparazzi Branch

Clone the TRI Paparazzi repository:

git clone git@github.com:transition-robotics/paparazzi.git paparazzi-tri

Enter the newly cloned repository:

cd paparazzi-tri

Copy example aircraft configurations

cp conf/conf.xml.tri conf/conf.xml

Compile Paparazzi with the new branch

First compile Paparazzi:

make clean
make

Then compile your aircraft firmware:

make AIRCRAFT=QS4_M2A2 clean_ac ap.compile

Depending on your local permissions, you might need to use sudo:

sudo make AIRCRAFT=QS4_M2A2 clean_ac ap.compile

Depending on your Quadshot "brain" and IMU, replace QS4_M2A2 in the above commands with the following:

  • QS4_L: Lisa/L (the Quadshot Kopi Luwak)
  • QS4_LIA: Lia (the Mocha Quadshot)
  • QS4_M1A1: Lisa/M 1.0 with Aspirin 1.x (e.g., the Quadshot Cappuccino with self-provided Lisa/M v1.0 "brain" and Aspirin v1.x IMU)
  • QS4_M2A1: Lisa/M 2.0 with Aspirin 1.x (e.g., the Quadshot Cappuccino with self-provided Lisa/M v2.0 "brain" and Aspirin v1.x IMU)
  • QS4_M2A2: Lisa/M 2.0 with Aspirin 2.1 (e.g., the Quadshot Espresso)

Running the Paparazzi Groundstation

Run the Paparazzi Center:

 ./paparazzi
  • Choose your airframe under the A/C menu in the upper left. (e.g., QS4_M2A2 for an Quadshot Espresso)
  • Click Execute in the upper right
  • From the Tools menu, select:
    • Datalink
    • Server
    • Messages
    • Settings

Messages, select BOOZ2_RADIO_CONTROL to see

Editing Airframe files

Piotr did an interview with Hak5 in 2011 in which he gives a brief overview of the contents of the Quadshot's airframe file.

Using a Different Radio

For more detailed Quadshot-specific information on getting RC radio systems to work, please see RC Radios and Receivers.

All TRI provided airframe files except QS4_LIA are set to use Spektrum satellite receivers. If you want to change any of those to use combined PPM input instead you have to replace the line:

<subsystem name="radio_control" type="spektrum"/>

with

<subsystem name="radio_control" type="ppm"/>

and remove or comment the following lines if they exist:

<define name="RADIO_MODE" value="RADIO_FLAP"/>
<define name="RADIO_CONTROL_SPEKTRUM_SIGNS" value="\{1,1,-1,1,-1,-1,-1,1,1,1,1,1\}"/>
<define name="RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT" value="UART5"/>
<define name="OVERRIDE_UART5_IRQ_HANDLER"/>

In conf/conf.xml you need to define which radio file should be used to decode the PPM signal into radio control commands, this line looks like:

radio="radios/QS1RX6.xml"

You can find more preconfigured radio files in the conf/radios/ paparazzi source code directory. If you need to add a new radio file for your particular transmitter and receiver configuration please refer to the Radio Control page in the Paparazzi Wiki.

Updating Autopilot Firmware

Tutorial for building the Quadshot firmware and flashing it onto Lisa/L, Lisa/M, and Lia.

Using the Quadshot Attitude Visualizer

The visualizer is a great way to see the Quadshot's attitude estimation and control inputs

Under Linux:

  • Make sure you have python installed..
  • Install freeglut and freeglut-dev:
$ sudo apt-get install freeglut3 freeglut3-dev
  • For newer versions of Ubuntu (>= 11.10) you might have to install another package because the linker doesn't link anymore. First try without this though.The issue seems to have been solved for Ubuntu 12.04 and in fact binutils-gold might obstruct Paparazzi compilation in 12.04:
$ sudo apt-get install binutils-gold
  • Install python-opengl and python-pygame:
$ sudo apt-get install python-opengl
$ sudo apt-get install python-pygame
  • Remake the groundstation software - from your /paparazzi directory, type:
$ make clean; make
  • Recompile your autopilot and reflash its firmware.
  • Run:
$ paparazzi/sw/in_progress/python/attitude_viz.py

On your ground station settings, ensure you're on default in telemetry to get the correct messages. both pfd and attitude visualizer should work.


Under OSX (in testing):

$ sudo port install py27-opengl

When you call the visualizer, you CANNOT do

$ ./sw/in_progress/python/attitude_viz.py

because the first line in the .py gives the path to the desired python executable, which is the OSX default, which does NOT have the openGL module So one needs to make sure Python is setup correctly to use the MacPorts version Then call it like this:

$ python ./sw/in_progress/python/attitude_viz.py

Or alternatively, if you don't want to setup the default python you can specify the path directly:

$ /opt/local/bin/python2.7 ./sw/in_progress/python/attitude_viz.py

Where to Get More Information