安装依赖
sudo apt-get install -y python-wstool python-rosdep ninja-build
sudo apt-get install stow
安装absl
cd scripts
./install_abseil.sh
虚拟机已经安装ceres-solver-1.14.0,遇到的BUG是
CMake Error at /usr/local/lib/cmake/Ceres/CeresConfig.cmake:88 (message):
Failed to find Ceres - Missing requested Ceres components: [SuiteSparse]
......
but it set Ceres_FOUND to FALSE so package "Ceres" is considered to be NOT
FOUND.
这是因为ceres编译的时候没有选择suitespase,在ceres/build目录下通过以下命令先卸载掉ceres:
#先卸载掉ceres
sudo make uninstall
#删除掉build目录
rm -rf build
然后根据我的命令重新安装即可(出现这个错误就可以不用认官网的安装教程)
mkdir build && cd build
#注意:将编译选项打开
cmake -DEIGENSPARSE=ON ..
make
sudo make install
编译catographer静态库
官网是直接将catographer编译到/usr/local底下,我是将库文件安装到本地的指定文件夹,具体操作如下:
mkdir build && cd build
cmake -D CMAKE_INSTALL_PREFIX=/home/hi/DependPackages/install ..
make
make install
编译和安装后在catographer的cmake文件里加上路径即可编译catographer_ros
set(cartographer_DIR "/home/hi/DependPackages/install/share/cartographer/")
Cartographer — Cartographer documentationhttps://google-cartographer.readthedocs.io/en/latest/