Skip to content

Two-segment penprobe lookup demo: run on servo_only-derived maps#5

Merged
jacklange22 merged 1 commit into
mainfrom
feat/two-seg-penprobe-lookup-demo
May 29, 2026
Merged

Two-segment penprobe lookup demo: run on servo_only-derived maps#5
jacklange22 merged 1 commit into
mainfrom
feat/two-seg-penprobe-lookup-demo

Conversation

@jacklange22
Copy link
Copy Markdown
Owner

Summary

  • Makes the two-segment penprobe chasing demo runnable on a workspace lookup map built from the big servo_only dataset (which never recorded a physical_assembly).
  • Distinguishes an unknown (empty) map bottom/top assignment from a genuine conflict: unknown is allowed via allow_unknown_map_assembly (demo default on, mirrors allow_unknown_map_tip_tool); a real conflicting assignment still hard-blocks. Servo-ID match, per-servo tick envelope, nearest-distance hard stop, and current limits are unchanged; a loud warning is recorded into the run.
  • GUI (TwoSegmentPenprobeLookupDemoPage): "Use Latest Built Map" + "Browse…" buttons, a CLI build hint, and an "allow unknown bottom/top assignment" checkbox.
  • Adds the lookup + penprobe-demo test files to scripts/run_tests.sh two-segment so they run in the bench-day net.

Verified end-to-end against a real 2493-point map built from 20260526_235950_two_segment_collect_pose_command_dataset.

Test plan

  • test_two_segment_penprobe_lookup_demo.py + test_two_segment_workspace_lookup.py — 41 pass on top of main #4
  • controller unknown-vs-conflict matrix; demo runs on / blocks unknown-assembly map; GUI page-construction test
  • two-segment (267) + quick (126) green pre-merge

🤖 Generated with Claude Code

…ed maps

The two-segment penprobe chasing demo could not run on a map built from the
big collected dataset: that dataset is servo_only and never recorded a
physical_assembly, so the built map carries empty bottom/top segment keys.
The controller's check_compatibility() treated empty keys as a *mismatch*
against the live bench (segment_b/segment_a), blocking the demo in precheck.

Distinguish an UNKNOWN (empty) map assembly from a genuine CONFLICT:
- Controller (two_segment_lookup_controller.py): add
  LookupControllerConfig.allow_unknown_map_assembly (default False = strict).
  check_compatibility() now reports bottom/top_segment_key_unknown_in_map for
  an empty map assignment (relaxable via the flag) while a present-but-different
  assignment still hard-blocks as ..._mismatch. Add map_assembly_is_unknown.
- Demo experiment (two_segment_penprobe_lookup_demo.py): add
  allow_unknown_map_assembly (default True, mirrors allow_unknown_map_tip_tool),
  thread it into the controller, and record a loud map_assembly_unknown warning
  + flags into the run metrics. A genuine conflict is still blocked; servo IDs,
  per-servo tick envelope, nearest-distance hard stop and current limits are
  unchanged.

GUI (TwoSegmentPenprobeLookupDemoPage): add "Use Latest Built Map" + "Browse…"
buttons (scan data/experiments/two_segment_workspace_lookup_maps/), a CLI
build hint, and an "Allow unknown bottom/top assignment" checkbox so the demo
is operable without hand-editing the map path.

Verified end-to-end against a real map built from
20260526_235950_two_segment_collect_pose_command_dataset (2493 points): the
demo runs, issues commands for on-manifold targets, and records the warning.

Tests: controller unknown-vs-conflict matrix, demo runs on an unknown-assembly
map (and blocks when opted out), and a GUI page-construction test. Also add the
lookup + penprobe-demo test files to scripts/run_tests.sh two-segment so they
run in the bench-day net (267 pass). quick (126) and hardware-safe green.

Note: pre-existing unrelated failure test_shipped_system_yaml_carries_slowdown_profile
expects default_profile_velocity>=5 but the operator set it to 3; untouched here.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jacklange22 jacklange22 merged commit 7e41358 into main May 29, 2026
1 check failed
@jacklange22 jacklange22 deleted the feat/two-seg-penprobe-lookup-demo branch May 29, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant