ORB-SLAM2安装错误解决

问题:

配置ORB-SLAM2时,运行 cmake .. -DCMAKE_BUILD_TYPE=Release
出现找不到CHOLMOD_INCLUDE_DIR与CHOLMOD_LIBRARY的错误,如下所示:

hri@hri-hwb-Teclast:~/rosbuild_ws/package_dir/ORB_SLAM2_Fusion/build$ cmake .. -DCMAKE_BUILD_TYPE=Release
Build type: Release
-- Using flag -std=c++11.
[FindCholmod.cmake] CHOLMOD_INCLUDE_DIR: CHOLMOD_INCLUDE_DIR-NOTFOUND
-- Could NOT find CHOLMOD (missing: CHOLMOD_INCLUDE_DIR CHOLMOD_LIBRARIES) 
CHOLMOD_INCLUDE_DIR: CHOLMOD_INCLUDE_DIR-NOTFOUND
EIGEN3_INCLUDE_DIR: /usr/local/include/eigen3
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CHOLMOD_INCLUDE_DIR
   used as include directory in directory /home/hri/rosbuild_ws/package_dir/ORB_SLAM2_Fusion
   used as include directory in directory /home/hri/rosbuild_ws/package_dir/ORB_SLAM2_Fusion
   used as include directory in directory /home/hri/rosbuild_ws/package_dir/ORB_SLAM2_Fusion
   used as include directory in directory /home/hri/rosbuild_ws/package_dir/ORB_SLAM2_Fusion
   used as include directory in directory /home/hri/rosbuild_ws/package_dir/ORB_SLAM2_Fusion
CHOLMOD_LIBRARY
    linked by target "ORB_SLAM2_FUSION" in directory /home/hri/rosbuild_ws/package_dir/ORB_SLAM2_Fusion

-- Configuring incomplete, errors occurred!
See also "/home/hri/rosbuild_ws/package_dir/ORB_SLAM2_Fusion/build/CMakeFiles/CMakeOutput.log".

解决办法:

安装libcholmod3与libsuitesparse,指令如下:

sudo apt-get install libcholmod3
sudo apt-get install libsuitesparse-dev

你可能感兴趣的:(ORB-SLAM2)