pylabrobot.resources.hamilton.hamilton_decks.HamiltonDeck.get_or_create_x_arm#
- HamiltonDeck.get_or_create_x_arm(name: str, x: float, size_x: float, reference_point_from_left: float, model: str) Resource#
Get, or create once, the deck-owned X-arm resource called
name.The deck owns it: created as a child the first time and reused thereafter, so repeated setups do not duplicate it. It is placed so its reference point sits at the arm’s current x.
The arm is wider than the width its drive reports, which begins at the arm’s left edge and stops short of its right end. So the two are given separately: how much room the part takes, and where along it the drive’s position refers to.
- Parameters:
name (str) – what to call it, e.g. “left_x_arm”.
x (float) – where the arm is now, in mm, at its reference point.
size_x (float) – how wide the arm is, in mm, end to end.
reference_point_from_left (float) – how far along it, from its left edge in mm, the drive’s position refers to - the middle of the reported width on a large arm, its right end on a small one.
model (str) – which arm this is.
- Returns:
The arm resource, whether it was just created or already there.
- Return type: