Skip to content

Replace rigid object sets with PerEnvironmentObject - #1408

Closed
cvolkcvolk wants to merge 7 commits into
cvolkcvolk/refactor/native-object-set-spawningfrom
cvolkcvolk/refactor/remove-rigid-object-set
Closed

cvolkcvolk wants to merge 7 commits into
cvolkcvolk/refactor/native-object-set-spawningfrom
cvolkcvolk/refactor/remove-rigid-object-set

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.


Replace RigidObjectSet with PerEnvironmentObject and make environment assignment explicit. Migrate Python callers, YAML, environment generation, previews, and documentation to the new API.

Why this change?

An Object describes one concrete asset used across environments. PerEnvironmentObject describes a named scene role, such as fruit, whose asset can differ between environments. Tasks and relations address that role once.

The underlying concept remains the same. The switch from MultiUsdFileCfg to MultiAssetSpawnerCfg, native cloning, and USD preparation is in #1407; this PR changes the public API and authoring format.

Stack: #1406 → #1407 → #1408. Review this PR against #1407.

What changes?

  • Add PerEnvironmentObject(objects=..., assign_to_environments=...) and remove RigidObjectSet. Member spawn settings are copied; names, poses, and relations belong to the parent scene role.
  • sequential cycles through members in order; random samples independently and allows repeats. Arena assigns once before placement and preserves the assignment across resets. These strings are Arena settings, not Lab's scene-wide clone-strategy API.
  • Add YAML per_environment_objects, with constructor params for each member. Update generation and GUI previews together so repeated registry names with different settings remain distinct.
  • Use spawn_cfg, has_multiple_assets, and asset_indices_by_env consistently. The capability counts configured alternatives, not observed differences between environments.
  • Migrate examples and CLI callers (--object_set becomes --object_variants). Reject the removed object_sets and objects[].variants YAML forms.

This diff also contains the configuration regression fix from the review: instance .scale and .usd_path reads follow the current native configuration without changing library class declarations. That fix and the spawn_cfg constructor naming belong with #1406 when the stack is reorganized.

Constraints: members must be concrete rigid assets. Nested choices and member bounds overrides are rejected. Multiple members require per-environment bounds; changing assignment or environment count requires a new PerEnvironmentObject.

Usage example

With banana and orange instantiated from the asset library:

# Before
fruit = RigidObjectSet(name="fruit", objects=[banana, orange])

# After
fruit = PerEnvironmentObject(
    name="fruit",
    objects=[banana, orange],
    assign_to_environments="sequential",
)

Environments receive banana, orange, banana, orange. Set shared poses and relations on fruit. For the same asset in every environment, use the library Object directly.

# Before
object_sets:
  - id: fruit
    members: [banana_ycb_robolab, orange_01_fruits_veggies_robolab]

# After
per_environment_objects:
  - id: fruit
    objects:
      - registry_name: banana_ycb_robolab
      - registry_name: orange_01_fruits_veggies_robolab
    assign_to_environments: sequential

Ordinary assets remain under objects. Each member accepts its own params, such as scale. Relations and task parameters continue to reference fruit.

Review the Python class, then YAML schema and its generation/GUI consumers.

Validation

198 focused tests passed: 109 YAML/GUI checks (one subprocess test deselected), 37 placement/environment-configuration checks, and 52 configuration/geometry/assignment/native-scene/export checks. pre-commit run --all-files and commit hooks passed.

Simulation checks used OPENBLAS_NUM_THREADS=1 after an Isaac Sim startup crash in OpenBLAS. The complete suite was not run. Remote kitchen/reference integration and full GUI video preview remain unverified; thumbnail and camera checks do not establish video-preview coverage.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@cvolkcvolk cvolkcvolk changed the title Replace rigid object sets with Object variants Replace rigid object sets with ObjectChoice Oct 8, 2026
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@cvolkcvolk cvolkcvolk changed the title Replace rigid object sets with ObjectChoice Replace rigid object sets with PerEnvironmentObject Oct 8, 2026
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@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