Difference between revisions of "Installation"

From PaparazziUAV
Jump to: navigation, search
(moved Installation to Installation/Linux: wiki reorg, will make Installation cover the overview, but need to keep history with this)
 
(Updated to be more generic installation page with links to OS specific pages, based on original Installation page text with linux specific stuff removed)
Line 1: Line 1:
#REDIRECT [[Installation/Linux]]
+
<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Installation</categorytree>
 +
__TOC__
 +
 
 +
== Introduction ==
 +
 
 +
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux] or Apple Macintosh running [http://en.wikipedia.org/wiki/OS_X Mac OS X]. There is also work being done to port Paparazzi to Windows.
 +
 
 +
The steps required to install the software needed to be able to let your UAS fly are:
 +
<ul>
 +
<li>Prepare your operating system of choice for installation.
 +
<li>Install any prerequisites for Paparazzi.
 +
<li>Install all necessary Paparazzi tools.
 +
<li>Download the source code from the source repository.
 +
<li>Complete any final configuration (i.e. for hardware access).
 +
<li>Compile the binaries from the sources.
 +
</ul>
 +
 
 +
=== OS Specific Instructions ===
 +
 
 +
This process varies depending on the operating system you are using. For detailed installation instructions, please see the following pages:
 +
*[[Installation/Linux|Installing Paparazzi on Linux]]
 +
*[[Installation/MacOSX|Installing Paparazzi on Mac OS X]]
 +
 
 +
For more advanced installation information or developers, please see the following pages:
 +
*[[Installation/Manual|Installing manually]]
 +
*[[Installation/FromScratch|Installing everything from scratch]]
 +
**In very rare occasions one needs to install the tools and third-party libraries used by Paparazzi all from scratch. Sometimes one just wants to be able to use all the latest and greatest compilers, or source code of everything to improve something. Then there is no other way than to install from scratch.
 +
*[[Installation/Windows|Installing Paparazzi on Windows]] (WORK IN PROGRESS, NOT YET COMPLETE)
 +
 
 +
=== Virtual Machines ===
 +
 
 +
It is also possible to have your Debian/Ubuntu running in a virtual machine, for instance with [http://www.virtualbox.org/ VirtualBox]. This requires minimal changes to your computer setup, as you can run the VM from all common platforms (Windows, OS X, Linux). The virtual machine image can easily be transferred between different laptops, giving greater flexibility. Unfortunately, the Open-Source Edition of VirtualBox doesn't include the necessary USB support, so you'll need to get the regular version from the website.
 +
 
 +
If you are new and this is your first time installing it is suggested you keep it simple. Use the standard Linux or OS X install. Select a system you can dedicate to the Linux installation. No VMs or dual boot configurations. The idea is do a very simple generic installation that is certain to have no issues. This reassures you that the installation process works and you can see and use a working Paparazzi install for some time before you try a more complicated install. The install is well documented and certain to succeed if followed exactly. Most issues arise when someone unfamiliar with Paparazzi or their OS tries a non-standard install that requires special steps that are not documented. Generally, commands can be copied and pasted for easy, step-by-step installation.
 +
 
 +
=== Source Code ===
 +
 
 +
The Paparazzi source code is hosted by [https://github.com/paparazzi/paparazzi Github]. It is downloaded using [[git]].
 +
 
 +
== Downloading the Source Code ==
 +
The complete source code should be downloaded from the paparazzi software repository on Github. Make sure you have installed the <tt>paparazzi-dev</tt> package as described above. Whithout these you will not be able to compile the sourcecode.
 +
 
 +
See the [https://github.com/paparazzi/paparazzi project page] at Github for more details.  From the directory of your choice type:
 +
git clone git://github.com/paparazzi/paparazzi.git
 +
or if you are behind a firewall with an http proxy available:
 +
git clone https://github.com/paparazzi/paparazzi.git
 +
 
 +
This will download all of the paparazzi sourcecode need for an autopilot to work into the directory <tt>paparazzi/</tt>
 +
 
 +
'''If this whole "Git" thing is new to you an you are curious, more options and information can be found on the [[git]] page.'''
 +
 
 +
== Launching the Software ==
 +
 
 +
The first step is to compile. From the <tt>paparazzi</tt> directory (<tt>cd ~/paparazzi</tt>), run
 +
 
 +
make
 +
 
 +
You will have to run this command after each update of the source (<tt>git pull</tt> command).
 +
Launch the software from the <tt>paparazzi</tt> directory with
 +
 
 +
./paparazzi
 +
 
 +
From the [[Paparazzi_Center|Paparazzi Center]] interface, select the ''Microjet'' aircraft, select the ''sim'' target and ''Build'' it. Then ''Execute'' the ''Simulation'' session. The procedure is detailed in the [[Simulation]] page.
 +
 
 +
=== Agents ===
 +
 
 +
If ('''and only if''') you want to directly launch some Paparazzi agents (the ''Tools'' of the [[Paparazzi_Center|Paparazzi Center]]), without using the Paparazzi Center, you must have the Paparazzi source and home environment variables set correctly in your shell. These variables can be automatically set in your shell by adding the following lines to your .bashrc file:
 +
{{Box Code|~/.bashrc|
 +
export PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi software directory''
 +
export PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi software directory''
 +
}}
 +
 
 +
=== env Variables ===
 +
 
 +
If you wish to manually set the env variables (i.e. when compiling a backup copy of your code in a different folder) execute the following command from the folder you wish to set as your active paparazzi folder:
 +
export PAPARAZZI_HOME=`pwd`;export PAPARAZZI_SRC=`pwd`
 +
Verify that your variables are set correctly with the following command:
 +
env | grep PAPARAZZI
 +
which should return the following:
 +
PAPARAZZI_HOME<nowiki>=</nowiki>''your paparazzi software directory''
 +
PAPARAZZI_SRC<nowiki>=</nowiki>''your paparazzi software directory''
 +
 
 +
== Software Updates ==
 +
Paparazzi is a very rapidly evolving project and as such you might want to update your software regularly.
 +
 
 +
Any new files you created will not be lost/overwritten when updating (like your own airframe file). Nevertheless, as with all things, backups are advised.
 +
If you modified source code, the best way is of course to use the version control system [[Git]] to commit your changes. Otherwise at least use the brute force method and save everything in another directory.
 +
 
 +
Update your software with care and caution, and always test the functionality on the ground and in the air as some updates will affect tuning parameters. You might need to update your airframe file as well. The compiler will usually complain if there is a problem, at which point you can look at the [[Airframe_Configuration|Airframe Configuration wiki page]] again, look on the [[Contact#Mailing_List|mailing list]] or some of the most recent airframe files on git to find the proper syntax. See the [[Compiling]] page for more help if needed.
 +
 
 +
That said, keeping your software up to date is fairly easy with Git.
 +
 
 +
To download and automatically merge any updated source files, run the following command from your Paparazzi directory
 +
git pull
 +
Please see the [[Git|Git wiki page]] for more details.
 +
 
 +
After any git update or source code modification the code can be recompiled from ''your paparazzi software directory'' with the following command:
 +
 
 +
make
 +
 
 +
The ''make'' command will only recompile portions of the software where changed have been detected.  If it does not behave as expected you can deleted all compiled files and recompile from scratch with the following commands:
 +
 
 +
make clean
 +
make
 +
 
 +
See the [[Compiling]] page for more info.
 +
 
 +
== Using the Live CD ==
 +
 
 +
There is a [[LiveCD]] available, but it dates back to 2008. It is still an easy way to get a first glimpse on Paparazzi.
 +
 
 +
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]

Revision as of 16:09, 8 March 2012

Introduction

Paparazzi is very easily installed on any laptop or workstation running the Ubuntu Linux OS or virtually any Debian based Linux or Apple Macintosh running Mac OS X. There is also work being done to port Paparazzi to Windows.

The steps required to install the software needed to be able to let your UAS fly are:

  • Prepare your operating system of choice for installation.
  • Install any prerequisites for Paparazzi.
  • Install all necessary Paparazzi tools.
  • Download the source code from the source repository.
  • Complete any final configuration (i.e. for hardware access).
  • Compile the binaries from the sources.

OS Specific Instructions

This process varies depending on the operating system you are using. For detailed installation instructions, please see the following pages:

For more advanced installation information or developers, please see the following pages:

  • Installing manually
  • Installing everything from scratch
    • In very rare occasions one needs to install the tools and third-party libraries used by Paparazzi all from scratch. Sometimes one just wants to be able to use all the latest and greatest compilers, or source code of everything to improve something. Then there is no other way than to install from scratch.
  • Installing Paparazzi on Windows (WORK IN PROGRESS, NOT YET COMPLETE)

Virtual Machines

It is also possible to have your Debian/Ubuntu running in a virtual machine, for instance with VirtualBox. This requires minimal changes to your computer setup, as you can run the VM from all common platforms (Windows, OS X, Linux). The virtual machine image can easily be transferred between different laptops, giving greater flexibility. Unfortunately, the Open-Source Edition of VirtualBox doesn't include the necessary USB support, so you'll need to get the regular version from the website.

If you are new and this is your first time installing it is suggested you keep it simple. Use the standard Linux or OS X install. Select a system you can dedicate to the Linux installation. No VMs or dual boot configurations. The idea is do a very simple generic installation that is certain to have no issues. This reassures you that the installation process works and you can see and use a working Paparazzi install for some time before you try a more complicated install. The install is well documented and certain to succeed if followed exactly. Most issues arise when someone unfamiliar with Paparazzi or their OS tries a non-standard install that requires special steps that are not documented. Generally, commands can be copied and pasted for easy, step-by-step installation.

Source Code

The Paparazzi source code is hosted by Github. It is downloaded using git.

Downloading the Source Code

The complete source code should be downloaded from the paparazzi software repository on Github. Make sure you have installed the paparazzi-dev package as described above. Whithout these you will not be able to compile the sourcecode.

See the project page at Github for more details. From the directory of your choice type:

git clone git://github.com/paparazzi/paparazzi.git

or if you are behind a firewall with an http proxy available:

git clone https://github.com/paparazzi/paparazzi.git

This will download all of the paparazzi sourcecode need for an autopilot to work into the directory paparazzi/

If this whole "Git" thing is new to you an you are curious, more options and information can be found on the git page.

Launching the Software

The first step is to compile. From the paparazzi directory (cd ~/paparazzi), run

make

You will have to run this command after each update of the source (git pull command). Launch the software from the paparazzi directory with

./paparazzi

From the Paparazzi Center interface, select the Microjet aircraft, select the sim target and Build it. Then Execute the Simulation session. The procedure is detailed in the Simulation page.

Agents

If (and only if) you want to directly launch some Paparazzi agents (the Tools of the Paparazzi Center), without using the Paparazzi Center, you must have the Paparazzi source and home environment variables set correctly in your shell. These variables can be automatically set in your shell by adding the following lines to your .bashrc file:

File: ~/.bashrc
export PAPARAZZI_HOME=your paparazzi software directory
export PAPARAZZI_SRC=your paparazzi software directory

env Variables

If you wish to manually set the env variables (i.e. when compiling a backup copy of your code in a different folder) execute the following command from the folder you wish to set as your active paparazzi folder:

export PAPARAZZI_HOME=`pwd`;export PAPARAZZI_SRC=`pwd`

Verify that your variables are set correctly with the following command:

env | grep PAPARAZZI

which should return the following:

PAPARAZZI_HOME=your paparazzi software directory
PAPARAZZI_SRC=your paparazzi software directory

Software Updates

Paparazzi is a very rapidly evolving project and as such you might want to update your software regularly.

Any new files you created will not be lost/overwritten when updating (like your own airframe file). Nevertheless, as with all things, backups are advised. If you modified source code, the best way is of course to use the version control system Git to commit your changes. Otherwise at least use the brute force method and save everything in another directory.

Update your software with care and caution, and always test the functionality on the ground and in the air as some updates will affect tuning parameters. You might need to update your airframe file as well. The compiler will usually complain if there is a problem, at which point you can look at the Airframe Configuration wiki page again, look on the mailing list or some of the most recent airframe files on git to find the proper syntax. See the Compiling page for more help if needed.

That said, keeping your software up to date is fairly easy with Git.

To download and automatically merge any updated source files, run the following command from your Paparazzi directory

git pull

Please see the Git wiki page for more details.

After any git update or source code modification the code can be recompiled from your paparazzi software directory with the following command:

make

The make command will only recompile portions of the software where changed have been detected. If it does not behave as expected you can deleted all compiled files and recompile from scratch with the following commands:

make clean
make

See the Compiling page for more info.

Using the Live CD

There is a LiveCD available, but it dates back to 2008. It is still an easy way to get a first glimpse on Paparazzi.