Skip to content

v1: PreciseFlexArmBackend: classify the arm's reach (standard / extended / unknown) from controller link lengths#1098

Merged
BioCam merged 1 commit into
PyLabRobot:v1b1from
BioCam:brooks-pf400-classify-arm-reach
Jun 22, 2026
Merged

v1: PreciseFlexArmBackend: classify the arm's reach (standard / extended / unknown) from controller link lengths#1098
BioCam merged 1 commit into
PyLabRobot:v1b1from
BioCam:brooks-pf400-classify-arm-reach

Conversation

@BioCam

@BioCam BioCam commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Adds a private _classify_pf400_reach((l1, l2)) helper that classifies a PreciseFlex arm's controller-read link lengths against the two known PF400 configurations - standard (225 / 210 mm) and extended (302 / 289 mm) - returning "standard", "extended", or "unknown". PreciseFlexConfiguration.reach_class is now derived from it, and setup logs a warning when the link lengths match neither known arm (a sign the arm's device-stored link lengths may have been changed).

  • The two known link duos live in one place as the single source of truth (ARM_LINKS_STANDARD, ARM_LINKS_EXTENDED), per the PF400 System Dimensions (drawing 615287); PF400Params link defaults now reference the extended (XR) pair.
  • Match tolerance is 5 mm per link; the two configurations are ~77 mm apart, so they never overlap.
  • reach_class previously used an inline l1 + l2 >= 513 threshold that could only return "standard" or "extended"; it now also reports "unknown" and warns, surfacing a mismatched / tampered geometry instead of silently guessing.

Backward compatible: reach_class keeps its "standard" / "extended" values and adds "unknown"; its default is "extended", matching the default PF400Params (the extended/XR link lengths). No call sites change.

Tests: _classify_pf400_reach over standard, extended, within-tolerance, and unmatched link lengths.

No new device I/O - it classifies the link lengths already read from the controller at setup.

🤖 Generated with Claude Code

…ended / unknown) from controller link lengths

Adds a private `_classify_pf400_reach((l1, l2))` that classifies a PreciseFlex arm's controller-read
link lengths against the two known PF400 configs - standard (225/210 mm) and extended (302/289 mm) -
returning "standard", "extended", or "unknown". `PreciseFlexConfiguration.reach_class` is derived
from it (`ARM_LINKS_STANDARD`/`ARM_LINKS_EXTENDED` as the single source of truth, 5 mm match
tolerance), and setup warns when the lengths match neither known arm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@BioCam BioCam requested a review from rickwierenga June 22, 2026 10:14
@BioCam BioCam merged commit b46a2ae into PyLabRobot:v1b1 Jun 22, 2026
1 of 19 checks passed
@BioCam BioCam deleted the brooks-pf400-classify-arm-reach branch June 22, 2026 10:25
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