Ubuntu18.04+ros(melodic)安装cartographer报错

文章描述了在使用`catkin_make_isolated--install--use-ninja`编译Cartographer时遇到的错误,涉及`PoseGraph2D`和`TrimmingHandle`的`EXCLUSIVE_LOCKS_REQUIRED`函数重载问题,以及`lua_parameter_dictionary_test_helpers`中的非空函数返回类型错误。开发者求助于解决C++语法错误。
摘要由CSDN通过智能技术生成

依赖什么的都装好了,最后输入

catkin_make_isolated --install --use-ninja

编译安装报错,错误信息如下:
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:291:9: error: ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’ cannot be overloaded
         EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d.h:281:9: error: with ‘int cartographer::mapping::PoseGraph2D::TrimmingHandle::EXCLUSIVE_LOCKS_REQUIRED(int)’
         EXCLUSIVE_LOCKS_REQUIRED(parent_->mutex_);
         ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fu/cartographer_ws/src/cartographer/cartographer/mapping/internal/2d/pose_graph_2d_test.cc:24:0:
/home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h: In member function ‘virtual std::__cxx11::string cartographer::common::DummyFileResolver::GetFileContentOrDie(const string&)’:
/home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h:42:3: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
/home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h: In member function ‘virtual std::__cxx11::string cartographer::common::DummyFileResolver::GetFullPathOrDie(const string&)’:
/home/fu/cartographer_ws/src/cartographer/cartographer/common/internal/testing/lua_parameter_dictionary_test_helpers.h:46:3: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
cc1plus: some warnings being treated as errors
ninja: build stopped: subcommand failed.
<== Failed to process package 'cartographer':
  Command '['ninja', '-j20', '-l20']' returned non-zero exit status 1

Reproduce this error by running:
==> cd /home/fu/cartographer_ws/build_isolated/cartographer && ninja -j20 -l20

Command failed, exiting.
fu@fu-xx:~/cartographer_ws$

还有好多的报错,因为都是上面那种语法出错问题,这里就不全部贴上去了。

求助下各位大佬,这到底是出了啥问题。

  • 6
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值