vlp-16点云聚类(14)

https://github.com/xiangkejun/chuan/tree/master/chuan_ws/src/euclidean_cluster_xx?1546276764383

将分割后的地面上的点云进行聚类提取。

并以box的形式包围起来。

参考:https://blog.csdn.net/AdamShan/article/details/83015570

 

//xx
//添加3dlidar 
//通过flag_3dlidar_stauts 开启和关闭3dlidar
// 用地面分割后的点云进行跟踪
#include "euclidean_cluster_core.h"
#include <iostream>

int flag_3dlidar_stauts;  //3d lidar 控制状态
EuClusterCore::EuClusterCore(ros::NodeHandle &nh)
{

    seg_distance_ = {15, 30, 45, 60};
  //  cluster_distance_ = {0.5, 1.0, 1.5, 2.0, 2.5};
     cluster_distance_ = {1.0, 1.0, 1.5, 2.0, 2.5};
    sub_point_cloud_ = nh.subscribe("/velodyne_points", 5, &EuClusterCore::point_cb, this);

    //xx
    //有两个地发发布 flag_nav_to_3dlidar,1.导航交控制权给3dlidar 2.3dbox处理完发取消3dbox的发布
    sub_nav_to_3dlidar_ = nh.subscribe("flag_nav_to_3dlidar",1,&EuClusterCore::flag_nav_to_3dlidar_cb,this);
  //  sub_point_cloud_ = nh.subscribe("/filtered_points_no_ground", 5, &EuClusterCore::point_cb, this);

 //   pub_bounding_boxs_ = nh.advertise<jsk_recognition_msgs::BoundingBoxArray>("/detected_bounding_boxs", 5);
    pub_bounding_boxs_ = nh.advertise<jsk_recognition_msgs::BoundingBoxArray>("/box_lidar_points", 5);

    ros::spin();
}

// 订阅点云数据后 得到box 以节点 /box_lidar_points发布
 

启动

roslaunch euclidean_cluster box_lidar_xx.launch

 

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值