follow up post to Updating PLR API for machine interfaces discussion, specifically to discuss what the Arm capability should look like.
the question for this thread is: what are the models we need to model any robotic arm in PLR?
Arm hierarchy
I think we need at least three separate capabilities, each extending the capabilities of the previous one:
Arm- Manages picking up and dropping resources in the resource model
- Has tracking for which resource is picked up
- Converts resource locations to pick up locations (+rotations)
- Used by arms that do not support rotation, just pickup
- Atomic methods:
pick_up_at_location(location: Coordinate, plate_width: float)drop_at_location(location: Coordinate, plate_width: float)get_location
- Example: core grippers
OrientableArm- Inherits shared logic from
Arm - Adds a rotation parameter for pickup/drop operations. So supports resources picked up in different rotations like landscape or portrait mode. Theoretically it can be any rotation, but backends can constrain that. For example, iswap can (currently) only deal with resources that are rotated in multiples of 90Ëš around the z-axis.
- These arms can rotate, but crucially do not have all joints.
- Atomic methods:
pick_up_at_location(location: Coordinate, plate_width: float, rotation: Rotation)drop_at_location(location: Coordinate, plate_width: float, rotation: Rotation)
- Example: iswap
- Inherits shared logic from
JointArm- In addition to having rotations, these arms consist of a series of well-defined, ordered joints, like SCARA style and I think also including articulated arms.
- Atomic methods:
pick_up_at_location(location: Coordinate, plate_width: float, rotation: Rotation)drop_at_location(location: Coordinate, plate_width: float, rotation: Rotation)pick_up_at_joint_location(location: Dict[int, float], plate_width: float)drop_at_joint_location(location: Dict[int, float], plate_width: float)
- Example: PF400
Each capability-frontend will have an associated capability-backend for it, like ArmBackend, OrientableArmBackend, JointArmBackend.
As an example, the new STAR class will have an iswap: OrientableArm attribute.
Backend responsibility
Currently, the STARBackend, where the iswap functionality lives, has a bunch of math on converting locations and rotations of resources together with pickup rotation to center-coordinates. This can all be moved to the front end, since this logic is the same for all arms. All arms we have come across so far actually work on a CCC-basis (center in xyz). This means we can compute the location of a pickup in shared code and just pass the Coordinate and Rotation to the backend - along with backend kwargs that further specify a resource movement like lefty/righty on pf400. This really simplifies the implementation of new arms since that logic gets quite complex.
Addressable space
Each arm will have its own coordinate system. I think the cleanest way to model this is just in the same set by the Arm’s associated resource. I am currently thinking about the idea of adding a _reference_resource: Resource attribute to Arm to handle the space this arm is working in. For iswap and core grippers, this will just be the STAR’s deck. For the pf400, it will be a new resource.
Teach points
The main interface to working with arm is calibrating and updating teach points. In PLR this is currently a bit confusing, but I do not have a good proposal for improving it. (see iswap docs)
What is annoying: when you set a resource’s location, that is the location of its left front bottom LFB. This means that when you put a resource somewhere with an arm physically, and then you request the current arm location, the arm reports that location in CCB, which is not actually the location that the given resource should be set to. You have to figure out what plate you were holding to find the actual LFB of the destination. It also matters where on the resource it was gripped: obviously the bottom of the resource depends on the resource’s pickup height.
When you are just working with coordinates or joint positions, this is not a big deal, but when you teach resources it is awkward.



