当前位置:网站首页>Installation of sophus package in slam14 lecture

Installation of sophus package in slam14 lecture

2022-06-24 08:57:00 alex1801

        SLAM14 in ,useSophus.cpp An error is reported during project compilation :

CMake Error at CMakeLists.txt:5 (find_package):
    By not providing "FindSophus.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Sophus", but
CMake did not find one.
    Could not find a package configuration file provided by "Sophus" with any
of the following names:

         Error reason :makelist I can't find it in China. Sophus The header file . We deal with it in two steps :

1、 download Sophus package , And compile 、 install

         Enter the source directory , compile , install .

cd slambook2/3rdparty/Sophus
mkdir build
cd build
cmake ..
make
sudo make install

2、 stay CMakeLists.txt Add... To the file Sophus_INCLUDE_DIRS Variable

         Viewing error messages , I just can't find Sophus Contents of libraries and header files :

set(Sophus_INCLUDE_DIRS " Place your Sophus Header file folder path ")
set(Sophus_LIBS " Place your Sophus Folder path of library file , Indicate the corresponding library file ")

         such as , Mine is like this :

set(Sophus_INCLUDE_DIRS "/usr/local/include/sophus")
# set(Sophus_LIBS "/usr/local/lib/libSophus.so")
include_directories(
${Sophus_INCLUDE_DIRS}
)

         Then link your execution file Sophus The library files . In this case , The above compilation errors should disappear .

原网站

版权声明
本文为[alex1801]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240652380446.html