Skip to content

Commit e6c6593

Browse files
committed
make some private, grip parameters for pick_plate, width is required
1 parent 62ba6c0 commit e6c6593

File tree

5 files changed

+225
-209
lines changed

5 files changed

+225
-209
lines changed

docs/user_guide/_getting-started/units.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ Unless otherwise specified, these are the units used in PyLabRobot:
1212
| Speed | millimeters/second (mm/s) |
1313
| Flow Rate | microliters/second (µL/s) |
1414
| Temperature | degrees Celsius (°C) |
15+
| Force | Newtons (N) |

pylabrobot/arms/backend.py

Lines changed: 22 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@ class VerticalAccess:
1515
picking from a plate stack or tube rack on the deck.
1616
1717
Args:
18-
approach_height_mm: Height above the target position to move to before
19-
descending to grip (default: 100mm)
20-
clearance_mm: Vertical distance to retract after gripping before lateral
21-
movement (default: 100mm)
22-
gripper_offset_mm: Additional vertical offset added when holding a plate,
23-
accounts for gripper thickness (default: 10mm)
18+
approach_height_mm: Height above the target position to move to before descending to grip (default: 100mm)
19+
clearance_mm: Vertical distance to retract after gripping before lateral movement (default: 100mm)
20+
gripper_offset_mm: Additional vertical offset added when holding a plate, accounts for gripper thickness (default: 10mm)
2421
"""
2522

2623
approach_height_mm: float = 100
@@ -36,14 +33,10 @@ class HorizontalAccess:
3633
accessing plates in a hotel-style storage system.
3734
3835
Args:
39-
approach_distance_mm: Horizontal distance in front of the target to stop
40-
before moving in to grip (default: 50mm)
41-
clearance_mm: Horizontal distance to retract after gripping before lifting
42-
(default: 50mm)
43-
lift_height_mm: Vertical distance to lift the plate after horizontal retract,
44-
before lateral movement (default: 100mm)
45-
gripper_offset_mm: Additional vertical offset added when holding a plate,
46-
accounts for gripper thickness (default: 10mm)
36+
approach_distance_mm: Horizontal distance in front of the target to stop before moving in to grip (default: 50mm)
37+
clearance_mm: Horizontal distance to retract after gripping before lifting (default: 50mm)
38+
lift_height_mm: Vertical distance to lift the plate after horizontal retract, before lateral movement (default: 100mm)
39+
gripper_offset_mm: Additional vertical offset added when holding a plate, accounts for gripper thickness (default: 10mm)
4740
"""
4841

4942
approach_distance_mm: float = 50
@@ -59,91 +52,77 @@ class SCARABackend(MachineBackend, metaclass=ABCMeta):
5952
"""Backend for a robotic arm"""
6053

6154
@abstractmethod
62-
async def open_gripper(self):
55+
async def open_gripper(self, gripper_width: float) -> None:
6356
"""Open the arm's gripper."""
64-
...
6557

6658
@abstractmethod
67-
async def close_gripper(self):
59+
async def close_gripper(self, gripper_width: float) -> None:
6860
"""Close the arm's gripper."""
69-
...
7061

7162
@abstractmethod
7263
async def is_gripper_closed(self) -> bool:
7364
"""Check if the gripper is currently closed."""
74-
...
7565

7666
@abstractmethod
77-
async def halt(self):
67+
async def halt(self) -> None:
7868
"""Stop any ongoing movement of the arm."""
79-
...
8069

8170
@abstractmethod
82-
async def home(self):
71+
async def home(self) -> None:
8372
"""Home the arm to its default position."""
84-
...
8573

8674
@abstractmethod
87-
async def move_to_safe(self):
75+
async def move_to_safe(self) -> None:
8876
"""Move the arm to a predefined safe position."""
89-
...
9077

9178
@abstractmethod
9279
async def approach(
9380
self,
9481
position: Union[PreciseFlexCartesianCoords, JointCoords],
9582
access: Optional[AccessPattern] = None,
96-
):
83+
) -> None:
9784
"""Move the arm to an approach position (offset from target).
9885
9986
Args:
10087
position: Target position (CartesianCoords or JointCoords)
101-
access: Access pattern defining how to approach the target.
102-
Defaults to VerticalAccess() if not specified.
88+
access: Access pattern defining how to approach the target. Defaults to VerticalAccess() if not specified.
10389
"""
104-
...
10590

10691
@abstractmethod
10792
async def pick_plate(
10893
self,
10994
position: Union[PreciseFlexCartesianCoords, JointCoords],
95+
plate_width: float,
11096
access: Optional[AccessPattern] = None,
111-
):
97+
) -> None:
11298
"""Pick a plate from the specified position.
11399
114100
Args:
115101
position: Target position for pickup
116-
access: Access pattern defining how to approach and retract.
117-
Defaults to VerticalAccess() if not specified.
102+
access: Access pattern defining how to approach and retract. Defaults to VerticalAccess() if not specified.
118103
"""
119-
...
120104

121105
@abstractmethod
122106
async def place_plate(
123107
self,
124108
position: Union[PreciseFlexCartesianCoords, JointCoords],
125109
access: Optional[AccessPattern] = None,
126-
):
110+
) -> None:
127111
"""Place a plate at the specified position.
128112
129113
Args:
130114
position: Target position for placement
131-
access: Access pattern defining how to approach and retract.
132-
Defaults to VerticalAccess() if not specified.
115+
access: Access pattern defining how to approach and retract. Defaults to VerticalAccess() if not specified.
133116
"""
134-
...
135117

136118
@abstractmethod
137-
async def move_to(self, position: Union[PreciseFlexCartesianCoords, JointCoords]):
138-
"""Move the arm to a specified position in 3D space."""
139-
...
119+
async def move_to(self, position: Union[PreciseFlexCartesianCoords, JointCoords]) -> None:
120+
"""Move the arm to a specified position in 3D space or in joint space."""
140121

141122
@abstractmethod
142123
async def get_joint_position(self) -> JointCoords:
143-
"""Get the current position of the arm in 3D space."""
144-
...
124+
"""Get the current position of the arm in joint space."""
145125

146126
@abstractmethod
147127
async def get_cartesian_position(self) -> PreciseFlexCartesianCoords:
148128
"""Get the current position of the arm in 3D space."""
149-
...

0 commit comments

Comments
 (0)