本文主要是介绍cartographer 常见问题及解决方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1. Check failed: status == 0 (2 vs. 0) [string “include “map_builder.lua”…”]:36: attempt to index global ‘SPARSE_POSE_GRAPH’ (a nil value)
问题描述:出现这个问题的原因是map_builder.lua文件中没有SPARSE_POSE_GRAPH这个参数,这是由于cartographer更新导致的。
解决方案:
删掉lua文件里SPARSE_POSE_GRAPH参数。
2. protobuff版本冲突问题
问题描述:
In file included from /home/zhangying/Downloads/cartographer/cartographer/common/ceres_solver_options.h:21:0,from /home/zhangying/Downloads/cartographer/cartographer/common/ceres_solver_options.cc:17:
/usr/local/include/cartographer/common/proto/ceres_solver_options.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is#error This file was generated by a newer version of protoc which is^~~~~
/usr/local/include/cartographer/common/proto/ceres_solver_options.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update#error incompatible with your Protocol Buffer headers. Please update^~~~~
/usr/local/include/cartographer/common/proto/ceres_solver_options.pb.h:14:2: error: #error your headers.#error your headers.
解决方案:
删除/usr/local/include/下的cartographer文件夹,重新编译安装cartographer
cd /usr/local/include
sudo rm -rf cartographer
cd ~/Downloads/cartographer
rm -rf bulid
mkdir build
cd build
cmake ..
make -j4
sudo make install
这篇关于cartographer 常见问题及解决方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!