Compiling g2o with Eigen-3.3.9 with GNU-6.5


g2o is an open-source C++ framework for optimizing graph-based nonlinear error functions. g2o has been designed to be easily extensible to a wide range of problems and a new problem typically can be specified in a few lines of code. The current implementation provides solutions to several variants of SLAM and BA.

A wide range of problems in robotics as well as in computer-vision involve the minimization of a non-linear error function that can be represented as a graph. Typical instances are simultaneous localization and mapping (SLAM) or bundle adjustment (BA). The overall goal in these problems is to find the configuration of parameters or state variables that maximally explain a set of measurements affected by Gaussian noise. g2o is an open-source C++ framework for such nonlinear least squares problems. g2o has been designed to be easily extensible to a wide range of problems and a new problem typically can be specified in a few lines of code. The current implementation provides solutions to several variants of SLAM and BA.

https://github.com/RainerKuemmerle/g2o

What I used:

  • gnu-6.5
  • m4-1.4.18
  • gmp-6.1.0
  • mpfr-3.1.4
  • mpc-1.0.3
  • isl-0.18
  • gsl-2.1
  • cmake-3.21.3
% git clone https://github.com/RainerKuemmerle/g2o
% cd g2o
% mkdir build
% cd build

Sometimes, cmake does not capture your export value. The best is to force the c and cxx compilers directly by stating their path.

% cmake .. -DEIGEN3_INCLUDE_DIR=/usr/local/eigen-3.3.9/build/include/eigen3 -DCMAKE_INSTALL_PREFIX=/usr/local/g2o/ -DCHOLMOD_INCLUDE_DIR=/usr/lib64/ -DCMAKE_C_COMPILER=/usr/local/gcc-6.5.0/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/gcc-6.5.0/bin/g++
% make -j 4
% make all

References:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.