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

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

进而,我就在网上查找资料,就找到了此解决方案,进行相关的代码修改:https://blog.csdn.net/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进行分割显示,显示效果如下图。
在这里插入图片描述

  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是 Autoware 1.14 的安装教程: 1. 安装依赖项 ```bash sudo apt-get update sudo apt-get install -y python-catkin-tools python-rosdep ros-$ROS_DISTRO-desktop-full ros-$ROS_DISTRO-mavros* ros-$ROS_DISTRO-joy ros-$ROS_DISTRO-geodesy ros-$ROS_DISTRO-control-toolbox ros-$ROS_DISTRO-octomap* ros-$ROS_DISTRO-ros-control ros-$ROS_DISTRO-ros-controllers ros-$ROS_DISTRO-rosbridge-server ros-$ROS_DISTRO-web-video-server ros-$ROS_DISTRO-joy-teleop ros-$ROS_DISTRO-teleop-twist-joy ros-$ROS_DISTRO-teleop-twist-keyboard ros-$ROS_DISTRO-laser-proc ros-$ROS_DISTRO-depthimage-to-laserscan ros-$ROS_DISTRO-tf2-web-republisher ros-$ROS_DISTRO-robot-localization ros-$ROS_DISTRO-ros-numpy python-pip python3-pip python-setuptools python3-setuptools python3-yaml python3-numpy python3-dev python3-future python3-pyqt5 python3-pyqt5.qsci python3-lxml python3-yaml python3-pydot python3-psutil python3-tk python3-opencv python3-matplotlib python3-scipy python3-pil python3-sklearn libyaml-cpp-dev libtinyxml2-dev ``` 2. 安装 CUDA、cuDNN 和 TensorRT(可选) 如果您想要使用 NVIDIA GPU 运行 Autoware,需要安装 CUDA、cuDNN 和 TensorRT。您可以从 NVIDIA 官网下载适用于您的系统的版本。 3. 配置 ROS ```bash sudo rosdep init rosdep update ``` 4. 构建 Autoware ```bash mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src git clone https://github.com/Autoware-AI/autoware.ai.git cd autoware.ai git checkout 1.14.0 cd ~/catkin_ws/ rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y catkin config --extend /opt/ros/$ROS_DISTRO --cmake-args -DCMAKE_BUILD_TYPE=Release catkin build ``` 5. 运行 Autoware ```bash source ~/catkin_ws/devel/setup.bash roslaunch runtime_manager runtime_manager.launch ``` 以上是 Autoware 1.14 的安装教程,希望对您有所帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值