-

hey viewer, we're moving!

We are currently transitioning to a new web system, so we are not updating this wikisite anymore.

The public part of the new web system is available at http://www.ira.disco.unimib.it


Compile DAFNE Branch Exp 20101109

From Irawiki

Jump to: navigation, search

Quanto segue ha come target Ubuntu 11.04 (natty), e permette di installare velocemente tutti i prerequisiti per compilare DAFNE (versione branch 9/11/09 o backup Fermi 19/1/09)

Non sarà richiesta conferma per le varie operazioni.

Se sudo chiede più di una volta la password, alzare il timeout della validità della password con visudo.

Contents

Ottenimento sorgenti

Versione Branch

Effettuare il checkout del modulo software - branch Branch_Exp_20101109

cvs -q checkout -r Branch_Exp_20101109 -P software

Versione Backup Gennaio Fermi

contenuta nell'archivio DAFNE_backup_at_19_jan.tar.gz

Script prerequisiti

Posizionarsi nella directory software/DAFNE ed eseguire il seguente script, per l'installazione automatica di tutti i prerequisiti.

#!/bin/bash

echo "Execute this from the software/DAFNE directory
press ENTER to continue, CTRL+C to cancel"
read

BASEDIR=`pwd`


sudo apt-get install -y -qq unp


echo "

OpenCV Library"
sudo add-apt-repository ppa:gijzelaar/opencv2
sudo apt-get update
sudo apt-get install -y -qq opencv
sudo apt-get install -y -qq libopencv-dev
sudo apt-get install -y -qq python-opencv
sudo apt-get install -y -qq opencv-doc
sudo apt-get install -y -qq libcv-dev
sudo apt-get install -y -qq libhighgui-dev
sudo apt-get install -y -qq libcvaux-dev


echo "

Atlas & CBlas Library"
sudo apt-get install -y -qq libatlas-base-dev
sudo apt-get build-dep -y -qq libatlas-base-dev
sudo apt-get install -y -qq libblas-dev
sudo apt-get build-dep -y -qq libblas-dev
sudo apt-get install -y -qq liblapack-dev
sudo apt-get build-dep -y -qq liblapack-dev


echo "

GNU Scientific Library"
sudo apt-get install -y -qq libgsl0-dev


echo "

EIGEN 2"
sudo apt-get install -y -qq libeigen2-dev
cd $BASEDIR
cp -R /usr/include/eigen2/Eigen ./DMGL/
cp -R /usr/include/eigen2/Eigen ./DRL/
cp -R /usr/include/eigen2/Eigen ./DSL/
cp -R /usr/include/eigen2/Eigen ./Examples/


echo "

Octomap"
sudo apt-get install -y -qq cmake doxygen libqt4-dev libqt4-opengl-dev libqglviewer-qt4-dev
cd $BASEDIR/Extern/octomap/build
cmake ../src
make
sudo make install


echo "

CSparse"
sudo apt-get install -y -qq libcsparse2.2.3
sudo apt-get install -y -qq libsuitesparse-dev

#++++++++++++++++++
# quello che segue può essere necessario per compilare alcuni esempi
# ma non sono riuscito a risolvere i problemi di linking con csparse
# e nemmeno a ricompilare csparse (problemi con metis e cholmod)

#sudo apt-get install -y -qq libparemetis-dev
#mkdir $BASEDIR/External/suitesparse
#cd $BASEDIR/External/suitesparse
#wget http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-3.6.1.tar.gz
#unp SuiteSparse-3.6.1.tar.gz
#cd SuiteSparse

#mkdir $BASEDIR/DMGL/suitesparse
#cp -R CSparse/Include/* $BASEDIR/DMGL/suitesparse
#cp -R CHOLMOD/Include/* $BASEDIR/DMGL/suitesparse
#cp UFconfig/UFconfig.h $BASEDIR/DMGL/suitesparse
#mkdir $BASEDIR/Examples/suitesparse
#cp -R CSparse/Include/* $BASEDIR/Examples/suitesparse
#cp -R CHOLMOD/Include/* $BASEDIR/Examples/suitesparse
#cp UFconfig/UFconfig.h $BASEDIR/Examples/suitesparse

#wget http://www.toolshape.com/temp/visart/UFconfig.mk
#cp -R UFconfig.mk UFconfig
#make
#sudo make install



echo "

CanFestival"
sudo apt-get install -y -qq mercurial
mkdir $BASEDIR/External/canfestival
cd $BASEDIR/External/canfestival
hg clone http://dev.automforge.net/CanFestival-3
cd CanFestival-3
./configure
make
sudo make install


echo "

Basler Pylon"
mkdir $BASEDIR/External/pylon
cd $BASEDIR/External/pylon
wget http://www.toolshape.com/temp/visart/pylon-2.3.3-1337-32.tar.gz
echo http://www.baslerweb.com/beitraege/maildownload_formular_en_59126.html
unp pylon-2.3.3-1337-32.tar.gz
cd pylon-2.3.3-1337-bininst
unp pylon-bininst-32.tar.gz
cd pylon
cp -R include/pylon $BASEDIR/DSL/
cp -R include/pylon $BASEDIR/Examples/
cp -R genicam/library/CPP/include/* $BASEDIR/DSL/
cp -R genicam/library/CPP/include/* $BASEDIR/Examples/
sudo mkdir /opt/pylon
sudo mkdir /opt/pylon/pylon
sudo cp -R ./* /opt/pylon/pylon

export PYLON_ROOT=/opt/pylon/pylon
export GENICAM_ROOT_V2_1=${PYLON_ROOT}/genicam
export LD_LIBRARY_PATH=${PYLON_ROOT}/lib
export LD_LIBRARY_PATH=${GENICAM_ROOT_V2_1}/bin/Linux32_i86
sudo mkdir -p $HOME/genicam_xml_cache
export GENICAM_CACHE_V2_1=$HOME/genicam_xml_cache

sudo ln -s /opt/pylon/pylon/lib/libpylonbase.so /usr/local/lib/
sudo ln -s /opt/pylon/pylon/lib/libpylonutility.so /usr/local/lib/


echo "

Hokuyo Urg"
sudo apt-get install -y -qq liburg0-dev


echo "

Joystick Wrapper"
mkdir /$BASEDIR/External/joystick
cd /$BASEDIR/External/joystick
wget http://libjsw.sourcearchive.com/downloads/1.5.6/libjsw_1.5.6.orig.tar.gz
unp libjsw_1.5.6.orig.tar.gz
cd libjsw-1.5.6/libjsw
make
sudo make install


echo "

XercesC"
sudo apt-get install -y -qq libxerces-c-dev

echo 'deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe' >/tmp/hardytmp.list
sudo cp /tmp/hardytmp.list /etc/apt/sources.list.d/
sudo apt-get update
sudo apt-get install -y -qq libxerces27-dev
sudo rm /etc/apt/sources.list.d/hardytmp.list
sudo apt-get update


echo "

Missing dirs.."
mkdir $BASEDIR/DCVL/lib
mkdir $BASEDIR/DIL/lib
mkdir $BASEDIR/DIML/lib
mkdir $BASEDIR/DMGL/lib
mkdir $BASEDIR/DRL/lib
mkdir $BASEDIR/DSL/lib
mkdir $BASEDIR/Examples/bin
mkdir $BASEDIR/DCVL/include
mkdir $BASEDIR/DIL/include
mkdir $BASEDIR/DIML/include
mkdir $BASEDIR/DMGL/include
mkdir $BASEDIR/DRL/include
mkdir $BASEDIR/DSL/include

mv $BASEDIR/Examples/src/main.cpp $BASEDIR/Examples/src/main.cpp.lolwut
mv $BASEDIR/Examples/src/main.cpp.disparity $BASEDIR/Examples/src/main.cpp



Se si sta utilizzando la versione "backup gennaio", questa contiene riferimenti al SDK photonfocus, a partire dal main. Se lo si vuole rimuovere, queste le operazioni:

rimuovere file DRL/src/PhotonFocusAcquisition.*

utilizzare i file nell'archivio File:DafneExamplesGennaio.zip

in pratica:

da Examples/src/DAFNE.h rimuovere #include "PhotonFocusAcquisition.h"

da Examples/src/Makefile rimuovere PvBase PvDevice PvBuffer PvGUI PvPersistence PvGenICam PvStreamRaw PvStream

da Examples/src/main.cpp sostituire l'inizializzazione camere con caricamenti da file

poi si procede col solito make clean e make da directory principale DAFNE

eseguire ./buildmain.sh da Examples/src è un modo comodo per ricompilare velocemente solo il main.cpp (sempre contenuto in File:DafneExamplesGennaio.zip)

Personal tools