-
Notifications
You must be signed in to change notification settings - Fork 6
4. Prerequisite: configuring and installing G2O
Follow this tutorial to install G2O as a prerequisite for RGB-D RTK. The library should be compiled with C++17 and linked against Eigen 3.4.0. The steps below were tested on an Ubuntu 20.04 system.
sudo apt-get install libsuitesparse-dev qtdeclarative5-dev qt5-qmake libqglviewer-dev-qt5
Download the G2O source code.
Extract the file to a known directory (e.g. /home/your_user/Lib/g2o/
)
In a text editor, open the file /home/your_user/Lib/g2o/CMakeLists.txt
.
Search for the line
set(CMAKE_CXX_STANDARD 11)
and change it to
set(CMAKE_CXX_STANDARD 17)
In the Linux terminal, enter the G2O source code directory (step 2 above). Create the directory in which the binary files will be compiled:
mkdir Release
Enter this directory and run CMake-GUI:
cd Release
cmake-gui ..
Click Configure
, select Unix Makefiles
, Use default native compilers
and click Finish
.
Wait until the initial CMake configuration for the project finishes.
Then, follow these instructions
- Check the
Advanced
option and search forEIGEN_INCLUDE_DIR
. Change this variable to/usr/local/include/eigen3
Click Configure
and wait. Then, click Generate
.
Close the CMake-GUI window and back in the terminal, compile the G2O source code:
make -j2
This process might take some time to finish. When it does, install the generated libraries into the system directory:
sudo make install
- Soon