cartographer的安装总结
由于cartographer是一个比较老的方法,2016年?很多依赖库已经有了新的版本。
安装教程:
官网(就很好用):http://www.ceres-solver.org/installation.html#linux
自己分步安装:
https://www.cnblogs.com/hitcm/p/5939507.html
https://blog.csdn.net/weixin_43262513/article/details/88256762
这两个差不多。
我最后是用一台之前没安过ceres-solver和protobuf的新机子,依照官网教程安好的,很简单。
最重要的是:
根据本文
https://zhuanlan.zhihu.com/p/139627319
最重要的是,上述教程是在没有安装cartographer、cartographer_ros、ceres及protobuf库,但是安装了ROS的ubuntu系统中进行的,如果已经安装了其中一部分,建议卸载干净或者重装系统/虚拟机以避免未知错误。
我花了5.6个小时也没能解决cmake的编译问题。
包括但不限于:
Policy CMP0026 is not set: Disallow use of the LOCATION target property. Run....
add_library cannot create target "gmock" because another target with the sam
CMake Error at CMake Error at /usr/src/gmock/gtest/cmake/internal_utils.cmake:130 (add_library)
add_library cannot create target “gtest” because another target with the
same name already exists. The existing target is a shared library created
in source directory “/usr/src/gtest”. See documentation for policy CMP0002
for more details.
这些都是因为
我之前安过了ceres及protobuf库,无穷无尽的编译bug,都无法解决,主要是版本对应不上。
换台没安过这些的机子,5分钟搞定
ps:由于上述踩雷信息,和同门battle了一下,安cartographer很考验握力ORZ