Back to Apollo

感知模块介绍

collection/perception/README_cn.md

11.0.085.7 KB
Original Source

感知模块介绍

相机模块概述

相机模块包括多种纯视觉感知算法,包括环视bev算法、多阶段2d检测及3d姿态回归算法、单阶段算法。BEV检测模块使用了PETR模型,可以完成对多个摄像机数据的推理获得障碍物目标。多阶段检测模块是基于YOLO开发的多任务模型,可以同时输出数十个维度信息,如“2d”、“3d”和车辆转向信息。相机单阶段检测算法包含两个模型Caddn和SMOKE,可以同时输出目标的2d和3d信息,上述模块可以将结果传输到camera_tracking组件实现目标追踪。

Channel+消息格式

模块输入通道输出通道消息格式
camera_detection_bev/apollo/sensor/camera/CAM_FRONT/image
/apollo/sensor/camera/CAM_FRONT_RIGHT/image
/apollo/sensor/camera/CAM_FRONT_LEFT/image
/apollo/sensor/camera/CAM_BACK/image
/apollo/sensor/camera/CAM_BACK_LEFT/image
/apollo/sensor/camera/CAM_BACK_RIGHT/image
/apollo/perception/obstaclesapollo::perception::PerceptionObstacles
camera_detection_multi_stage/apollo/sensor/camera/front_6mm/image/perception/inner/Detectionapollo::perception::onboard::CameraFrame
camera_detection_single_stage/apollo/sensor/camera/front_6mm/image/perception/inner/Detectionapollo::perception::onboard::CameraFrame
camera_location_estimation/perception/inner/Detection/perception/inner/location_estimationapollo::perception::onboard::CameraFrame
camera_location_refinement/perception/inner/location_estimation/perception/inner/location_refinementapollo::perception::onboard::CameraFrame
camera_tracking/perception/inner/location_refinement/perception/inner/PrefusedObjectsapollo::perception::onboard::SensorFrameMessage

参数

camera_detection_multi_stage 模块

此模块配置文件位置:

  • modules/perception/camera_detection_multi_stage/conf

  • modules/perception/camera_detection_multi_stage/data

算法基本配置: modules/perception/camera_detection_multi_stage/proto/camera_detection_multi_stage.proto

参数类型参数名默认值含义
stringcamera_namefront_6mm对应tf中摄像头名称,frame id
stringPluginParam.nameYoloObstacleDetector检测算法
stringPluginParam.config_pathperception/camera_detection_multi_stage/data配置文件路径
stringPluginParam.config_fileyolo.pb.txt配置文件名称
stringchannel.input_camera_channel_name/apollo/sensor/camera/front_6mm/image输入消息通道
stringchannel.output_obstacles_channel_name/perception/inner/Detection输出消息通道
int32gpu_id0gpu id
int32frame_capacity20帧缓存容量
int32image_channel_num3图片通道数两
boolenable_undistortionfalse不失真使能
boolenable_visualizationfalse可视化使能
doubledefault_camera_pitch0默认摄像头俯仰角度
doubledefault_camera_height1.5默认摄像头高度
doublets_diff0.1时间戳偏差值
booloutput_final_obstaclesfalse是否输出最终障碍物
stringDebug.output_viz_message_channel_name/perception/inner/camera_viz_msg输出可视化调试信息通道
boolDebug.output_camera_debug_msgfalse是否输出摄像头调试信息
stringDebug.camera_debug_channel_name/perception/camera_debug输出调试信息通道
stringDebug.visual_debug_folder/apollo/debug_output可视化调试保存路径
stringDebug.visual_camerafront_6mm摄像头名称
boolDebug.write_visual_imgfalse可视化状态量

模型配置: modules/perception/camera_detection_multi_stage/detector/yolo/proto/model_param.proto

参数类型参数名默认值含义
common.ModelInfoinfo/设定模型参数配置
common.Resizeresize/设定高度、宽度等
common.Normalizenormalize/设定均值、方差
floatoffset_ratio0.28889偏移率
floatcropped_ratio0.71111裁剪率
int32resized_width1440resize 宽度
int32aligned_pixel32对齐像素
floatconfidence_threshold0.4目标置信度
floatlight_vis_conf_threshold0车灯可视置信度
floatlight_swt_conf_threshold0车灯闪烁置信度
int32ori_cycle2调整观测角范围
boolper_cls_regfalse
boolwith_box3dtrue是否计算3dbbox
boolwith_frboxfalse是否计算前后bbox
boolwith_lightstrue是否计算车灯
boolwith_ratiosfalse是否计算
int32num_areas0车身周围目标区域划分数量
floatborder_ratio0.01边界比例阈值
NMSParamnms_param/设定 nms 参数
floatmin_dims.min_2d_height10最小2d目标像素高度
floatmin_dims.min_3d_height0.1最小3d目标高度
floatmin_dims.min_3d_width0最小3d目标宽度
floatmin_dims.min_3d_length0最小3d目标长度

ModelInfo配置:

参数类型参数名默认值含义
stringname3d-r4-half_caffe模型名称,同models/下文件夹名
stringframeworkTensorRT模型推理框架
stringModelFile.proto_filedeploy.pt模型网络结构
stringModelFile.weight_filedeploy.model模型权重文件
stringModelFile.anchors_filenchors.txtyolo2d框anchor size
stringModelBlob.inputs1440x800模型输入数据名称及维度
int32ModelBlob.outputs/模型输出数据名称及维度

camera_detection_single_stage 模块

此模块配置位置:

  • modules/perception/camera_detection_single_stage/conf

  • modules/perception/camera_detection_single_stage/data

算法基本配置: modules/perception/camera_detection_single_stage/proto/camera_detection_single_stage.proto

参数类型参数名默认值含义
stringcamera_namefront_6mm对应tf中摄像头名称,frame
floattimestamp_offset0时间偏移量
stringPluginParam.nameSmokeObstacleDetector检测算法
stringPluginParam.config_pathperception/camera_detection_single_stage/data配置文件路径
stringPluginParam.config_filesmoke_config.pb.txt配置文件名称
int32gpu_id0gpu id
stringchannel.input_camera_channel_name/apollo/sensor/camera/front_6mm/image输入消息通道
stringchannel.output_obstacles_channel_name/perception/inner/Detection输出消息通道

模型配置: modules/perception/camera_detection_single_stage/detector/smoke/proto/model_param.proto

参数类型参数名默认值含义
common.ModelInfoinfo/设定模型参数配置
common.Resizeresize/设定高度、宽度等
common.Normalizenormalize/设定均值、方差
floatoffset_ratiox,y = 0偏移率
floatconfidence_threshold0.5目标置信度
floatmin_dims.min_2d_height0.015625最小2d目标高度
floatmin_dims.min_3d_height0.1最小3d目标高度
floatmin_dims.min_3d_width0最小3d目标宽度
floatmin_dims.min_3d_length0最小3d目标长度
int32ori_cycle1调整观测角范围
floatborder_ratio0.01边界比例阈值

camera_detection_bev 模块

算法基本配置: modules/perception/camera_detection_bev/proto/camera_detection_bev.proto

参数类型参数名默认值含义
stringcamera_namefront_6mm对应tf中摄像头名称,frame id
floattimestamp_offset0时间偏移量
stringPluginParam.nameBEVObstacleDetector检测算法
stringPluginParam.config_pathperception/camera_detection_bev/data配置文件路径
stringPluginParam.config_filedetr.pb.txt配置文件名称
int32gpu_id0gpu id
stringchannel.input_camera_channel_name/apollo/sensor/camera/front_6mm/image输入消息通道
stringchannel.output_obstacles_channel_name/perception/inner/Detection输出消息通道

模型配置: modules/perception/camera_detection_bev/detector/detr/proto/model_param.proto

参数类型参数名默认值含义
common.ModelInfoinfo/设定模型参数配置
common.Resizeresize/设定高度、宽度等
common.Normalizenormalize/设定均值、方差
floatscore_threshold0目标得分置信度
camera_location_estimation模块

组件配置文件: modules/perception/camera_location_estimation/proto/camera_location_estimation.proto

参数类型参数名默认值含义
stringcamera_namefront_6mmcamera 名字
stringPluginParam.nameMultiCueTransformer算法名称
stringPluginParam.config_pathperception/camera_location_estimation/data算法配置文件路径
stringPluginParam.config_fileconfig.pb.txt算法配置文件名称
doubletimestamp_offset0时间戳偏移量
stringinput_camera_channel_name/数据输入通道
stringoutput_obstacles_channel_name/数据输出通道

算法配置文件: modules/perception/camera_location_estimation/transformer/multicue/proto/multicue.proto

参数类型参数名默认值含义
floatmin_dimension_val0.2最小维度
boolcheck_dimensiontrue是否检查维度信息

camera_location_refinement 模块

此模块配置文件位置:

  • modules/perception/camera_location_refinement/conf

  • modules/perception/camera_location_refinement/data

组件配置文件: modules/perception/camera_location_refinement/proto/camera_location_refinement.proto

参数类型参数名默认值含义
stringcamera_namefront_6mmcamera 名字
doubletimestamp_offset0时间戳偏移量
stringinput_camera_channel_name/数据输入通道
stringoutput_obstacles_channel_name/数据输出通道
int32lane_calibration_working_sensor_namefront_6mm车道校准传感器名称
stringPostprocessorParam.nameMultiCueTransformer算法名称
stringPostprocessorParam.config_pathperception/camera_location_estimation/data算法配置文件路径
stringPostprocessorParam.config_fileconfig.pb.txt算法配置文件名称
stringCalibrationServiceParam.nameMultiCueTransformer算法名称
stringCalibrationServiceParam.config_pathperception/camera_location_estimation/data算法配置文件路径
stringCalibrationServiceParam.config_fileconfig.pb.txt算法配置文件名称

算法配置文件: modules/perception/camera_location_refinement/location_refiner/proto/location_refiner.proto

参数类型参数名默认值含义
floatmin_dist_to_camera30到camera最小距离,判断是否在roi内
floatroi_h2bottom_scale0.5依据内参计算目标高度调整数值时增益

camera tracking 模块

组件配置文件:/apollo/modules/perception/camera_tracking/conf/camera_tracking_config.pb.txt

参数类型参数名默认值含义
stringoutput_channel_name/perception/inner/PrefusedObjectscamera tracking 模块输出通道
stringPluginParam.nameOMTObstacleTracker跟踪算法名称
stringPluginParam.config_pathperception/camera_tracking/data跟踪算法配置文件路径
stringPluginParam.config_fileomt.pb.txt跟踪算法配置文件名称
int32image_width1920图像宽度
int32image_height1080图像高度
int32gpu_id0gpu id

omt tracker算法配置文件: /apollo/modules/perception/camera_tracking/data/omt.pb.txt

参数类型参数名默认值含义
int32img_capability14缓存的图像数量
int32reserve_age5目标丢失次数阈值
floatweight_same_camera.appearance0.45sa不为0,计算分数appearance权重
floatweight_same_camera.motion0.4sa不为0,计算分数motion权重
floatweight_same_camera.shape0.15sa不为0,计算分数shape权重
floatweight_same_camera.overlap0.05sa不为0,计算分数overlap权重
floatweight_diff_camera.motion0.5sa为0,计算分数motion权重
floatweight_diff_camera.shape0.15sa为0,计算分数shape权重
floatweight_diff_camera.overlap0.35sa为0,计算分数overlap权重
stringtype_change_cost_filetype_change_costcost文件名
floatborder20图像边界阈值
floattarget_thresh0.6目标分数阈值,如果低于该分数,则过滤
floatabnormal_movement0.4不正常移动阈值,用于判断是否误匹配
floatmin_init_height_ratio17目标高度阈值,用于判断是否创建新目标
floattarget_combine_iou_threshold0.6iou阈值,用于判断是否合并两个目标
TargetParamtarget_param目标初始化参数
stringplugin_param.nameTrackingFeatureExtractor特征提取器
stringplugin_param.config_pathperception/camera_tracking/data特征提取器配置文件路径
stringplugin_param.config_filetracking_feature.pb.txt特征提取起配置文件名称
int32feature_input_width960特征提取器输入特征宽度
int32feature_input_height640特征提取器输入特征高度

特征提取算法配置文件: /apollo/modules/perception/camera_tracking/data/tracking_feature.pb.txt

参数类型参数名默认值含义
stringfeat_blob_nameconv4_3特征层
int32feat_blob_shape1/64/160/240特征尺寸
FeatureTypeextractor.feat_typeROIPooling特征类型
int32extractor.roi_pooling_param.pooled_h3ROIPooling高度
int32extractor.roi_pooling_param.pooled_w3ROIPooling宽度
boolextractor.roi_pooling_param.use_floortrue在ROIPooling中使用floor取整

支持的模型

模型类型模型下载地址
PETR_V1_paddleBEV_detectionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/petrv1.zip
yolox3d_onnxcamera_detectionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/yolox3d_onnx.zip
caddn_paddlecamera_detectionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/caddn_paddle.zip
3d-r4-half_caffecamera_detectionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/3d-r4-half_caffe.zip
smoke_torchcamera_detectionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/smoke_torch.zip

包列表

分类包名
perceptionperception-camera-detection-bev
perceptionperception-camera-detection-multi-stage
perceptionperception-camera-detection-single-stage
perceptionperception-camera-location-estimation
perceptionperception-camera-location-refinement)
perceptionperception-camera-tracking

红绿灯模块概述

红绿灯模块主要分为四个部分:预处理、检测、识别和追踪。预处理阶段用于查询定位和地图信号灯信息,选择检测红绿灯的摄像头根据信号光在像平面上的投影,保存相机选择结果输出给检测阶段使用。检测阶段是传统的卷积神经网络检测任务,接收带有ROI的图像信息作为输入数据并顺序输出边界框。识别阶段根据输出的边界框识别交通灯的颜色。 这个任务是使用传统的卷积神经网络完成。 识别模块的输入是带有ROI的图像信息和一组边界框信息作为输入数据,输出是一个四维向量。分别表示每个边界框为黑、红、黄、绿的概率,当且仅当概率足够大时,概率最高的类别将被识别为信号灯的状态。追踪阶段是对红绿灯的检测结果进行一定的修正。

Channel+消息格式

模块输入通道输出通道消息格式
traffic_light_region_proposal/apollo/sensor/camera/front_6mm/image
/apollo/sensor/camera/front_12mm/image/perception/inner/Detectionapollo::perception::onboard::TrafficDetectMessage
traffic_light_detection/perception/inner/Detection/perception/inner/Retectionapollo::perception::onboard::TrafficDetectMessage
traffic_light_recognition/perception/inner/Retection/perception/inner/Trackingapollo::perception::onboard::TrafficDetectMessage
traffic_light_tracking/perception/inner/Tracking/apollo/perception/traffic_lightapollo::perception::TrafficLightDetection

参数

traffic_light_region_proposal 模块

配置文件位置: modules/perception/traffic_light_region_proposal/conf

组件基本配置: modules/perception/traffic_light_region_proposal/proto/trafficlights_proposal_component.proto

参数类型参数名默认值含义
stringcamera_namesfront_6mm,front_12mm检测使用相机名称
stringchannel.input_camera_channel_name/apollo/sensor/camera/front_6mm/image
/apollo/sensor/camera/front_12mm/image输入消息通道
doubletl_image_timestamp_offsetdefault = 0.0红绿灯预处理图像时间偏移
stringPluginParam.nameTLPreprocessor预处理算法插件名称
stringproposal_output_channel_name/perception/inner/Detection预处理模块处理消息输出通道名称
stringmax_process_image_fps8最大处理图像fps参数
doublequery_tf_interval_seconds0.3查询tf间隔时长
doublevalid_hdmap_interval1.5未能获取信号信息的合法间隔时长
int32gpu_id0gpu id

traffic_light_detection 模块

组件配置文件: modules/perception/traffic_light_detection/conf/traffic_light_detection_config.pb.txt

参数类型参数名默认值含义
stringPluginParam.nameTrafficLightDetection检测算法名称
stringPluginParam.config_pathperception/traffic_light_detection/data配置文件路径
stringPluginParam.config_filedetection_caffe.pb.txt配置文件名称
stringdetection_output_channel_name/perception/inner/Retection检测结果输出通道
int32gpu_id0gpu id

检测模型配置: modules/perception/traffic_light_detection/detection/proto/model_param.proto

模型配置文件位置:modules/perception/traffic_light_detection/data/detection_caffe.pb.txt

参数类型参数名默认值含义
stringnametl_detection_caffe模型名称,同models/下文件夹名
stringframeworkTensorRT模型推理框架
stringModelFile.proto_filedeploy.prototxt模型网络结构
stringModelFile.weight_filebaidu_iter_140000.caffemodel模型权重文件
stringModelBlob.inputsimg、im_info模型输入数据名称及维度
int32ModelBlob.outputsbboxes模型输出数据名称及维度

traffic_light_recognition 模块

此模块配置文件位置:

  • modules/perception/traffic_light_recognition/conf

  • modules/perception/traffic_light_recognition/data

组件配置文件: modules/perception/traffic_light_recognition/proto/traffic_light_recognition_component.proto

参数类型参数名默认值含义
stringPluginParam.nameTrafficLightRecognition检测算法名称
stringPluginParam.config_pathperception/traffic_light_recognition/data配置文件路径
stringPluginParam.config_filerecognition.pb.txt配置文件名称
stringrecognition_output_channel_name/perception/inner/Tracking检测结果输出通道
int32gpu_id0gpu id

识别模型配置: modules/perception/traffic_light_recognition/recognition/proto/model_param.proto

vertical_model ClassifyParam:

参数类型参数名默认值含义
stringnamevertical_caffe模型名称,同models/下文件夹名
stringframeworkTensorRT模型推理框架
stringModelFile.proto_filedeploy.prototxt模型网络结构
stringModelFile.weight_filebaidu_iter_250000.caffemodel模型权重文件
stringModelBlob.inputsdata_orgshap:[1,96,32,3]模型输入数据名称及维度
int32ModelBlob.outputsprob模型输出数据名称及维度
floatclassify_threshold0.5分类模型阈值
int32classify_resize_width32分类调整宽度
int32classify_resize_height96分类调整高度
floatscale0.01规模参数
floatmean_b69.06平均b值
floatmean_g66.58平均g值
floatmean_r66.56平均r值
boolis_bgrtrue判断是BGR还是RGB

quadrate_model ClassifyParam:

参数类型参数名默认值含义
stringnamequadrate_caffe模型名称,同models/下文件夹名
stringframeworkTensorRT模型推理框架
stringModelFile.proto_filedeploy.prototxt模型网络结构
stringModelFile.weight_filebaidu_iter_200000.caffemodel模型权重文件
stringModelBlob.inputsdata_org shap:[1,64,64,3]模型输入数据名称及维度
int32ModelBlob.outputsprob模型输出数据名称及维度
floatclassify_threshold0.5分类模型阈值
int32classify_resize_width64分类调整宽度
int32classify_resize_height64分类调整高度
floatscale0.01规模参数
floatmean_b69.06平均b值
floatmean_g66.58平均g值
floatmean_r66.56平均r值
boolis_bgrtrue判断是BGR还是RGB

horizontal_model ClassifyParam:

参数类型参数名默认值含义
stringnamehorizontal_caffe模型名称,同models/下文件夹名
stringframeworkTensorRT模型推理框架
stringModelFile.proto_filedeploy.prototxt模型网络结构
stringModelFile.weight_filebaidu_iter_200000.caffemodel模型权重文件
stringModelBlob.inputsdata_org shap:[1,32,96,3]模型输入数据名称及维度
int32ModelBlob.outputsprob模型输出数据名称及维度
floatclassify_threshold0.5分类模型阈值
int32classify_resize_width96分类调整宽度
int32classify_resize_height32分类调整高度
floatscale0.01规模参数
floatmean_b69.06平均b值
floatmean_g66.58平均g值
floatmean_r66.56平均r值
boolis_bgrtrue判断是BGR还是RGB

traffic_light_tracking 模块

此模块配置文件位置:

  • modules/perception/traffic_light_tracking/conf

  • modules/perception/traffic_light_tracking/data

组件配置文件: modules/perception/traffic_light_tracking/proto/traffic_light_tracking_component.proto

参数类型参数名默认值含义
stringPluginParam.nameSemanticReviser检测算法名称
stringPluginParam.config_pathperception/traffic_light_tracking/data配置文件路径
stringPluginParam.config_filesemantic.pb.txt配置文件名称
stringtraffic_light_output_channel_name/apollo/perception/traffic_light检测结果输出通道
stringv2x_trafficlights_input_channel_name/apollo/v2x/traffic_lightv2x红绿灯信号输入通道

tracking配置文件: modules/perception/traffic_light_tracking/tracker/proto/semantic.proto

参数类型 参数名 默认值 含义 float revise_time_second 1.5 修改时间阈值 float blink_threshold_second 0.55 红绿灯闪烁阈值时间 int hysteretic_threshold_count 1 延迟阈值时间计数统计

支持的模型

模型类型模型下载地址
horizontal_torchTrafficlight_recognitionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/horizontal_torch.zip
quadrate_torchTrafficlight_recognitionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/quadrate_torch.zip
vertical_torchTrafficlight_recognitionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/vertical_torch.zip
horizontal_caffeTrafficlight_recognitionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/horizontal_caffe.zip
quadrate_caffeTrafficlight_recognitionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/quadrate_caffe.zip
vertical_caffeTrafficlight_recognitionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/vertical_caffe.zip
tl_detection_caffeTrafficlight_detectionhttps://apollo-pkg-beta.cdn.bcebos.com/perception_model/tl_detection_caffe.zip

包列表

分类包名
perceptionperception-traffic-light-region-proposal
perceptionperception-traffic-light-detection
perceptionperception-traffic-light-recognition
perceptionperception-traffic-light-tracking

毫米波模块概述

毫米波模块主要负责读取毫米波雷达的驱动输出信息,对毫米波硬件输出的目标级数据进行处理,包括目标跟踪、ROI过滤等,输出跟踪后的目标级障碍物,可以单独输出也可以输入到多传感器融合模块。

Channel+消息格式

模块输入通道输出通道消息格式
radar_detection/apollo/sensor/radar/front/apollo/perception/obstaclesapollo::perception::PerceptionObstacles

参数

radar_detection 模块

此模块配置文件位置:

  • modules/perception/radar_detection/conf

  • modules/perception/radar_detection/data

算法基本配置: modules/perception/radar_detection/proto

参数类型参数名默认值含义
doublemax_match_distance2.5匹配最大距离阈值
doublebound_match_distance10.0匹配边界阈值
doubledelay_time0.07用于纠正目标的时间戳
stringradar_nameradar_front毫米波雷达名称
stringtf_child_frame_idradar_front毫米波雷达名称
doubleradar_forward_distance200.0毫米波雷达前向探测距离
stringpreprocessor_param.nameContiArsPreprocessor预处理插件名
stringpreprocessor_param.config_pathperception/radar_detection/data预处理插件配置路径
stringpreprocessor_param.config_filepreprocessor.pb.txt预处理插件配置文件名
stringperception_param.nameRadarObstaclePerception感知插件名
stringperception_param.config_pathperception/radar_detection/data感知插件配置路径
stringperception_param.config_pathradar_obstacle_perception.pb.txt感知插件配置文件名
stringodometry_channel_name/apollo/localization/pose定位通道名
stringoutput_channel_name/perception/inner/PrefusedObjects输出通道名
stringdetector_param.nameContiArsDetector目标检测插件名
stringroi_filter_param.nameHdmapRadarRoiFilterROI过滤插件名
stringtracker_param.nameContiArsTracker跟踪插件名
stringtracker_param.config_pathperception/radar_detection/data跟踪插件配置路径
stringtracker_param.config_fileconti_ars_tracker.pb.txt跟踪插件配置文件名
doubletracking_time_window0.06跟踪时间窗口
stringmatcher_param.nameHMMatcher匹配器插件名
stringmatcher_param.config_pathperception/radar_detection/data匹配器插件配置路径
stringmatcher_param.config_filehm_matcher.pb.txt匹配器插件配置文件名
stringchosen_filterAdaptiveKalmanFilter过滤器名
doubletracked_times_threshold3跟踪时间阈值
booluse_filterfalse是否使用过滤器

包列表

分类包名
perceptionperception-radar-detection

4D毫米波模块概述

4D毫米波模块主要负责读取4D毫米波雷达的驱动输出信息,即4D毫米波雷达输出的点云数据。4D毫米波模块会对毫米波点云进行点云预处理,使用经典的点云3D目标检测模型PointPillars对目标进行检测,并通过ROI过滤和目标跟踪算法输出跟踪后的目标级障碍物,可以单独输出,也可以输入到多传感器融合模块。

Channel+消息格式

模块输入通道输出通道消息格式
radar4d_detection/apollo/sensor/oculii/PointCloud2/apollo/perception/obstaclesapollo::perception::PerceptionObstacles

参数

radar4d_detection 模块

此模块配置文件位置:

  • modules/perception/radar4d_detection/conf

  • modules/perception/radar4d_detection/data

算法基本配置: modules/perception/radar4d_detection/proto

参数类型参数名默认值含义
doublercs_offset-35毫米波雷达反射强度的偏置
stringdetector_param.nameRadar4dDetection目标检测器插件名
stringdetector_param.config_pathperception/radar4d_detection/data目标检测器配置路径
stringdetector_param.config_filepoint_pillars_param.pb.txt目标检测器配置文件名
stringroi_filter_param.nameHdmapRadarRoiFilterROI过滤器插件名
stringmulti_target_tracker_param.nameMrfEngine多目标跟踪器插件名
stringmulti_target_tracker_param.config_pathperception/radar4d_detection/data/tracking多目标跟踪器配置路径
stringmulti_target_tracker_param.config_filemrf_engine.pb.txt多目标跟踪器配置文件名
stringfusion_classifier_param.nameFusedClassifier目标分类器插件名
stringfusion_classifier_param.config_pathperception/radar4d_detection/data/fused_classifier目标分类器配置路径
stringfusion_classifier_param.config_filefused_classifier.pb.txt目标分类器配置文件名
boolenable_roi_filtertrue是否使用roi过滤器
stringradar_nameradar_front4D毫米波名称
stringtf_child_frame_idradar_front4D毫米波名称
doubleradar_forward_distance200.0毫米波最大探测距离
stringpreprocessor_param.nameRadarPreprocessor点云预处理插件名
stringpreprocessor_param.config_pathperception/radar4d_detection/data点云预处理配置路径
stringpreprocessor_param.config_filepreprocessor_config.pb.txt点云预处理配置文件名
stringperception_param.nameRadarObstaclePerception目标检测模块插件名
stringperception_param.config_pathperception/radar4d_detection/data目标检测模块配置文件路径
stringperception_param.config_fileradar_obstacle_perception_config.pb.txt目标检测模块配置文件名
stringodometry_channel_name/apollo/localization/pose定位模块通道名
stringoutput_channel_name/perception/inner/PrefusedObjects4D毫米波模块输出通道名
stringinfo.weight_file.fileradar_libtorch_all.zip目标检测网络参数文件名
floatpostprocess.score_threshold0.1置信度阈值
floatpostprocess.nms_overlap_threshold0.01nms阈值
int32postprocess.num_output_box_feature7网络输出的特征数量
int32preprocess.num_point_feature7网络输入的点特征数量
boolpreprocess.enable_fuse_framestrue是否使用多帧融合策略
int32preprocess.num_fuse_frames5融合帧数量
doublepreprocess.fuse_time_interval0.5融合帧最大时间差
booluse_histogram_for_matchfalse是否使用直方图特征进行匹配
booloutput_predict_objectsfalse是否输出预测的目标
doublereserved_invisible_time2最大不可见时间

包列表

分类包名
perceptionperception-radar4d-detection

lidar模块概述

激光雷达检测用于 3D 目标检测,它的输入是激光雷达点云,输出为检测到的物体的类型和坐标。

Channel+消息格式

模块输入通道输出通道消息格式
lidar_detectionperception/lidar/pointcloud_ground_detection/perception/lidar/detectionapollo::perception::onboard::LidarFrameMessage
lidar_detection_filter/perception/lidar/detection/perception/lidar/detection_filterapollo::perception::onboard::LidarFrameMessage
lidar_tracking/perception/lidar/detection_filter/perception/inner/PrefusedObjectsapollo::perception::onboard::LidarFrameMessage, apollo::perception::onboard::SensorFrameMessage
pointcloud_ground_detection/perception/lidar/pointcloud_map_based_roi/perception/lidar/pointcloud_ground_detectionapollo::perception::onboard::LidarFrameMessage
pointcloud_map_based_roi/perception/lidar/pointcloud_preprocess/perception/lidar/pointcloud_map_based_roiapollo::perception::onboard::LidarFrameMessage
pointcloud_preprocess/apollo/sensor/velodyne64/compensator/PointCloud2/perception/lidar/pointcloud_preprocessapollo::drivers::PointCloud, apollo::perception::onboard::LidarFrameMessage

参数

lidar_detection模块

