解决autoware1.14无法显示/bounding_boxes矩形框

在跟着创客智造学习autoware时,上面的教程使用的是autoware1.12,而我电脑里配置的是autoware1.14的版本,可能由于版本不同,在进行autoware入门教程-使用Euclidean Clustering进行检测时,在rviz显示中,选择boundingBoxArray,topic为bounding_box无法显示矩形框。

进而,我就在网上查找资料,就找到了此解决方案,进行相关的代码修改:https://blog.youkuaiyun.com/qq_38861347/article/details/126103048

1)找到lidar_euclidean_cluster_detect.cpp源码文件
vim ~/autoware.ai/src/autoware/core_perception/lidar_euclidean_cluster_detect/nodes/lidar_euclidean_cluster_detect/lidar_euclidean_cluster_detect.cpp

在这里插入图片描述

2)添加头文件<BoundingBoxArray.h>及变量
#include <jsk_recognition_msgs/BoundingBoxArray.h>
ros::Publisher _pub_bounding_boxes;

在这里插入图片描述

3)在main函数添加bounding_boxes话题
 pub_bounding_boxs_ = h.advertise<jsk_recognition_msgs::BoundingBoxArray>("/bounding_boxes", 5);

在这里插入图片描述

4)添加源码,发布话题

添加如下几行源码:
在这里插入图片描述

5)编译lidar_euclidean_cluster_detect单个功能包
AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --continue-on-error --packages-select lidar_euclidean_cluster_detect
6)修改参数
$roslaunch runtime_manager runtime_manager.launch

点开coputing->lidar_euclidean_cluster_detect->app
在这里插入图片描述
将输入话题改成 /points_raw,勾选simulation的bag包播放,在选择computing的lidar_euclidean_cluster_detect进行分割显示,显示效果如下图。
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值