Source code for genericroboticarm.robo_APIs.interactive_transfer

"""
An interface for robotic arm that implement the necessary utility to use the SiLA feature
LabTransferManipulatorController.
"""
from abc import ABC, abstractmethod
from typing import List, Tuple


[docs] class InteractiveTransfer(ABC): # intermediate actions of the upcoming transfer command, announced by the client via the # IntermediateActionPlanning feature. Never rebound on the class, only on instances. _announced_intermediate_actions: List[str] = [] @property def available_intermediate_actions(self) -> List[str]: """ List of functionalities the arm can do together with put/get labware commands, like (un-)lidding, shaking reading barcode, etc. :return: """ return [] @property def preparable_intermediate_actions(self) -> List[str]: """ The subset of the available intermediate actions the arm can already work on during prepare_for_input(), provided they were announced beforehand. Fetching a lid is such an action: it concerns only the arm and can be done while the other device prepares itself. Arms that ignore announcements return nothing here. :return: """ return []
[docs] def announce_intermediate_actions(self, intermediate_actions: List[str]): """ Tells the arm which intermediate actions the upcoming transfer command will request, so that prepare_for_input() can already do the part of them that concerns only the arm. Announcing is optional and non-binding: the actions are passed to get_labware() as usual, which has to work whether they were announced or not. :param intermediate_actions: :return: """ self._announced_intermediate_actions = list(intermediate_actions)
@property def announced_intermediate_actions(self) -> List[str]: """ The intermediate actions announced for the upcoming transfer command. :return: """ return self._announced_intermediate_actions @property def available_handover_positions(self) -> List[Tuple[str, int]]: """ :return: """ return [] @property @abstractmethod def number_internal_positions(self) -> int: """ :return: """
[docs] @abstractmethod def put_labware(self, intermediate_actions: List[str], device: str, position: int): """ :param position: :param device: :param intermediate_actions: :return: """
[docs] @abstractmethod def get_labware(self, intermediate_actions: List[str], device: str, position: int): """ :param position: :param device: :param intermediate_actions: :return: """
[docs] @abstractmethod def prepare_for_output(self, internal_pos: int, device: str, position: int) -> bool: """ :param position: :param device: :param internal_pos: :return: """
[docs] @abstractmethod def prepare_for_input(self, internal_pos: int, device: str, position: int, plate_type: str) -> bool: """ :param plate_type: :param plate_type: :param position: :param device: :param internal_pos: :return: """
[docs] @abstractmethod def cancel_transfer(self): """ :return: """