此模块配置文件路径:

  • modules/perception/lidar_detection/conf
  • modules/perception/lidar_detection/data

ModelInfo配置,文件路径:modules/perception/common/proto/model_info.proto

参数类型参数名默认值含义
stringname/模型名称,同models/下文件夹名
stringframework/模型推理框架
stringModelFile.proto_file/模型网络结构
stringModelFile.weight_file/模型权重文件
stringModelFile.anchors_file/anchor size
stringModelBlob.inputs/模型输入数据名称及维度
int32ModelBlob.outputs/模型输出数据名称及维度

PointCloudPreProcess:

参数类型参数名默认值含义
int32gpu_id0GPU的id
doublenormalizing_factor255强度归一化的缩放因子
int32num_point_feature4每个点的特征数量
boolenable_ground_removalfalse是否过滤掉地面点
doubleground_removal_height-1.5过滤掉z值小于阈值的点
boolenable_downsample_beamsfalse是否根据beam id对点云进行过滤
int32downsample_beams_factor4保留beam id为downsample_beams_factor的倍数的点云
boolenable_downsample_pointcloudfalse是否根据voxel过滤点云
doubledownsample_voxel_size_x0.01过滤时voxel的x方向长度
doubledownsample_voxel_size_y0.01过滤时voxel的y方向长度
doubledownsample_voxel_size_z0.01过滤时voxel的z方向长度
boolenable_fuse_framesfalse是否融合多帧点云
int32num_fuse_frames5融合点云的帧数
doublefuse_time_interval0.5融合点云的时间间隔
boolenable_shuffle_pointsfalse是否打乱点云索引
int32max_num_points2147483647允许的最大点云数量
boolreproduce_result_modefalse是否开启复现结果模式
boolenable_roi_outside_removalfalse是否在输入模型之前将roi外的点云进行过滤

PointCloudPostProcess

参数类型参数名默认值含义
floatscore_threshold0.5置信度阈值
floatnms_overlap_threshold0.5NMS的iou阈值
int32num_output_box_feature7输出障碍物的属性个数
floatbottom_enlarge_height0.25获取目标真实点云时向上扩充的范围
floattop_enlarge_height0.25获取目标真实点云时向下扩充的范围
floatwidth_enlarge_value0获取目标真实点云时宽度扩充的范围
floatlength_enlarge_value0获取目标真实点云时长度扩充的范围

cnnseg配置

modules/perception/lidar_detection/detector/cnn_segmentation/proto/model_param.proto

参数类型参数名默认值含义
ModelInfoinfo/模型基本配置
FeatureParamfloatpoint_cloud_range90点云范围
uint32width864BEV宽度
uint32height864BEV高度
floatmin_height-5.0点云z值最小值
floatmax_height5.0点云z值最大值
booluse_intensity_featuretrue是否使用强度特征
booluse_constant_featurefalse是否使用常数特征
booldo_classificationtrue是否预测分类信息
booldo_headingtrue是否预测朝向角信息
PointCloudPreProcesspreprocess/预处理信息
SppEngineConfigfloatheight_gap0.5高度差距
boolremove_ground_pointstrue是否过滤掉障碍物中的地面点
floatobjectness_thresh0.5objectness的阈值
floatconfidence_thresh0.1confidence的阈值
floatheight_thresh0.5高度阈值
uint32min_pts_num3目标最少点数
floatconfidence_range85置信度范围
boolfill_recall_with_segmentortrue是否使用背景分割

centerpoint配置:

modules/perception/lidar_detection/data/center_point_param.pb.txt

参数类型参数名默认值含义
ModelInfoinfo/模型通用配置
PointCloudPreProcesspreprocess/预处理
PointCloudPostProcesspostprocess/后处理
int32point2box_max_num5每个点最多可以属于多少个box
floatquantize0.2将尺寸量化为quantize的倍数

包列表

分类包名
perceptionperception-lidar-detection

lidar_detection_filter模块

background_filter配置:

modules/perception/lidar_detection_filter/data/background_filter.pb.txt

参数类型参数名默认值含义
floatoutside_roi_filter_distance1.0在车道线之外的距离阈值

roi_boundary_filter配置:

modules/perception/lidar_detection_filter/data/roi_boundary_filter.pb.txt

参数类型参数名默认值含义
floatdistance_to_boundary_threshold2.5障碍物在车道线外时,距离车道线边界的阈值,大于该阈值则被删除
floatconfidence_threshold0.0目标置信度阈值
floatcross_roi_threshold0.6目标是否在roi交界处的阈值
floatinside_threshold-1.0障碍物在车道线内时,距离车道线边界的阈值,小于该阈值则被删除

包列表

分类包名
perceptionperception-lidar-detection-filter

pointcloud_map_base_roi模块

hdmap_roi_filter配置:

modules/perception/pointcloud_map_based_roi/data/hdmap_roi_filter.pb.txt

参数类型参数名默认值含义
floatrange120.0基于LiDAR传感器点的2D网格ROI LUT的图层范围
floatcell_size0.25用于量化2D网格的单元格的大小。
floatextend_dist2.5从多边形边界扩展ROI的距离。
boolno_edge_tablefalse是否有edge table
boolset_roi_servicetrue是否设置ROI Service

map_manager配置:

modules/perception/pointcloud_map_based_roi/data/map_manager.pb.txt

参数类型参数名默认值含义
boolupdate_posefalse是否更新lidar到世界坐标系的位姿
floatroi_search_distance120.0ROI搜索的范围

包列表

分类包名
perceptionperception-pointcloud-map-based-roi

pointcloud_preprocess模块

pointcloud_preprocessor配置:

modules/perception/pointcloud_preprocess/data/pointcloud_preprocessor.pb.txt

参数类型参数名默认值含义
boolfilter_naninf_pointstrue是否过滤nan点
boolfilter_nearby_box_pointsfalse是否过滤nearby box的点
floatbox_forward_x0主车imu到右侧宽度
floatbox_backward_x0主车imu到左侧宽度
floatbox_forward_y0主车imu到前方距离度
floatbox_backward_y0主车imu到后方距离
boolfilter_high_z_pointsfalse是否过滤高度方向的z坐标
floatz_threshold5高度过滤阈值

包列表

分类包名
perceptionperception-pointcloud-preprocess

pointcloud_ground_detection模块

spatio_temporal_ground_detector配置文件:

modules/perception/pointcloud_ground_detection/data/spatio_temporal_ground_detector.pb.txt

参数类型参数名默认值含义
uint32grid_size16网格size
floatground_thres0.25网格阈值
floatroi_rad_x120.0x方向roi radius
floatroi_rad_y120.0y方向roi radius
floatroi_rad_z100.0z反向roi radius
uint32nr_smooth_iter5smooth迭代次数
booluse_roitrue是否用roi内的点云
booluse_ground_servicetrue是否用ground service

ground_service_detector配置文件:

modules/perception/pointcloud_ground_detection/data/ground_service_detector.pb.txt

参数类型参数名默认值含义
doubleground_threshold0.25地面分割阈值

包列表

分类包名
perceptionperception-pointcloud-ground-detection

lidar_tracking模块

fused_classifer

fused_classifier配置文件:

modules/perception/lidar_tracking/data/fused_classifier/fused_classifier.pb.txt

参数类型参数名默认值含义
floattemporal_window20.0时间窗口
boolenable_temporal_fusiontrue是否开启时间融合
stringone_shot_fusion_methodCCRFOneShotTypeFusionone shot fusion方法
stringsequence_fusion_methodCCRFSequenceTypeFusionsequence fusion方法
booluse_tracked_objectstrue是否使用跟踪的目标

ccrf_type_fusion配置文件:

参数类型参数名默认值含义
stringclassifiers_property_file_pathnull分类属性文件路径
stringtransition_property_file_pathnull转移属性文件路径
floattransition_matrix_alpha1.8转移矩阵alpha参数
tracker

mlf_engine配置文件:

modules/perception/lidar_tracking/data/tracking/mlf_engine.pb.txt

参数类型参数名默认值含义
stringmain_sensor/主传感器
booluse_histogram_for_matchtrue是否用histogram用来做匹配
uint32histogram_bin_size10histogram的大小
booloutput_predict_objectsfalse是否输出预测目标
doublereserved_invisible_time0.2保留不可见时间
booluse_frame_timestampfalse是否用frame时间戳

mlf_track_object_matcher配置文件:

modules/perception/lidar_tracking/data/tracking/mlf_track_object_matcher.conf

参数类型参数名默认值含义
stringforeground_mathcer_methodMultiHmBipartiteGraphMatcher前景目标匹配方法
stringbackground_matcher_methodGnnBipartiteGraphMatcher背景目标匹配方法
floatbound_value100.0边界值
floatmax_match_distance4.0最大匹配距离

mlf_track_object_distance配置文件:

modules/perception/lidar_tracking/data/tracking/mlf_track_object_distance.conf

参数类型参数名默认值含义
stringsensor_name_pairnull传感器名称pair
floatlocation_dist_weight0位置距离权重
floatdirection_dist_weight0方向距离权重
floatbbox_size_dist_weight0bbox大小距离权重
floatpoint_num_dist_weight0目标点云数量距离权重
floathistogram_dist_weight0统计直方图距离权重
floatcentroid_shift_dist_weight0中心点偏移距离权重
floatbbox_iou_dist_weight0bbox iou距离权重
floatsemantic_map_dist_weight0语义图距离权重

mlf_tracker配置文件:

modules/perception/lidar_tracking/data/tracking/mlf_tracker.conf

参数类型参数名默认值含义
stringfilter_name/filter名称

mlf_motion_filter配置文件:

modules/perception/lidar_tracking/data/tracking/mlf_motion_filter.conf

参数类型参数名默认值含义
booluse_adaptivetrue是否用自适应方法
booluse_breakdowntrue是否使用breakdown
booluse_convergence_boostuptrue是否用收敛启动
doubleinit_velocity_variance5.0速度方差初始参数
doubleinit_acceleration_variance10.0加速度方差初始参数
doublemeasured_velocity_variance0.4速度方差测量参数
doublepredict_variance_per_sqrsec1.0预测方差参数
uint32boostup_history_size_minimum3历史最小值初始化参数
uint32boostup_history_size_maximum6历史最大值初始化参数
doubleconverged_confidence_minimum0.5最小收敛置信度参数
doublenoise_maximum0.1最大噪声参数
doubletrust_orientation_range40方向范围信任参数

mlf_motion_refiner配置文件:

modules/perception/lidar_tracking/data/tracking/mlf_motion_refiner.conf

参数类型参数名默认值含义
doubleclaping_acceleration_threshold10.0加速度截断阈值
doubleclaping_speed_threshold1.0速度截断阈值

mlf_shape_filter配置文件:

modules/perception/lidar_tracking/data/tracking/mlf_shape_filter.conf

参数类型参数名默认值含义
doublebottom_points_ignore_threshold0.1底部点云忽略阈值
doubletop_points_ignore_threshold1.6顶部点云忽略阈值

包列表

分类包名
perceptionperception-lidar-tracking

融合模块概述

融合模块是Apollo自动驾驶系统的重要组成部分,本质为多源数据下的多目标跟踪问题,将车端搭载的多种传感器的障碍物检测跟踪结果作为观测,再次进行跟踪和融合,并将最终的障碍物检测跟踪结果输出。融合模块弥补了单一传感器的FOV缺陷,有效结合了不同传感器的优点特性,提供了更高精度和信息更为丰富的障碍物感知结果。 融合模块大体分为以下几步:

  • 对输入的各传感器跟踪的障碍物信息进行统一的结构转换;

  • 对转化后的各传感器跟踪的障碍物信息与历史track信息进行匹配

    • 对于匹配上的历史track,根据输入的观测,进行各属性(如类别、中心点、尺寸、存在概率等)的融合更新

    • 对于没有匹配上的历史track,单纯进行预测,将各属性预测至当前时间下

    • 对于没有匹配上的传感器障碍物信息,根据特定条件新建track,加入到历史track中,并初始化各属性信息

  • 根据各属性信息,分别判断所有的历史track是否满足预设的门限条件,选择输出或不输出

  • 根据时间信息,删除超过一定时间的历史track

