当前位置:网站首页>关于ros版本问题导致MarkerArray的不显示解决
关于ros版本问题导致MarkerArray的不显示解决
2022-04-21 11:54:00 【良知犹存】
前言
最近使用ROS的MarkerArray和Marke发送显示显示自己的一些二维障碍物显示信息,这里面的使用案例大家可以在网上去搜索哈,本篇就不多赘述了,今天介绍自己使用时候遇到一个不显示的问题。
publishers.advertise<visualization_msgs::MarkerArray>("obj_map_markers", 1);`
publishers.advertise<visualization_msgs::Marker>("target_marker", 1);
上面是使用的两个topic数据发送对应的数据,其中用到的数据类型为visualization_msgs::Marker和 visualization_msgs::MarkerArray map_markers
但是启动rviz之后就会显示如下问题:

[ERROR] [1501915695.729391644]: Client [/rviz_1650338584890468180] wants topic target_marker to have datatype/md5sum [visualization_msgs/Marker/4048c9de2a16f4ae8e0538085ebf1b97], but our version has [visualization_msgs/Marker/18326976df9d29249efc939e00342cde]. Dropping connection.
[ WARN] [1501915695.831973737]: [lds driver] readSuccess 214: First time read data succeeded.
[ERROR] [1501915695.934151873]: Client [/rviz_1650338584890468180] wants topic obj_map_markers to have datatype/md5sum [visualization_msgs/MarkerArray/d155b9ce5188fbaf89745847fd5882d7], but our version has [visualization_msgs/MarkerArray/90da67007c26525f655c1c269094e39f]. Dropping connection.
解决方法
这个问题的出现是ros编译源码包版本不一致,导致msg生成的类型文件里面的md5校验不一致导致的无法显示问题。
打开你编译空间下对应的类 头文件,修改对应的return返回值为 报警信息中的返回值
vi opt/ros/indigo/include/visualization_msgs/MarkerArray.h
这是打开后的文件

修改return返回值:

同理另一个文件的修改如下
vi opt/ros/indigo/include/visualization_msgs/Marker.h
template<class ContainerAllocator>
struct MD5Sum< ::visualization_msgs::Marker_<ContainerAllocator> >
{
static const char* value()
{
//return "18326976df9d29249efc939e00342cde";
return "4048c9de2a16f4ae8e0538085ebf1b97";
}
static const char* value(const ::visualization_msgs::Marker_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0x18326976df9d2924ULL;
static const uint64_t static_value2 = 0x9efc939e00342cdeULL;
};
再次编译,再设备中运行代码,打开rviz。
这是解决之后的rviz显示效果:

其中黄色栅格显示部分就是使用MarkerArray发送的障碍物表达。

作者:良知犹存,白天努力工作,晚上原创公号号主。公众号内容除了技术还有些人生感悟,一个认真输出内容的职场老司机,也是一个技术之外丰富生活的人,摄影、音乐 and 篮球。关注我,与我一起同行。
‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧ END ‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧
推荐阅读
【3】CPU中的程序是怎么运行起来的 必读
本公众号全部原创干货已整理成一个目录,回复[ 资源 ]即可获得。

版权声明
本文为[良知犹存]所创,转载请带上原文链接,感谢
https://conscience-still.blog.csdn.net/article/details/124269402
边栏推荐
- LeetCode 每日一题:824. 山羊拉丁文
- L2-005 set similarity (25 points) (Set + tolerance and exclusion)
- A small game of guessing numbers
- 微信小程序转uniapp
- 【Flutter 专题】89 图解基本 Overlay 悬浮新手引导 #yyds干货盘点#
- Écrire un dictionnaire de tableaux au format CSV
- 【链表】148. 排序链表
- 路由基础之控制RIP路由的发布及路由引入
- JSON and related
- ASP.NET Core实现JWT授权与认证(1.理论篇)
猜你喜欢

手撕链表题,我看你也行(1)

L2-005 set similarity (25 points) (Set + tolerance and exclusion)

HMS Core 6.4.0版本发布公告

HMS Core 6.4.0版本發布公告

sentinelsat包介绍

php如何去掉数组键值

世界读书日|数据库经典书籍推荐书单(文末留言免费送)

Oracle provides superior database performance and scale through exadata cloud infrastructure x9m

php如何判断指定日期是不是前一天

分享 Map 对象和普通对象的 7 个区别
随机推荐
Redis集群模式
Offline RL Series 4: analysis of the influence of sample complexity on model convergence
pycharm中归一化记录
IIR second order filter in flight control
Massive data generated 421 million yuan of revenue in 2021, and the gross profit margin of database products increased by 8.78%!
如何跨域请求携带 cookie ?
LeetCode 每日一题:824. 山羊拉丁文
Haiwell Cloud Scada Designer 3
L2-003 moon cake (25 points) (greedy)
Using lazy deletion and scheduled deletion to realize expired localstorage cache
C language: pointer 2 (linear table knowledge + detailed explanation of examples)
Nocalhost for dapr remote debugging
【Flutter 专题】89 图解基本 Overlay 悬浮新手引导 #yyds干货盘点#
STL function usage is continuously updated
L2-004 is this a binary search tree? (25 points)
离线强化学习(Offline RL)系列4:(数据集) 经验样本复杂度(Sample Complexity)对模型收敛的影响分析
手撕链表题,我看你也行(1)
L2-039 清点代码库 (25 分)
What's the use of the enterprise's official website? Do you have to build an official website?
ASP dotnet core does integration test based on TestServer