Skip to content

Aligned placement TSR for precise stacking #112

Description

@siddhss5

Goal

Add an optional "aligned" placement TSR for precise stacking — object centered on the destination face, with orientation constraints appropriate to the held object's geometry.

Current behavior

_generate_surface_place_tsrs generates TSRs with:

  • Bw[0,1] = ±(surface extent - margin) — lateral freedom
  • Bw[5] = [-π, π] — full yaw freedom

This is good for general placement ("put it somewhere on the table") but bad for stacking ("put the box exactly on top of the other box with edges aligned").

Design

Generate an additional precision TSR with:

  • Bw[0,1] = [0, 0] — centered on the face, no lateral freedom
  • Yaw depends on held object geometry:
    • Box: Bw[5] = [0, 0] — edges aligned with destination
    • Cylinder: Bw[5] = [-π, π] — free yaw (no meaningful alignment)
    • Sphere: Bw[5] = [-π, π] — free yaw

This TSR is always emitted alongside the free-placement TSRs. The planner samples from all TSRs, so it may naturally pick the aligned one if it's easier to reach.

For explicit precise/aligned placement, the caller can filter to only the precision TSR:

robot.place("sugar_box", aligned=True)   # box: centered + edges aligned
robot.place("can", aligned=True)         # cylinder: centered + free yaw
robot.place("sugar_box")                 # all TSRs including precision

Implementation

  • _generate_surface_place_tsrs gets an aligned_only: bool = False parameter
  • Always generates the precision TSR (Bw xy = 0, yaw per geometry type)
  • If aligned_only=False (default), also generates the free TSR
  • If aligned_only=True, only the precision TSR
  • place() in primitives.py passes through the aligned kwarg
  • GeneratePlaceTSRs reads {ns}/aligned from blackboard

LLM integration

The LLM can choose aligned placement when the user says things like:

  • "stack the boxes neatly"
  • "put it right on top"
  • "align the edges"
  • "center it"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions