Skip to content

Enable OVRTX cloning by default#5591

Merged
kellyguo11 merged 8 commits into
isaac-sim:developfrom
huidongc:ovrtx-cloning
May 15, 2026
Merged

Enable OVRTX cloning by default#5591
kellyguo11 merged 8 commits into
isaac-sim:developfrom
huidongc:ovrtx-cloning

Conversation

@huidongc

@huidongc huidongc commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Added :func:~isaaclab.cloner.cloner_utils.is_homogeneous to detect whether a :class:~isaaclab.cloner.ClonePlan
    assigns every environment from every source (a homogeneous clone mask).

  • Fixed cloned environments disappearing from tiled camera output if
    :attr:~isaaclab_ov.renderers.OVRTXRendererCfg.use_ovrtx_cloning is set to True,
    by correcting scene-partition attribute creation on env roots and cameras.

  • Renamed the use_cloning field on :class:~isaaclab_ov.renderers.OVRTXRendererCfg to use_ovrtx_cloning.
    Changed its default value to True. This will bring notable speedup for the total startup time (Launch to Train),
    esp. for large-scale env setups. On Isaac-Dexsuite-Kuka-Allegro-Lift-v0 with 1024 env clones, the total startup time
    dropped from ~78s to ~43s. Note that if use_ovrtx_cloning is enabled but the env setup is heterogeneous, the
    OVRTX renderer will disable the internal cloning path and logs a warning, exporting the full multi-environment stage
    instead (same effect as setting use_ovrtx_cloning to False for that run).

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Please attach before and after screenshots of the change if applicable.

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 May 12, 2026
@huidongc huidongc changed the title Ovrtx cloning Enable OVRTX cloning May 12, 2026
@huidongc huidongc changed the title Enable OVRTX cloning Enable OVRTX cloning by default May 12, 2026

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

Copy link
Copy Markdown

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 fixes cloned environments disappearing from tiled camera output when use_cloning=True by correcting scene-partition attribute creation. It also changes the default of use_cloning to True, yielding significant startup speedups (~45% faster on large-scale setups).

Design Assessment

Architecture: Sound

The refactor simplifies create_cloning_attributescreate_scene_partition_attributes with cleaner semantics:

  • Removed unnecessary complexity: No longer iterates over non-camera prims to set attributes (the old code set primvars:omni:scenePartition on every prim, but the new approach correctly sets it only on env roots and cameras)
  • Better separation of concerns: Env roots get primvars:omni:scenePartition, cameras get omni:scenePartition (different attribute names per USD convention)
  • Improved logging: Added debug logging for attribution and warning for missing env prims
  • Return type change: Function no longer returns object count (which was unused/misleading since it counted objects that don't need the attribute)

Findings

🔵 Info ovrtx_usd.py:165 - Function rename and docstring update clearly explain the new behavior. Good documentation.

🔵 Info ovrtx_usd.py:183-185 - The key fix: Previously the loop skipped the env root prim but set primvars:omni:scenePartition on all descendant prims. Now it correctly sets the attribute on the env root and only omni:scenePartition on cameras. This matches OVRTX's expected attribute schema.

🔵 Info ovrtx_renderer_cfg.py:37 - Default changed from False to True. This is a behavioral change for users who relied on the default. The changelog correctly documents this, and the performance benefit (78s → 43s) justifies the change.

🟡 Minor ovrtx_usd.py:180 - The warning log on missing env prim is good, but consider whether this should be an error in strict mode, as a missing env_0 is likely a configuration bug.

Test Coverage

No new tests are included in this PR. Given that:

  1. This is a bug fix for an existing feature
  2. The change is in rendering infrastructure that typically requires GPU/Isaac Sim runtime
  3. The fix was validated empirically (1024 envs, Isaac-Dexsuite benchmark)

Manual testing appears sufficient for this change, though unit tests for the attribute-setting logic (with a mock stage) would be a nice-to-have.

Verdict

Ship it

Clean bug fix with clear performance benefits. The code simplification is appropriate, and the changelog correctly documents both the fix and the default change.


Update (6722131): ✅ Reviewed incremental changes from de1b7286722131. The new commits are merge commits from develop branch (24 commits) — no changes to the actual PR content (OVRTX cloning fix). The original review findings remain valid.


Update (d546776): ✅ Reviewed incremental changes from 6722131d546776. The new commits are a v5.2.0 release merge (version bumps and changelog consolidation across isaaclab, isaaclab_ov, isaaclab_newton, isaaclab_physx, isaaclab_ovphysx, isaaclab_mimic, isaaclab_tasks). No changes to the actual PR content (OVRTX cloning fix). The original review findings remain valid.


Update (ab783f0): ✅ Good improvement! Added Sdf.ChangeBlock() context manager around attribute creation loop in create_scene_partition_attributes. This batches USD layer edits, reducing overhead from repeated change notifications — a solid micro-optimization for scenes with many environments. Original review findings remain valid.


Update (2eb503c): ✅ Nice backward-compatibility addition! This commit adds OVRTX 0.2.0 support:

  • Gates cloning on _IS_OVRTX_0_3_0_OR_NEWER (older versions fallback gracefully)
  • New enable_scene_partition_workaround parameter sets primvars:omni:scenePartition on ALL prims for OVRTX 0.2.0 (which lacks primvar inheritance)
  • Parameter renamed use_cloninguse_ovrtx_cloning for clarity
  • Updated docstrings to document version requirements

Note: The Sdf.ChangeBlock() from the previous commit was removed — presumably the per-prim workaround iteration for 0.2.0 makes batching less beneficial. Original review verdict stands: Ship it


Update (cfd1272): ✅ Reviewed incremental changes from 2eb503c9cfd12727. Changes include:

  • Documentation improvements: Installation instructions now use ./isaaclab.sh -p -m pip install leapp for consistency
  • Tutorial restructuring for LEAPP export workflow with clearer steps
  • Changelog fixes (proper RST bullet formatting, added is_homogeneous utility function documentation)
  • Minor docstring wording improvements (iffif)
  • New changelog validation: Rejects orphan paragraphs that would cause Sphinx build failures

No changes to the OVRTX cloning core logic. Original review verdict stands: Ship it


Update (c4dd368): ✅ Reviewed incremental changes from cfd12727c4dd368f. Test infrastructure update: increased timeout for test_rsl_rl_export_flow.py from 4000s to 10000s (test runs 54 tasks with 600s timeout each). Reasonable adjustment to prevent CI flakiness. No changes to OVRTX cloning logic. Original review verdict stands: Ship it


Update (ab7057f): ✅ Reverted the previous timeout change for test_rsl_rl_export_flow.py back to 4000s (from 10000s). No changes to OVRTX cloning logic. Original review verdict stands: Ship it

@huidongc huidongc requested review from ncournia-nv and pbarejko May 12, 2026 12:53
@greptile-apps

greptile-apps Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a bug where cloned environments disappeared from tiled camera output when use_cloning=True in OVRTXRendererCfg, and simultaneously flips the default of use_cloning from False to True for a ~45% startup speedup on large env counts.

  • Bug fix (ovrtx_usd.py): The old create_cloning_attributes skipped the env root prim itself but set primvars:omni:scenePartition on every non-camera child; the new create_scene_partition_attributes correctly places the attribute on the env root and only sets omni:scenePartition on camera prims discovered via Usd.PrimRange.
  • Default change (ovrtx_renderer_cfg.py): use_cloning is now True by default, so users relying on the previous full-stage export behavior must now opt out explicitly via use_cloning=False.
  • Rename: create_cloning_attributescreate_scene_partition_attributes with a None return type (the old int return counting processed objects was unused at every call site).

Confidence Score: 4/5

The fix is internally consistent and the camera disappearance bug is addressed by correctly placing primvars:omni:scenePartition on env roots instead of child prims; the default flip to use_cloning=True is the main change that could surprise existing users at upgrade time.

The attribute placement logic is a targeted, well-understood correction, and the renderer import rename is purely mechanical. The only risks are the implicit default change for downstream users who never set use_cloning explicitly, and the minor ambiguity around Usd.PrimRange visiting the env root itself in the camera loop — neither of which represents a defect on paths that follow the expected scene layout.

ovrtx_renderer_cfg.py deserves a second look regarding the default flip and its impact on users with non-standard scene hierarchies; ovrtx_usd.py is worth checking for the PrimRange root-inclusion behavior.

Important Files Changed

Filename Overview
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_usd.py Core logic change: env root now gets primvars:omni:scenePartition (previously skipped), only cameras get omni:scenePartition, and non-camera children no longer receive any partition attribute; Usd.PrimRange visits env_prim itself so the Camera check could apply to the root too, though env roots are never Camera prims in practice.
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_cfg.py Single boolean default flip (use_cloning: bool = FalseTrue); breaking behavior change for existing users who did not set this field explicitly.
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py Mechanical rename of create_cloning_attributescreate_scene_partition_attributes in import and call site; no behavioral change.
source/isaaclab_ov/changelog.d/huidongc-ovrtx-cloning.rst New changelog fragment documenting the bug fix and default change; content is accurate and well-described.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[prepare_stage called] --> B{use_cloning?}
    B -- True --> C[env_indices = 0]
    B -- False --> D[env_indices = 0..num_envs-1]
    C --> E[create_scene_partition_attributes]
    D --> E
    E --> F[For each env_idx]
    F --> G{env_prim valid?}
    G -- No --> H[log warning, skip]
    G -- Yes --> I[Set primvars:omni:scenePartition on env root]
    I --> J[PrimRange walk under env root]
    J --> K{prim IsA Camera?}
    K -- Yes --> L[Set omni:scenePartition on camera]
    K -- No --> M[skip]
    L --> N[Next prim]
    M --> N
    N --> J
    I --> O[export_stage_for_ovrtx]
    O --> P{use_cloning AND num_envs > 1?}
    P -- Yes --> Q[Deactivate env_1..env_N-1]
    Q --> R[Export stage with only env_0]
    R --> S[Reactivate all envs]
    P -- No --> T[Export full stage]
Loading

Reviews (1): Last reviewed commit: "add note related to drop of the total st..." | Re-trigger Greptile

Comment thread source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_usd.py
Comment thread source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_cfg.py Outdated
Comment thread source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_usd.py
Comment thread source/isaaclab_ov/changelog.d/huidongc-ovrtx-cloning.rst
Comment thread source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_usd.py
Comment thread source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_cfg.py Outdated
@kellyguo11 kellyguo11 moved this to Ready to merge in Isaac Lab May 15, 2026
@kellyguo11 kellyguo11 merged commit 9989d27 into isaac-sim:develop May 15, 2026
53 of 56 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in Isaac Lab May 15, 2026
@isaaclab-review-bot isaaclab-review-bot Bot mentioned this pull request May 16, 2026
7 tasks
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request May 18, 2026
# Description

* Added :func:`~isaaclab.cloner.cloner_utils.is_homogeneous` to detect
whether a :class:`~isaaclab.cloner.ClonePlan`
assigns every environment from every source (a homogeneous clone mask).

* Fixed cloned environments disappearing from tiled camera output if
:attr:`~isaaclab_ov.renderers.OVRTXRendererCfg.use_ovrtx_cloning` is set
to ``True``,
by correcting scene-partition attribute creation on env roots and
cameras.

* Renamed the ``use_cloning`` field on
:class:`~isaaclab_ov.renderers.OVRTXRendererCfg` to
``use_ovrtx_cloning``.
Changed its default value to ``True``. This will bring notable speedup
for the total startup time (Launch to Train),
esp. for large-scale env setups. On Isaac-Dexsuite-Kuka-Allegro-Lift-v0
with 1024 env clones, the total startup time
dropped from ~78s to ~43s. Note that if ``use_ovrtx_cloning`` is enabled
but the env setup is heterogeneous, the
OVRTX renderer will disable the internal cloning path and logs a
warning, exporting the full multi-environment stage
instead (same effect as setting ``use_ovrtx_cloning`` to ``False`` for
that run).


## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Screenshots

Please attach before and after screenshots of the change if applicable.

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Co-authored-by: Kelly Guo <kellyg@nvidia.com>
@huidongc huidongc deleted the ovrtx-cloning branch June 4, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants