Skip to content

Relax Anchor Constraint for ClutterOn - #1389

Merged
zhx06 merged 12 commits into
mainfrom
zxiao/feature/staged-clutter-placement
Oct 16, 2026
Merged

zhx06 merged 12 commits into
mainfrom
zxiao/feature/staged-clutter-placement

Conversation

@zhx06

@zhx06 zhx06 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Allow ClutterOn supports to be positioned through their own relations. Optimize supports and clutter together in the existing batched solver.

Why this change?

ClutterOn previously required an anchored support. A bowl or tray could not vary its position through placement relations while holding clutter.

What changes?

  • Compute clutter release constraints from the support’s current candidate pose, allowing clutter constraints to influence support placement.
  • Reuse parent-first initialization and shuffle clutter height order per candidate to avoid consistently placing the same object first.
  • Validate supports against their solved poses during settling, and record/replay each support alongside its clutter.
  • Skip velocity writes to kinematic bodies in placement and ordinary pose resets.
  • Update the existing bowl example and simplify the recording guide.

Seeded behavior changes: the shuffle also applies to anchored clutter. Existing scenes can produce different layouts for the same placement_seed compared with previous versions. Repeated runs remain reproducible under the same configuration and runtime.

Candidate budgets, complete-layout ranking and pool selection retain their existing behavior.

Limitations

Supports require a fixed upright orientation in 90° yaw increments and static or kinematic geometry during settling. Nested ClutterOn supports remain unsupported.

Validation

Completed local checks:

  • 86 solver and initialization regression tests.
  • 36 placement/reset tests.
  • 16 simulation tests covering PhysX/Newton settling, velocity resets, partial resets and replay.
  • Documented bowl recording workflow, with recorded poses checked during replay by integration tests.
  • Strict documentation build, rendered-page inspection, pre-commit and whitespace checks.

@zhx06
zhx06 marked this pull request as ready for review October 6, 2026 19:25
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

ClutterOn can now sit on a support that the solver places itself (for example, a bowl with On(table)). When that happens, placement runs in two passes: it solves the non-clutter objects, freezes them as anchors on copied assets, solves the clutter for each kept layout, and then merges the reports and losses before ranking. The change only applies to scenes that used to fail the IsAnchor assert, so existing scenes keep the joint solve. The logic looks correct; my concerns are about how much extra machinery the new path needs.

Design, Boundaries & Scope

  • Cost and size of the second pass (staged_clutter_placement.py:127): it runs one solve per (env, kept layout), one after another. Most of the new module (copying assets, remapping relation parents, merging reports, the local env_id=0 rule) exists because anchors share one pose across rows. Could the solver accept a per-row anchor pose so pass 2 is one batched call?
  • Where the dispatch lives (object_placer.py:138): all placement now goes through place_staged_clutter, which calls back into three private ObjectPlacer members. Keeping the "staged or joint" check inside ObjectPlacer would keep the ordinary path in one place.

Findings

  • 🟡 staged_clutter_placement.py:127: second pass runs one solve per layout, in sequence (see above).
  • 🔵 object_placer.py:157: the placement_seed generator override can never change anything.
  • 🔵 object_placer.py:138: lazy import plus private-member access; keep the dispatch in ObjectPlacer.
  • 🔵 franka_staged_bowl_clutter_no_task.yaml: near-copy of the existing bowl example.

Test Coverage and CI Cost

  • 🔵 test_staged_clutter_placement.py wraps pure torch solver tests in the persistent SimulationApp, while the neighbouring solver tests run as plain pytest.
  • 🔵 test_staged_clutter_recording_replays_randomized_supports runs a 2×2 grid, and every case records and replays. two-supports already covers what one-support checks, so the grid could likely shrink. I couldn't get timings to confirm the cost.

Verdict

Minor fixes needed

@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Restructures how clutter objects are placed relative to their supports.

The PR appears safe to merge; no actionable issues were found.

What we checked:

  • Frozen supports keep their rotation: The copy stores the solved pose. Anchor bounds read that pose’s rotation, so the clutter pass uses the rotated support footprint.
  • Earlier failures stay failed: Merging combines each check with logical AND. A failure in either pass remains a failure in the complete layout.

Summary

ClutterOn now supports fixtures placed through ordinary relations. Arena solves non-clutter objects first, freezes their poses, then extends each retained layout with clutter.

  • Complete layouts retain both passes’ poses, losses, and check results for pooling, recording, and replay.
  • Deferred checks receive original assets and actual environment IDs.
  • Documentation and tests cover movable supports, ranking, resets, settling, and replay.
  • zhx06 explicitly documents no backtracking: clutter cannot retry discarded fixture candidates.
  • zhx06 documents copied assets and local environment ID 0 for inexpensive clutter checks; custom checks needing original inputs must be deferred.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Placement request] --> B{Any movable clutter support?}
    B -->|No| C[Existing joint solve and checks]
    B -->|Yes| D[Solve non-clutter objects]
    D --> E[Retain ranked fixture layouts]
    E --> F[Freeze one fixture layout]
    F --> G[Solve clutter and merge results]
    G --> H[Check complete layouts using original assets]
    H --> I[Rank by failures and combined loss]
    I --> J[Return complete layouts]
    C --> J
Loading

Reviews (1) · Last reviewed commit: "improve redability"

@xyao-nv

xyao-nv commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

I have one concern here regarding the two-stage solver flow, solve the nonclutter objs -> freeze using copies -> solve clutter.

Let's say in your example,

tray.relations = [On(table)]
tools.relations = [ClutterOn(tray)]

Arena chooses the tray’s position before checking whether the tools can fit there.

It could be cases where,

  1. It finds two valid tray positions: A, near an obstacle, and B, in an open area.
  2. It keeps A and discards B because A ranks better for tray placement.
  3. It tries placing tools above A, but the obstacle blocks them.
  4. It reports an unsuccessful layout—even though B might have worked.

Given you want to stick to this two-pass solver design,

Can we limit how many times solver will try based on A layout?

A cheaper addition is to screen tray positions before trying clutter—for example, reject positions where obstacles leave too little release space above the tray. That can eliminate obvious failures, though it cannot guarantee a valid arrangement.

A more expensive ops is to allow backtracking,

 Pass 1 → keep tray positions A, B, C
 Pass 2:
    A + clutter → fails
    B + clutter → succeeds → STOP
    C           → never tried

This may impact the distribution of tray positions though. Need a closer study on its variance/bias.

@zhx06
zhx06 force-pushed the zxiao/feature/staged-clutter-placement branch 4 times, most recently from 4d82afd to 241ba79 Compare October 14, 2026 15:16
@zhx06
zhx06 force-pushed the zxiao/feature/staged-clutter-placement branch from 241ba79 to 8bcefa4 Compare October 15, 2026 17:36

@cvolkcvolk cvolkcvolk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zhx06
zhx06 force-pushed the zxiao/feature/staged-clutter-placement branch from 8bcefa4 to 8a93c0f Compare October 16, 2026 17:48
@zhx06
zhx06 merged commit c2cbc3f into main Oct 16, 2026
12 checks passed
cvolkcvolk added a commit that referenced this pull request Oct 19, 2026
Brings in:
- Fix demo recording with variations and placement (#1435)
- Relax Anchor Constraint for ClutterOn (#1389)

Signed-off-by: Clemens Volk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants