Cmake相关
1.XXXXXX
2.XXXXXXX
C++
1.xxxxxx
SLAM14讲第二版
1.第3讲:./plotTrajectory: error while loading shared libraries: libpango_core.so: cannot open shared object file: No such file or directory
刚安装的pangolin库,需要使用命令:
sudo ldconfig
更新一下,就不会报错了
2.调用G2O By not providing "FindG2O.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "G2O", but CMake did not find one.
自己写一个使用g2o求解位姿程序遇到的问题,翻译过来就是缺少FindG2O.cmake文件
解决:在项目目录下新建cmake文件夹,并放入FindG2O.cmake文件(从slambook2瓢来的),另外在CMakeLists.txt中加上:
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
3.ch13:/usr/bin/ld: ../../lib/libmyslam.so: undefined reference to `g2o::csparse_extension::cs_chol_workspace(cs_di_sparse const*, cs_di_symbolic const*, int*, double*)'
应该是第一次安装g2o的时候没有安装libsuitesparse-dev ,我是按照下面的流程解决了:
1.卸载libsuitesparse-dev:
sudo apt remove libsuitesparse-dev
2.重新安装libsuitesparse-dev:
sudo apt install libsuitesparse-dev
3.重新编译安装G2o,注意把之前存在的build文件夹删掉,重新建立build文件夹编译安装
4.重新编译ch13工程(也要把之前的build文件夹删掉)