Sophus庫有模板類庫和非模板類庫兩個版本,本文選擇的是非模板類庫。
開始使用Sophus庫時會碰到下面的錯誤,說明Sophus沒有正確編譯。
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:
SophusConfig.cmake
sophus-config.cmake
Add the installation prefix of "Sophus" to CMAKE_PREFIX_PATH or set
"Sophus_DIR" to a directory containing one of the above files. If "Sophus"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
Sophus庫本身是一個cmake工程,使用以下命令對它進行編譯(Sophus庫只需編譯,無需安裝)。
可以通過輸入以下命令獲得並安裝非模板類的Sophus庫:
git clone http://github.com/strasdat/Sophus.git
cd Sophus
git checkout a621ff
mkdir build
cd build
cmake ..
make