Skip to content

Commit e0333a0

Browse files
committed
star: error if direction is not default with core gripper (#751)
1 parent 5f1473e commit e0333a0

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3415,6 +3415,9 @@ async def pick_up_resource(
34153415
if use_unsafe_hotel:
34163416
raise ValueError("Cannot use iswap hotel mode with core grippers")
34173417

3418+
if pickup.direction != GripDirection.FRONT:
3419+
raise NotImplementedError("Core grippers only support FRONT (default)")
3420+
34183421
if channel_1 is not None or channel_2 is not None:
34193422
warnings.warn(
34203423
"The channel_1 and channel_2 parameters are deprecated and will be removed in future versions. "
@@ -3545,7 +3548,7 @@ async def drop_resource(
35453548
hotel_center_z_direction=0 if z >= 0 else 1,
35463549
clearance_height=round(hotel_clearance_height * 10),
35473550
hotel_depth=round(hotel_depth * 10),
3548-
grip_direction=drop.drop_direction,
3551+
grip_direction=drop.direction,
35493552
open_gripper_position=round(open_gripper_position * 10),
35503553
traverse_height_at_beginning=round(traversal_height_start * 10),
35513554
z_position_at_end=round(z_position_at_the_command_end * 10),
@@ -3565,7 +3568,7 @@ async def drop_resource(
35653568
GripDirection.RIGHT: 2,
35663569
GripDirection.BACK: 3,
35673570
GripDirection.LEFT: 4,
3568-
}[drop.drop_direction],
3571+
}[drop.direction],
35693572
minimum_traverse_height_at_beginning_of_a_command=round(traversal_height_start * 10),
35703573
z_position_at_the_command_end=round(z_position_at_the_command_end * 10),
35713574
open_gripper_position=round(open_gripper_position * 10),
@@ -3576,6 +3579,9 @@ async def drop_resource(
35763579
if use_unsafe_hotel:
35773580
raise ValueError("Cannot use iswap hotel mode with core grippers")
35783581

3582+
if drop.direction != GripDirection.FRONT:
3583+
raise NotImplementedError("Core grippers only support FRONT direction (default)")
3584+
35793585
await self.core_release_picked_up_resource(
35803586
location=Coordinate(x, y, z),
35813587
resource=drop.resource,

pylabrobot/liquid_handling/backends/serializing_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ async def drop_resource(self, drop: ResourceDrop, **backend_kwargs):
213213
"offset": serialize(drop.offset),
214214
"pickup_distance_from_top": drop.pickup_distance_from_top,
215215
"pickup_direction": serialize(drop.pickup_direction),
216-
"drop_direction": serialize(drop.drop_direction),
216+
"drop_direction": serialize(drop.direction),
217217
"rotation": drop.rotation,
218218
},
219219
**backend_kwargs,

pylabrobot/liquid_handling/backends/tecan/EVO_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ async def test_move_resource(self):
387387
offset=Coordinate.zero(),
388388
pickup_distance_from_top=13.2,
389389
pickup_direction=GripDirection.FRONT,
390-
drop_direction=GripDirection.FRONT,
390+
direction=GripDirection.FRONT,
391391
rotation=0,
392392
)
393393

pylabrobot/liquid_handling/liquid_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2221,7 +2221,7 @@ async def drop_resource(
22212221
offset=offset,
22222222
pickup_distance_from_top=self._resource_pickup.pickup_distance_from_top,
22232223
pickup_direction=self._resource_pickup.direction,
2224-
drop_direction=direction,
2224+
direction=direction,
22252225
rotation=rotation_applied_by_move,
22262226
)
22272227
result = await self.backend.drop_resource(drop=drop, **backend_kwargs)

pylabrobot/liquid_handling/standard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class ResourceDrop:
169169
offset: Coordinate
170170
pickup_distance_from_top: float
171171
pickup_direction: GripDirection
172-
drop_direction: GripDirection
172+
direction: GripDirection
173173
rotation: float
174174

175175

0 commit comments

Comments
 (0)