Files
massive-cloud/alg/train_measurement_system_v3.2_0629/config/measurements.yaml

538 lines
15 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 列车测量任务配置文件 - 使用原始点云(未配准)
# 测试所有任务在原始点云上的表现
# 点云文件路径
pointcloud_file: "/home/suzhe/pcc/train_models/train_2_1T.ply"
# ROI提取配置 - 使用优化Grid索引
roi_extraction:
method: "grid" # 使用Grid网格索引
use_optimized: true # 使用优化版(numpy向量化,快75倍)
grid_size: 100.0 # 网格大小100mm
# 性能预期:
# - 索引构建: 223秒 (一次性)
# - ROI提取: 0.19秒/任务 (vs Linear的14秒/任务)
# - 20任务总时间: ~12分钟 (vs Linear的13分钟)
# - 提升: 约7% (1分钟)
# 测量任务列表
tasks:
- name: "任务21_侧门高度"
type: "line_to_plane" # TODO: 改为 line_to_line
enabled: true
description: "测量侧门顶部边缘线到底部边缘线的距离"
#2176.7 - 2176.4
theoretical_dimension: 2176.4
tolerance:
upper: 4
lower: 1
# 源边缘线ROI(侧门顶部边缘)
source_roi:
line_start: [-2460, 3356.43, -1511.26]
line_end: [-1821.05, 3356.43, -1511.26]
# 目标边缘线ROI(侧门底部边缘)
target_roi:
bbox_min: [-2500, 1177, -1621]
bbox_max: [-1500, 1183, -1500]
params:
sample_points: 100
ransac_threshold: 2.0
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
roi_distance_threshold: 0.02 # 精筛选距离阈值(mm)
- name: "任务2_车体长度"
type: "plane_to_plane"
enabled: true
description: "测量车体前后端面的距离"
theoretical_dimension: 26507 # 理论尺寸
tolerance: 10
# visualization_dir: "visualizations_0617"
source_roi:
bbox_min: [-14009, 1500, -900]
bbox_max: [-14005, 1700, 900]
target_roi:
bbox_min: [12497, 1070, -1300]
bbox_max: [12503, 1160, 1300]
params:
sample_points: 100
ransac_threshold: 0.1
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
- name: "任务43_窗口下沿高度"
type: "line_to_plane" # TODO: 改为 line_to_plane
enabled: true
description: "测量窗口下沿边缘线到地面的距离"
theoretical_dimension: 803
tolerance:
upper: 6.5
lower: -4
# 源边缘线ROI(窗口下沿边缘)
source_roi:
line_start: [933.37,1983,-1676.62]
line_end: [2114.6,1983,-1676.62]
# 目标平面ROI(地面)
target_roi:
bbox_min: [-10222, 1179, -302]
bbox_max: [12428, 1181, 302]
params:
sample_points: 100
ransac_threshold: 0.5
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
roi_distance_threshold: 0.02 # 精筛选距离阈值(mm)
- name: "任务44_车顶高度"
type: "plane_to_plane"
enabled: true
description: "测量车顶到地面的距离"
theoretical_dimension: 2800 # 理论尺寸
tolerance:
upper: 7
lower: -1 # 公差 ±3mm
source_roi:
bbox_min: [2000, 3979, -14]
bbox_max: [5000, 3981, 14]
target_roi:
bbox_min: [100, 1177, -1510]
bbox_max: [11000, 1183, -1420]
params:
sample_points: 100
ransac_threshold: 0.1
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
# - name: "任务3_边梁立面6点到z=0平面距离"
# type: "point_to_plane"
# enabled: false
# description: "测量边梁立面6个精确点到z=0平面的距离"
# mode: "exact_points"
# theoretical_dimension: 1445 # 理论尺寸
# tolerance:
# upper: 0
# lower: -2 # 公差 ±3mm
# # 目标点坐标(左右各3个点)
# target_points:
# - [-753.5, 1052.5, -1445]
# - [-753.5, 1052.5, 1445]
# - [3446.5, 1053, -1445]
# - [3446.5, 1053, 1445]
# - [8146.5, 1053, -1445]
# - [8146.5, 1053, 1445]
# # 平面参数 (ax + by + cz + d = 0),z=0即c=1, d=0
# plane:
# a: 0
# b: 0
# c: 1
# d: 0
# # 最近点搜索半径(mm)
# search_radius: 10.0
- name: "任务15_侧墙z最大值点到z=0平面距离"
type: "point_to_plane"
enabled: true
description: "从两个包围盒提取侧墙点云,选取z绝对值最大的10个点,计算到z=0平面的距离"
mode: "bbox_filtered"
theoretical_dimension: 1680 # 理论尺寸
tolerance:
upper: -2
lower: -6 # 公差 ±3mm
# 包围盒列表
bboxes:
- name: "左侧墙"
min: [-1468, 1899, -1680]
max: [12300, 1901, -1677]
- name: "右侧墙"
min: [-1468, 1899, 1677]
max: [12300, 1901, 1680]
# 过滤条件
filter:
type: "max_abs_coordinate"
axis: "z"
top_n: 10
# 平面参数 (z=0)
plane:
a: 0
b: 0
c: 1
d: 0
# - name: "任务4_纵向梁距离"
# type: "point_to_point"
# enabled: true
# description: "测量关于z=0对称的点对之间的距离(纵向梁)"
# theoretical_dimension: 2890 # 理论尺寸
# tolerance:
# upper: 0
# lower: -4 # 公差 ±3mm
# # 点对配置(使用任务3的6个点,配对测量)
# point_pairs:
# - name: "前端点对"
# point1: [-753.5, 1052.5, -1445]
# point2: [-753.5, 1052.5, 1445]
# - name: "中间点对"
# point1: [3446.5, 1053, -1445]
# point2: [3446.5, 1053, 1445]
# - name: "后端点对"
# point1: [8146.5, 1053, -1445]
# point2: [8146.5, 1053, 1445]
# # 最近点搜索半径(mm)
# search_radius: 10.0
- name: "任务1_转向架距离"
type: "point_to_point + hole_center"
enabled: true
description: "测量两对定位孔的x距离,作为转向架间距离"
theoretical_dimension: 17800
tolerance: 2
boxes:
- name: "左前"
min: [-8944,1020,-1507]
max: [-8846,1040,-1401]
- name: "右前"
min: [-8947,1020,1400]
max: [-8847,1040,1507]
- name: "左后"
min: [8850,1020,-1551]
max: [8955,1040,-1450]
- name: "右后"
min: [8850,1020,1450]
max: [8950,1040,1552]
# - name: "任务6_转向架未加工支撑面到参考线距离"
# type: "plane_to_plane + 4_hole_center"
# enabled: false
# description: "四个孔定位参考线平面,转向架支撑面用ROI框定"
# theoretical_dimension: 65
# tolerance:
# upper: 8.5
# lower: -3
# visualization_dir: "visualizations_0617"
# boxes:
# - name: "左上孔"
# min: [11631,1010,155]
# max: [11674,1055,210]
# - name: "右上孔"
# min: [11631,1010,-210]
# max: [11674,1055,-155]
# - name: "左下孔"
# min: [11631,812,155]
# max: [11674,857,205]
# - name: "右下孔"
# min: [11631,812,-205]
# max: [11674,857,-155]
# - name: "左加工面"
# min: [-9189,998,1405]
# max: [-8993,1002,1501]
# - name: "右加工面"
# min: [-9191,998,-1500]
# max: [-8990,1002,-1410]
# params:
# sample_points: 100
# ransac_threshold: 0.1
# ransac_max_iterations: 1000
# min_inlier_ratio: 0.6
- name: "任务7_边梁下平面到参考线的距离"
type: "plane_to_plane + 4_hole_center"
enabled: true
description: "四个孔定位参考平面,边梁下平面用ROI指定"
theoretical_dimension: 85
tolerance:
upper: 8.5
lower: -3
# visualization_dir: "visualizations_0617"
boxes:
- name: "左上孔"
min: [11631,1015,159]
max: [11674,1050,206]
- name: "右上孔"
min: [11631,1015,-201]
max: [11674,1050,-157]
- name: "左下孔"
min: [11631,817,160]
max: [11674,852,200]
- name: "右下孔"
min: [11631,817,-200]
max: [11674,852,-160]
- name: "左平面"
min: [8847,1017,-1629]
max: [8876,1023,-1548]
- name: "右平面"
min: [8862,1017,1593]
max: [8944,1023,1624]
params:
sample_points: 100
ransac_threshold: 0.1
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
- name: "任务18_门口宽度"
type: "plane_to_plane"
enabled: true
description: "乘客门口宽度"
theoretical_dimension: 1070 # 理论尺寸
tolerance:
upper: 3
lower: 0
# 源平面(采样点的来源)
source_roi:
bbox_min: [-2552, 1390, 1402]
bbox_max: [-2551, 3080, 1577]
# 目标平面(测量距离的目标)
target_roi:
bbox_min: [-1482, 1400, 1513]
bbox_max: [-1481, 3120, 1591]
params:
sample_points: 100
ransac_threshold: 0.1
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
check_width_variation: true # 启用宽度差值检查(任务19)
width_variation_tolerance: 2.0 # 差值公差 ±2mm
- name: "任务28_端门口宽度"
type: "plane_to_plane"
description: "后部门口宽度"
theoretical_dimension: 900 # 理论尺寸
tolerance:
upper: 2
lower: 0
# 源平面(采样点的来源)
source_roi:
bbox_min: [12428, 1244, -451]
bbox_max: [12480, 3070, -449]
# 目标平面(测量距离的目标)
target_roi:
bbox_min: [12428, 1278, 449]
bbox_max: [12480, 3090, 451]
params:
sample_points: 100
ransac_threshold: 0.1
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
- name: "任务29_端门口高度"
type: "plane_to_plane"
description: "后部门口高度"
theoretical_dimension: 2050 # 理论尺寸
tolerance:
upper: 5
lower: 0
# 源平面(采样点的来源)
source_roi:
bbox_min: [12424, 3229, -330]
bbox_max: [12486, 3231, 330]
# 目标平面(测量距离的目标)
target_roi:
bbox_min: [12440, 1179, -440]
bbox_max: [12490, 1181, 440]
params:
sample_points: 100
ransac_threshold: 0.05
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
- name: "任务32_司机室登车门门口宽度"
type: "line_to_line" # TODO: 改为 line_to_line
enabled: true
description: "司机室门口宽度(左右两条边缘线之间的距离)"
# 566 - 566.6
theoretical_dimension: 566.6
tolerance:
upper: 3
lower: 0
# 源边缘线ROI(门口左侧边缘)
source_roi:
line_start: [-8177.85,1650.33,-1541.48]
line_end: [-8177.85,2448.88,-1499.63]
# 目标边缘线ROI(门口右侧边缘)
target_roi:
line_start: [-8744.48,1727.71,-1537.42]
line_end: [-8744.48,2421.28,-1501.08]
params:
sample_points: 100
ransac_threshold: 2.0
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
roi_distance_threshold: 0.02 # 精筛选距离阈值(mm)
- name: "任务33_司机室登车门门口高度"
type: "line_to_line" # TODO: 改为 line_to_line
enabled: true
description: "司机室门口高度(上下两条边缘线之间的距离)"
# 1687 - 1687.1
theoretical_dimension: 1687.1
tolerance:
upper: 3
lower: 0
# 源边缘线ROI(门口上边缘)
source_roi:
line_start: [-8630.24,2994.7,-1467.83]
line_end: [-8280.89,2994.7,-1467.83]
# 目标边缘线ROI(门口下边缘)
target_roi:
line_start: [-8625.48,1309.87,-1555.36]
line_end: [-8301.7,1309.87,-1555.36]
params:
sample_points: 100
ransac_threshold: 2.0
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
roi_distance_threshold: 0.02 # 精筛选距离阈值(mm)
# - name: "任务14_侧墙相对纵梁的角度位置"
# type: "point_to_plane"
# description: "包围盒提取窗口上沿,选取z绝对值最大的10个点,计算到z=1445平面的距离"
# mode: "bbox_filtered"
# theoretical_dimension: 179.3 # 理论尺寸
# tolerance:
# upper: 2
# lower: -4 # 公差 ±3mm
# # 包围盒列表
# bboxes:
# - name: "左窗口上沿"
# min: [1136, 2700, 1620]
# max: [1713, 2745, 1630]
# # 过滤条件
# filter:
# type: "max_abs_coordinate"
# axis: "z"
# top_n: 10
# # 平面参数 (z=0)
# plane:
# a: 0
# b: 0
# c: 1
# d: -1445
- name: "任务30_参考线到司机室辅助孔距离"
type: "point_to_plane + 4_hole_center + 1_hole_center"
enabled: true
description: "4孔定参考线平面,1孔定辅助孔位置,点到面"
theoretical_dimension: 308.5
tolerance: 2
boxes:
- name: "左上孔"
min: [11631,1015,159]
max: [11674,1050,206]
- name: "右上孔"
min: [11631,1015,-201]
max: [11674,1050,-157]
- name: "左下孔"
min: [11631,817,160]
max: [11674,852,200]
- name: "右下孔"
min: [11631,817,-200]
max: [11674,852,-160]
- name: "辅助孔"
min: [-13308, 620, -5]
max: [-13296, 630, 5]
- name: "任务16_车体最大宽度"
type: "point_to_point"
enabled: true
description: "从两个包围盒提取侧墙点云,选取z绝对值最大的10个点,他们z距离之差"
mode: "bbox_filtered"
theoretical_dimension: 3360
tolerance:
upper: -4
lower: -10
# 包围盒列表
bboxes:
- name: "左侧墙"
min: [-1468, 1890, -1680]
max: [12300, 1910, -1677]
- name: "右侧墙"
min: [-1468, 1890, 1677]
max: [12300, 1900, 1680]
# 过滤条件
filter:
type: "max_abs_coordinate"
axis: "z"
top_n: 10
- name: "任务47_内端墙门口高"
type: "plane_to_plane"
enabled: true
description: "车体内部神秘横梁高度"
theoretical_dimension: 2200
tolerance:
upper: 2
lower: 0
# 源平面(采样点的来源)
source_roi:
bbox_min: [-98, 3379, -1000]
bbox_max: [-77, 3381, 1000]
# 目标平面(测量距离的目标)
target_roi:
bbox_min: [-1000, 1179, -300]
bbox_max: [1000, 1181, 300]
params:
sample_points: 100
ransac_threshold: 0.1
ransac_max_iterations: 1000
min_inlier_ratio: 0.6
- name: "任务46_车体横断面对角线差值"
type: "point_to_point"
enabled: true
description: "对角线距离作差"
theoretical_dimension: 0 # 理论差值为0
tolerance: 0.1
# visualization_dir: "visualizations"
mode: "exact_points"
# 定义两条对角线的点对
point_pairs:
- name: "对角线1"
point1: [3500, 1180, 1541.42] # 左下角
point2: [3500, 2961.83, -1543.02] # 右上角
- name: "对角线2"
point1: [3500, 1180, -1541.42] # 右下角
point2: [3500, 2961.85, 1543.02] # 左上角
# 查找最近点的搜索半径(mm)
search_radius: 10.0
# 差值比较配置
compare_mode: "difference" # 启用差值比较模式
compare_pairs: [0, 1] # 比较对角线1和对角线2的距离
difference_tolerance: 0.1 # 差值阈值:2mm