cartographer 常见问题及解决方法

本文解决了在使用Cartographer进行地图构建时遇到的两个常见问题:一是关于SPARSE_POSE_GRAPH参数错误,需要从lua文件中删除该参数;二是protobuff版本冲突问题,解决方法是删除并重新编译安装cartographer。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值