|
|
@@ -86,8 +86,7 @@ class RobotController:
|
|
|
# Move to pickup position
|
|
|
await self.movement.move_to_position(x, y, z)
|
|
|
# Grip cell
|
|
|
- if await self.movement.activate_endeffector():
|
|
|
- raise RuntimeError("Failed to grip cell")
|
|
|
+ await self.movement.activate_endeffector()
|
|
|
self.gripper_occupied = True
|
|
|
|
|
|
# Move back to safe height
|
|
|
@@ -98,7 +97,7 @@ class RobotController:
|
|
|
logger.error(f"Failed to pick cell from feeder: {str(e)}")
|
|
|
await self.movement.deactivate_endeffector() # TODO [SG]: Should deactivate here?
|
|
|
self.gripper_occupied = False
|
|
|
- return False
|
|
|
+ raise e
|
|
|
|
|
|
def get_next_free_slot(self):
|
|
|
for device in self.devices:
|
|
|
@@ -136,11 +135,11 @@ class RobotController:
|
|
|
# Move down to insertion position
|
|
|
await self.movement.move_to_position(x, y, z)
|
|
|
# Release cell
|
|
|
- if not await self.movement.deactivate_gripper():
|
|
|
+ if not await self.movement.deactivate_endeffector():
|
|
|
raise RuntimeError("Failed to release cell")
|
|
|
except Exception as e:
|
|
|
logger.error(f"Failed to insert cell: {str(e)}")
|
|
|
- return False
|
|
|
+ raise e
|
|
|
|
|
|
slot.occupied = True
|
|
|
slot.cell_id = cell.id
|
|
|
@@ -186,7 +185,7 @@ class RobotController:
|
|
|
return cell_id
|
|
|
except Exception as e:
|
|
|
logger.error(f"Failed to collect cell: {str(e)}")
|
|
|
- await self.movement.deactivate_gripper() # Try to deactivate to avoid stuck gripper
|
|
|
+ await self.movement.deactivate_endeffector() # Try to deactivate to avoid stuck gripper
|
|
|
self.gripper_occupied = False
|
|
|
return None
|
|
|
|
|
|
@@ -219,7 +218,7 @@ class RobotController:
|
|
|
# Move to dropoff position
|
|
|
await self.movement.move_to_position(x, y, z)
|
|
|
# Release cell
|
|
|
- if not await self.movement.deactivate_gripper():
|
|
|
+ if not await self.movement.deactivate_endeffector():
|
|
|
raise RuntimeError("Failed to release cell")
|
|
|
self.gripper_occupied = False
|
|
|
|