feat: pass scan intensities to the matcher and load the tape profile keys

The tape gate reads intensity by ray index, so it is only correct when the
intensity array and the ranges array come from the same scan and have the same
length. The handler hands scan->intensities straight across - not rebuilt, not
buffered, not remembered from an earlier scan.

That is a joint, and joints are what the unit tests below cannot see, so it has
its own coverage: ATapeProfileOnAScanWithoutIntensitiesSaysWhy feeds the exact
plate being looked for on a scan that carries no intensities and requires the
handler to say "no intensity data". A handler that passed a fabricated array
would never produce that line.

One log line per action run, on the first detection that matches, and only when
the tape check is on: how many bright rays each wing returned, the measured
spacing and widths, each against the profile value and tolerance. This is the
number whoever installs a dock needs - tape stuck a few centimetres off still
detects today and then fails outright once it is dusty or damp, and without
this line nobody knows it was already at the edge. Once, because it is a
commissioning number and not a heartbeat.
This commit is contained in:
2026-08-26 16:46:46 +07:00
parent 633291054b
commit 487396a491
4 changed files with 193 additions and 8 deletions

View File

@@ -50,6 +50,24 @@ actions_dock:
min_confidence: 0.3
offset_x: 0.50
# Cùng hình với v_std, khác đúng một chuyện: bắt buộc thấy dải phản quang.
v_tape:
pattern: v
vertex_angle: 1.5708 # [rad]
wing_length: 0.30 # [m]
angle_tolerance: 0.20 # [rad]
length_tolerance: 0.06 # [m]
vertex_gap: 0.05 # [m]
min_wing_points: 5
min_confidence: 0.3
offset_x: 0.60 # [m] lùi ra trước mặt sạc, giống v_std
tape_enabled: true
tape_spacing: 0.2121 # [m] hai dải ở giữa hai cánh 0.30 m của tấm mở 90 độ
tape_width: 0.12 # [m]
tape_spacing_tolerance: 0.04
tape_width_tolerance: 0.05
tape_min_intensity: 500.0
# scan_topic không có trong kho -> phải từ chối LÚC BOOT kèm danh sách topic có thật.
actions_dock_bad_topic:
handlers: