Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: g2o/core/base_vertex.h #261

Open
Jyang772 opened this issue Apr 29, 2017 · 1 comment
Open

fatal error: g2o/core/base_vertex.h #261

Jyang772 opened this issue Apr 29, 2017 · 1 comment

Comments

@Jyang772
Copy link

I am trying to build lsd_slam on Ubuntu 16.04 with ROS Kinetic.
CMake seems to have found libg2o, yet I get the following error:

-- Found g2o headers in: /opt/ros/kinetic/include/g2o
-- -- Found libg2o: /opt/ros/kinetic/lib/libg2o_csparse_extension.so;/opt/ros/kinetic/lib/libg2o_core.so;/opt/ros/kinetic/lib/libg2o_stuff.so;/opt/ros/kinetic/lib/libg2o_types_slam3d.so;/opt/ros/kinetic/lib/libg2o_solver_cholmod.so;/opt/ros/kinetic/lib/libg2o_solver_pcg.so;/opt/ros/kinetic/lib/libg2o_solver_csparse.so;/opt/ros/kinetic/lib/libg2o_incremental.so;/opt/ros/kinetic/lib/libg2o_types_sba.so
-- CHOLMOD_INCLUDE_DIR : /usr/include/suitesparse
-- CSPARSE_INCLUDE_DIR : /usr/include/suitesparse
-- G2O_INCLUDE_DIR : /opt/ros/kinetic/include/g2o
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'SuiteSparse' but neither
  'SuiteSparse_INCLUDE_DIRS' nor 'SuiteSparse_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  lsd_slam/lsd_slam_core/CMakeLists.txt:44 (catkin_package)


-- Configuring done
CMake Warning (dev) at lsd_slam/lsd_slam_viewer/CMakeLists.txt:72 (add_executable):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "viewer" links to some libraries for which the linker must
  search:

    GL, glut, GLU

  and other libraries with known full path:

    /usr/local/lib/libQGLViewer.so
    /home/cv14/catkin_ws/devel/lib/libcv_bridge.so
    /opt/ros/kinetic/lib/libopencv_calib3d3.so.3.2.0

  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
  more information.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/cv14/catkin_ws/build
####
#### Running command: "make -j8 -l8" in "/home/cv14/catkin_ws/build"
####
Scanning dependencies of target sensor_msgs_generate_messages_cpp
Scanning dependencies of target std_msgs_generate_messages_cpp
Scanning dependencies of target sensor_msgs_generate_messages_lisp
Scanning dependencies of target geometry_msgs_generate_messages_py
Scanning dependencies of target std_msgs_generate_messages_nodejs
[  0%] Built target std_msgs_generate_messages_cpp
[  0%] Built target sensor_msgs_generate_messages_cpp
[  0%] Built target geometry_msgs_generate_messages_py
Scanning dependencies of target std_msgs_generate_messages_py
Scanning dependencies of target geometry_msgs_generate_messages_eus
Scanning dependencies of target geometry_msgs_generate_messages_nodejs
[  0%] Built target sensor_msgs_generate_messages_lisp
Scanning dependencies of target sensor_msgs_generate_messages_eus
Scanning dependencies of target sensor_msgs_generate_messages_py
[  0%] Built target std_msgs_generate_messages_nodejs
Scanning dependencies of target geometry_msgs_generate_messages_cpp
[  0%] Built target geometry_msgs_generate_messages_nodejs
[  0%] Built target std_msgs_generate_messages_py
[  0%] Built target geometry_msgs_generate_messages_eus
Scanning dependencies of target sensor_msgs_generate_messages_nodejs
[  0%] Built target sensor_msgs_generate_messages_eus
Scanning dependencies of target std_msgs_generate_messages_eus
[  0%] Built target sensor_msgs_generate_messages_py
Scanning dependencies of target _lsd_slam_viewer_generate_messages_check_deps_keyframeMsg
[  0%] Built target sensor_msgs_generate_messages_nodejs
Scanning dependencies of target std_msgs_generate_messages_lisp
Scanning dependencies of target geometry_msgs_generate_messages_lisp
[  0%] Built target geometry_msgs_generate_messages_cpp
Scanning dependencies of target _lsd_slam_viewer_generate_messages_check_deps_keyframeGraphMsg
[  0%] Built target std_msgs_generate_messages_eus
Scanning dependencies of target lsd_slam_viewer_gencfg
[  0%] Built target std_msgs_generate_messages_lisp
[  0%] Built target geometry_msgs_generate_messages_lisp
Scanning dependencies of target lsd_slam_core_gencfg
[  1%] Generating dynamic reconfigure files from cfg/LSDSLAMViewerParams.cfg: /home/cv14/catkin_ws/devel/include/lsd_slam_viewer/LSDSLAMViewerParamsConfig.h /home/cv14/catkin_ws/devel/lib/python2.7/dist-packages/lsd_slam_viewer/cfg/LSDSLAMViewerParamsConfig.py
Scanning dependencies of target cv_bridge
[  5%] Generating dynamic reconfigure files from cfg/LSDDebugParams.cfg: /home/cv14/catkin_ws/devel/include/lsd_slam_core/LSDDebugParamsConfig.h /home/cv14/catkin_ws/devel/lib/python2.7/dist-packages/lsd_slam_core/cfg/LSDDebugParamsConfig.py
[  5%] Generating dynamic reconfigure files from cfg/LSDParams.cfg: /home/cv14/catkin_ws/devel/include/lsd_slam_core/LSDParamsConfig.h /home/cv14/catkin_ws/devel/lib/python2.7/dist-packages/lsd_slam_core/cfg/LSDParamsConfig.py
[  5%] Built target _lsd_slam_viewer_generate_messages_check_deps_keyframeMsg
Scanning dependencies of target image_geometry
[  5%] Built target _lsd_slam_viewer_generate_messages_check_deps_keyframeGraphMsg
Scanning dependencies of target lsd_slam_viewer_generate_messages_eus
Scanning dependencies of target lsd_slam_viewer_generate_messages_py
Scanning dependencies of target lsd_slam_viewer_generate_messages_cpp
Generating reconfiguration files for LSDSLAMViewerParams in lsd_slam_viewer
Generating reconfiguration files for LSDDebugParams in lsd_slam_core
[  6%] Generating EusLisp code from lsd_slam_viewer/keyframeGraphMsg.msg
[  8%] Generating C++ code from lsd_slam_viewer/keyframeGraphMsg.msg
[ 10%] Building CXX object vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge.dir/cv_bridge.cpp.o
[ 11%] Generating Python from MSG lsd_slam_viewer/keyframeGraphMsg
Wrote header file in /home/cv14/catkin_ws/devel/include/lsd_slam_viewer/LSDSLAMViewerParamsConfig.h
Wrote header file in /home/cv14/catkin_ws/devel/include/lsd_slam_core/LSDDebugParamsConfig.h
Generating reconfiguration files for LSDParams in lsd_slam_core
Wrote header file in /home/cv14/catkin_ws/devel/include/lsd_slam_core/LSDParamsConfig.h
Scanning dependencies of target lsd_slam_viewer_generate_messages_lisp
[ 13%] Generating Lisp code from lsd_slam_viewer/keyframeGraphMsg.msg
[ 15%] Generating EusLisp code from lsd_slam_viewer/keyframeMsg.msg
[ 16%] Building CXX object vision_opencv/image_geometry/CMakeFiles/image_geometry.dir/src/pinhole_camera_model.cpp.o
[ 18%] Generating Python from MSG lsd_slam_viewer/keyframeMsg
[ 18%] Built target lsd_slam_viewer_gencfg
[ 20%] Building CXX object vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge.dir/rgb_colors.cpp.o
[ 22%] Generating Lisp code from lsd_slam_viewer/keyframeMsg.msg
[ 23%] Generating EusLisp manifest code for lsd_slam_viewer
[ 23%] Built target lsd_slam_core_gencfg
[ 25%] Generating Python msg __init__.py for lsd_slam_viewer
[ 25%] Built target lsd_slam_viewer_generate_messages_lisp
[ 27%] Building CXX object vision_opencv/image_geometry/CMakeFiles/image_geometry.dir/src/stereo_camera_model.cpp.o
Scanning dependencies of target lsd_slam_viewer_generate_messages_nodejs
[ 28%] Generating C++ code from lsd_slam_viewer/keyframeMsg.msg
[ 30%] Generating Javascript code from lsd_slam_viewer/keyframeGraphMsg.msg
[ 30%] Built target lsd_slam_viewer_generate_messages_py
[ 32%] Generating Javascript code from lsd_slam_viewer/keyframeMsg.msg
[ 32%] Built target lsd_slam_viewer_generate_messages_nodejs
[ 32%] Built target lsd_slam_viewer_generate_messages_cpp
[ 32%] Built target lsd_slam_viewer_generate_messages_eus
Scanning dependencies of target lsd_slam_viewer_generate_messages
[ 32%] Built target lsd_slam_viewer_generate_messages
[ 33%] Linking CXX shared library /home/cv14/catkin_ws/devel/lib/libimage_geometry.so
[ 33%] Built target image_geometry
[ 35%] Linking CXX shared library /home/cv14/catkin_ws/devel/lib/libcv_bridge.so
[ 35%] Built target cv_bridge
Scanning dependencies of target cv_bridge_boost
Scanning dependencies of target viewer
Scanning dependencies of target lsdslam
[ 37%] Building CXX object lsd_slam/lsd_slam_viewer/CMakeFiles/viewer.dir/src/main_viewer.o
[ 38%] Building CXX object lsd_slam/lsd_slam_viewer/CMakeFiles/viewer.dir/src/KeyFrameGraphDisplay.o
[ 40%] Building CXX object lsd_slam/lsd_slam_viewer/CMakeFiles/viewer.dir/src/KeyFrameDisplay.o
[ 42%] Building CXX object lsd_slam/lsd_slam_viewer/CMakeFiles/viewer.dir/src/PointCloudViewer.o
[ 44%] Building CXX object lsd_slam/lsd_slam_viewer/CMakeFiles/viewer.dir/src/settings.o
[ 45%] Building CXX object lsd_slam/lsd_slam_core/CMakeFiles/lsdslam.dir/src/DataStructures/Frame.cpp.o
[ 47%] Building CXX object lsd_slam/lsd_slam_core/CMakeFiles/lsdslam.dir/src/DataStructures/FramePoseStruct.cpp.o
[ 49%] Building CXX object lsd_slam/lsd_slam_core/CMakeFiles/lsdslam.dir/src/DataStructures/FrameMemory.cpp.o
[ 50%] Building CXX object vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge_boost.dir/module.cpp.o
In file included from /home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/DataStructures/FramePoseStruct.h:23:0,
                 from /home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/DataStructures/FramePoseStruct.cpp:22:
/home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:24:34: fatal error: g2o/core/base_vertex.h: No such file or directory
compilation terminated.
lsd_slam/lsd_slam_core/CMakeFiles/lsdslam.dir/build.make:86: recipe for target 'lsd_slam/lsd_slam_core/CMakeFiles/lsdslam.dir/src/DataStructures/FramePoseStruct.cpp.o' failed
make[2]: *** [lsd_slam/lsd_slam_core/CMakeFiles/lsdslam.dir/src/DataStructures/FramePoseStruct.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 52%] Building CXX object vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge_boost.dir/module_opencv3.cpp.o
In file included from /home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/DataStructures/FramePoseStruct.h:23:0,
                 from /home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/DataStructures/Frame.h:26,
                 from /home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/DataStructures/Frame.cpp:21:
/home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:24:34: fatal error: g2o/core/base_vertex.h: No such file or directory
compilation terminated.
lsd_slam/lsd_slam_core/CMakeFiles/lsdslam.dir/build.make:62: recipe for target 'lsd_slam/lsd_slam_core/CMakeFiles/lsdslam.dir/src/DataStructures/Frame.cpp.o' failed
make[2]: *** [lsd_slam/lsd_slam_core/CMakeFiles/lsdslam.dir/src/DataStructures/Frame.cpp.o] Error 1
In file included from /home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/DataStructures/FramePoseStruct.h:23:0,
                 from /home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/DataStructures/Frame.h:26,
                 from /home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/DataStructures/FrameMemory.cpp:22:
/home/cv14/catkin_ws/src/lsd_slam/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:24:34: fatal error: g2o/core/base_vertex.h: No such file or directory
compilation terminated.

@af-silva
Copy link

Hi, try to use this g2o library from the ORB SLAM project, is the one that I use and everything is ok (i'm on ubuntu 14.04, so I can't insure you that this will work)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants