Installation on Ubuntu

This page shows the installation process on a 32/64-bit Ubuntu 9.10 or later step by step.

All terminal inputs can be copied 1:1 into your Terminal window.

Installation Overview

  • Ubuntu packages
  • libdc1394
  • OpenCV
  • MAVConn
  • QGroundControl
  • Eclipse SDK

0) Get your Ubuntu up and running

Follow the standard installation instructions on http://www.ubuntu.com/getubuntu

Pixhawk Student computer specific: We are currently using 11.10 64-bit version of Ubuntu. During installation you will be asked for username, password and computer name - please ask your supervisor (or simply Lorenz, Petri or Dominik) what to enter.

As first step after the installation is done please check that the native graphics drivers are installed and activated and also install directly the gnome-panel package for access to the classic Ubuntu desktop:

Press Ctrl+Alt+T to open a terminal and

sudo apt-get install gnome-panel synaptic

1) Install Prerequisites

For the build system

sudo apt-get install build-essential cmake git-core autoconf libtool libgtk2.0-dev doxygen

Dependencies for AI_VISION

sudo apt-get install gpsd libgps-dev libboost-all-dev libgsl0-dev \
libusb-1.0-0-dev libv4l-dev libv4l-0 libgtop2-dev libaio-dev libsigc++-2.0-dev \
libglibmm-2.4-dev libglew1.5-dev libxmu-dev libpcre3-dev libprotobuf-dev

For mapping related process we're using PCL and G2O (the source is included). The following commands will install pcl-1.3 and SuiteSparse that are needed for some processes.

sudo apt-get install python-software-properties 
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-1.5-all-dev libsuitesparse-dev libcminpack-dev

2) Install libdc1394

for Point Grey camera support. (Required)

mkdir -p ~/src
cd ~/src
git clone https://github.com/pixhawk/libdc1394.git
cd libdc1394
autoreconf -i -s
./configure
make -j4
sudo make install
cd
Add Plugdev rule

You have to add a plugdev rule for the point grey cameras to make them accessable for standard users. Just copy and execute this into your Terminal window.

sudo sh -c "cat > /etc/udev/rules.d/11-camera.rules <<_EOF
SUBSYSTEM==\"usb\",ATTRS{idVendor}==\"1e10\",GROUP=\"plugdev\"
SUBSYSTEM==\"usb\",ATTRS{idVendor}==\"164c\",GROUP=\"plugdev\"
_EOF"
cat > $HOME/rule.tmp <<_EOF
# All (fake VID 0x7070) LPCUSB devices (access through libusb)
SUBSYSTEM=="usb", ATTRS{idVendor}=="7070", GROUP="plugdev"
# FTDI 2232 parallel converter / Amontec JTAG-Tiny (access through libftdi)
SUBSYSTEM=="usb",  ATTRS{idVendor}=="0403", ATTRS{idProduct}=="cff8", GROUP="plugdev"
# make joysticks/gamepads readable on event interface (writeable for force feedback), see input_event.sh
KERNEL=="event*", IMPORT{program}="input_event.sh %p", NAME="input/%k", GROUP="plugdev", MODE="0640"
ENV{FF_DEVICE}=="1", MODE="0660"
# Rules taken from PPZ project
_EOF
sudo mv $HOME/rule.tmp /etc/udev/rules.d/10-mav.rules
sudo restart udev

If you already have cameras plugged in please replug them so that the new rules are loaded.

3) OpenCV Installation

This will download, compile and install the current version of OpenCV (at this moment 2.3).

mkdir -p ~/src
cd ~/src
wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.1/OpenCV-2.4.1.tar.bz2/download -O OpenCV-2.4.1.tar.bz2
tar xjf OpenCV-2.4.1.tar.bz2
cd OpenCV-2.4.1
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=Release ..
make -j4
sudo make install
cd

Google Protocol Buffers

We're also using Google Protocol Buffers for message serialization. The following commands will install protobuf-2.4.1 that is needed for some processes.

wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz
tar xvfz protobuf-2.4.1.tar.gz
cd protobuf-2.4.1
./configure
make
sudo make install

4) MAVConn Installation

MAVConn is the aerial middleware necessary for our application software. It handles the inter-process communication.

Follow the installation tutorial: MAVCONN Installation

5) QGroundControl Installation

Follow the instructions on the QGroundControl Website. Install first Qt and Qt Creator and then install the QGroundControl dependencies and application, as shown on the website.

For visualization of PIXHAWK-specific data, you need to do these following steps before compiling the QGroundControl code in Qt Creator.

  1. Tell QGroundControl to support PIXHAWK messages by copying user_config.pri.dist to user_config.pri.
cd ~/pixhawk/qgroundcontrol
cp user_config.pri.dist user_config.pri
  1. Install the Google Protobuf Buffers library. Instructions are located above.
  2. Compile OSG with Collada support. Instructions are located here.

6) Install JRE & Eclipse

Now install Eclipse CDT with Sun Java JRE:

Eclipse CDT

:!: Do not install Eclipse with apt-get, you will get a very outdated version of Eclipse

7) Build Application Software from Source

This guide is assuming you want to build this software package:

Clone the GIT repository onto your harddisk. If you don't know how to do this, please follow the GitHub Help: http://help.github.com. The required commands are:

mkdir -p ~/src/
cd ~/src/
git clone git://github.com/pixhawk-students/cvl11.git
cd cvl11
mkdir debug-eclipse
cd debug-eclipse
cmake -G "Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ..
ln -s ../src/ source
make -j8

You've just created an Eclipse project (see below how to import this).

You can however also run the applications directly from the command shell:

cd ~/src/cvl11
bin/cvlab-example

Import the project in Eclipse




File → Import → Existing Project Into Workspace → select ~/src/cvl11/debug-eclipse → Click OK




Details: Eclipse CDT4 Generator

If you want to use Code::Blocks instead, follow Codeblocks.

@USER@

Project

Related Sites

Micro Air Vehicles

2009-2011 System

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported