Repository navigation
Add an Around relation for placing an object within a radius of another - #1669
Draft
alexmillane wants to merge 1 commit into
Draft
alexmillane wants to merge 1 commit into
alexmillane wants to merge 1 commit into
Conversation
Signed-off-by: Alex Millane <amillane@nvidia.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an
Aroundrelation 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 pairedAlignWithrelations.Why this change?
To scatter an object near a reference, environments currently combine two
AlignWithrelations, one per horizontal axis, each with a wide tolerance. For example,kitchen_bench_replicator_g_shape_banana_and_orange_in_bowlplaces each fruit with an x and a yAlignWithto 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 mostradius_m. Z is unconstrained, so it is combined withOnfor a support. It is the binary counterpart ofPositionLimitsCylindrical(radius_max=...). It is registered asaroundand is available to agentic environment generation.AroundLossStrategyapplies zero loss inside the radius and a linear penalty outside it. It sharesaround_center_distance_xywith the newAroundValidator, so the solver and thearoundbuild-time check agree on the geometry.OnTreeInitializerseedsAroundsubjects 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.AlignWith,Aroundcombined withFaceTorequires the turning asset's placement-box centre to lie on its yaw axis. Otherwise placement raises an error.aroundwithradius_m: 0.3for 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:
After:
Validation
test_kitchen_bench_yaml_env.pybrought up the edited banana and orange environment in Isaac Sim. All 50 candidate layouts passed thearoundcheck.test_relation_solver_background_collision.pyexits with code 127 attest_discover_passive_assets_filterslocally. It fails the same way on unmodifiedmain.