Skip to content

Replace RigidObjectSet with native object variants - #1405

Closed
cvolkcvolk wants to merge 1 commit into
mainfrom
cvolkcvolk/refactor/native-object-variants
Closed

cvolkcvolk wants to merge 1 commit into
mainfrom
cvolkcvolk/refactor/native-object-variants

Conversation

@cvolkcvolk

@cvolkcvolk cvolkcvolk commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Superseded by three dependent draft PRs:

  1. Unify object settings in the native spawn configuration #1406 — make native spawn configuration authoritative and fix geometry/export consumers.
  2. Use MultiAssetSpawnerCfg for rigid object sets #1407 — use native heterogeneous spawning and shared placement assignments.
  3. Replace rigid object sets with PerEnvironmentObject #1408 — remove RigidObjectSet and migrate Python, YAML, GUI, and documentation.

The replacement uses native configurations as variants and removes the proposed public ObjectVariant descriptor. Review and merge the drafts in the order above. The original implementation remains below for reference.


Replace RigidObjectSet with Object variants backed by Isaac Lab's native MultiAssetSpawnerCfg and scene clone planning. Separate variant definitions, environment assignment, and USD hierarchy preparation, and migrate the Python, YAML, CLI, and review GUI callers.

Why this change?

RigidObjectSet combined scene identity, variant selection, placement geometry, and asset rewriting. Isaac Lab now supports distinct native spawn configurations across environments, including per-variant scale and physics settings.

What changes?

  • Let one Object represent a task role with multiple ObjectVariant definitions. Relations, resets, and contact sensors address that role.
  • Assign variants before placement and pass the same assignment to native scene cloning. Preserve it through Hydra serialization and resets; reject later overrides that invalidate placement.
  • Prepare cached USD copies only when rigid-body paths differ. Compatible assets retain their sources, and scales remain in native spawn configurations.
  • Align bounds, collision meshes, and scene export with the rigid-body pose frame. Keep geometry and contact paths aligned with current native spawn settings.

Breaking migrations:

  • Replace RigidObjectSet(objects=...) with Object(variants=...), using as_variant() for existing concrete assets.
  • Replace YAML object_sets[].members with objects[].variants. Each variant declares registry_name and optional constructor params.
  • Rename environment configuration object_set and CLI --object_set to object_variants and --object_variants.

Each alternative must contain one rigid body. Assignments remain fixed for the object's lifetime; a different assignment or environment count requires a new object. Heterogeneous placement uses per-environment AABBs even in mesh mode, and fixed heterogeneous obstacles require IsAnchor() plus a known pose. Offline recording, cached replay, clutter collection, and scene export require concrete variants.

Usage example

Before:

from isaaclab_arena.assets.object_set import RigidObjectSet

fruit = RigidObjectSet(name="fruit", objects=fruit_assets)
fruit.add_relation(On(table_reference))

After:

from isaaclab_arena.assets.object import Object

fruit = Object(
    name="fruit",
    variants=[asset.as_variant() for asset in fruit_assets],
)
fruit.add_relation(On(table_reference))

ArenaEnvBuilder repeats declaration order by default. random_choice=True samples independently per environment. as_variant() copies native spawn configuration and explicit geometry overrides; the new Object owns the name, pose, and relations.

Validation

Passing targeted checks:

  • CPU coverage for schema/generation/review UI, assignment serialization, placement geometry, configuration, and light variations; CLI graph output smoke check.
  • PhysX coverage for native variant spawning across nine environments, Hydra roundtrip, masses/inertias, contact paths, resets, task termination, scene export, and mesh/background collision.
  • Robot-mounted camera regression: 1 passed.
  • Final USD preparation regressions, including inherited material-binding strength: 7 passed.
  • Placement-recording CLI subprocess with PhysX: 1 passed.
  • Host formatting, lint, whitespace checks, and pre-commit run --all-files.

The full repository test suite was not run. GUI preview validation hit an existing recording incompatibility: the pinned Isaac Lab returns None for render_mode="rgb_array", so the current Gym RecordVideo integration produces no frames. The preview child stalled during cleanup and was terminated. The shared video integration needs a separate migration to native video recorders.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
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