Files
Mirko HollerandClaude Sonnet 5 1778c5e029 feat(vision): add detect_aruco_markers(), pivot gripper localization to fiducials
Resolved this session's open question directly: get_2 (pin fully seated) has
no notch at all -- it's not a detection failure, the gap physically closes.
The outer-silhouette alternative doesn't help either, since it hits the same
background-bleed/glow-bridging problems independent of pin state.

Decision (Mirko has no time to iterate on physical hardware, so this needs to
be right the first time): add ArUco fiducial markers to the gripper instead of
continuing to try to recognize the gripper itself. Chosen over hand-drawn dots
specifically because dots need custom, unverified geometry-decoding code and
have no protection against false triggers from scratches/glare of similar
size/spacing -- ArUco tags decode to a specific id via an already-implemented,
long-established algorithm, so a scratch essentially never spoofs one, and
detection gives position+rotation+scale directly from the corners.

detect_aruco_markers(image, dictionary_name="DICT_4X4_50") -> list[ArucoDetection]
is a new, generic Layer 0 primitive (doesn't know about "gripper"/"jaw" --
that mapping is Layer 1/2, once real marked captures exist to calibrate
against). Tested against synthetically generated markers (single marker,
distinguishing two by id, unknown-dictionary error, empty-image case) since
there's no real gripper photo with fiducials mounted yet.

Chosen spec recorded in GRIPPER_LOCALIZATION_PLAN.md: DICT_4X4_50, id 0 = left
jaw, id 1 = right jaw, printed as large as each jaw's flat face allows, matte
material, mounted flat with a white quiet-zone margin. Marker images were
generated and round-trip-verified this session (including after aggressive
downscale+blur) before handing them off for printing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015fDXnPuNvm3qUsUb4V4Gfo
2026-09-08 11:13:58 -03:00
..
2026-06-24 12:55:32 +02:00