-
Notifications
You must be signed in to change notification settings - Fork 58
Installation
This document contains installation instructions for the Bayesian Filtering Library. Section [sec:linux] contains installation instructions for Linux, while Section [sec:windows] explains installation with Visual Studio for Windows. authors:
- 'Tinne De Laet, Wim Meeussen, Erwin Aertbeliën and Klaas Gadeyne'
title: Installation Guide
Bayesian Filtering Library
This section contains installation instructions for BFL for Linux.
An alternative way to get BFL is to install it from source, e.g. if you are not using Ubuntu or Debian. This section gives step-by-step instructions to compile BFL from source. You'll not only need to compile BFL, but also a matrix computation library and a random number generator library. A few things you need to know before getting started:
-
BFL is developed on Mac OS X and regularly tested for GNU Linux on Debian and Ubuntu. However we've received success reports from other distributions and architectures, such as Gentoo, MAC OS X and MS Windows.
-
BFL compiles without warnings with g++ 2.95.0 up to g++ 4.1.2 However, it is preferred to use the latest g++ version.
-
We use cmake in the build system of BFL. You'll need cmake 2.4 or later.
-
To download the latest version from our subversion server, you will need a subversion client.
The instructions explain how to install libraries in the /install directory.
BFL requires an external library for matrix computations. You can choose to use the LTI library, the Newmat library, or the Boost library.
You can install the LTI library as a precompiled Ubuntu/Debian package, or compile it from source.
-
To install the precompiled LTI package, add the line in your sources.list as described in Section 1.1{reference-type="ref" reference="subsec:ubuntu"}, and then run:
sudo apt-get update sudo apt-get install liblti-dev
-
To install the LTI library from source:
-
First you'll need to install the libxt-dev package:
sudo apt-get install libxt-dev
-
Then download the latest version of the LTI library from the LTI web page http://ltilib.sourceforge.net/doc/homepage/index.shtml
-
Move the downloaded file to a sources folder:
mv ltilib.tar.gz ~/sources/
-
Go to the directory $\mathtt{\tilde{ }}$
/sources/
cd ~/sources/
-
Untar and unzip the file:
tar -xzvf ltilib.tar.gz
-
Build the library:
cd ltilib/linux make -f Makefile.cvs ./configure --disable-debug --without-gtk --disable-gtk --prefix=~/install make
If you don't want to install ltilib in
/install
pass another argument for the–prefix
option to the configure script. -
Finally, install the library
[sudo] make install
For more details, see the LTI web page http://ltilib.sourceforge.net/doc/homepage/index.shtml.
-
You can install the Newmat library as a precompiled Ubuntu/Debian package, or compile it from source.
-
To install the precompiled Newmat package run:
sudo apt-get install libnewmat10-dev
-
To install the Newmat library from source:
-
Create a directory in which you will put the source of newmat:
mkdir ~/sources/newmat/
-
Then download the latest version (version 11) of the Newmat library from the Newmat web page: http://www.robertnz.net/download.html
-
Move the downloaded file to your source folder:
mv newmat11.tar.gz ~/sources/newmat
-
Go to the directory $\mathtt{\tilde{ }}$
/sources/
cd ~/sources/newmat
-
Untar and unzip the file:
tar -xzvf newmat11.tar.gz
-
Then go to http://people.mech.kuleuven.be/~tdelaet/Makefile.Newmat and save the file as Makefile in your newmat directory.
-
Also get the adapted include.h at http://people.mech.kuleuven.be/~tdelaet/include.h.newmat11 and save the file as include.h. in your newmat directory.
-
Build the library:
make
-
Finally, install the library. By default newmat gets installed in
/usr/local
. So change the PREFIX variable inMakefile.Newmat
to/install
or any other installation directory before running make install.[sudo] make install
-
You can install the Boost library as a precompiled Ubuntu/Debian package, or install it from source.
-
To install the precompiled Boost package run:
sudo apt-get install libboost-dev
-
To get the source of the Boost library from source, download it from http://sourceforge.net/project/showfiles.php?group_id=7586.
-
Move the downloaded file to your source folder:
mv boost_1_34_0.tar.gz ~/sources/
-
Untar and unzip the file?
tar -xzvf boost_1_34_0.tar.gz
-
Go into the created directory:
cd boost_1_34_o
-
Configure the library:
./configure
-
Make the package:
make
-
Install boost:
sudo make install
-
BFL requires an external library for matrix computations. You can choose to use the LTI library, the Boost library, or the Scythe library.
You can install the LTI library as a precompiled Ubuntu/Debian package, or compile it from source (follow the same instructions as described in section 1.2.1{reference-type="ref" reference="subsec:matrix"}). If you already installed LTI as the matrix library, you already have everything for the rng library.
You can install the Boost library as a precompiled Ubuntu/Debian package, or install it from source (follow the same instructions as described in section 1.2.1{reference-type="ref" reference="subsec:matrix"}). If you already installed Boost as the matrix library, you already have everything for the rng library.
To install the Scythe from source:
-
Download the Scythe from the Scythe web page: http://scythe.wustl.edu/
-
Move the downloaded file to your source folder:
mv scythestat-1.0.1.tar.gz ~/sources
-
Untar and unzip the file:
tar -xzvf scythestat-1.0.1.tar.gz
-
Configure the library:
./configure
-
Make the package:
make
-
Install scythe:
sudo make install
Now we arrived to the installation of the BFL library itself. BFL is available from our subversion server, or as a tarbal.
-
First go to the $\mathtt{\tilde{ }}$
/sources/
folder:cd ~/sources/
-
Then, to get a copy of BFL, use
-
For subversion access:
svn co http://svn.mech.kuleuven.be/repos/orocos/trunk/bfl
-
To extract a BFL tarbal you got from the website:
tar xvf orocos-bfl.tar.gz
-
-
Now create and go to a build directory in /sources/bfl
mkdir ~/sources/bfl/build cd ~/sources/bfl/build
-
If you've installed one of the dependencies in a non-standard (where your compiler doesn't look by default) location, set the following environment variables to point to the appropriate directories (Don't bluntly copy the statements below)
export CMAKE_INCLUDE_PATH=/path/to/installed/library/include export CMAKE_LIBRARY_PATH=/path/to/installed/library/lib
See http://www.cmake.org/Wiki/CMake_Useful_Variables#Environment_Variables for more information
-
Run ccmake:
ccmake ..
-
Then type 'c' to configure, and 'e' to exit the page that shows the configure output. Now you see the cmake configuration menu. In this menu you can change the following options:
-
BUILD_EXAMPLES: ON if building the examples is desired,
-
BUILD_TESTS: ON if building the cppunit tests is desired,
-
CMAKE_BUILD_TYPE: Debug or e.g. Release,
-
CMAKE_INSTALL_PREFIX: directory where to install bfl, e.g.
/install
, -
GINAC_SUPPORT: OFF if you don't want to use GINAC support,
-
LIBRARY_TYPE: type of library build, shared or static,
-
MATRIX_LIB: matrix library used: boost, lti or newmat,
-
RNG_LIB: random number generator used: boost, lti or scythe.
Now repeat the 'c' configure and 'e' exit cycle, until you get no more errors. When this is the case, you'll have the 'g' generate option available. Press 'g' to generate the makefiles, and then quit cmake with 'q' quit.
-
-
Now all configuration is done, and you can build BFL:
make
-
To check the functionality of BFL, use
make check
-
To install BFL use
sudo make install
In the $\mathtt{\tilde{ }}$/sources/sources/bfl/examples
directory,
you find some example BFL filters. A good next step is to check out the
BFL tutorial on http://www.orocos.org/bfl, for a step-by-step
introduction in building your own filters in BFL.
Good luck!
This section offers a step-by-step guide for BFL installation with Visual Studio on Windows.
-
Download the BFL source code from the website: http://www.orocos.org/bfl/source. Unzip this code.
-
Create a folder
$build$ and a folder$install$ where you will respectively build and install bfl (what's in a name?). -
Install boost
-
The boost Getting Started Guide gives excellent installation instructions for windows: http://www.boost.org/more/getting_started/index.html. In accordance with these instructions we advice to use the installer provided by Boost Consulting.
-
Change the install of boost such that the include files are located under:
$c:\backslash boost \backslash$ Remark that the first part is arbirary, but the$include$ part not; this will make the bfl installation easier.
-
-
Install CMake:
- You can find cmake at www.cmake.org. Install it for windows.
-
Run CMake:
-
Go to the start menu to start the CMake-GUI.
-
Fill in the location of the source code e.g.:
c:\Users\username\Desktop\orocos-bfl-0.6.0-pre1-src
-
Fill in the location of the build directory (which you previously created), e.g.:
c:\Users\username\Desktop\orocos-bfl-0.6.0-pre1-src\build
-
Press the Configure botton. Select 'Visual Studio 8, 2005' as a generator. You well get a lot of 'errors' (remark this are actually not errors but messages). You can press the 'OK' botton to check all messages or just press the 'Cancel' botton to supress all further messages. Also mind the CPP-Unit error, which will prevent you from running the CPP-unit tests, but won't bother the examples nor any of your applications.
-
Fill in:
-
CMAKE_BUILD_TYPE: release
-
CMAKE_INSTALL_PREFIX:
$c:\backslash Users \backslash username \backslash Desktop \backslash orocos-bfl-0.6.0-pre1-src \backslash build$ -
LIBRARY_TYPE: static
-
MATRIX_INSTALL:
$c:\backslash boost \backslash$ -
MATRIX_LIB: boost
-
RNG_INSTALL:
$c:\backslash boost \backslash$ -
RNG_LIB: boost
-
-
Press the Configure botton until you can press OK.
-
Press OK. CMake will shut down now, and BFL is ready to build. (If you get unexpected errors check the common problems section 2.1{reference-type="ref" reference="subsec:problems"}).
-
-
Build BFL with Visual Studio
-
Start Visual Studio through the Start botton.
-
Open the project 'ALL_BUILD' located in the build directory.
-
Build the project (right mouse botton, build). (If you get unexpected errors check the common problems section).
-
Build the INSTALL project to install everything.
-
In the $\mathtt{\tilde{ }}$/sources/sources/bfl/examples
directory,
you find some example BFL filters. A good next step is to check out the
BFL tutorial on http://www.orocos.org/bfl, for a step-by-step
introduction in building your own filters in BFL.
Good luck!
Why does CMakeSetup with the message LINK : fatal error LNK1104: cannot open file 'user32.lib' while configuring a project?
The path to the SDK libs (user32.lib) must be added by the IDE when the project generator "Visual Studio 8 2005" is used, because cmake uses VCExpress.exe and on the fly generated project files to check for compiling (VCExpress.exe reads some config files for the compiler/linker options)
So add the sdk lib path at Tools$\rightarrow$Options$\rightarrow$Projects and Solutions$\rightarrow$VC++ Directories$\rightarrow$Library files So you have to install the platform SDK, (available on the Microsoft website http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en) but normally you will already have done this. The installation will take some time.
The CPPunit tests will not compile on windows due to the lack of the libcppunit library. (this will give an error message, you can ignore this message), the examples should work however. If you would like to get the cpp unit tests, you can check the platform specific build instructions on http://cppunit.sourceforge.net/cppunit-wiki/. Building the library is possible for e.g. Microsoft Visual Studio 2005 but not for Visual Studio 2005 Express.