Place an Object

You have an object in the gripper and need to place it at a specific location. This involves planning a collision-free path to the placement pose, descending to the surface, releasing, and retreating.

Prerequisites

  • Object already grasped (see Pick an Object)
  • Placement location known in world coordinates

Steps

1. Move to pre-place position

# Pre-place: above the target location
pre_place = PoseInFrame(
    reference_frame="world",
    pose=Pose(
        x=500, y=0, z=200,
        o_x=0, o_y=0, o_z=-1, theta=0
    )
)

await motion_service.move(
    component_name="my-arm",
    destination=pre_place,
    world_state=world_state
)

2. Descend to placement surface

# Place: at the surface
place_pose = PoseInFrame(
    reference_frame="world",
    pose=Pose(
        x=500, y=0, z=50,
        o_x=0, o_y=0, o_z=-1, theta=0
    )
)

await motion_service.move(
    component_name="my-arm",
    destination=place_pose,
    world_state=world_state
)

3. Release and retreat

# Open gripper to release
await gripper.open()
print("Object placed")

# Retreat: lift straight up
retreat_pose = PoseInFrame(
    reference_frame="world",
    pose=Pose(
        x=500, y=0, z=200,
        o_x=0, o_y=0, o_z=-1, theta=0
    )
)

await motion_service.move(
    component_name="my-arm",
    destination=retreat_pose,
    world_state=world_state
)
print("Retreated from placement")

Tips

  • Use OrientationConstraint during descent to keep the object level.
  • The retreat path should go straight up to avoid disturbing the placed object.
  • After releasing, the object becomes a potential obstacle. Update your WorldState if the arm needs to move near the placement location again.

What’s Next