安裝使用orb slam2是遇到的問題與解決

2021-10-01 04:35:04 字數 1552 閱讀 6086

問題1. eigen3找不到

在執行./biuld.sh時,報錯

cmake error at /usr/local/share/cmake-3.15/modules/findpackagehandlestandardargs.cmake:137 (message):

could not find eigen3 (missing: eigen3_include_dir eigen3_version_ok)

(required is at least version "3.1.0")

call stack (most recent call first):

/usr/local/share/cmake-3.15/modules/findpackagehandlestandardargs.cmake:378 (_fphsa_failure_message)

cmake_modules/findeigen3.cmake:82 (find_package_handle_standard_args)

cmakelists.txt:70 (find_package)

解決方法是指定eigen3的安裝路徑,即修改orb_slam2和g2o資料夾下的cmakelists.txt

兩者修改後如下:

# include(/home/wang/software/opencv/opencv-3.2.0.bin/opencvconfig.cmake)

include(/usr/local/share/opencv/opencvconfig.cmake)

include_directories("/usr/include/eigen3")

# find_package(eigen3 3.1.0 required)

find_package(pangolin required)

include_directories(

$$/include

# $$

)

# find eigen3

# set(eigen3_include_dir $)

# find_package(eigen3 3.1.0 required)

# if(eigen3_found)

# set(g2o_eigen3_include $ cache path "directory of eigen3")

# else(eigen3_found)

# set(g2o_eigen3_include "" cache path "directory of eigen3")

# endif(eigen3_found)

include_directories("/usr/include/eigen3")

問題2.報錯如下:

error: 'usleep' was not declared in this scope

usleep(3000);

解決方法:缺失標頭檔案,在orb_slam2的include下任意.**件中(如keyframe.h)新增標頭檔案unistd.h

ORB SLAM2中遇到問題

報錯 error while loading shared libraries libpangolin.so cannot open shared object file no such file or directory 解決 大致的問題是出在,通過原始碼包進行安裝時,如果不指定 prefix會將...

ORB SLAM2安裝問題總結

rosbuild building package orb slam master rosbuild error from directory check opt ros kinetic share ros core rosbuild bin check same directories.py ho...

Kinect跑自己的ORB SLAM2遇到的坑

需要注意的是,kinect自己帶了乙個opencv3.3.1,我以前安了乙個3.4.0,後來又安了乙個2.4.16.6,這樣opencv就比較亂,在執行.build.sh的時候就會報錯,大概是這種型別的錯誤 於是我就把opencv2.4.16.6給解除安裝了,沒想到它把3.4.0也卸了一部分相同的部...