Skip to content

Unify object settings in the native spawn configuration - #1406

Closed
cvolkcvolk wants to merge 1 commit into
mainfrom
cvolkcvolk/refactor/object-spawn-configuration
Closed

cvolkcvolk wants to merge 1 commit into
mainfrom
cvolkcvolk/refactor/object-spawn-configuration

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.


Make Object.spawn_cfg the source of asset settings used by spawning, geometry queries, and USD export. This is the configuration foundation for the object-set migration.

Why this change?

Arena currently stores USD paths, scales, and spawn settings both on Object and in object_cfg.spawn. Editing the native scale can therefore change the simulated object while placement still uses the old dimensions.

This PR makes those consumers read the same configuration. It does not change how assets are distributed across environments.

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

What changes?

  • Object.spawn_cfg exposes object_cfg.spawn. Constructor settings populate it once, and supplied configurations are copied.
  • ObjectGeometry derives bounds, contact paths, and collision meshes from that configuration. Geometry updates after configuration changes and uses the rigid body's pose frame.
  • Lights, references, background collision, and scene export read the native settings. Export uses the native spawner.
  • Remove the old configuration-factory methods and update their subclasses.

RigidObjectSet and its MultiUsdFileCfg backend remain available. These changes also apply to ordinary objects, so this PR has a broader scope than heterogeneous spawning alone.

Migration: use spawn_cfg / object_cfg instead of stored instance settings and addon dictionaries. Subclasses using the removed factory methods must construct their native configuration directly.

Before merging independently: the fix for library .scale / .usd_path reads currently lives in #1408. It needs to move into this configuration PR when the stack is reorganized.

Usage example

For an existing USD-backed object:

# Before: reads Arena's stored fields.
source_path = box.usd_path
scale = box.scale

# After: reads the configuration used for spawning and geometry.
source_path = box.spawn_cfg.usd_path
scale = box.spawn_cfg.scale

Review configuration ownership, then geometry and export.

Validation

Targeted configuration, geometry, scale, export, collision, and reference-helper checks passed. The final consumer batch passed 27 tests. pre-commit run --all-files passed.

The remote kitchen/reference integration could not open its staging USD. The complete suite was not run.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@cvolkcvolk cvolkcvolk changed the title Use native object spawn configuration as the source Unify object settings in the native spawn configuration 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