Gazebo动态障碍actor collision动态链接库生成,到Protobuf版本问题遇到的BUG解决


最初的问题是希望在gazebo中设置一个动态行走的人,然后能被激光雷达扫描到,这里参考的链接

https://robkin.blog.csdn.net/article/details/128203687
作者给的教程非常完整,但是其中我所遇到的BUG非常难受

编译碰撞插件error

编译报错主要是包括
error: #error This file was generated by an older version of protoc which is
error: #error This file was generated by a newer version of protoc which is

这两种
让我非常不理解,版本过高与版本过低同时出现是什么鬼,但是当我现在完全解决以后,我发现我直接参考这个链接就行了
https://blog.csdn.net/lc740390316/article/details/86493220
简单来说,就是更改Protobuf的版本

Protobuf版本问题

在知道是版本问题以后,我需要知道我的Ubuntu20.04 + gazebo11现在应该对应哪个版本,这个Protobuf版本具体参考这个链接,简单来说就是进入gazebo库文件,随便找个头文件打开,会有要求Protobuf的版本的句子,我的是

#if GOOGLE_PROTOBUF_VERSION < 3006001
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please update
#error your headers.

意思就是需要3.6.1及以上的Protobuf版本
但是我这里犯了一个严重的错误

我自己系统里面本身存在的3.4.0版本的Protobuf是源码的下载的,而我更新的3.6.1版本的Protobuf是二进制下载的(图方便了),导致出现下面的错误:
This program was compiled against version 3.4.0 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.6.1). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.
意思就是两个版本的Protobuf产生了冲突,运行 gazebo actor_collisions.world 这一步就会出错
最后我恍然大悟,卸载了二进制的3.6.1版本的Protobuf,删除了3.4.0版本的Protobuf是源码,按照链接
https://blog.csdn.net/m0_49448331/article/details/107734989
的方式老老实实安装,最终终于运行成功!
人物具有碰撞属性,周围的物体会被踢走

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
gazebo11和protobuf之间的关系是什么? gazebo11是一个用于仿真机器人系统的开源软件。它使用protobuf库作为其通信协议的一部分,用于在不同组件之间传递数据。在ubuntu 18.04下,gazebo11依赖的protoc版本是3.0.0,而在ubuntu 16.04下,gazebo11依赖的protoc版本是2.6.1。 如果你之前安装了cartographer并升级了protobuf版本,可能会导致protobuf库的冲突,进而引起问题。 如果你在Windows上编译gazebo9,你需要安装一些软件和依赖库,包括cmake、ruby、libcurl HEAD、libyaml、dlfcn-win32、jsoncpp、protobuf 3.4.1等等。 所以,gazebo11和protobuf之间的关系是gazebo11使用protobuf库作为通信协议的一部分,而具体使用的protobuf版本取决于你的操作系统和软件依赖。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [Gazebo需要的protoc版本与google-cartographer需要的版本不一致](https://blog.csdn.net/xp1994816/article/details/100712622)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [gazebo9源码编译所需依赖(Windows)](https://download.csdn.net/download/u013013023/12983595)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值