Difference between revisions of "Software User Guide"

From Quadshot Wiki
Jump to: navigation, search
(Using the Quadshot Attitude Visualizer)
(Using the Quadshot Attitude Visualizer)
Line 96: Line 96:
  
 
=Using the Quadshot Attitude Visualizer=
 
=Using the Quadshot Attitude Visualizer=
The visualizer is a great way to see the Quadshot's attitude estimation and control inputs. As of this writing (June 2013) it works for Ubuntu only, not for OSX.
+
The visualizer is a great way to see the Quadshot's attitude estimation and control inputs
  
 +
Under Linux:
 
*Make sure you have python installed..
 
*Make sure you have python installed..
 
*Install freeglut and freeglut-dev:
 
*Install freeglut and freeglut-dev:
 
<source lang="xml">
 
<source lang="xml">
sudo apt-get install freeglut3 freeglut3-dev
+
$ sudo apt-get install freeglut3 freeglut3-dev
 
</source>
 
</source>
 
*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:
 
*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:
 
<source lang="xml">
 
<source lang="xml">
sudo apt-get install binutils-gold
+
$ sudo apt-get install binutils-gold
 
</source>
 
</source>
 
*Install python-opengl and python-pygame:
 
*Install python-opengl and python-pygame:
 
<source lang="xml">
 
<source lang="xml">
sudo apt-get install python-opengl
+
$ sudo apt-get install python-opengl
sudo apt-get install python-pygame
+
$ sudo apt-get install python-pygame
 
</source>
 
</source>
 
*Remake the groundstation software - from your /paparazzi directory, type:
 
*Remake the groundstation software - from your /paparazzi directory, type:
 
<source lang="xml">
 
<source lang="xml">
make clean; make
+
$ make clean; make
 
</source>
 
</source>
 
*Recompile your autopilot and reflash its firmware.
 
*Recompile your autopilot and reflash its firmware.
 
*Run:
 
*Run:
 
<source lang="xml">
 
<source lang="xml">
paparazzi/sw/in_progress/python/attitude_viz.py
+
$ paparazzi/sw/in_progress/python/attitude_viz.py
 
</source>
 
</source>
 
On your ground station settings, ensure you're on default in telemetry to get the correct messages. both pfd and attitude visualizer should work.
 
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):
 +
*Install the Macports port "py27-opengl"
 +
When you call the visualizer, you CANNOT do
 +
<source lang="xml">
 +
$ ./sw/in_progress/python/attitude_viz.py
 +
</source>
 +
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:
 +
<source lang="xml">
 +
$ python ./sw/in_progress/python/attitude_viz.py
 +
</source>
 +
Or alternatively, if you don't want to setup the default python you can specify the path directly:
 +
<source lang="xml">
 +
$ /opt/local/bin/python2.7 ./sw/in_progress/python/attitude_viz.py
 +
</source>
  
 
=Where to Get More Information=
 
=Where to Get More Information=

Revision as of 18:18, 23 August 2013

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):

  • Install the Macports port "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