Skip to content

Use MultiAssetSpawnerCfg for rigid object sets - #1407

Closed
cvolkcvolk wants to merge 2 commits into
cvolkcvolk/refactor/object-spawn-configurationfrom
cvolkcvolk/refactor/native-object-set-spawning
Closed

cvolkcvolk wants to merge 2 commits into
cvolkcvolk/refactor/object-spawn-configurationfrom
cvolkcvolk/refactor/native-object-set-spawning

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Superseded by smaller draft PRs with separate review scopes:

The complete seven-PR review order is in #1415. The original branch and commits remain available.


Switch RigidObjectSet from MultiUsdFileCfg to MultiAssetSpawnerCfg. Preserve each member's native settings and use the same asset assignment for placement and Isaac Lab cloning.

Why this change?

RigidObjectSet already uses Isaac Lab spawning, but Arena expands member USD paths into one entry per environment and bakes scales into prepared USDs. Different scales can require rewritten assets even when their body hierarchies match.

MultiAssetSpawnerCfg retains a separate native configuration for each member. Arena still assigns members before placement and prepares incompatible rigid-body hierarchies.

Stack: #1406 → #1407 → #1408. Review this PR against #1406. The Python class remains RigidObjectSet, and YAML still uses object_sets.

What changes?

  • Native spawning: keep each member's scale, materials, physics, and USD selections in its configuration. Remove expanded environment-sized USD-path lists.
  • Assignment: select one member per environment before placement and pass those choices to Lab's clone planner. Preserve them through Hydra serialization and reject later configuration changes that would invalidate placement.
  • Geometry: bounds, anchors, and placement diagnostics use the assigned member in each environment. Assignments remain fixed across resets.
  • USD preparation: write cached copies only when relative rigid-body paths differ. Scale differences alone no longer require rewriting USDs.
  • Previews: render native configurations so thumbnails retain member settings.

The main review invariant is: the asset used for placement must be the asset spawned in that environment. Review assignment and cloning, set construction, and USD preparation.

Behavior changes: heterogeneous bounds must be requested per environment; a different assignment or environment count requires a new set. Random choices are seeded by object name and can differ from previous results. Nested multi-spawners and custom member bounds are rejected. Fixed heterogeneous obstacles require IsAnchor. Native clone combinations and additional unassigned heterogeneous scene entries are rejected when Arena controls assignment.

Usage example

For direct placement callers; ArenaEnvBuilder does this automatically:

# Before
fruit.assign_variants(num_envs=4, variant_seed=42)
bounds = fruit.get_bounding_box()

# After
from isaaclab_arena.scene.object_variant_assignment import assign_object_variants

assign_object_variants([fruit], num_envs=4, seed=42)
bounds = fruit.get_bounding_box_per_env(num_envs=4)

The result now contains the selected member's bounds for each environment.

Validation

Completed runs passed 14 mass/clutter/native-scene tests, 37 assignment/bounds/set/conversion tests, 1 robot-camera test, and 2 preview/collision tests. USD-preparation checks also passed. These batches overlap and are not a unique-test total. pre-commit run --all-files passed.

An earlier run hit a USD/Kit import-order error; completed simulation runs passed in fresh processes after deferring native imports. The complete suite and the remote-asset/video-preview paths noted in the stack remain unverified.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@cvolkcvolk cvolkcvolk changed the title Use native spawning for rigid object sets Use MultiAssetSpawnerCfg for rigid object sets Oct 8, 2026
@cvolkcvolk cvolkcvolk closed this Oct 8, 2026
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