Difference between revisions of "Installation/Linux"

From PaparazziUAV
Jump to navigation Jump to search
Line 1: Line 1:
== LiveCd ==
Precompiled binaries can be downloaded and executed with the ''paparazzi-bin'' package but to maintain the power and flexibility of open-source code, most operations within Paparazzi involve recompilation of autopilot and/or ground station code.  Therefore the typical installation requires all of the necessary C, OCAML, and Perl compilers as well as some XML and Ivy handlers.


The LiveCD is the easiest way to start with Paparazzi: no installation is required and no changes are made to your computerSimply burn the image as a boot CD and reboot!  The LiveCD includes the complete paparazzi binary package (code source, tools and cross compilers). Usage is described in the next section.
== Setting your Environment Variables ==
Before launching the GCS or compiling anything you must have the Paparazzi source and home environment variables set correctly in your shellThese variables can be automatically set in your shell by adding the following lines to your .bashrc file:
The CD image is available from the [[Downloads|Downloads]] page.
{{Box Code|/home/your_username/.bashrc|
 
export PAPARAZZI_HOME<nowiki>=</nowiki>/home/''your_username''/paparazzi
The Paparazzi demo is launchable on the Live CD from the Paparazzi icon.
export PAPARAZZI_SRC<nowiki>=</nowiki>/home/''your_username''/paparazzi
 
}}
Knoppix allows for all the user data to be saved on a hard disk partition (most file systems are supported) or on a removable device (typically a USB pendrive). Note that this action is not destructive: the user data tree is compressed and stored on your file system as a single file (<tt>knoppix.img</tt>).
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:
* From the Knoppix menu (second from bottom left), choose '''Configure''', '''Create a persistent KNOPPIX disk image'''
export PAPARAZZI_HOME=`pwd`;export PAPARAZZI_SRC=`pwd`
* Choose your media (be sure to connect your USB pendrive before booting!)
Verify that your variables are set correctly with the following command:
* Choose if you want an encrypted filesystem (to protect your flight plan designed for the next MAV competition :-) )
env | grep PAPARAZZI
* Choose the size of your home directory (100Mb is recommended)
which should return the following:
On the next reboot, this saved state will be automatically located and loaded.
PAPARAZZI_HOME<nowiki>=</nowiki>/home/''your_username''/paparazzi
 
PAPARAZZI_SRC<nowiki>=</nowiki>/home/''your_username''/paparazzi
Using this persistent feature, the Paparazzix Live CD can really be used to configure, simulate and fly an aircraft with the Paparazzi system.
 
The Live CD can also be used to install a Debian system on the hard disk, using the <tt>knoppix-installer</tt> command. Be sure to backup the hard disk before trying ...


== Installation on Debian ==
== Installation on Debian ==


