Skip to content

basic implementation of uFactory xArm#965

Open
Robert-Keyser-Calico wants to merge 4 commits intoPyLabRobot:mainfrom
Robert-Keyser-Calico:keyser-xarm-testing
Open

basic implementation of uFactory xArm#965
Robert-Keyser-Calico wants to merge 4 commits intoPyLabRobot:mainfrom
Robert-Keyser-Calico:keyser-xarm-testing

Conversation

@Robert-Keyser-Calico
Copy link
Contributor

This pull request introduces a new abstraction for 6-axis robotic arms to the codebase, including a generic frontend and backend interface, as well as an initial implementation for the xArm 6 robot. It also provides comprehensive tests and an interactive example script for pick-and-place operations. These changes pave the way for supporting advanced robotic arms and make it easier to integrate different 6-axis robots in the future.

6-Axis Arm Abstraction and Implementation

  • Added a generic SixAxisArm frontend class in six_axis.py that defines high-level operations (movement, gripper control, pick/place, freedrive mode) for 6-axis robots, delegating to a backend.
  • Introduced an abstract SixAxisBackend interface in six_axis_backend.py specifying all required backend methods for 6-axis robot support.
  • Exposed new modules in the package initializer (__init__.py) for easy import. [1] [2]

xArm 6-Specific Additions

  • Added joint enumeration (XArm6Axis) and backend scaffolding for the xArm 6 robot, preparing for hardware-specific implementations. [1] [2]
  • Included an interactive pick-and-place example script (example_pick_place.py) that guides users through teaching positions, saving/loading them, and running a pick-and-place cycle with vertical access.
  • Provided a sample taught_positions.json file as an example of saved positions for the xArm 6.

Testing

  • Added a thorough asynchronous test suite (six_axis_tests.py) that mocks the backend and validates all major frontend behaviors, including freedrive mode handling and command delegation.

Robert-Keyser-Calico and others added 4 commits March 25, 2026 10:59
Introduces a parallel arm hierarchy for 6-axis articulated robots alongside
the existing SCARA classes. Includes SixAxisBackend abstract base,
SixAxisArm frontend, XArm6Backend wrapping the xArm Python SDK, vertical
and horizontal access pattern sequences, freedrive mode, error recovery,
and an interactive pick-and-place walkthrough script with JSON position
persistence.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add speed, mvacc, joint_speed, joint_mvacc properties to XArm6Backend
- Change gripper interface to use target position parameter instead of
  binary open/close, using set_gripper_position from the SDK
- Add gripper_open_pos and gripper_close_pos constructor params for
  pick/place sequence defaults
- Enable gripper during setup (set_gripper_mode, set_gripper_enable)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove unused `patch` import in xarm6_backend_tests.py
- Sort imports alphabetically (HorizontalAccess before VerticalAccess)
- Type `_arm` as `Any` to fix mypy attr-defined errors (xarm SDK has no stubs)
- Add type: ignore comments for untyped xarm import and test mocking
- Apply ruff formatting to all 6 files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use import-not-found instead of import-untyped for xarm SDK ignore
- Add from __future__ import annotations to example_pick_place.py
  for X | Y union syntax compatibility

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