-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.txt
103 lines (78 loc) · 5.34 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
________________________________________________________________________________
INSTALLING REQUIRED/OPTIONAL PACKAGES FOR DEBIAN (UBUNTU) USERS
(for manual installation see "MANUAL INSTALLATION OF REQUIRED/OPTIONAL PACKAGES" below)
sudo apt-get install cmake libboost-filesystem-dev libboost-system-dev libboost-serialization-dev
sudo apt-get install doxygen graphviz
"sudo apt-get eigen3" currently (February 2014) installs version 3.1.2. However, DmpBbo
requires version >= 3.2. To get the latest Eigen version:
use this PPA: https://launchpad.net/~kalakris/+archive/eigen
or do a manual install: see "MANUAL INSTALLATION OF REQUIRED/OPTIONAL PACKAGES" below
________________________________________________________________________________
BUILDING DMPBBO
Please make sure you have installed all the required packages before trying to compile.
We assume that you use a compiler that is compatible with the C++11 standard.
To compile, do:
mkdir -p build_dir; cd build_dir; cmake .. -DCMAKE_BUILD_TYPE=Release; make; make Docs
To compile a version that has debugging symbols included, and compiles some tests also:
mkdir -p build_dir_debug; cd build_dir_debug; cmake .. -DCMAKE_BUILD_TYPE=Debug; make VERBOSE=1
When running the code on a real robot, you want to do an optimized build without asserts, i.e. -DCMAKE_BUILD_TYPE=Release
To install libs in /usr/local/lib, headers in /usr/local/include and binaries in dmpbbo/bin:
sudo make install
________________________________________________________________________________
STATIC VS SHARED LIBRARIES
The default is to build static libraries (e.g. libdmp.a) and to statically link these
libraries to the demo and test executables (the reason for this is the boost bug below).
Alternatively, you can build shared libraries by changing the CMakeLists.txt in this directory:
set(SHARED_OR_STATIC "SHARED") => set(SHARED_OR_STATIC "STATIC")
Calling "sudo make install" will install the shared libraries in /usr/local/lib. Make sure that /usr/local/lib is in your LD_LIBRARY_PATH, or the binaries will not be able to dynamically link the required libraries.
If you use shared libraries, your program may crash with:
pure virtual method called
terminate called without an active exception
This is a bug in boost::serialization for versions >=1.44, which can be fixed with this patch:
https://svn.boost.org/trac/boost/ticket/4842#comment:21
https://svn.boost.org/trac/boost/attachment/ticket/4842/void_cast.cpp.patch
Note that the crash happens towards the very end of the program, just before returning from main() when desctructors are called. So it does not affect functionality, but it is just very irritating that boost crashes and sometimes dumps a core (I use boost version 1.48, maybe the issue is fixed in later versions). If I had known things like this would happen, I would have probably used cereal (http://uscilab.github.io/cereal/) rather than boost::serialization...
________________________________________________________________________________
REAL-TIME DEBUGGING BUILD
Various function approximators have been optimized so that no dynamic allocations are made in real-time critical functions. The Eigen matrix library has functionality for checking whether dynamic allocations are made in certain blocks of code.
To compile a version that has real-time checks built in:
mkdir -p build_dir_realtime; cd build_dir_realtime; cmake .. -DREALTIME_CHECKS=1 -DCMAKE_BUILD_TYPE=Debug; make VERBOSE=1
Note that it doesn't make sense to set -DREALTIME_CHECKS=1 without -DCMAKE_BUILD_TYPE=Debug, as asserts are only done in debug mode.
________________________________________________________________________________
MANUAL INSTALLATION OF REQUIRED/OPTIONAL PACKAGES
___________________________________
CMAKE (required)
http://www.cmake.org/cmake/resources/software.html
___________________________________
EIGEN (required, version >= 3.2)
http://eigen.tuxfamily.org/dox/GettingStarted.html
Getting the latest version (thanks to Ryan Lober):
sudo apt-get install mercurial
"go to whereever you want to start the installation"
hg clone https://bitbucket.org/eigen/eigen/
cd eigen
mkdir build_dir
cd build_dir
cmake ..
sudo make install
___________________________________
BOOST (required modules: filesystem, system, serialization. version >=1.34)
http://www.boost.org/doc/libs/1_55_0/more/getting_started/
http://www.boost.org/doc/libs/1_55_0/libs/filesystem/doc/
http://www.boost.org/doc/libs/1_55_0/libs/system/doc/
http://www.boost.org/doc/libs/1_55_0/libs/serialization/doc/
___________________________________
DOXYGEN (optional, version >1.7.5, for the \cite command)
http://www.stack.nl/~dimitri/doxygen/download.html#srcbin
___________________________________
LWPR (optional)
To use the Locally Weighted Projection Regression algorithm as a
function approximator, install the following software:
http://sourceforge.net/projects/lwpr/
Our build system assumes the resulting headers/libraries are installed in
/usr/local/include and /usr/local/lib respectively. If they are in a
non-standard location (because you don't want to 'make install' or such)
please modify the following lines in src/functionapproximators/FindLWPR.cmake
accordingly:
find_path(LWPR_INCLUDE_DIR lwpr.hh HINTS /usr/local/include/)
find_library(LWPR_LIBRARY liblwpr.a HINTS /usr/local/lib/)