Error while compiling RTAB-Map with g2o support
Posted by
g.bartoli on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Error-while-compiling-RTAB-Map-with-g2o-support-tp422.html
Hi,
yesterday I cloned the GIT repository and correctly compiled RTAB-Map standalone on Linux Mint 17.1 (Ubuntu 14.04), this was my configuration with cmake:
-- Info :
-- CMAKE_INSTALL_PREFIX = /usr/local
-- CMAKE_BUILD_TYPE = Release
-- BUILD_SHARED_LIBS = ON
-- With OpenCV nonfree module (SIFT/SURF) = NO (not found)
-- With Freenect = YES
-- With OpenNI2 = NO (OpenNI2 not found)
-- With Freenect2 = NO (libfreenect2 not found)
-- With dc1394 = YES
-- With FlyCapture2/Triclops = NO (Point Grey SDK not found)
-- With g2o = NO
-- With Qt = YES (version 4)
-- --------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bartoli/Projects/rtabmap/build
This morning I wanted to add the g2o support, so I installed the library using the apt-get (ros-indigo-libg2o), so I updated the code with "git pull origin master" and ran cmake again. This time it correctly showed "With g2o = YES", but now I'm unable to recompile the project with cmake, many errors appears, this is just one of them:
In file included from /usr/local/include/g2o/core/optimizable_graph.h:38:0,
from /usr/local/include/g2o/core/sparse_optimizer.h:32,
from /home/bartoli/Projects/rtabmap/corelib/src/Graph.cpp:42:
/usr/local/include/g2o/core/hyper_graph.h: At global scope:
/usr/local/include/g2o/core/hyper_graph.h:138:15: error: ‘unordered_map’ in namespace ‘std’ does not name a type
typedef std::unordered_map<int, Vertex*> VertexIDMap;
^
/usr/local/include/g2o/core/hyper_graph.h:225:13: error: ‘VertexIDMap’ does not name a type
const VertexIDMap& vertices() const {return _vertices;}
^
/usr/local/include/g2o/core/hyper_graph.h:227:7: error: ‘VertexIDMap’ does not name a type
VertexIDMap& vertices() {return _vertices;}
^
/usr/local/include/g2o/core/hyper_graph.h:274:7: error: ‘VertexIDMap’ does not name a type
VertexIDMap _vertices;
^
I also uploaded the full log file... do you have an idea why it does not work with g2o?
log.txt
~Guido