Channel + 消息格式

通道名称消息格式备注
输入通道/perception/inner/PrefusedObjects感知common中定义的SensorFrameMessage类每个传感器通过消息里的sensor_name区分
输出通道/apollo/perception/obstaclesPerceptionObstacles对外发布
输出通道/perception/inner/visualization/FusedObjects感知common中定义的SensorFrameMessage类用于后续的可视化,暂时没用

参数介绍

融合模块算法配置文件为 multi_sensor_fusion/conf/multi_sensor_fusion_config.pb.txt , 各参数含义如下

参数类型参数名默认值含义
PluginParamfusion_param/融合模块使用的融合方法名称和配置路径
boolobject_in_roi_checktrue是否进行障碍物在roi区域内的检查(实际未使用)
doubleradius_for_roi_object_check120以主车为原点,读取高精地图ROI区域的搜索半径(实际未使用)
stringoutput_obstacles_channel_name/apollo/perception/obstacles融合模块最终对外发布输出的通道名称
stringoutput_viz_fused_content_channel_name/perception/inner/visualization/FusedObjects融合模块用于后续可视化的通道名称(未使用)

根据 fusion_param 获取到的方法名称为 ProbabilisticFusion , 配置文件 probablistic_fusion.pb.txt 各参数含义如下

参数类型参数名默认值含义
booluse_lidartrue是否使用激光雷达检测跟踪结果
booluse_radartrue是否使用毫米波雷达检测跟踪结果
booluse_cameratrue是否使用相机检测跟踪结果
PluginParamtrack_param/定义历史track的名称和配置文件路径
PluginParamdata_association_paramHMTrackersObjectsAssociation使用的数据关联算法名称【没有相关配置文件】
PluginParamgatekeeper_param/定义门限条件判断的名称和配置文件路径
stringprohibition_sensorsradar_frontrepeated字段,可指定多个;不允许该传感器新建历史track
doublemax_lidar_invisible_period0.25超过特定时间没有更新就删除激光雷达观测
doublemax_radar_invisible_period0.50超过特定时间没有更新就删除毫米波雷达观测
doublemax_camera_invisible_period0.75超过特定时间没有更新就删除相机观测
intmax_cached_frame_num50

根据 track_param 获取到的方法名称为 PbfTrack , 配置文件 pbf_tracker.pb.txt 各参数含义如下

参数类型参数名默认值含义
PluginParamtype_fusion_param/类别融合方法名称和配置文件路径
PluginParammotion_fusion_paramKalmanMotionFusion运动融合(含速度、加速度信息)方法名称
PluginParamshape_fusion_paramPbfShapeFusion形状融合(含尺寸、方向、polygon、中心点)方法名称
PluginParamexistance_fusion_params/存在概率融合方法名称和配置文件路径

根据 type_fusion_param 获取到的方法名称为 DstTypeFusion , 配置文件 dst_type_fusion.pb.txt 各参数含义如下

参数类型参数名默认值含义
CameraDstTypeFusionParamcamera_params::name两个相机名称为front_6mm和front_12mm相机的sensor_name
camera_params::valid_dist6/12mm分别对应110m和150mlidar/radar向相机投影设置的最大距离,超过此值,距离得分会减小
camera_params::reliability6/12mm分别对应0.95和0.5历史track匹配上时,单帧检测概率分布的置信度权重
camera_params::reliability_for_unknown6/12mm分别对应0.2和0.2未匹配上时,预测的单帧检测概率分布的置信度权重
LidarDstTypeFusionParamlidar_params::name激光雷达名称为velodyne64激光雷达的sensor_name
lidar_params::reliability0.5历史track匹配上时,单帧检测概率分布的置信度权重
lidar_params::reliability_for_unknown0.5未匹配上时,预测的单帧检测概率分布的置信度权重

根据 existance_fusion_params 获取到的方法名称为 DstExistanceFusion , 配置文件 dst_existance_fusion.pb.txt 各参数含义如下

参数类型参数名默认值含义
doubletrack_object_max_match_distance4.0在相机匹配到历史track时,根据匹配距离与该值的比例赋值DST属性概率
CameraValidDistcamera_valid_dist::camera_name两个相机名称为front_6mm和front_12mm相机的sensor_name
camera_valid_dist::valid_dist6/12mm分别对应110m和150mlidar/radar向相机投影设置的最大距离,超过此值,距离得分会减小

根据 gatekeeper_param 获取到的方法名称为 PbfGatekeeper , 配置文件 pbf_gatekeeper.pb.txt 各参数含义如下

参数类型参数名默认值含义
boolpublish_if_has_lidartrue有激光雷达检测是否输出
boolpublish_if_has_radartrue有毫米波雷达检测是否输出
boolpublish_if_has_cameratrue有相机雷达检测是否输出
booluse_camera_3dtrue是否使用相机的3d信息
doublemin_radar_confident_distance40毫米波检测可信的最小检测距离
doublemax_radar_confident_angle20毫米波检测可信的最大检测角度
doublemin_camera_publish_distance50非锥桶条件下,相机的最小输出距离
doubleinvisible_period_threshold0.001【没有使用】
doubletoic_threshold0.8该track的toic置信度阈值
booluse_track_time_pub_strategytrue是否使用跟踪时间的输出策略
intpub_track_time_thresh3跟踪帧数小于该值,不输出
doubleexistance_threshold0.7在锥桶或者相机超过最小输出距离的前提下,该track存在概率大于该值才可输出
doubleradar_existance_threshold0.9后毫米波雷达,该track存在概率大于该值才可输出

包列表

包名
perception-multi-sensor-fusion