Back to Apollo

模块名称

modules/perception/lidar_segmentation/README_cn.md

11.0.03.5 KB
Original Source

模块名称

lidar_segmentation

简介

lidar背景分割模块使用secondary_indices点云进行分割。Secondary indices是non_ground_indice和roi_indices的交集,并删除前景对象点索引。

目录结构

├── lidar_segmentation     // lidar segmentation组件
    ├── common             // 公用代码
    ├── conf               // 配置文件目录
    ├── dag                // dag启动文件
    ├── data               // 模块配置参数
    ├── launch             // launch启动文件
    ├── proto              // lidar segmentation模块配置proto文件
    ├── segmentor          // 背景分割方法
    ├── lidar_segmentation_component.cc // 组件入口
    ├── lidar_segmentation_component.h
    ├── cyberfile.xml      // 包管理配置文件
    ├── README.md
    ├── README_cn.md
    └── BUILD

模块

LidarSegmentationComponent

apollo::perception::lidar::LidarSegmentationComponent

输入

名称类型描述
msgonboard::LidarFrameMessage激光雷达消息帧

输出

名称类型描述
frameonboard::LidarFrameMessage激光雷达消息帧

配置

如下 graph_segmentation 的配置。

参数类型参数名称默认值含义
uint32grid_width网格宽度
uint32grid_height网格高度
float分辨率网格分辨率
float阈值图形分割阈值
uint32min_pt_number聚类的最小点数
uint32search_radius3网格搜索半径
floatheight_threshold2.0高度阈值
floatxmin-30.0pointcloud 前方有效距离
floatxmax30.0pointcloud 后方有效距离
floatymin-10.0pointcloud 右侧有效距离
floatymax30.0pointcloud 左侧有效距离
floatsemantic_cost1.0语义标签成本
floatsame_semantic_coefficient1.0语义类别相同时的系数
floatdiff_semantic_coefficient1.0语义类别不同时的系数
floatsame_motion_coefficient1.0动静态类别相同时的系数
floatdiff_motion_coefficient1.0动静态类别不同时的系数
floatsplit_aspect_ratio10.0切分目标的长宽比阈值
floatsplit_distance5.0切分长度

如何启动

  1. 在配置文件中的 modules/perception/data/params 中添加车辆参数配置文件,对应frame_id和sensor_name,启动transform命令
bash
cyber_launch start /apollo/modules/transform/launch/static_transform.launch
  1. 修改 modules/perception/launch/perception_lidar.launch
  • 选择要启动的 dag 文件,将 lidar_segmentation.dag 添加到 perception_lidar.launch
  • 修改 msg_adapter。用于将其他步骤发送的消息包装为/apollo/perception/obstacles,可用于单独调试。修改modules/perception/data/flag/perception_common.flag中相关通道配置
  1. 修改配置文件中modules/perception/lidar_segmentation/conf/lidar_segmentation_config.pb.txt的参数
  • output_channel_name:输出通道名称
  • plugin_param:插件参数
  • name:方法名称
  • config_path:配置文件夹
  • config_file:配置文件名
  1. 启动perception
bash
cyber_launch start /apollo/modules/perception/launch/perception_lidar.launch