Skip to content

Allow for automatic switching between ovrtx and isaac sim RTX - #6246

Merged
mataylor-nvidia merged 36 commits into
isaac-sim:developfrom
mataylor-nvidia:mataylor/rtx-preset
Jun 25, 2026
Merged

Allow for automatic switching between ovrtx and isaac sim RTX#6246
mataylor-nvidia merged 36 commits into
isaac-sim:developfrom
mataylor-nvidia:mataylor/rtx-preset

Conversation

@mataylor-nvidia

@mataylor-nvidia mataylor-nvidia commented Jun 23, 2026

Copy link
Copy Markdown

Description

Introduce a new general "RTX" preset, where a user does not need to understand the differences and caveats between Isaac Sim RTX vs. ovrtx. As a user, they can specify presets=rtx, and we will have logic to determine whether Isaac Sim RTX or ovrtx should be used. Users can still explicitly specify presets=ovrtx or presets=isaacsim_rtx, and we will produce an error if any invalid combinations are provided (e.g. ovrtx + isaac sim).

If a user specifies presets=rtx, runs physx from isaac sim or uses the kit visualizer, we will use isaac sim RTX.

If a user specifies presets=rtx, does not launch any isaac sim instances (e.g. no kit visualizer and no isaac sim physx), then we can use ovrtx (or whichever option is more performant)

Fixes OMPE-92354

Type of change

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

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

@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces a new presets=rtx domain preset that automatically selects between Isaac Sim RTX (IsaacRtxRendererCfg) and OVRTX (OVRTXRendererCfg) at launch time, so users no longer need to know which renderer is compatible with their chosen physics backend or visualizer. It also fixes a pre-existing ordering bug where presets=rtx combined with --livestream would incorrectly resolve to OVRTX (now _ensure_livestream_kit_visualizer runs before scan()).

  • presets.py: adds _AutoRtxPresetCfg (a sentinel @configclass with renderer_type="auto_rtx") as the rtx field of MultiBackendRendererCfg; the sentinel is intentionally not a RendererCfg subclass so existing isinstance checks stay clean.
  • sim_launcher.py: scan() now records all auto_rtx placeholder locations during the tree walk and resolves them post-walk via _uses_isaac_sim_runtime() (Kit/Isaac Sim wins if needs_kit or a Kit visualizer is present); launch_simulation moves _ensure_livestream_kit_visualizer before scan() so livestream-forced Kit is visible during resolution.
  • Tests cover the full decision matrix: PhysX→Isaac RTX, Newton→OVRTX, Newton+kit-visualizer→Isaac RTX, and the livestream ordering regression.

Confidence Score: 5/5

Safe to merge — the auto RTX resolution logic is correct for all documented use cases and the previously-flagged livestream ordering bug is properly fixed.

The core decision logic in scan() is sound: auto_rtx placeholders are collected before the visited guard so aliased instances are all updated, and _ensure_livestream_kit_visualizer is now correctly called before scan() so livestream-forced Kit is visible during resolution. The only inconsistency found is that config_scan.needs_kit can remain False when use_isaac_sim was triggered solely by a kit visualizer and the auto_rtx node is not inside a CameraCfg — but launch_simulation reads _uses_isaac_sim_runtime() rather than config_scan.needs_kit for its actual decision, so runtime behavior is correct in all currently-exercised paths.

sim_launcher.py — the post-resolution needs_kit update uses the has_kit_camera/kitless-physics formula, which can underreport for non-camera auto_rtx in kit-visualizer-only scenarios.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/app/sim_launcher.py Core change: scan() now accepts full launcher_args, records auto_rtx placeholder locations during the walk, and resolves them post-walk. _ensure_livestream_kit_visualizer is moved before scan() to fix the previously-flagged ordering bug. Logic is sound but scan() now has a more impactful in-place mutation side effect.
source/isaaclab_tasks/isaaclab_tasks/utils/presets.py Adds _AutoRtxPresetCfg sentinel (renderer_type="auto_rtx") and exposes it as the rtx field of MultiBackendRendererCfg. Clean, minimal change.
source/isaaclab_tasks/test/core/test_runtime_compatibility.py Adds five new tests covering rtx→isaac_rtx (PhysX), rtx→ovrtx (Newton), rtx→isaac_rtx (kit visualizer), and the critical livestream-ordering regression.
source/isaaclab_tasks/test/core/test_preset_kit_decision.py Adds four targeted tests: rtx as a domain preset (not renderer selector), rtx+physx→isaac_rtx, rtx+newton→ovrtx, rtx+newton+kit_visualizer→isaac_rtx.
source/isaaclab_tasks/test/core/test_shadow_hand_camera_presets.py Adds test verifying rtx preset has renderer_type="auto_rtx" and is NOT a RendererCfg, plus updates the expected preset name set.
source/isaaclab_tasks/test/core/test_sim_launcher_visualizer_intent.py Adds monkeypatch for isaaclab.utils (has_kit=lambda: False) to satisfy the new import in launch_simulation. Minimal, correct fix.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant User as User CLI
    participant LS as launch_simulation()
    participant EL as _ensure_livestream_kit_visualizer()
    participant SC as scan()
    participant VT as _uses_isaac_sim_runtime()
    participant VL as _validate_runtime()

    User->>LS: "launcher_args (presets=rtx, livestream?, visualizer?)"
    LS->>EL: launcher_args
    EL-->>LS: "mutates visualizer to [kit] if livestream>0"
    LS->>SC: cfg, launcher_args (with kit already injected if livestream)
    SC->>SC: walk tree, record auto_rtx locations, physics, kit cameras
    SC->>VT: config_scan (needs_kit from initial walk), launcher_args
    VT-->>SC: "use_isaac_sim = needs_kit OR has_kit_visualizer"
    alt "use_isaac_sim == True"
        SC->>SC: setattr(camera, renderer_cfg, IsaacRtxRendererCfg())
        SC->>SC: "update has_kit_camera, needs_kit = True"
    else "use_isaac_sim == False"
        SC->>SC: setattr(camera, renderer_cfg, OVRTXRendererCfg())
        SC->>SC: "update has_ovrtx = True, needs_kit = False"
    end
    SC-->>LS: resolved Scan
    LS->>VL: config_scan, launcher_args
    VL-->>LS: raises if ovrtx+kit or ovphysx+kit
    alt needs_kit
        LS->>LS: AppLauncher (Kit / Isaac Sim)
        LS->>LS: auto-enable cameras if has_kit_camera
    else kitless
        LS->>LS: sync visualizer settings to carb
    end
    LS-->>User: yields resolved physics_cfg
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant User as User CLI
    participant LS as launch_simulation()
    participant EL as _ensure_livestream_kit_visualizer()
    participant SC as scan()
    participant VT as _uses_isaac_sim_runtime()
    participant VL as _validate_runtime()

    User->>LS: "launcher_args (presets=rtx, livestream?, visualizer?)"
    LS->>EL: launcher_args
    EL-->>LS: "mutates visualizer to [kit] if livestream>0"
    LS->>SC: cfg, launcher_args (with kit already injected if livestream)
    SC->>SC: walk tree, record auto_rtx locations, physics, kit cameras
    SC->>VT: config_scan (needs_kit from initial walk), launcher_args
    VT-->>SC: "use_isaac_sim = needs_kit OR has_kit_visualizer"
    alt "use_isaac_sim == True"
        SC->>SC: setattr(camera, renderer_cfg, IsaacRtxRendererCfg())
        SC->>SC: "update has_kit_camera, needs_kit = True"
    else "use_isaac_sim == False"
        SC->>SC: setattr(camera, renderer_cfg, OVRTXRendererCfg())
        SC->>SC: "update has_ovrtx = True, needs_kit = False"
    end
    SC-->>LS: resolved Scan
    LS->>VL: config_scan, launcher_args
    VL-->>LS: raises if ovrtx+kit or ovphysx+kit
    alt needs_kit
        LS->>LS: AppLauncher (Kit / Isaac Sim)
        LS->>LS: auto-enable cameras if has_kit_camera
    else kitless
        LS->>LS: sync visualizer settings to carb
    end
    LS-->>User: yields resolved physics_cfg
Loading

Reviews (5): Last reviewed commit: "Merge branch 'mataylor/rtx-preset' of gi..." | Re-trigger Greptile

Comment thread source/isaaclab/isaaclab/app/sim_launcher.py
mataylor-nvidia and others added 2 commits June 23, 2026 13:41
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Matthew Taylor <mataylor@nvidia.com>
@mataylor-nvidia
mataylor-nvidia marked this pull request as draft June 23, 2026 17:44
@mataylor-nvidia

Copy link
Copy Markdown
Author

@greptileai

@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@mataylor-nvidia mataylor-nvidia self-assigned this Jun 23, 2026
@mataylor-nvidia
mataylor-nvidia marked this pull request as ready for review June 23, 2026 18:16
@kellyguo11 kellyguo11 changed the title OMPE-92354: Allow for automatic switching between ovrtx and isaac sim RTX Allow for automatic switching between ovrtx and isaac sim RTX Jun 24, 2026
Comment thread docs/source/overview/environments.rst Outdated
* **presets=** — environment-specific (domain) preset name passed as
``presets=NAME[,NAME,...]``
(e.g. ``rgb``, ``depth``, ``single_camera``, ``duo_camera``)
(e.g. ``rtx``, ``rgb``, ``depth``, ``single_camera``, ``duo_camera``)

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.

rtx should be part of the renderer presets and not the environment-specific presets? similar to isaacsim_rtx_renderer... listed under renderer= above

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.

could we maybe also have another ticket to rename the renderer presets to remove the _renderer suffix in the name?

@mataylor-nvidia mataylor-nvidia Jun 24, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

rtx should be part of the renderer presets and not the environment-specific presets?

Yes I had it under renderers but changed it back :( , however ticket states preset=rtx should I update the ticket?

If a user specifies presets=rtx, runs physx from isaac sim or uses the kit visualizer, we will use isaac sim RTX.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have updated this to renderer=rtx

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.

thanks! yes let's update the ticket, it might have been created before we refactored the presets logic

``--task=<name> --help`` to list them.

Use ``renderer=rtx`` for automatic RTX selection on tasks that expose the multi-backend renderer selector.
It uses Isaac Sim RTX with PhysX or the Kit visualizer, and OVRTX for fully kit-less runs.

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.

if the user uses ovphyx as the physics backend - should the auto rtx select ovrtx?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes I have added an additional test for this as you noted below. 👌

Comment on lines +283 to +297
use_isaac_sim = _uses_isaac_sim_runtime(config_scan, launcher_args)
renderer_factory = IsaacRtxRendererCfg if use_isaac_sim else OVRTXRendererCfg

has_auto_camera = False
for location in auto_rtx_locations:
if location[0] is None:
raise ValueError("Automatic RTX renderer placeholders cannot be resolved as the root config.")
setattr(location[0], location[1], renderer_factory())
has_auto_camera = has_auto_camera or location[2]

if use_isaac_sim:
config_scan.has_kit_camera = config_scan.has_kit_camera or has_auto_camera
else:
config_scan.has_ovrtx = True
config_scan.needs_kit = config_scan.has_kit_camera or not config_scan.has_kitless_physics

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 we add some comments explaining this resolution logic

assert launcher_args.visualizer == ["kit"]
assert launcher_args.enable_cameras is True
assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg)

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.

do we need a test for if user chooses ovphysx?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes I will add it

@rilei-nvidia rilei-nvidia left a comment

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.

Thanks for addressing the comments around adding the tests for the ovphysx case, and the clear comments & documentation @mataylor-nvidia!

Comment thread docs/source/features/hydra.rst Outdated
* - ``ovrtx_renderer``
- OV RTX renderer
* - ``rtx``
- Automatic RTX renderer selection (Isaac Sim RTX for PhysX or Kit visualizer, OVRTX for fully kit-less runs)

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.

maybe we can clarify physx --> isaac sim physx
or just simply it as Isaac Sim RTX when running with Isaac Sim, and ovrtx for kitless

use_isaac_sim = _uses_isaac_sim_runtime(config_scan, launcher_args)
renderer_factory = IsaacRtxRendererCfg if use_isaac_sim else OVRTXRendererCfg

# Update every auto RTX placeholder in place, and track whether any of them were

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.

is the comment maybe incomplete?

@mataylor-nvidia
mataylor-nvidia merged commit b84dd70 into isaac-sim:develop Jun 25, 2026
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants