Build MIP

Build

MIP relies on third party libraries to implement some mandatory/optional features. This determines MIP to have mandatory and optional dependancies. These are the mandatory dependences of MIP:

And these are the optional libraries used by MIP:

Other of MIP may rely to other dependancies. In the following we explain how to correctly install MIP on all

Ubuntu 8.04/8.10/9.04/9.10/10.04/12.04

Before downloading, MIP open synaptic
$ sudo synaptic 
and check if you have the following packages (IMPORTANT: never use the quick search box to find the packages; use the button search on the left of the quick search box; if you are not able to find a package always check that the quick search box is empty):
build-essential
subversion
cmake (version at least 2.6.2, if you find only version 2.4 or 2.6.0 go to www.cmake.org and download manually following the instructions for the installation)

Let MIP_HOME be the absolute path of the directory in wich you want to download MIP.

Checkout the MIP project from the labrob repository:

$ svn co svn://labrob.diag.uniroma1.it/software/MIP/trunk MIP_HOME 

Checkout the dependences from the labrob repository:

$ svn co svn://labrob.diag.uniroma1.it/software/MIP/dependences MIP_HOME/../dependences 

Open synaptic:

$ sudo synaptic 
To get the compiler (g++), install the package build-essential
install the following packages (also with -dev):
libltdl-dev
libtool
libmpfr-dev
freeglut3, freeglut3-dev
libgtk2.0, libgtk2.0-dev
libboost-serialization, libboost-serialization-dev
expect, expect-dev
zenity
If your synaptic can't find that libraries, it is possible to install more recent versions (with higher number).

Other non-mandatory dependances are:
libgsl0-dev (requested to build the MultiReg-based mutual localization module)
NOW DEPRECATED libCGAL-dev (requested to build the deployment task and algorithms)

Not on synaptic
mandatory: armadillo 2.4.6 or earlier (tested versions 3.3.2, 2.4.6 and 2.0.1) see http://arma.sourceforge.net/
optional: orocos-BFL (tested version 0.7.0, not on synaptic, requested to build particle filters for the mutual localization; see http://www.orocos.org/bfl/source for download and install notes)
optional: openCV2.0 or later (tested version 2.0, not on synaptic, requested to build camera related components; see http://opencv.willowgarage.com/wiki/ for download and install notes)
note: if you want to record video you need ffmpeg support, use "sudo apt-get install libavformat-dev libavcodec-dev libavfilter-dev libswscale-dev" in terminal to install openCv dependences.

Close synaptic

The following dependences are not mandatory and are used only in a plugin package to provide 2D simulations. They must be compiled from the source code that you can find in the aforementioned dependences repository, or from the website http://sourceforge.net/projects/playerstage/files/. We use Player version 2.1.3, Stage version 2.1.1

Repair rgb.txt broken link (only for Ubuntu 8.10):

$ cd MIP_HOME/..
$ sudo cp dependences/rgb.txt /etc/X11/rgb.txt

Repair rgb.txt broken link (only for Ubuntu 9.04):
$ cd /usr/X11R6/
$ sudo mkdir lib
$ sudo mkdir lib/X11
$ cd MIP_HOME/..
$ sudo cp dependences/rgb.txt /usr/X11R6/lib/X11/rgb.txt

Build and Install player:
$ cd MIP_HOME/../dependences
$ tar -xjvf player-2.1.3.tar.bz2
$ cd player-2.1.3
$ ./configure
$ make
$ sudo make install

Add in the $HOME/.bashrc the following line:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Build and Install stage:

$ cd MIP_HOME/../dependences
$ tar -xjvf stage-2.1.1.tar.bz2
$ cd stage-2.1.1
$ ./configure
$ make
$ sudo make install

Build and install csm (not mandatory):
Two possibilities:
1) Download and install the current csm version from the Andrea Censi web site. 2) untar $HOME/dependences/csmXXXXXXXX.tar,gz and install it:

$ cd $HOME/dependences/
$ tar xzfv csmXXXXXXXX.tar.gz
$ cd csm
$ cmake .
$ make
$ sudo make install

optional: ROS - MIP now offers some tools to connect to ROS (http://www.ros.org/wiki/). These tools are not compiled if ROS is not installed on the computer. We curretly support ROS electric.

Build MIP:

$ cd MIP_HOME
$ mkdir build
$ cmake ..
$ make

if you have ROS installed but you do not want to compile the ROS tools provided by MIP, execute the following commands:

$ cd MIP_HOME
$ mkdir build
$ cmake -DUSE_ROS=OFF ..
$ make

Ubuntu 9.04 64 bit

MIP works in 64-bit Ubuntu as well, with just a couple changes to the directions above. Due to a bug in version 1.35 of one of the Boost libraries which blocks building on 64-bit machines, you will need to get a more recent version of Boost (1.37 works):

sudo apt-get install libboost1.37-dev

Next, Ubuntu 9.04 has only CGAL 3.4 available in the repositories (and the CGAL repository version forces the installation of the problematic Boost 1.35). Do not install CGAL from the repositories, instead you must build CGAl 3.3.1 from source. The tarball for CGAL 3.3.1 is included in MIP_HOME/dependences, extract it and follow the instructions in the INSTALL text file to install the library files into /usr/local/.

Finally, with Boost 1.37 there is a small tweak necessary to get player 2.1.3 working with Boost signals (possibly other versions, but player 2.1.3 and Boost 1.37 is what was tested). In the folder you installed player 2.1.3 from, find the configure script. Inside this file, do a search for

boost_signals boost_signals-gcc-mt

and change this so that it reads

boost_signals boost_signals-gcc-mt boost_signals-mt

Then, when you re-configure and re-install player, signalling should be included. These are the only changes to the MIP install directions needed for the 64-bit version of Ubuntu.

Fedora 8/9/10 (not updated anymore)

Let MIP_HOME be the absolute path of the directory in wich you have downloaded MIP.

Checkout the MIP project from the labrob repository:

$ svn co svn://labrob.diag.uniroma1.it/software/MIP/trunk MIP_HOME 

If needed, checkout the dependences the labrob repository:

$ svn co svn://labrob.diag.uniroma1.it/software/MIP/dependences MIP_HOME/../dependences 

Install dependences (assuming that your username is USERNAME):

$ su -
# cd MIP_HOME
# ./install-dependences all
wait for a few minutes ...
# exit

Compile project:

$ cd MIP_HOME
$ cmake .
$ make

Install libboost-serialization (TODO).

If necessary add in the $HOME/.bashrc the following line:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Debian

todo

OsX 1.5 (Not updated)

install port (to do)

install boost, glut, player, stage, mpfr, gsl:

$ sudo port install boost
$ sudo ln -s /opt/local/include/boost/ /usr/include/boost
$ sudo port install glut lua-glut
$ sudo ln -s /opt/local/lib/libjpeg.dylib /usr/local/lib/libjpeg.dylib
$ sudo port install playerstage-player playerstage-stage
$ sudo ln -s /usr//X11/share/X11/rgb.txt /usr/X11/lib/X11/rgb.txt
$ sudo port install mpfr
$ sudo ln -s /opt/local/include/mpfr.h /usr/local/include/mpfr.h
$ sudo ln -s /opt/local/lib/libmpfr.dylib /usr/local/lib/libmpfr.dylib
$ sudo ln -s /opt/local/include/gmp.h /usr/local/include/gmp.h
$ sudo ln -s /opt/local/lib/libgmp.dylib /usr/local/lib/libgmp.dylib
$ sudo port install mpfr
$ sudo port install gsl

install cgal, gsl:

$ cd $MIP_HOME
$ sudo ./install_dependences cgal

create gl, glu, glut links:

$ sudo ln -s /usr/X11R6/lib/libGL.dylib /usr/lib/libGL.dylib
$ sudo ln -s /usr/X11R6/lib/libGLU.dylib /usr/lib/libGLU.dylib
$ sudo ln -s /opt/local/lib/libglut.dylib /usr/lib/libglut.dylib

install zenity:

$ sudo port install zenity

Build MIP:

$ cd MIP_HOME
$ cmake .
$ make

Execute the script $MIP_HOME/main/scripts/osxLoopBack.sh

$ cd  $MIP_HOME/main/scripts/
$ ./osxLoopBack.sh
(This is needed everytime the computer is rebooted)

Generated on Mon Feb 20 07:01:08 2017 for MIP by  doxygen 1.5.6