基于cartographer2.0 的Ros版本源代码Slam中的代码错误

1. 安装Ubuntu20的Ros版本,把Cart2.0版本编译一下,遇到点小问题

问题:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

Please set them or make sure they are set and tested correctly in the CMake files:

GMOCK_LIBRARY (ADVANCED)

 linked by target "time_conversion_test" in directory /home/wishchin/catkin_ws/src/cartographer_ros/cartographer_ros

.......................

    linked by target "msg_conversion_test" in directory /home/wishchin/catkin_ws/src/cartographer_ros/cartographer_ros

-- Configuring incomplete, errors occurred!

See also "/home/wishchin/catkin_ws/build/CMakeFiles/CMakeOutput.log".

See also "/home/wishchin/catkin_ws/build/CMakeFiles/CMakeError.log".

Invoking "cmake" failed

解决方法:sudo apt install libgmock-dev,安装了一个新版本,catkin_make编译成功;

2.Ros版本的Slam模式源代码

问题:在node.cc和node.h中

void Node::PublishLocalTrajectoryData(const ::ros::TimerEvent& timer_event) {

absl::MutexLock lock(&mutex_);

这个函数有问题,参数错了

修改为

void Node::PublishLocalTrajectoryData(const ::ros::WallTimerEvent& & timer_event) {

absl::MutexLock lock(&mutex_);

则可以使用Slam模式

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值