Skip to content

Add an Around relation for placing an object within a radius of another - #1669

Draft
alexmillane wants to merge 1 commit into
mainfrom
alex/feature/around_relation
Draft

alexmillane wants to merge 1 commit into
mainfrom
alex/feature/around_relation

Conversation

@alexmillane

Copy link
Copy Markdown
Collaborator

Add an Around relation that keeps an object's bounding-box centre within a radius of another object's centre in world XY. Use it in the KitchenBench banana and orange task in place of paired AlignWith relations.

Why this change?

To scatter an object near a reference, environments currently combine two AlignWith relations, one per horizontal axis, each with a wide tolerance. For example, kitchen_bench_replicator_g_shape_banana_and_orange_in_bowl places each fruit with an x and a y AlignWith to the bowl. The intent, "somewhere near the bowl", is hard to read from two per-axis alignment bands. The result is also a box rather than a region around the reference.

What changes?

  • Around(parent, radius_m) constrains the horizontal distance between the subject's and the reference's bounding-box centres to at most radius_m. Z is unconstrained, so it is combined with On for a support. It is the binary counterpart of PositionLimitsCylindrical(radius_max=...). It is registered as around and is available to agentic environment generation.
  • AroundLossStrategy applies zero loss inside the radius and a linear penalty outside it. It shares around_center_distance_xy with the new AroundValidator, so the solver and the around build-time check agree on the geometry.
  • OnTreeInitializer seeds Around subjects in the XY square that encloses the radius around the sampled reference. Seeds in the square's corners start outside the radius, and the solve pulls them in.
  • Like horizontal AlignWith, Around combined with FaceTo requires the turning asset's placement-box centre to lie on its yaw axis. Otherwise placement raises an error.
  • The banana and orange task now uses around with radius_m: 0.3 for each fruit. This changes the layout distribution: the previous bands allowed ±0.35 m in x and ±0.2 m in y. The catalog success rate has not been re-measured.

Usage example

Before:

- kind: align_with
  subject: banana
  reference: wooden_bowl
  params:
    axis: x
    tolerance_m: 0.35
- kind: align_with
  subject: banana
  reference: wooden_bowl
  params:
    axis: y
    tolerance_m: 0.2

After:

- kind: around
  subject: banana
  reference: wooden_bowl
  params:
    radius_m: 0.3

Validation

  • test_kitchen_bench_yaml_env.py brought up the edited banana and orange environment in Isaac Sim. All 50 candidate layouts passed the around check.
  • test_relation_solver_background_collision.py exits with code 127 at test_discover_passive_assets_filters locally. It fails the same way on unmodified main.
  • The policy success rate for the new layout is unverified.

Signed-off-by: Alex Millane <amillane@nvidia.com>

This branch has not been deployed

No deployments
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.

1 participant