Open lanyu0 opened 2 years ago
你在编Pangolin的时候要把Eigen打开打开,具体操作如下: 找到,src/CMakeLists.txt文件,把252-261行注释掉,替换内容如下: 替换前:
find_package(Eigen3 QUIET)
if(EIGEN3_FOUND)
set(HAVE_EIGEN 1)
list(APPEND USER_INC ${EIGEN3_INCLUDE_DIR} )
if(_CLANG_)
# Eigen causes many of these errors. Suppress.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
endif()
message(STATUS "Eigen Found and Enabled")
endif()
替换后:
set(HAVE_EIGEN 1)
set(EIGEN3_INCLUDE_DIR D:/library/eigen339)
list(APPEND USER_INC ${EIGEN3_INCLUDE_DIR} )
if(_CLANG_)
# Eigen causes many of these errors. Suppress.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
endif()
message(STATUS "Eigen Found and Enabled")
这里EIGEN3_INCLUDE_DIR为你电脑里面Eigen位置。
pangolin::OpenGlMatrix matrix = s_cam.GetModelViewMatrix(); Matrix<double, 4, 4> m = matrix;
不存在用户定义的从 "pangolin::OpenGlMatrix" 到 "Eigen::Matrix<double, 4, 4, 0, 4, 4>" 的适当转换C/C++(312)