Ubantu14.04lts system installs G2O and runs G2o_viewer

Source: Internet
Author: User
Tags git clone

Installation step 1. Download

Use the following command to download

git clone https://github.com/RainerKuemmerle/g2o/

Note that after downloading and then g2o the folder under Git log, I find that my current version is
Https://github.com/RainerKuemmerle/g2o/tree/deafc01ee8315b9405351fb145238c5d62f82dc7 2. Installation

Note that if you want to run G2o_viewer, skip directly to 3.2 and follow the steps to install ... Do not run G2o_viewer and follow the Readme.txt installation under the G2o folder.
Where these dependencies need to be added in front of sudo apt-get install
-Libeigen3-dev
-Libsuitesparse-dev
-Libqt4-dev
-Qt4-qmake
-Libqglviewer-qt4-dev

Note
Installing Libqglviewer

sudo apt-get Install-libqglviewer-qt4-dev

will prompt for incorrect name, workaround

sudo apt-get install Libqglviewer-dev

If not installed Libqglviewer will appear
G2o_viewer is not installed on this issue. Is that the executable file cannot be found in the Bin folder G2o_viewer 3. Operational and inevitable problems

CD to Bin folder

./g2o_viewer

Segmentation Fault (core dump) will appear
The reason is that QT4 is used under Ubuntu 14.04, and the current G2O version uses QT5, so g2o_viewer links the Qt two version of the dynamic link library.
Workaround:
Reference
Http://www.cnblogs.com/JingeTU/p/6390924.html
and http://www.cnblogs.com/gaoxiang12/p/4770813.html
Comments under Slamstudy.
The steps are as follows: 3.1 uninstalling G2o

RM-RF build and bin directly without make install

RM-RF Build
Rm-rf Bin

If make has been install,

RM-RF/USR/LOCAL/INCLUDE/G2O
rm-rf/usr/local/lib/libg2o*
3.2 Switch to a valid version and reload G2o

This version is valid.
8ba8a03f7863e1011e3270bb73c8ed9383ccc2a2
.. Therefore, the installation can run G2o_viewer all commands as follows:
Switch to the G2O directory

git clone https://github.com/RainerKuemmerle/g2o/
git log |grep 8ba8a*
git checkout 8BA8A03F7863E1011E3270BB73C8ED9383CCC2A2
sudo apt-get install libqt4-dev
sudo apt-get install qt4-qmake
sudo apt-get install Libqglviewer-dev
mkdir build
CD build
cmake. /
Make-j8

(3) Running G2o_viewer
Switch to the Bin folder

./g2o_viewer

The effect is as follows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.