Ubuntu下安装g2o

Dependencies

1
sudo apt-get install libcholmod3.0.6 libsuitesparse-dev freeglut3 freeglut3-dev freeglut3-dbg libqglviewer-dev libqglviewer-dev libeigen3-dev qtdeclarative5-dev qt5-qmake

Build

1
2
3
4
5
6
7
git clone https://github.com/RainerKuemmerle/g2o.git
cd g2o
mkdir build
cd build
cmake ..
make -j8
sudo make install

Test

1
./../bin/curve_fit
1
2
3
4
5
6
Target curve
a * exp(-lambda * x) + b
Iterative least squares solution
a = 1.98894
b = 0.406972
lambda = 0.201044