Skip to content

Add arms module with Arm/GripperArm hierarchy, Brooks and iSWAP backends#957

Open
rickwierenga wants to merge 12 commits intov1b1from
arms-module
Open

Add arms module with Arm/GripperArm hierarchy, Brooks and iSWAP backends#957
rickwierenga wants to merge 12 commits intov1b1from
arms-module

Conversation

@rickwierenga
Copy link
Member

Summary

  • Add pylabrobot/arms/ module with Arm, OrientableArm, JointArm device classes and GripperArmBackend, _BaseArmBackend, CanFreedrive backend hierarchy
  • Add pylabrobot/brooks/ vendor module with PreciseFlexBackend implementing JointGripperArmBackend
  • Add pylabrobot/hamilton/liquid_handlers/star/core.py (CoreGripper) and iswap.py (iSWAP) backends
  • Legacy PreciseFlexBackend delegates to new Brooks module
  • Legacy STAR_backend grip/iSWAP operations delegate to new backends
  • CanGrip mixin separates gripper-specific methods from base arm operations
  • Uses backend_params pattern for vendor-specific parameters

Cherry-picked from capability-architecture branch (commits c4a1dc69c, b91036bb0).

Test plan

  • All 23 arm tests pass
  • All imports verified (arms, brooks, hamilton core/iswap)
  • Pre-commit hooks pass (ruff format, ruff check, typos)
  • CI tests pass

🤖 Generated with Claude Code

rickwierenga and others added 2 commits March 23, 2026 14:42
Make PreciseFlexBackend comply with JointArmBackend interface:
- Inherit from JointArmBackend instead of DeviceBackend
- Implement all interface methods (pick_up/drop/move for both joint and cartesian)
- Move PF-specific params (access, speed, finger_speed, grasp_force) into backend_params dataclasses
- Remove pick_up_resource/drop_resource/move_to (inlined into interface methods)
- Make set_speed/get_speed private
- Remove resource_width from drop methods across all backends
- Park delegates to move_to_safe

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Split _BaseArmBackend (halt, park) from gripper-specific methods
- Add CanGrip mixin for open_gripper/close_gripper/is_gripper_closed
- Rename ArmBackend → GripperArmBackend
- Rename OrientableArmBackend → OrientableGripperArmBackend
- Rename JointArmBackend → JointGripperArmBackend
- Rename ArticulatedArmBackend → ArticulatedGripperArmBackend
- resource_width only appears on backends that CanGrip
- Move _resolve_direction to orientable_arm.py

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rickwierenga rickwierenga changed the base branch from main to v1b1 March 23, 2026 21:47
rickwierenga and others added 10 commits March 25, 2026 14:51
The inline error codes dict was accidentally trimmed to ~20 entries.
Import the complete 1809-line error_codes.py instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rail station management (_get_rail_position, _set_rail_position,
_move_rail) is private. Public API: move_rail(position) and
rail_position field on PickUpParams, DropParams, MoveToLocationParams.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ArmPosition → GripperLocation, PreciseFlexCartesianCoords →
PreciseFlexGripperLocation, get_cartesian_position →
get_gripper_location. Legacy API unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…aseArm

- ElbowOrientation is now Literal["right", "left"] instead of Enum
- Rename conversion helpers to _convert_orientation_str_to_int (non-optional)
  and _convert_orientation_int_to_str
- Move get_gripper_location from GripperArmBackend to _BaseArmBackend so all
  arm backends expose it; add delegation in _BaseArm
- Remove redundant get_gripper_location override from JointArm — it was just
  delegating to self.backend, which _BaseArm already does identically
- Legacy adapter updated to convert between enum .value and string literals

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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