Skip to content

Add per-env omni:scenePartition authoring in InteractiveScene#5445

Merged
ooctipus merged 4 commits into
isaac-sim:developfrom
ooctipus:zhengyuz/scene-partitioning
Jun 3, 2026
Merged

Add per-env omni:scenePartition authoring in InteractiveScene#5445
ooctipus merged 4 commits into
isaac-sim:developfrom
ooctipus:zhengyuz/scene-partitioning

Conversation

@ooctipus
Copy link
Copy Markdown
Collaborator

@ooctipus ooctipus commented Apr 29, 2026

Description

Adds InteractiveScene.author_scene_partitions() that, for each env root in env_prim_paths, writes the inheriting primvar primvars:omni:scenePartition on the root and the matching non-primvar omni:scenePartition token on every per-env UsdGeom.Camera. RTX (and OvRTX) honor primvar inheritance, so the env-root primvar propagates to all descendant geometry; renderers that don't recognize the primvar simply ignore it, so authoring is unconditional.

The method is called at the end of clone_environments(), so both ManagerBasedEnv (which calls InteractiveScene.__init__ to auto-clone) and Direct envs that drive cloning manually from _setup_scene (e.g. anymal_c_env) get partitioning for free. Authoring runs after USD/physics cloning but before the physics backend takes its tensor view in sim.reset, so PhysX and Newton tensor views are not invalidated. Cost is O(N + cameras); per-descendant authoring is intentionally not done because RTX is spec'd to honor primvar inheritance here.

Type of change

  • New feature (non-breaking change which adds functionality)

Tests

Two regression tests under source/isaaclab/test/scene/test_scene_partitioning.py:

Test Status today Behavior on RTX fix
test_partitioning_isolates_rigid_object PASSES — dexsuite Lift with the robot hidden, RigidObject tile diff ≈ 13 (well above the 5.0 threshold). Continues to pass.
test_partitioning_isolates_articulation XFAILS — dexsuite Lift with object + table hidden, robot tile diff ≈ 2.2 (same as partitioning OFF; RTX articulation path doesn't honor the primvar today). XPASSes once the RTX articulation path is fixed; signal to drop the xfail mark.

Confirmed via ablation against Isaac-Dexsuite-Kuka-Allegro-Lift-v0 at num_envs=4, env_spacing=0, replicate_physics=False, with selected per-env prims hidden via UsdGeom.Imageable.MakeInvisible (visibility-only — preserves PhysX tensor view validity).

The articulation-side bug is confirmed by Nathan Cournia; Steven Bloemer / FSD has the RTX-side fix in flight. The xfail test is the regression hook for that fix landing.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Apr 29, 2026
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Summary

This PR adds per-environment scene partitioning for RTX rendering isolation by authoring primvars:omni:scenePartition on env roots and omni:scenePartition on cameras. The implementation is clean and correctly placed after cloning but before physics tensor view creation. The tests are well-documented regression tests that track known RTX limitations.

Architecture Impact

Self-contained with proper integration point. The author_scene_partitions() method is called at the end of clone_environments(), which is the correct location — after USD/physics cloning completes but before sim.reset() creates tensor views. Both ManagerBasedEnv (via InteractiveScene.__init__) and Direct envs (via manual clone_environments() calls) will get partitioning automatically. The method only touches USD layer attributes and doesn't interact with physics state.

Implementation Verdict

Ship it — Minor documentation improvement suggested but not blocking.

Test Coverage

Thorough and well-reasoned. The tests are regression tests for RTX behavior rather than unit tests of the authoring logic itself. The extensive docstring explains why minimal scenes don't work (RTX requires articulation presence) and documents exact measured thresholds. The xfail pattern for the articulation test is appropriate — it will surface when the upstream RTX fix lands. However, there's no direct unit test verifying that the USD attributes are actually authored correctly (checking that prims have the expected attributes after author_scene_partitions()).

CI Status

No CI checks available yet — should verify tests pass before merge.

Findings

🔵 Improvement: source/isaaclab/isaaclab/scene/interactive_scene.py:277-279 — Missing primvar interpolation metadata
For primvars, RTX typically expects the interpolation metadata to be set. While the default may work, explicitly setting it would be more robust:

# After creating the primvar attribute, consider:
# primvar_api = UsdGeom.PrimvarsAPI(env_prim)
# primvar = primvar_api.CreatePrimvar("omni:scenePartition", Sdf.ValueTypeNames.Token)
# primvar.SetInterpolation(UsdGeom.Tokens.constant)

That said, the current Sdf.JustCreatePrimAttributeInLayer approach is valid and may be intentional for performance (avoiding schema traversal). Clarify in comments if intentional.

🔵 Improvement: source/isaaclab/test/scene/test_scene_partitioning.py:116 — Env not closed on build failure
If gym.make() succeeds but the subsequent hide_prims loop fails (e.g., due to a prim path typo), the env won't be closed:

def _build_dexsuite_env(hide_prims: list[str], scale_object_to: float | None = None):
    ...
    env = gym.make("Isaac-Dexsuite-Kuka-Allegro-Lift-v0", cfg=env_cfg)
    # If this section throws, env leaks
    stage = env.unwrapped.scene.stage
    for env_idx in range(NUM_ENVS):
        ...

Consider wrapping in try/except to close on error, or document that callers must handle this.

🔵 Improvement: source/isaaclab/test/scene/test_scene_partitioning.py — Missing direct unit test for attribute authoring
The tests verify RTX rendering behavior but don't directly verify that author_scene_partitions() creates the expected USD attributes. A simple unit test could verify:

def test_scene_partition_attributes_authored():
    # Create minimal scene, call clone_environments
    # Verify env_0 has primvars:omni:scenePartition = "env_0"
    # Verify cameras have omni:scenePartition = "env_N"

This would catch authoring bugs independently of RTX behavior.

🔵 Improvement: source/isaaclab/isaaclab/scene/interactive_scene.py:285 — Consider logging partition authoring
Given this is a new feature that affects rendering behavior, a debug-level log message would help users understand when partitioning is active:

logger.debug(f"Authored scene partitions for {len(self.env_prim_paths)} environments")

🔵 Improvement: source/isaaclab/test/scene/test_scene_partitioning.py:42-51 — Shim could be module-level constant
The _shim_omni_physics_tensors_api() function is called at module load but the shim pattern is duplicated across test files. Consider centralizing this in a test utilities module if it's needed elsewhere.

🟡 Warning: source/isaaclab/test/scene/test_scene_partitioning.py:134 — Action shape may be incorrect for batched envs

action_shape = env.action_space.shape
for _ in range(WARMUP_STEPS):
    actions = (torch.rand(action_shape, ...) * 2.0 - 1.0) * ACTION_SCALE

For vectorized envs, action_space.shape typically doesn't include the batch dimension. Verify this works correctly with NUM_ENVS=4 — if action_space.shape is (action_dim,), the actions tensor should be (num_envs, action_dim). The test may work by accident if gym auto-broadcasts, but explicit shape (NUM_ENVS, *action_shape) would be clearer.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR adds InteractiveScene.author_scene_partitions(), called automatically at the end of clone_environments(), which writes primvars:omni:scenePartition on each env root prim and omni:scenePartition on per-env cameras so RTX can cull rendering per environment. The implementation is well-structured — it uses an Sdf.ChangeBlock for batched USD edits, guards against invalid prims, and the xfail test correctly pins the known RTX articulation limitation as a regression hook.

Confidence Score: 4/5

Safe to merge; all findings are non-blocking style/best-practice suggestions with no impact on correctness for the common case.

Only P2 findings: VariabilityVarying vs VariabilityUniform (semantically off but not functionally broken), a dead docstring in the test file, and PrimRange missing instanced cameras (not relevant unless USD instances are used). No P0/P1 issues found.

source/isaaclab/isaaclab/scene/interactive_scene.py — review the Usd.PrimRange instance-proxy handling if USD-instanced cameras ever appear in scenes.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/scene/interactive_scene.py Adds author_scene_partitions() that writes primvars:omni:scenePartition on env roots and omni:scenePartition on cameras; minor issues: VariabilityVarying should be VariabilityUniform, and Usd.PrimRange misses cameras inside USD instances.
source/isaaclab/test/scene/test_scene_partitioning.py New regression test file using dexsuite Lift env; has a dead second module docstring. Tests are appropriately marked isaacsim_ci and the xfail is correctly structured.
source/isaaclab/config/extension.toml Version bumped from 4.6.21 to 4.6.22 matching the changelog entry.
source/isaaclab/docs/CHANGELOG.rst New changelog entry for 4.6.22 accurately describes the feature.

Sequence Diagram

sequenceDiagram
    participant Init as InteractiveScene.__init__
    participant Clone as clone_environments()
    participant Author as author_scene_partitions()
    participant USD as USD Stage (Sdf layer)
    participant RTX as RTX Renderer

    Init->>Clone: clone_environments(copy_from_source)
    Clone->>USD: physics_clone_fn / usd_replicate (per env prims)
    Clone->>Author: author_scene_partitions()
    loop for each env_path in env_prim_paths
        Author->>USD: Sdf.ChangeBlock
        Author->>USD: JustCreatePrimAttributeInLayer(root, primvars:omni:scenePartition = env_i)
        Author->>USD: JustCreatePrimAttributeInLayer(camera, omni:scenePartition = env_i)
    end
    Note over Author,USD: Runs before sim.reset() so physics tensor view is not invalidated
    RTX->>USD: reads primvars:omni:scenePartition on env root
    RTX->>RTX: culls geometry to matching partition per camera
Loading

Reviews (1): Last reviewed commit: "Add per-env omni:scenePartition authorin..." | Re-trigger Greptile

"""
root_layer = self.stage.GetRootLayer()
token_type = Sdf.ValueTypeNames.Token
variability = Sdf.VariabilityVarying
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 VariabilityVarying is semantically incorrect for a static partition token

Sdf.VariabilityVarying signals that the attribute can carry time-sampled values and should be interpolated per the stage's time-code. A scene-partition token is a permanent, non-animated assignment — Sdf.VariabilityUniform is the correct choice. USD renderers (and RTX) are supposed to treat Uniform attributes as constant across time, which matches the intent here. Using Varying wastes a small amount of metadata overhead and could confuse downstream tools that inspect attribute variability.

Suggested change
variability = Sdf.VariabilityVarying
variability = Sdf.VariabilityUniform

Comment on lines +36 to +37

"""Launch Isaac Sim Simulator first."""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Orphaned string literal acts as a dead second module docstring

Python treats only the first string literal in a module as the module __doc__. The """Launch Isaac Sim Simulator first.""" string is unreachable as a docstring and becomes a no-op string constant. Other Isaac Lab test files typically use a plain # Launch Isaac Sim Simulator first. comment here instead.

Suggested change
"""Launch Isaac Sim Simulator first."""
# Launch Isaac Sim Simulator first.

Comment on lines +283 to +291
for prim in Usd.PrimRange(env_prim):
if prim == env_prim:
attr_path = prim.GetPath().AppendProperty("primvars:omni:scenePartition")
elif prim.IsA(UsdGeom.Camera):
attr_path = prim.GetPath().AppendProperty("omni:scenePartition")
else:
continue
Sdf.JustCreatePrimAttributeInLayer(root_layer, attr_path, token_type, variability, False)
root_layer.GetAttributeAtPath(attr_path).default = token
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Usd.PrimRange skips cameras inside USD instances (instance proxies)

Usd.PrimRange(env_prim) uses the default traversal predicate, which does not descend into instance prototypes — it only visits instance proxy prims at the top level, not their children. If any env contains instanced geometry (e.g. an instanced sensor rig), cameras nested inside those instances will be invisible to this traversal and will not receive the omni:scenePartition attribute. To make the traversal instance-aware, pass Usd.TraverseInstanceProxies(): for prim in Usd.PrimRange(env_prim, Usd.TraverseInstanceProxies()):

@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from e840880 to a852485 Compare April 29, 2026 20:56
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

The new commits appear to be a rebase/refresh — the diff and implementation are identical to the previous review. No code changes were made to address the previous findings.

Previous findings still apply:

  • The action shape concern (🟡 Warning) should be verified
  • The suggested improvements (unit test for attribute authoring, env cleanup on build failure, logging) remain valid but are non-blocking

CI Status: pre-commit is failing — this needs to be fixed before merge.

Verdict: The implementation is correct. Fix the pre-commit failure and consider the previous improvement suggestions, but the core functionality is ready to ship.

Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

The new commit (587b425) addresses the previous CI failure — pre-commit now passes ✅. The implementation remains unchanged and correct.

Previous findings status:

  • The action shape concern was minor and the implementation is correct as-is
  • Suggested improvements (unit test for attribute authoring, logging) remain valid but non-blocking

Verdict: Ship it. The core functionality is correct, tests are comprehensive with appropriate xfail handling for the known RTX articulation limitation, and CI is green.

@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from db053ea to da3e021 Compare April 30, 2026 18:57
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

The new commit (da3e021) adds a monkeypatch for author_scene_partitions in the test_clone_environments_non_cfg_invokes_visualizer_clone_fn unit test. This is a correct fix — the test mocks stage with a bare object(), so the USD prim walk in author_scene_partitions would fail without the patch.

Change is correct and necessary. The test now properly isolates its concern (verifying clone callback invocation) without triggering the real USD traversal code, which is separately exercised by the end-to-end test_partitioning_isolates_* tests.

Verdict: Ship it.

@kellyguo11 kellyguo11 moved this to In progress in Isaac Lab May 1, 2026
@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from da3e021 to 019ca00 Compare May 1, 2026 21:10
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

Previous concern about the unit test crashing due to author_scene_partitions being called on a mocked stage has been addressed — the monkeypatch is now in place.

The new commit (019ca00) adds a comment clarifying why the monkeypatch exists. This is a documentation-only change and is correct.

Verdict: Ship it.

@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from 019ca00 to 1a0e549 Compare May 2, 2026 08:16
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

The new commit (1a0e549) adds a clarifying comment in test_clone_environments_non_cfg_invokes_visualizer_clone_fn explaining that the author_scene_partitions monkeypatch exists because the test mocks stage with a bare object(), and that the partition USD walk is exercised end-to-end by the test_partitioning_isolates_* tests below.

This is a documentation-only change that improves code clarity. Previous concerns have been addressed.

Verdict: Ship it.

@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from 1a0e549 to acaba41 Compare May 2, 2026 09:32
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Follow-up Review

The new commit (acaba41) makes no functional changes to the PR. Reviewing the diff between the previous commit and HEAD shows identical code — this appears to be a rebase or no-op commit.

Previous concerns have been addressed. The implementation is correct, test coverage is thorough (with appropriate xfail for the known RTX articulation limitation), and the changelog accurately describes the feature.

Verdict: Ship it.

@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from acaba41 to 76f8fb4 Compare May 12, 2026 07:37
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Summary

This PR adds per-environment omni:scenePartition USD attribute authoring to InteractiveScene for RTX cull-by-env rendering. The implementation writes inheriting primvars on env roots and explicit tokens on cameras, enabling RTX renderers to isolate geometry per-environment. The approach is clean, well-documented, and includes regression tests with appropriate xfail markers for known RTX limitations.

Design Assessment

Architecture: ✅ Good

  • File placement is appropriate — the scene-level partition authoring belongs in InteractiveScene.
  • The method is called at the end of clone_environments(), ensuring both ManagerBasedEnv and Direct envs benefit automatically.
  • Using Sdf.ChangeBlock() for batched USD edits is the correct pattern for performance.
  • The O(N + cameras) complexity is acceptable; avoiding per-descendant authoring is the right call given RTX primvar inheritance.

Cross-module impact: ✅ Low risk

  • The partition attributes are RTX-specific and ignored by renderers that don't support them.
  • No changes to public APIs beyond the new author_scene_partitions() method.
  • Physics tensor views are not affected since authoring happens before sim.reset().

Findings

🔵 Suggestioninteractive_scene.py:378-379: Consider adding a docstring comment clarifying why the token is extracted via rsplit (to handle nested paths correctly).

🔵 Suggestiontest_interactive_scene.py:499,559: The magic threshold values (3.0 and 5.0) for tile diff assertions could benefit from brief inline comments explaining their derivation.

🔵 Suggestion — The existing clone-callback test now requires a monkeypatch for author_scene_partitions. This is properly handled, but consider whether the mock stage in that test should eventually be upgraded to support the full partition flow.

Test Coverage

  • Feature PR: ✅ Coverage adequate
  • Two regression tests added (test_partitioning_isolates_rigid_object, test_partitioning_isolates_articulation)
  • The xfail pattern for the articulation test is a good approach — it will automatically signal when the RTX fix lands
  • Existing tests properly monkeypatched to avoid new dependency
  • Gaps: None critical — the tests exercise the key rendering-isolation behavior

CI Status

  • Core checks passed (labeler, broken links, detect changes)
  • Several checks still pending (pre-commit, license-check, installation tests, docker builds)
  • Recommend waiting for full CI green before merge

Verdict

Ship it

This is a well-designed, non-breaking feature addition that provides automatic scene partitioning for RTX rendering isolation. The implementation follows USD best practices, has appropriate test coverage including forward-looking regression hooks, and the code is clean and well-documented. The minor suggestions above are all optional polish items.

the per-env USD prims are cloned and before the physics backend takes its tensor view
of the stage in ``sim.reset`` — authoring USD attributes after the view exists
invalidates it.
"""
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Style suggestion: Consider adding a brief comment explaining why rsplit("/", 1)[-1] is used here — it correctly handles arbitrarily nested env paths and extracts just the leaf name (e.g., env_3 from /World/envs/env_3).

Suggested change
"""
token = env_path.rsplit("/", 1)[-1] # leaf name, e.g. "env_3"

cube.write_root_pose_to_sim_index(
root_pose=wp.from_torch(root_pose.contiguous(), dtype=wp.transformf),
env_ids=wp.from_torch(torch.arange(scene.num_envs, device=device, dtype=torch.int32)),
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Minor: Consider adding a brief comment explaining the threshold choice (3.0 for RGB mean diff). For future maintainers, it helps to know this was derived from empirical testing where partitioned envs with offset cubes showed diffs well above rendering noise.

)
robot.write_joint_position_to_sim_index(position=target_pos)
robot.set_joint_position_target_index(target=target_pos)
for _ in range(4):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Minor: Same suggestion — a brief comment on why 5.0 was chosen as the threshold would help future maintainers understand the expected visual difference when articulation partitioning works correctly.

Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Summary

This PR adds automatic per-environment omni:scenePartition authoring in InteractiveScene to enable RTX cull-by-env rendering. The implementation writes inheriting primvars at env roots that propagate to descendant geometry via RTX primvar inheritance, plus explicit attributes on cameras. Two regression tests are included, one of which is expected to xfail until an RTX articulation fix lands.

Design Assessment

Architecture: ✅ Sound approach

The design correctly leverages RTX's primvar inheritance for scene partitioning, which is the spec'd mechanism. Key design decisions are well-reasoned:

  1. Placement in _aggregate_scene_data_requirements() — Called after USD cloning but before sim.reset() takes tensor views. This timing is correct and well-documented.

  2. O(N + cameras) complexity — Intentionally avoids per-descendant authoring since RTX honors primvar inheritance. This is the right performance trade-off.

  3. Unconditional authoring — Non-RTX renderers ignore the primvar, so authoring is safe across all backends.

  4. Camera handling — Cameras need the non-primvar omni:scenePartition token explicitly (not via inheritance), which the code correctly handles.

One architectural concern: The method is called from _aggregate_scene_data_requirements(), which semantically aggregates requirements — scene partition authoring is a side effect that arguably doesn't belong there. However, the timing constraint (after cloning, before tensor views) limits placement options, so this is acceptable.

Findings

🔵 Suggestion interactive_scene.py:376-377 — Consider adding a brief comment explaining why cameras need the non-primvar attribute vs. the primvar used for geometry.

# Cameras need explicit omni:scenePartition (not primvar) per RTX spec
elif prim.IsA(UsdGeom.Camera):

🔵 Suggestion interactive_scene.py:373 — The token extraction env_path.rsplit("/", 1)[-1] is clean, but consider using Sdf.Path(env_path).name for consistency with USD API conventions elsewhere in the codebase.

🔵 Suggestion test_interactive_scene.py:515-517 — The randomized cube positions could theoretically result in similar positions across environments (unlikely but possible with only 4 envs). Consider using deterministic, spread-apart positions for more robust test isolation:

# Deterministic spread positions instead of random
root_pose[:, 1] = torch.tensor([-0.4, -0.1, 0.1, 0.4], device=device)  # Y spread
root_pose[:, 2] = torch.tensor([0.8, 1.0, 1.2, 1.4], device=device)   # Z spread

🔵 Suggestion test_interactive_scene.py:473 — The monkeypatch for author_scene_partitions is correct and well-documented. Good defensive testing pattern.

🟡 Warning test_interactive_scene.py — The tests depend on isaaclab_assets.KUKA_ALLEGRO_CFG and build_simulation_context with device="cuda:0". Ensure CI runners have GPU access and the asset is available. The @pytest.mark.isaacsim_ci marker suggests this is handled, but worth verifying.

Test Coverage

  • Feature PR: Yes — Adequate coverage with two complementary tests
  • test_partitioning_isolates_rigid_object: Tests the happy path (RigidObject partitioning)
  • test_partitioning_isolates_articulation: Regression hook for known RTX limitation (xfail)
  • Gaps: No negative tests (e.g., verifying behavior when stage is invalid), but the if not env_prim.IsValid(): continue guard handles this gracefully

CI Status

  • Check changelog fragmentsMissing changelog entry (required for feature PRs)
  • ⏳ Several checks still pending (pre-commit, license-check, Docker builds)
  • ✅ Build Wheel, Broken Links, Labeler passing

Verdict

Minor fixes needed

The implementation is architecturally sound and follows RTX partitioning specs correctly. The code is well-documented with clear docstrings explaining timing constraints and design rationale. Tests are thoughtful, including an xfail marker as a regression hook for a known upstream RTX issue.

Required before merge:

  1. Add changelog fragment (CI is failing on this)

Optional improvements:

  • Minor code suggestions above (comments, USD API consistency)
  • Consider deterministic test positions for robustness

Nice work on the documentation and test strategy! 🎉


Update (6f4895b):

Reviewed incremental changes from cbc7ee76f4895b. The new commits include many unrelated changes (import path updates from isaaclab.utils to isaaclab.utils.configclass, new RenderCfg RT2 settings, camera data warp dtype changes, etc.), but the scene partitioning code in interactive_scene.py and its tests are unchanged.

Previous inline comments still apply:

  • P2: Sdf.VariabilityVaryingVariabilityUniform (not addressed)
  • P2: Usd.TraverseInstanceProxies() for camera traversal (not addressed)
  • Minor suggestions (comments, Sdf.Path usage) — optional, not blocking

No new issues introduced by this commit.

if requirements != current_req:
self.sim.update_scene_data_requirements(requirements)

self.author_scene_partitions()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Architectural note: Calling author_scene_partitions() from _aggregate_scene_data_requirements() is a timing necessity (after cloning, before tensor views), but semantically it's a side effect in a method focused on requirement aggregation. Consider adding a comment explaining this coupling, or in a future refactor, creating a dedicated post-clone hook point.

of the stage in ``sim.reset`` — authoring USD attributes after the view exists
invalidates it.
"""
root_layer = self.stage.GetRootLayer()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Minor: Consider using Sdf.Path(env_path).name instead of env_path.rsplit("/", 1)[-1] for consistency with USD API conventions used elsewhere in the codebase.

)
# Avoid binding this unit test to global SimulationContext singleton state.
monkeypatch.setattr(InteractiveScene, "device", property(lambda self: "cpu"))
# This test mocks ``stage`` with a bare ``object()``; the partition USD walk needs a real
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Good defensive testing pattern — monkeypatching out author_scene_partitions for the mock-stage test prevents crashes while the real functionality is exercised by the dedicated test_partitioning_isolates_* tests below.

@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from cbc7ee7 to 6f4895b Compare May 16, 2026 08:42
@kellyguo11 kellyguo11 moved this from In progress to Done in Isaac Lab May 17, 2026
@kellyguo11 kellyguo11 moved this from Done to Ready to merge in Isaac Lab May 17, 2026
@kellyguo11 kellyguo11 moved this from Ready to merge to In progress in Isaac Lab May 18, 2026
@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from 6f4895b to 8bd2846 Compare May 21, 2026 23:04
@github-actions github-actions Bot added the isaac-sim Related to Isaac Sim team label May 21, 2026
@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch 3 times, most recently from 07ac6af to 2cfa75d Compare June 1, 2026 06:29
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot — Follow-up Review

Summary

Branch was force-pushed/squashed to a single commit (2cfa75d) with message "fix scene partition", rebasing onto latest develop.

Changes from Previous Review

The diff content is functionally identical to the previously reviewed changes. This is a clean rebase/squash — no new code changes introduced.

Key components unchanged:

  • InteractiveScene.author_scene_partitions() method with correct Sdf.ChangeBlock() batching
  • Camera partition token authoring in camera_view.py
  • RTX scene partitioning enabled in all Kit app files
  • Isolated test_scene_partitioning.py with proper test isolation for RTX state
  • Monkeypatching in test_interactive_scene.py for mock-stage tests
  • Golden images regenerated for new partition behavior

CI Status

  • pre-commit: success
  • Build Wheel: success
  • ⏳ Several checks still in progress (Installation Tests, Docs, license-check)
  • Check changelog fragments: failure — the changelog entry exists (zhengyuz-scene-partitioning.rst), this may be a CI config issue

Previous Findings

All minor suggestions from prior reviews remain applicable but are non-blocking:

  • Silent continue on invalid env prim (could add warning log)
  • Camera path split assumption comment (minor readability)
  • Sdf.Path API consistency (style nit)

Verdict

Still ready for merge.

The squash/rebase is clean. Human approval from @kellyguo11 already obtained. Once CI stabilizes and the changelog check is resolved, this PR is good to go.


Update (commit ccb384a): The only change since the last review is the addition of source/isaaclab_ov/changelog.d/zhengyuz-scene-partitioning.skip — a changelog skip marker that should resolve the previously-failing "Check changelog fragments" CI check. No functional code changes. Previous inline suggestions (VariabilityUniform, instance proxy traversal, style nits) remain as-is — they are non-blocking and the original comments are still visible. ✅ No new issues.---

Update (commit cb62aef): New push includes two concerns:

  1. Scene partitioning improvements:

    • author_scene_partitions() now called directly from clone_environments() instead of from _aggregate_scene_data_requirements() — addresses the architectural coupling concern from previous review.
    • Camera partition authoring added to camera_view.py (correctly sets omni:scenePartition token on spawned visualizer cameras).
    • OvRTX renderer's create_scene_partition_attributes commented out (since InteractiveScene now handles it centrally). Minor nit: would be cleaner to remove the line + unused import rather than comment-out.
  2. Deferred pxr imports (separate contributor: jichuanh): Moves all from pxr import … statements from module-level to function bodies / TYPE_CHECKING blocks across ~10 files. This fixes Kit's USD binding registration when pxr is imported before AppLauncher. Well-structured change.

Status of previous inline findings:

  • author_scene_partitions() placement: Fixed (moved to clone_environments()).
  • VariabilityVaryingVariabilityUniform: Not addressed (non-blocking).
  • ⬜ Instance proxy traversal (Usd.TraverseInstanceProxies()): Not addressed (non-blocking).
  • ⬜ Style nits (rsplit comment, Sdf.Path API): Not addressed (non-blocking).

No new blocking issues.


Update (commit 504a5ed):VariabilityVaryingVariabilityUniform fix applied — the attribute is now correctly authored as uniform with isCustom=True. This was the main semantic correctness issue from my earlier reviews.

Status of previous findings:

  • VariabilityUniform: Fixed in this commit.
  • ⬜ Instance proxy traversal (Usd.TraverseInstanceProxies()): Not addressed (non-blocking).
  • ⬜ Style nits (orphaned docstring, rsplit comment, Sdf.Path API): Not addressed (non-blocking).

No new issues introduced. ✅


Update (commit 30e6ef5): Significant architectural refactoring — scene partitioning logic has been moved from InteractiveScene into IsaacRtxRenderer.prepare_stage(). This is the right layering: the renderer now owns its own scene-preparation concerns rather than requiring the scene to know about renderer internals.

Key changes reviewed:

  1. isaac_rtx_renderer.pyprepare_stage() is no longer a no-op:

    • Iterates /World/envs/env_{i} prims using Usd.PrimRange
    • Writes primvars:omni:scenePartition (token) on each env root for primvar inheritance
    • Writes omni:scenePartition (token) on UsdGeom.Camera descendants only
    • Uses Sdf.ChangeBlock() for batched notification — ✅ correct
    • Uses Sdf.VariabilityUniform with isCustom=True — ✅ correct (addresses earlier review feedback)
    • Properly skips non-env-root, non-Camera prims via continue — efficient
  2. camera_view.py — visualizer camera partition authoring:

    • Sets omni:scenePartition on spawned visualizer cameras using the standard Usd API (not low-level Sdf)
    • Token derived from path.split("/")[-2] (the env name) — works correctly for the expected /World/envs/env_N/CameraName pattern
  3. Kit app files (6 files): All correctly add renderer.scenePartitioning.enabled = true before RTX init

  4. New test: test_isaac_rtx_renderer_scene_partitioning.py:

    • Well-motivated isolation (RTX partition state persists across scenes in one Kit app session)
    • Tests both RigidObject and Articulation scenarios
    • Uses env_spacing=0.0 + distinct poses to verify partitioning isolation — good test design
    • Asserts tile RGB difference thresholds (>3.0 rigid, >5.0 articulation)
  5. Golden images: Regenerated as expected from partition-correct rendering. LFS pointers updated.

  6. Changelog: Proper .rst entry + .skip markers for packages without user-facing changes.

Remaining non-blocking observations:

  • Instance proxy traversal: Usd.PrimRange(env_prim) won't traverse instance proxies. If replicate_physics=True (USD native instancing), cameras inside instances won't get the attribute. However, the test uses replicate_physics=False and the current InteractiveScene workflow calls prepare_stage after cloning — so this is acceptable for the current use case. Worth a follow-up if native instancing is supported later.
  • camera_view.py uses high-level API vs renderer uses low-level Sdf API: Minor style inconsistency but both are correct. The renderer path is performance-sensitive (many envs), so low-level Sdf is justified there.

No blocking issues. ✅ Ready for merge.

@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from ccb384a to cb62aef Compare June 1, 2026 08:50
attr_path = prim.GetPath().AppendProperty("omni:scenePartition")
else:
continue
Sdf.JustCreatePrimAttributeInLayer(root_layer, attr_path, token_type, variability, False)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try this change on your local machine?

    Sdf.JustCreatePrimAttributeInLayer(root_layer, attr_path, token_type, Sdf.VariabilityUniform, True)

Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-Review After Latest Commits (504a5ed)

Summary

This PR adds per-environment omni:scenePartition authoring in InteractiveScene for RTX cull-by-env rendering. The implementation moves partition attribute creation from the OvRTX renderer to the core scene infrastructure, ensuring all Kit apps benefit from partitioning automatically.

Latest Change: change to variability uniform

The most recent commit (504a5ed) changes the attribute variability to Sdf.VariabilityUniform. This is the correct approach:

Sdf.JustCreatePrimAttributeInLayer(root_layer, attr_path, token_type, Sdf.VariabilityUniform, True)

Good: Using VariabilityUniform is semantically correct for scene partition tokens since they:

  • Don't change over time during the simulation
  • Are configuration/topology data, not animated values
  • Match USD best practices for attributes that describe scene structure

Architecture Review

Strengths:

  1. Clean separation - Partitioning is now handled at scene construction time, not at renderer preparation
  2. Kit app enablement - All 6 Kit files now enable renderer.scenePartitioning.enabled before RTX init
  3. Comprehensive test coverage - New test_scene_partitioning.py with both RigidObject and Articulation isolation tests
  4. Primvar inheritance - Using primvars:omni:scenePartition on env roots propagates correctly to descendant geometry
  5. Camera handling - Cameras get explicit omni:scenePartition attributes (not primvars) as required by RTX

The implementation pattern:

  • Env roots get primvars:omni:scenePartition (inherited by geometry)
  • UsdGeom.Camera descendants get omni:scenePartition (direct attribute)
  • Uses Sdf.ChangeBlock() for efficient batch USD edits

Minor Observations

  1. Commented-out code in ovrtx_renderer.py:

    # create_scene_partition_attributes(stage, num_envs, self._use_ovrtx_cloning)

    Consider removing the import and commented call entirely if this function is no longer used anywhere, to reduce dead code.

  2. camera_view.py duplication: The camera partition logic in create_visualizer_camera() partially duplicates what author_scene_partitions() does for cameras. Since visualizer cameras are created after scene cloning, this is likely intentional, but a comment clarifying the relationship would help future maintainers.

  3. Test isolation note: The docstring explaining why these tests live in a separate file (renderer state pollution) is excellent documentation. 👍

Testing

The test design is solid:

  • test_partitioning_isolates_rigid_object() - validates geometry partitioning
  • test_partitioning_isolates_articulation() - validates articulated asset partitioning
  • Both use tile difference thresholds (3.0 and 5.0) to detect rendering isolation

The golden images have been regenerated to reflect the new partitioning behavior.


Automated review by isaaclab-review-bot 🤖

Comment thread source/isaaclab/isaaclab/scene/interactive_scene.py Outdated
@huidongc huidongc requested review from huidongc and pbarejko June 1, 2026 11:27
@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from 504a5ed to 30e6ef5 Compare June 1, 2026 21:37
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-Review After Latest Commit (30e6ef5)

Summary

Great work addressing the reviewer feedback! This commit properly moves the scene partition authoring logic into IsaacRtxRenderer.prepare_stage(), following the guidance from @huidongc, @pbarejko, and @ooctipus that renderer-specific implementation details belong in the renderer layer.

Key Changes in This Commit

1. Architecture Refactor (✅ Approved Approach)

  • Scene partition authoring now lives in IsaacRtxRenderer.prepare_stage() instead of InteractiveScene
  • This is the correct separation of concerns — RTX-specific attributes are authored by the RTX renderer
  • The prepare_stage() method now properly handles:
    • primvars:omni:scenePartition on env roots (inherited by descendant geometry)
    • omni:scenePartition on UsdGeom.Camera descendants (direct attribute)

2. Tests Relocated

  • Tests moved from source/isaaclab/test/scene/ to source/isaaclab_physx/test/renderers/
  • Makes sense given the partitioning is now renderer-specific

3. Kit App Files (✅ Consistent)

  • All 6 Kit files have renderer.scenePartitioning.enabled = true added
  • Consistent comment: # Enable before RTX initialization so env-root partitions are honored

Code Review Notes

isaac_rtx_renderer.py - Implementation looks solid:

for prim in Usd.PrimRange(env_prim):
    if prim == env_prim:
        attr_path = prim.GetPath().AppendProperty("primvars:omni:scenePartition")
    elif prim.IsA(UsdGeom.Camera):
        attr_path = prim.GetPath().AppendProperty("omni:scenePartition")
    else:
        continue
  • Uses Sdf.ChangeBlock() for efficient batch USD edits ✅
  • Correctly uses Sdf.VariabilityUniform for static partition tokens ✅
  • Handles env root primvar vs camera direct attribute correctly ✅

camera_view.py - Visualizer camera handling:

attr = cam_prim.GetAttribute("omni:scenePartition")
if not attr.IsValid():
    attr = cam_prim.CreateAttribute("omni:scenePartition", Sdf.ValueTypeNames.Token)
attr.Set(path.split("/")[-2])
  • Necessary because visualizer cameras are created after prepare_stage() is called
  • Uses path.split("/")[-2] which extracts the env name (e.g., env_0 from /World/envs/env_0/Camera)

Minor Observations

  1. Usd.PrimRange traversal predicate: The default traversal predicate in Usd.PrimRange does not descend into USD instance proxies. If env prims use USD instancing for cameras, they would be missed. However, since the comment in the tests mentions replicate_physics=False, this is likely not an issue for the current use case. Worth documenting if this assumption matters.

  2. OvRTX renderer: Does the OvRTX renderer (in isaaclab_ov) need similar prepare_stage() logic, or does it handle partitioning differently? The skip file suggests no changes needed, but confirming the OvRTX path works would be good.

  3. Changelog wording: The changelog says "Fixed" but this is really a new feature (enabling partitioning). Consider "Added" for accuracy.

Testing

The relocated tests exercise both RigidObject and Articulation partitioning scenarios with appropriate tile-difference thresholds. The test isolation rationale in the docstring is excellent documentation.


Automated review by isaaclab-review-bot 🤖


Update (b685361):

Reviewed the incremental changes from 504a5edbb685361e. This is a large commit that combines scene-partitioning refinements with the broader core/contrib task restructure.

Previous concerns status:

  • Sdf.VariabilityVaryingSdf.VariabilityUniform — Fixed. The code now correctly uses Sdf.VariabilityUniform for the static partition token.
  • Architectural placementauthor_scene_partitions() is now called from clone_environments() directly (not as a side effect of _aggregate_scene_data_requirements()). Cleaner call site.

Notable design change: Scene partition authoring moved from IsaacRtxRenderer.prepare_stage() back to InteractiveScene.author_scene_partitions(). This is a reasonable architectural choice — the USD primvar is renderer-agnostic metadata that both RTX and OvRTX consume, so placing it at the scene level avoids duplication and correctly separates "what to partition" (scene) from "how to render partitions" (renderer). The OvRTX renderer's create_scene_partition_attributes call is now commented out accordingly.

No new issues found in the scene-partitioning changes. The core/contrib restructure is mechanical (import path renames) and looks consistent.


Update (065ac79): Reviewed incremental changes from b685361e065ac79c. This commit refines the architecture and adds an orthogonal event manager feature.

Previous concerns status:

  • Sdf.VariabilityUniform — Still correctly used in IsaacRtxRenderer.prepare_stage()
  • ✅ Architecture — Scene partition authoring is now cleanly in IsaacRtxRenderer.prepare_stage() using Sdf.ChangeBlock() and direct Sdf layer edits. Good separation of concerns.
  • ℹ️ Usd.PrimRange instance proxy traversal — Still uses default predicate, but since replicate_physics=False is required for partitioning to work, this is acceptable for current use cases.
  • ℹ️ Previous inline comments on interactive_scene.py and test_scene_partitioning.py are now moot — those files no longer contain partition logic (moved to renderer layer).

New in this commit:

  1. resample_interval_on_reset added to EventTermCfg — well-documented, well-tested, clean implementation in both standard and experimental (Warp) event managers.
  2. camera_view.py now authors omni:scenePartition on visualizer cameras created after prepare_stage() — necessary since these cameras are spawned dynamically.
  3. Test file test_isaac_rtx_renderer_scene_partitioning.py has excellent isolation rationale in its module docstring explaining why it needs its own file.
  4. Golden images regenerated to match new partitioning behavior.

No new issues found. The code is well-structured and the test coverage is thorough.


Update (4290e40): Reviewed incremental changes from 065ac79c4290e40e. This is a large commit combining the scene-partitioning feature (unchanged from previous review) with a significant cartpole task restructure.

Previous concerns status:

  • ✅ All previous concerns addressed — no regressions in scene-partitioning code.
  • IsaacRtxRenderer.prepare_stage() unchanged — still uses Sdf.VariabilityUniform, Sdf.ChangeBlock(), correct primvar/camera attribute split.
  • camera_view.py partition authoring for visualizer cameras unchanged.

Cartpole restructure (orthogonal to scene partitioning):

  • Merged direct_cartpole + manager_cartpole → single core/cartpole package with _direct_/_manager_ infixes.
  • Dropped -v0 suffixes from task IDs; manager-based workflow is default (no suffix), direct uses -Direct.
  • Removed ~35 deprecated per-variant alias registrations — clean consolidation via presets= CLI.
  • Documentation, scripts, tests, benchmarks all updated consistently.
  • Changelogs added for breaking changes.

No new issues found. The scene-partitioning implementation remains solid and the cartpole restructure is mechanical and consistent.


Update (3bcfa8d): Reviewed incremental changes from 4290e40e3bcfa8dc. This is a large release-prep commit that bumps versions across all packages, generates CHANGELOGs, and adds several orthogonal features.

Previous concerns status:

  • ✅ All previous concerns remain addressed — no regressions in scene-partitioning code.
  • IsaacRtxRenderer.prepare_stage() unchanged — still uses Sdf.VariabilityUniform, Sdf.ChangeBlock(), correct primvar/camera attribute split.
  • camera_view.py visualizer camera partition authoring unchanged.
  • ✅ Kit app files still have renderer.scenePartitioning.enabled = true in all 6 files.
  • ✅ Test file test_isaac_rtx_renderer_scene_partitioning.py unchanged.

What's new in this commit (relevant to this PR):

  1. Version bumps & changelog generationisaaclab 6.1.0→6.2.0, isaaclab_tasks 1.10.1→2.0.0, isaaclab_newton 0.13.0→0.14.0, isaaclab_physx 1.1.0→1.1.1, plus all other subpackages. The scene-partitioning changelog entry correctly appears under isaaclab 6.2.0 Fixed section: "Enabled RTX scene partitioning in Isaac Lab Kit app files and added top-level scene partitioning regression coverage."
  2. get_scales() → ProxyArray (orthogonal, by @jichuanh) — BaseFrameView.get_scales(), UsdFrameView.get_scales(), FabricFrameView.get_scales(), OvPhysxFrameView.get_scales(), and NewtonSiteFrameView.get_scales() now return ProxyArray for API consistency. Breaking change documented in changelogs.
  3. reshape_data_to_view_3d torch support (orthogonal, by @antoiner) — Newton, OvPhysX, and PhysX RigidObjectCollection implementations now accept torch.Tensor in addition to wp.array.
  4. Math docstring correctioncombine_frame_transforms and subtract_frame_transforms docs corrected: "from frame A to B""from frame B to A" (correct for T_AB convention).
  5. Golden images regenerated — Cartpole golden images updated to match per-env partitioning (expected).
  6. .skip files addedzhengyuz-scene-partitioning.skip files in isaaclab_physx, isaaclab_ov, isaaclab_tasks correctly suppress changelog entries for test-only changes in those packages.

No new issues found. The scene-partitioning feature is complete and well-integrated into the release. All version bumps and changelog entries are consistent.


Update (e183198): Reviewed incremental changes from 3bcfa8dce1831989. This commit is a rebase/cleanup that brings the PR to its final form.

Previous concerns status:

  • ✅ All previous concerns remain addressed — no regressions in scene-partitioning code.
  • IsaacRtxRenderer.prepare_stage() unchanged — still uses Sdf.VariabilityUniform, Sdf.ChangeBlock(), correct primvar/camera attribute split.
  • camera_view.py visualizer camera partition authoring unchanged.
  • ✅ Kit app files still have renderer.scenePartitioning.enabled = true in all 6 files.
  • ✅ Test file test_isaac_rtx_renderer_scene_partitioning.py unchanged.
  • kit_visualizer.py viewport camera scene partition tagging unchanged.

Summary of files in this version (22 files changed):

  1. 6 Kit app files — All consistently add renderer.scenePartitioning.enabled = true before RTX initialization.
  2. isaac_rtx_renderer.pyprepare_stage() authors primvars:omni:scenePartition on env roots and omni:scenePartition on UsdGeom.Camera descendants using efficient Sdf.ChangeBlock() batch edits.
  3. camera_view.py — Authors omni:scenePartition on dynamically-created visualizer cameras.
  4. kit_visualizer.py — Tags viewport camera with first visible env partition so RTX renders correctly in interactive mode.
  5. test_isaac_rtx_renderer_scene_partitioning.py (new, 187 lines) — Two regression tests: rigid object and articulation partitioning isolation verified via per-tile RGB difference thresholds.
  6. Changelog entries and .skip files — Properly placed under isaaclab and isaaclab_visualizers Fixed sections; other packages have skip files.
  7. Golden images regenerated — 6 cartpole golden images updated to match new partitioning behavior.

No new issues found. The implementation is complete, well-tested, and ready for merge.


Update (10e9cc0): Reviewed new commit 10e9cc06 — "Update cartpole rendering golden images". This commit only updates 3 LFS golden image pointers for Isaac-Cartpole-Camera-Direct test renderings (constant_diffuse, diffuse_mdl, full_mdl). No logic changes — these appear to be expected regenerated test baselines due to the scene partitioning changes. No new concerns.


Update (2566931): Reviewed incremental change from 10e9cc0625669312. Single file modified: isaac_rtx_renderer.py.

Change: Made omni:scenePartition attribute creation idempotent. Previously, Sdf.JustCreatePrimAttributeInLayer() was called unconditionally which raises if the attribute spec already exists (e.g., when multiple renderer backends share the same stage). Now it:

  1. Checks if root_layer.GetAttributeAtPath(attr_path) returns an existing spec
  2. Only creates the attribute when absent (attr_spec is None)
  3. Always (re)assigns the per-env partition token regardless

Assessment: ✅ Good defensive fix. This addresses a real multi-renderer scenario where two backends could both call prepare_stage() on the same USD stage. The idempotent guard prevents Sdf spec-creation errors while still ensuring correct token values. Comment explains the rationale clearly.

No new issues found. Clean, minimal, well-commented fix.

if len(sim_utils.find_matching_prims(path)) == 0:
spawn.func(path, spawn, translation=(0.0, 0.0, 0.0), orientation=(0.0, 0.0, 0.0, 1.0))

stage = sim_utils.get_current_stage()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some comment in the code to explain what the code block here is intended for? It is not as obvious to me. :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I don't follow: the visualization camera is supposed to show all the envs, how do we need to modify the env cameras for visualization purpose?

@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from 30e6ef5 to b685361 Compare June 2, 2026 05:23

logger.info("Preparing stage for export (%d envs, cloning=%s)...", num_envs, self._use_ovrtx_cloning)
create_scene_partition_attributes(stage, num_envs, self._use_ovrtx_cloning)
# create_scene_partition_attributes(stage, num_envs, self._use_ovrtx_cloning)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore this call.

@@ -0,0 +1 @@
No user-facing isaaclab_ov changelog entry needed for scene partitioning test changes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can be reverted.

Comment thread source/isaaclab/isaaclab/scene/interactive_scene.py Outdated
@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch 3 times, most recently from 4290e40 to 3bcfa8d Compare June 2, 2026 21:51
@ooctipus ooctipus force-pushed the zhengyuz/scene-partitioning branch from 3bcfa8d to e183198 Compare June 2, 2026 21:58
ooctipus added 2 commits June 2, 2026 17:07
When a scene registers cameras with multiple distinct renderer configs,
RenderContext creates more than one IsaacRtxRenderer backend, and each runs
prepare_stage() on the same USD stage. Sdf.JustCreatePrimAttributeInLayer
raises if the omni:scenePartition attribute spec was already authored by a
prior backend, crashing env creation with a pxr.Tf.ErrorException.

Only create the attribute spec when absent, then assign the per-env token
either way, so repeated prepare_stage calls on a shared stage are safe.
@ooctipus ooctipus merged commit e0ccad6 into isaac-sim:develop Jun 3, 2026
37 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in Isaac Lab Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team isaac-sim Related to Isaac Sim team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants