Difference between revisions of "Software User Guide"

From Quadshot Wiki
Jump to: navigation, search
(Using the Quadshot Attitude Visualizer)
(updated ppz wiki URLs, enhanced attitude viz instructions for OSX)
Line 3: Line 3:
 
=Installing Paparazzi=
 
=Installing Paparazzi=
 
==Install Paparazzi==
 
==Install Paparazzi==
[http://paparazzi.enac.fr/wiki/Installation Install Paparazzi] on Mac OS X or Linux following the instructions in the Paparazzi Wiki.
+
[http://wiki.paparazziuav.org/wiki/Installation Install Paparazzi] on Mac OS X or Linux following the instructions in the Paparazzi Wiki.
  
 
== Get the Toytronics Paparazzi Branch ==
 
== Get the Toytronics Paparazzi Branch ==
Line 38: Line 38:
  
  
Run the [http://paparazzi.enac.fr/wiki/Paparazzi_Center Paparazzi Center]:
+
Run the [http://wiki.paparazziuav.org/wiki/Paparazzi_Center Paparazzi Center]:
  
 
<source lang="bash">
 
<source lang="bash">
Line 89: Line 89:
 
</source>
 
</source>
  
You can find more preconfigured radio files in the <tt>'''conf/radios/'''</tt> paparazzi source code directory. If you need to add a '''new''' radio file for your particular transmitter and receiver configuration please refer to the [http://paparazzi.enac.fr/wiki/Radio_Control Radio Control page in the Paparazzi Wiki].
+
You can find more preconfigured radio files in the <tt>'''conf/radios/'''</tt> paparazzi source code directory. If you need to add a '''new''' radio file for your particular transmitter and receiver configuration please refer to the [http://wiki.paparazziuav.org/wiki/Radio_Control Radio Control page in the Paparazzi Wiki].
  
 
=Updating Autopilot Firmware=
 
=Updating Autopilot Firmware=
Line 126: Line 126:
  
 
Under OSX (in testing):
 
Under OSX (in testing):
*Install the Macports port "py27-opengl"
+
*Install the [https://www.macports.org/ Macports] port "py27-opengl"
 +
<source lang="xml">
 +
$ sudo port install py27-opengl
 +
</source>
 
When you call the visualizer, you CANNOT do
 
When you call the visualizer, you CANNOT do
 
<source lang="xml">
 
<source lang="xml">
Line 146: Line 149:
 
*[http://forum.thequadshot.com/ Quadshot web forum]
 
*[http://forum.thequadshot.com/ Quadshot web forum]
 
*[http://webchat.freenode.net/?channels=quadshot&uio=d4 Quadshot IRC channel] (web browser client). To use a dedicated irc client connect to the #quadshot channel on the Freenode network (host: irc.freenode.net)
 
*[http://webchat.freenode.net/?channels=quadshot&uio=d4 Quadshot IRC channel] (web browser client). To use a dedicated irc client connect to the #quadshot channel on the Freenode network (host: irc.freenode.net)
*[http://paparazzi.enac.fr Paparazzi wiki]
+
*[http://wiki.paparazziuav.org/ Paparazzi wiki]
*[http://paparazzi.enac.fr/wiki/Contact Paparazzi email list and IRC channel information]
+
*[http://wiki.paparazziuav.org/wiki/Contact Paparazzi email list and IRC channel information]

Revision as of 22:45, 11 February 2014

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

Installing Paparazzi

Install Paparazzi

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

Get the Toytronics Paparazzi Branch

Change to your Paparazzi installation directory:

cd paparazzi

Check out the Transition Robotics Toytronics branch from github:

git remote add tri git://github.com/transition-robotics/paparazzi.git
git fetch tri
git checkout -b toytronics tri/toytronics

Copy example aircraft configurations

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

Compile Paparazzi with the new branch

make clean
make


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