pylabrobot.resources.MechanicalGripper.deserialize#
- classmethod MechanicalGripper.deserialize(data: dict, allow_marshal: bool = False) MechanicalGripper#
Rebuild a gripper, taking its own parts back out of its children.
Its body, fingers and pads are constructor arguments rather than children assigned after the fact, so they are found by the names
serializerecorded for them. Anything else goes back where it was: on a finger, or on the gripper, which is what it was holding.- Raises:
ValueError – If a part it names is not among its children, or a finger does not carry exactly one of the pads.
- Parameters:
- Return type: