Ubuntu下安装g2o

Dependencies

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

git clone https://github.com/RainerKuemmerle/g2o.git
cd g2o
mkdir build
cd build
cmake ..
make -j8
sudo make install

Test

./../bin/curve_fit
Target curve
a * exp(-lambda * x) + b
Iterative least squares solution

a = 1.98894
b = 0.406972
lambda = 0.201044