How anchor snapping works
How grasping, releasing and seating record an object's pose by anchor, and why.
The world is a record of where every object is. The platform does not watch objects move: when a skill grasps, carries and sets down a plate, it is the skill's calls that update the record. Anchor snapping is how those calls keep the record exact. Instead of storing wherever the arm happened to be when the gripper closed, the record says "the plate's grasp_short anchor is at the TCP" or "the plate's bottom_center is on the stand's top_center".
That keeps later steps consistent. An anchor resolved after a snap lands where the protocol says, not a few millimetres off because of how a move ended. The price is that the record is only as good as your anchors: the world states the snapped pose whether or not the physical object got there.
Grasping: attach
attachset_gripper(ARM, grasp.width)
attach(ARM, plate_id, snap_anchor="grasp_short")attach records the object as held by the arm. It does not move anything.
| Call | Recorded grip |
|---|---|
attach(arm, obj, snap_anchor="grasp_short") | The anchor exactly at the TCP. |
attach(arm, obj) | The object where it is relative to the TCP right now, from a fresh reading of the arm. |
While held, the object moves with the arm and the planner treats it as part of the robot. An object held by one arm cannot be attached by the other.
Setting down: release
releaserelease(ARM, width=OPEN_M, onto=(dest_id, "slot_1"), settle=dest.pose, settle_anchor="bottom_center")release opens the gripper and records where the object now is. It does not move the arm.
| Argument | Effect |
|---|---|
onto=(holder, anchor) | The object is recorded as sitting on that holder anchor and follows the holder from then on. |
settle=<pose or Anchor> | The object is recorded with settle_anchor exactly at that pose. |
settle_anchor | Which anchor of the released object goes on settle. Default: the anchor it was grasped by, else object. |
Without settle, the object is recorded where the gripper holds it as the arm stands now. Without onto, it is recorded on the world instead of on a holder.
Seating without motion: seat
seatseat(plate_id, stand_id, "top_center") # style "aligned"
seat(plate_id, stand_id, "top_center", style="flipped_180") # turned half a turn about the seat's Zseat puts the object's bottom_center anchor exactly on the holder's anchor. Use it when something was placed by hand, or to set up a starting state. seat_of(obj) returns the current seat (holder, anchor, style) or None.
Correcting a pose: set_object_pose
set_object_poseset_object_pose(plate_id, measured_pose) # the object anchor at measured_pose
set_object_pose(plate_id, measured_pose, anchor="A1") # anchor A1 at measured_poseThis records an object somewhere without motion, for example after a measurement or after a person moved it. It takes the object off any holder and puts it on the world. It is refused while an arm holds the object.
Why a seated object follows its holder
A seated object is recorded relative to the holder's anchor, not relative to the world. Move the stand in the World Builder, or open a drawer the plate sits in, and the plate moves with it. An object released without onto is recorded on the world and stays where it is.
When the record and the bench disagree
Symptoms that the record is wrong, not the motion:
- A later grasp approaches a few millimetres off, consistently. The seat or grasp anchor that the previous step snapped to is off by that much. Fix the anchor, not the skill.
- An object appears tilted or sunk into its holder after a place. The occupant's
bottom_centeror the holder's seat anchor has wrong axes. - An object stays in the air after a place. The skill released without
settle, so the object was recorded where the gripper was.
In the sim, nothing checks the snapped pose against a camera. On a rig with cameras, localizing an object measures where it really is.
Related
Updated 9 days ago