slam十四讲g2o问题

1. 3d2d程序的CMakeLists.txt写法

cmake_minimum_required(VERSION 2.8)
project(features)
set(CMAKE_CXX_FLAGS "-std=c++11")

list( APPEND CMAKE_MODULE_PATH /home/zhhp/g2o/cmake_modules )

find_package(OpenCV REQUIRED)
find_package(CSparse REQUIRED)
find_package( G2O REQUIRED )


include_directories(
${OpenCV_INCLUDE_DIRS}
${CSPARSE_INCLUDE_DIR}
${G2O_INCLUDE_DIRS}
"/usr/include/eigen3/"
)
add_executable(pose_estimation_3d2d src/pose_estimation_3d2d.cpp)

target_link_libraries(pose_estimation_3d2d
 ${OpenCV_LIBS}
${CSPARSE_LIBRARY}
 g2o_core g2o_stuff g2o_types_sba g2o_csparse_extension
 )

2
error: no matching function for call to ‘g2o::BlockSolver >::BlockSolver(g2o::BlockSolver >::LinearSolverType*&)’ Block* solver_ptr = new Block ( linearSolver ); // 矩阵块求解器

 

3

error while loading shared libraries: libg2o_core.so: cannot open shared object file: No such file or directory

你可能感兴趣的:(Ubuntu,g2o)