Back to Apollo

Module Name

modules/perception/lidar_segmentation/README.md

11.0.04.2 KB
Original Source

Module Name

lidar_segmentation

Introduction

The lidar segmentation module uses point cloud of secondary_indices to do object segmentation. Secondary indices is intersetion of non_ground_indices and roi_indices, and remove foreground objects point indices.

Directory Structure

├── lidar_segmentation     // lidar segmentation component
    ├── common             // common codes
    ├── conf               // configuration folder
    ├── dag                // module startup file
    ├── data               // module configuration parameters
    ├── launch             // launch file
    ├── proto              // lidar segmentation module configuration proto file
    ├── segmentor          // point cloud segmentation methods
    ├── lidar_segmentation_component.cc // component entrance
    ├── lidar_segmentation_component.h
    ├── cyberfile.xml      // package management file
    ├── README.md          // readme file
    ├── README_cn.md
    └── BUILD              // compile file

Modules

LidarSegmentationComponent

apollo::perception::lidar::LidarSegmentationComponent

Input

NameTypeDescription
msgonboard::LidarFrameMessagelidar frame message

Output

NameTypeDescription
frameonboard::LidarFrameMessagelidar frame message

Configuration

Configurations of graph_segmentation.

parameter typeparameter namedefault valuemeaning
uint32grid_widthgrid width
uint32grid_heightgrid height
floatresolutiongrid resolution
floatthresholdgraph segmentation threshold
uint32min_pt_numbermin point number of cluster
uint32search_radius3grid search radius
floatheight_threshold2.0height threshold decided by autonomous car
floatxmin-30.0pointcloud valid distance of front
floatxmax30.0pointcloud valid distance of back
floatymin-10.0pointcloud valid distance of right
floatymax30.0pointcloud valid distance of left
floatsemantic_cost1.0semantic label cost
floatsame_semantic_coefficient1.0edge coefficient for same semantic label
floatdiff_semantic_coefficient1.0edge coefficient for different semantic label
floatsame_motion_coefficient1.0edge coefficient for same motion label
floatdiff_motion_coefficient1.0edge coefficient for different motion label
floatsplit_aspect_ratio10.0split aspect ratio
floatsplit_distance5.0split distance

How to Launch

  1. Add vehicle parameter configuration file to modules/perception/data/params in profile, corresponding frame_id and sensor_name, launch transform
bash
cyber_launch start /apollo/modules/transform/launch/static_transform.launch
  1. Modify modules/perception/launch/perception_lidar.launch
  • select the dag file to start, add lidar_segmentation.dag to perception_lidar.launch
  • modify msg_adapter. It is used to wrap messages sent by other steps as /apollo/perception/obstacles, this can be used for individual debugging. Modify relevant channel configurations in modules/perception/data/flag/perception_common.flag
  1. Modify parameters of modules/perception/lidar_segmentation/conf/lidar_segmentation_config.pb.txt in profile
  • output_channel_name: output channel name
  • plugin_param: plugin parameters
    • name: method name
    • config_path: configuration folder
    • config_file: configuration file name
  1. Launch pointcloud perception
bash
cyber_launch start /apollo/modules/perception/launch/perception_lidar.launch