Paparazzi is packaged for debian as well as all of its dependencies. The [http://www.recherche.enac.fr/paparazzi/debian repository] hosted at ENAC holds their latest version.
Paparazzi is packaged for Debian as well as all of its dependencies. The [http://www.recherche.enac.fr/paparazzi/debian repository] hosted at ENAC holds their latest version.


==== Manual package installation ====
=== Installation from the Command Line===
Just add the following line(s) to your repository list (<b>/etc/apt/sources.list</b>).  Note: etch users must include ''both'' sarge and etch lines.
Just add the following line(s) to your repository list (<b>/etc/apt/sources.list</b>).  Note: etch users must include ''both'' sarge and etch lines.
{{Box Code|/etc/apt/sources.list|
{{Box Code|/etc/apt/sources.list|
Line 28: Line 25:
  #if needed deb <nowiki>http://www.recherche.enac.fr/paparazzi/debian etch main</nowiki>
  #if needed deb <nowiki>http://www.recherche.enac.fr/paparazzi/debian etch main</nowiki>
}}
}}
Then, update and install the package you are interested in:
Then, update your sources and install the precompiled binaries as well as the dependencies needed for recompiling:
  apt-get update
  apt-get update
  apt-get install paparazzi-bin
  apt-get install paparazzi-bin
apt-get install paparazzi-base
apt-get install paparazzi-dev
apt-get install paparazzi-arm7


==== GUI package installation ====
=== Installation thru Synaptic Package Manager ===
* Launch ''Synaptic Package Manager'' (''Applications/System'' Tools Menu)
* Launch ''Synaptic Package Manager'' (''Applications/System'' Tools Menu)
* In '''Settings/Repositories''', add a new repository on URI = '''<nowiki>http://www.recherche.enac.fr/paparazzi/debian</nowiki>''', Distribution = '''sarge''', Section = '''main'''
* In '''Settings/Repositories''', add a new repository on URI = '''<nowiki>http://www.recherche.enac.fr/paparazzi/debian</nowiki>''', Distribution = '''sarge''', Section = '''main'''
* Search for paparazzi-bin package (To find it easily, use ''Search'' Button)
* Users of current linux versions must also add '''<nowiki>http://www.recherche.enac.fr/paparazzi/debian</nowiki>''', Distribution = '''etch''', Section = '''main''' (both Sarge and Etch are needed)
* Mark it for installation (Right-click on package name)
* Search for paparazzi-bin, paparazzi-base, paparazzi-dev, and paparazzi-arm7 packages (use the ''Search'' button)
* Mark them for installation (right-click on package names)
* Left-click on ''Apply''
* Left-click on ''Apply''


=== System wide install ===
=== Optional/Obsolete Packages ===
 
Users of older AVR based boards will need paparazzi-avr
The <tt>paparazzi-bin</tt> package contains the airborne source code and the tools you need to configure and control the UAV. It provides 3 main commands:
* <tt>paparazzi-make</tt> to compile the aircraft (and run the demo);
* <tt>paparazzi</tt> to run the ground control station supervision;
* <tt>paparazzi-gcs</tt> to run the flight plan editor.


Start with <tt>paparazzi-make init</tt> to initialize your configuration directory (<tt>~/paparazzi</tt>) and
=== Installing the Source Code ===
<tt>paparazzi-make demo</tt> to run the demo.
After the dependency packages are installed the complete source code should be downloaded from the CVS.  See the [http://savannah.nongnu.org/cvs/?group=paparazzi project page] at Savannah for more details.
   
  cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/paparazzi co paparazzi
You will have to also install the
This will download all of the code and install it into /home/''your_username''/paparazzi
<tt>paparazzi-avr</tt> or <tt>paparazzi-arm7</tt> packages which contain the cross compiler and architecture dependent tools needed to produce and upload the airborne programs on avr or arm7 architectures.


=== Source code install ===
If you cannot use the CVS install, occasionally updated tarballs can also be fetched from the [[Downloads|Downloads]] page.


Users who want to look at and modify the source code can install the required dependencies and download the code independently.
=== Launching the Software ===
Make sure your [[Installation#Setting_your_Environment_Variables environment variables]] are set correctly and launch the software from /home/''your_username''/paparazzi with:


Installation of the meta-package '''paparazzi-dev''' will pull along all required dependencies.
./paparazzi


After the packages is installed the paparazzi source code needs to be downloaded.
=== Recompiling ===
This can be done using CVS. See the [http://savannah.nongnu.org/cvs/?group=paparazzi project page] at savannah for details:
After any CVS update or source code modification the code can be recompiled from /home/''your_username''/paparazzi with the following command:
<tt>cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/paparazzi co paparazzi3</tt>


A nightly tarball can also be fetched from the [[Downloads|Downloads]] page.
make


After extraction, go to the root of the source code and comile it:
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
  make


now that it is compiled you can run a demo with:
See the [[Compiling]] page for more info.


make demo
=== System wide install ===


When you are running your own simulations and aircraft you will compile first
The <tt>paparazzi-bin</tt> package contains the airborne source code and the tools you need to configure and control the UAV. It provides 3 main commands:
* <tt>paparazzi-make</tt> to compile the aircraft (and run the demo);
* <tt>paparazzi</tt> to run the ground control station supervision;
* <tt>paparazzi-gcs</tt> to run the flight plan editor.


make AIRCRAFT=''aircraft_name'' sim
Start with <tt>paparazzi-make init</tt> to initialize your configuration directory (<tt>~/paparazzi</tt>) and
 
<tt>paparazzi-make demo</tt> to run the demo.
then start the ground station with
   
 
== Manual Installation of Individual Packages ==
/paparazzi_folder/sw/supervision/paparazzi.pl
Users of Ubuntu or other Linux flavors or anyone needing manual control of each individual package can install them independently.  The list of dependencies of the Debian package is located in the <tt>debian/control</tt> file and may help users of other distributions.
 
  wget <nowiki>http://www.recherche.enac.fr/paparazzi/debian/dists/sarge/main/binary-i386/libsubject-perl_2.00_all.deb</nowiki>
If you receive a message similar to this:
  wget <nowiki>http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/xml-light-ocaml_2.1-2_i386.deb</nowiki>
 
  wget <nowiki>http://www.tls.cena.fr/products/ivy/download/packages/ivy-perl_4.21_all.deb</nowiki>
Directory /home/mcurrie/paparazzi doesn't exist
  wget <nowiki>http://www.tls.cena.fr/products/ivy/download/packages/ivy-c_3.9.2-1_i386.deb</nowiki>
This directory is needed to store user configuration and data
  wget <nowiki>http://www.tls.cena.fr/products/ivy/download/packages/ivy-c-dev_3.9.2-1_i386.deb</nowiki>
Shall I create it and populate it with examples? (Y/n)
  wget <nowiki>http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/ivy-ocaml_1.1-2_i386.deb</nowiki>
 
  wget <nowiki>http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/paparazzi-base_3.1-2_i386.deb</nowiki>
you can either rename your paparazzi folder to paparazzi and move it to /home/your_user or add the following lines to your .bashrc file in /home/''your_user''
  wget <nowiki>http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/paparazzi-bin_3.1-2_i386.deb</nowiki>
 
  wget <nowiki>http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/paparazzi-dev_3.1-2_i386.deb</nowiki>
  export PAPARAZZI_HOME=/home/''your_user''/''paparazzi_folder''
export PAPARAZZI_SRC=/home/''your_user''/''paparazzi_folder''
 
== Installation on Debian/Ubuntu "feisty fawn" ==
 
  In a terminal window enter the following
  wget http://www.recherche.enac.fr/paparazzi/debian/dists/sarge/main/binary-i386/libsubject-perl_2.00_all.deb
  wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/xml-light-ocaml_2.1-2_i386.deb
  wget http://www.tls.cena.fr/products/ivy/download/packages/ivy-perl_4.21_all.deb
  wget http://www.tls.cena.fr/products/ivy/download/packages/ivy-c_3.9.2-1_i386.deb
  wget http://www.tls.cena.fr/products/ivy/download/packages/ivy-c-dev_3.9.2-1_i386.deb
  wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/ivy-ocaml_1.1-2_i386.deb
  wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/paparazzi-base_3.1-2_i386.deb
  wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/paparazzi-bin_3.1-2_i386.deb  
  wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/paparazzi-dev_3.1-2_i386.deb
  sudo dpkg -i libsubject-perl_2.00_all.deb
  sudo dpkg -i libsubject-perl_2.00_all.deb
  sudo dpkg -i xml-light-ocaml_2.1-2_i386.deb
  sudo dpkg -i xml-light-ocaml_2.1-2_i386.deb
Line 114: Line 99:
  mkdir -p $USER/paparazzi/conf/
  mkdir -p $USER/paparazzi/conf/
  paparazzi
  paparazzi
#paparazzi  simulation goodness if above sucessful
Then follow the source install installation instructions above with cvs and after building the cvs paparazzi execute the ./paparazzi in the cvs distribution to get paparazzi-center as above. Note: compiling and loading the AP will fail on ubuntu unless you have installed an arm-elf-gcc cross tool chain. NEW Paparazzi users who are also new to Debian, may prefer the Ubuntu distribution (based on Debian) as it allows an easier entry to paparazzi goodness then a "pure" debian distribution for the novice while allowing access to all of Debian's wizardry as you become more experienced.
#follow the source install installation instructions above with cvs and then after building the cvs paparazzi then
#execute the ./paparazzi in the cvs distribution to get paparazzi-center as above
  #compiling and loading the AP will fail on ubuntu unless you have installed an arm-elf-gcc cross tool chain
  #To NEW paparazzi users who are also new to debian, allow me to recommend the ubuntu distribution(its based on debian)
#it allows an easier entry to paparazzi goodness then a "pure" debian distribution for the novice to both
#while allowing access to all of debians wizardry as you get more experienced with it


== Installation on non Debian GNU/Linux ==
== Software Updates ==
Keeping your software up to date is easy with the CVS system.  The system will compare all source code files with the server and update any that are needed, automatically merging any minor changes that you have incorporated along the way.


You will have to compile and install the paparazzi package from the sources. Unfortunately no configure facilities is included in the package: you will have to figure out what is needed. The list of dependencies of the Debian package (listed in the <tt>debian/control</tt>) file is the best start.
To download and automatically merge any updated source files, run the following command from your Paparazzi directory
cvs update -d
where the <tt>-d</tt> is needed to get any new directories.


== Software Updates ==
Users making changes to their code structure may prefer to have more control over the updating and merging process and may wish to install and use '''tkcvs''' instead which provides highlighted comparisons of any files that differ between your code and the CVS server and allows for a file by file update.
Keeping your software up to date is easy with the Debian package and the CVS systems.


To download any updated package, be sure to have the Paparazzi repository mentionned in your <tt>/etc/apt/sources.list</tt>:
To update your Linux distribution as well as any dependencies of Paparazzi (seldom necessary), run the following as root:
<nowiki>deb http://www.recherche.enac.fr/paparazzi/debian sarge main</nowiki>
<nowiki>deb http://www.recherche.enac.fr/paparazzi/debian etch main</nowiki>
and run the following command (as root):
  apt-get update
  apt-get update
apt get upgrade
== LiveCd ==
The LiveCD is an easy way to test Paparazzi: no installation is required and no changes are made to your computer.  Simply burn the image as a boot CD and reboot!  The LiveCD includes Linux and the complete paparazzi binary package (code source, tools and cross compilers).  It is intended for demonstration only and not frequently updated but it contains the complete system and can store changed files on a pen drive or compressed file on your hard drive so that it can compile, flash, and operate any aircraft, albeit slowly. 
The CD image is available from the [[Downloads|Downloads]] page.
The Paparazzi demo is launchable on the Live CD from the Paparazzi icon.
Knoppix allows for all the user data to be saved on a hard disk partition (most file systems are supported) or on a removable device (typically a USB pendrive). Note that this action is not destructive: the user data tree is compressed and stored on your file system as a single file (<tt>knoppix.img</tt>).
* From the Knoppix menu (second from bottom left), choose '''Configure''', '''Create a persistent KNOPPIX disk image'''
* Choose your media (be sure to connect your USB pendrive before booting!)
* Choose if you want an encrypted filesystem (to protect your flight plan designed for the next MAV competition :-) )
* Choose the size of your home directory (100Mb is recommended)
On the next reboot, this saved state will be automatically located and loaded.
Using this persistent feature, the Paparazzix Live CD can really be used to configure, simulate and fly an aircraft with the Paparazzi system.


To download any updated source file, run the following command from your Paparazzi directory
The Live CD can also be used to install a Debian system on the hard disk, using the <tt>knoppix-installer</tt> command. Be sure to backup the hard disk before trying ...
cvs update -d
where the <tt>-d</tt> is needed to get any new directory.

Revision as of 10:18, 28 August 2007

Precompiled binaries can be downloaded and executed with the paparazzi-bin package but to maintain the power and flexibility of open-source code, most operations within Paparazzi involve recompilation of autopilot and/or ground station code. Therefore the typical installation requires all of the necessary C, OCAML, and Perl compilers as well as some XML and Ivy handlers.

Setting your Environment Variables

Before launching the GCS or compiling anything 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: /home/your_username/.bashrc
export PAPARAZZI_HOME=/home/your_username/paparazzi
export PAPARAZZI_SRC=/home/your_username/paparazzi

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=/home/your_username/paparazzi
PAPARAZZI_SRC=/home/your_username/paparazzi

Installation on Debian

Paparazzi is packaged for Debian as well as all of its dependencies. The repository hosted at ENAC holds their latest version.

Installation from the Command Line

Just add the following line(s) to your repository list (/etc/apt/sources.list). Note: etch users must include both sarge and etch lines.

File: /etc/apt/sources.list
deb http://www.recherche.enac.fr/paparazzi/debian sarge main
#if needed deb http://www.recherche.enac.fr/paparazzi/debian etch main

Then, update your sources and install the precompiled binaries as well as the dependencies needed for recompiling:

apt-get update
apt-get install paparazzi-bin
apt-get install paparazzi-base
apt-get install paparazzi-dev
apt-get install paparazzi-arm7

Installation thru Synaptic Package Manager

  • Launch Synaptic Package Manager (Applications/System Tools Menu)
  • In Settings/Repositories, add a new repository on URI = http://www.recherche.enac.fr/paparazzi/debian, Distribution = sarge, Section = main
  • Users of current linux versions must also add http://www.recherche.enac.fr/paparazzi/debian, Distribution = etch, Section = main (both Sarge and Etch are needed)
  • Search for paparazzi-bin, paparazzi-base, paparazzi-dev, and paparazzi-arm7 packages (use the Search button)
  • Mark them for installation (right-click on package names)
  • Left-click on Apply

Optional/Obsolete Packages

Users of older AVR based boards will need paparazzi-avr

Installing the Source Code

After the dependency packages are installed the complete source code should be downloaded from the CVS. See the project page at Savannah for more details.

cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/paparazzi co paparazzi

This will download all of the code and install it into /home/your_username/paparazzi

If you cannot use the CVS install, occasionally updated tarballs can also be fetched from the Downloads page.

Launching the Software

Make sure your Installation#Setting_your_Environment_Variables environment variables are set correctly and launch the software from /home/your_username/paparazzi with:

./paparazzi

Recompiling

After any CVS update or source code modification the code can be recompiled from /home/your_username/paparazzi 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.

System wide install

The paparazzi-bin package contains the airborne source code and the tools you need to configure and control the UAV. It provides 3 main commands:

  • paparazzi-make to compile the aircraft (and run the demo);
  • paparazzi to run the ground control station supervision;
  • paparazzi-gcs to run the flight plan editor.

Start with paparazzi-make init to initialize your configuration directory (~/paparazzi) and paparazzi-make demo to run the demo.

Manual Installation of Individual Packages

Users of Ubuntu or other Linux flavors or anyone needing manual control of each individual package can install them independently. The list of dependencies of the Debian package is located in the debian/control file and may help users of other distributions.

wget http://www.recherche.enac.fr/paparazzi/debian/dists/sarge/main/binary-i386/libsubject-perl_2.00_all.deb
wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/xml-light-ocaml_2.1-2_i386.deb
wget http://www.tls.cena.fr/products/ivy/download/packages/ivy-perl_4.21_all.deb
wget http://www.tls.cena.fr/products/ivy/download/packages/ivy-c_3.9.2-1_i386.deb
wget http://www.tls.cena.fr/products/ivy/download/packages/ivy-c-dev_3.9.2-1_i386.deb
wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/ivy-ocaml_1.1-2_i386.deb
wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/paparazzi-base_3.1-2_i386.deb
wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/paparazzi-bin_3.1-2_i386.deb 
wget http://www.recherche.enac.fr/paparazzi/debian/dists/etch/main/binary-i386/paparazzi-dev_3.1-2_i386.deb
sudo dpkg -i libsubject-perl_2.00_all.deb
sudo dpkg -i xml-light-ocaml_2.1-2_i386.deb
sudo dpkg -i ivy-ocaml_1.1-2_i386.deb
sudo dpkg -i ivy-perl_4.21_all.deb
sudo apt-get install perl-tk
sudo apt-get -f install
sudo dpkg -i paparazzi-base_3.1-2_i386.deb
sudo dpkg -i paparazzi-bin_3.1-2_i386.deb
sudo dpkg -i paparazzi-dev_3.1-2_i386.deb
mkdir -p $USER/paparazzi/conf/
paparazzi

Then follow the source install installation instructions above with cvs and after building the cvs paparazzi execute the ./paparazzi in the cvs distribution to get paparazzi-center as above. Note: compiling and loading the AP will fail on ubuntu unless you have installed an arm-elf-gcc cross tool chain. NEW Paparazzi users who are also new to Debian, may prefer the Ubuntu distribution (based on Debian) as it allows an easier entry to paparazzi goodness then a "pure" debian distribution for the novice while allowing access to all of Debian's wizardry as you become more experienced.

Software Updates

Keeping your software up to date is easy with the CVS system. The system will compare all source code files with the server and update any that are needed, automatically merging any minor changes that you have incorporated along the way.

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

cvs update -d

where the -d is needed to get any new directories.

Users making changes to their code structure may prefer to have more control over the updating and merging process and may wish to install and use tkcvs instead which provides highlighted comparisons of any files that differ between your code and the CVS server and allows for a file by file update.

To update your Linux distribution as well as any dependencies of Paparazzi (seldom necessary), run the following as root:

apt-get update
apt get upgrade

LiveCd

The LiveCD is an easy way to test Paparazzi: no installation is required and no changes are made to your computer. Simply burn the image as a boot CD and reboot! The LiveCD includes Linux and the complete paparazzi binary package (code source, tools and cross compilers). It is intended for demonstration only and not frequently updated but it contains the complete system and can store changed files on a pen drive or compressed file on your hard drive so that it can compile, flash, and operate any aircraft, albeit slowly.

The CD image is available from the Downloads page.

The Paparazzi demo is launchable on the Live CD from the Paparazzi icon.

Knoppix allows for all the user data to be saved on a hard disk partition (most file systems are supported) or on a removable device (typically a USB pendrive). Note that this action is not destructive: the user data tree is compressed and stored on your file system as a single file (knoppix.img).

  • From the Knoppix menu (second from bottom left), choose Configure, Create a persistent KNOPPIX disk image
  • Choose your media (be sure to connect your USB pendrive before booting!)
  • Choose if you want an encrypted filesystem (to protect your flight plan designed for the next MAV competition :-) )
  • Choose the size of your home directory (100Mb is recommended)

On the next reboot, this saved state will be automatically located and loaded.

Using this persistent feature, the Paparazzix Live CD can really be used to configure, simulate and fly an aircraft with the Paparazzi system.

The Live CD can also be used to install a Debian system on the hard disk, using the knoppix-installer command. Be sure to backup the hard disk before trying ...