From f0eaf246fba3c28afa3860f2a210eb1549309d9e Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Wed, 12 Aug 2026 21:01:27 -0700 Subject: [PATCH 01/18] Consolidate environment backend smoke tests --- .github/workflows/build.yaml | 3 +- .../test_cartpole_showcase_environments.py | 2 +- ...wcase_environments_with_stage_in_memory.py | 2 +- .../test_contrib_environments_smoke.py | 1 - .../test_pickplace_stack_environments.py | 1 - .../test/contrib/test_teleop_environments.py | 2 +- ...eleop_environments_with_stage_in_memory.py | 2 +- .../test/core/test_environments.py | 8 +-- .../test/core/test_environments_newton.py | 38 -------------- .../test_environments_with_stage_in_memory.py | 3 +- .../test/core/test_record_video.py | 2 +- source/isaaclab_tasks/test/env_test_utils.py | 50 ------------------- 12 files changed, 12 insertions(+), 102 deletions(-) delete mode 100644 source/isaaclab_tasks/test/core/test_environments_newton.py diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2b5cb7d41226..3b51125704ee 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -966,8 +966,7 @@ jobs: # (dexterous, many contacts). Deformable/MPM kernels are not covered; # widen if a test job reports large cache growth. include-files: >- - test_environments.py, - test_environments_newton.py + test_environments.py # No Soft/Cloth: the deformable envs depend on optional extras the CI # image does not install (Soft needs pytetwild), so they only ever fail. test-k-expr: "Cartpole or Drawer or AnymalD or Handover" diff --git a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments.py b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments.py index 38b2ce277a19..7eda602252c9 100644 --- a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments.py +++ b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments.py @@ -26,7 +26,7 @@ @pytest.mark.parametrize( "task_name", setup_environment( - include_play=False, factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True + factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True ), ) @pytest.mark.isaacsim_ci diff --git a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py index 536b209dbd47..185b24bec828 100644 --- a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py +++ b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py @@ -27,7 +27,7 @@ @pytest.mark.parametrize( "task_name", setup_environment( - include_play=False, factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True + factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True ), ) def test_cartpole_showcase_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): diff --git a/source/isaaclab_tasks/test/contrib/test_contrib_environments_smoke.py b/source/isaaclab_tasks/test/contrib/test_contrib_environments_smoke.py index ea1ae57d9fc3..4c16760fc529 100644 --- a/source/isaaclab_tasks/test/contrib/test_contrib_environments_smoke.py +++ b/source/isaaclab_tasks/test/contrib/test_contrib_environments_smoke.py @@ -42,7 +42,6 @@ @pytest.mark.parametrize( "task_name", setup_environment( - include_play=False, multi_agent=False, factory_envs=False, cartpole_showcase_envs=False, diff --git a/source/isaaclab_tasks/test/contrib/test_pickplace_stack_environments.py b/source/isaaclab_tasks/test/contrib/test_pickplace_stack_environments.py index cbc10c272b73..8801aea9f71a 100644 --- a/source/isaaclab_tasks/test/contrib/test_pickplace_stack_environments.py +++ b/source/isaaclab_tasks/test/contrib/test_pickplace_stack_environments.py @@ -36,7 +36,6 @@ @pytest.mark.parametrize( "task_name", setup_environment( - include_play=False, factory_envs=False, multi_agent=False, teleop_envs=False, diff --git a/source/isaaclab_tasks/test/contrib/test_teleop_environments.py b/source/isaaclab_tasks/test/contrib/test_teleop_environments.py index c30af100038a..980b2f3046de 100644 --- a/source/isaaclab_tasks/test/contrib/test_teleop_environments.py +++ b/source/isaaclab_tasks/test/contrib/test_teleop_environments.py @@ -37,7 +37,7 @@ @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) @pytest.mark.parametrize( - "task_name", setup_environment(include_play=False, factory_envs=False, multi_agent=False, teleop_envs=True) + "task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True) ) @pytest.mark.isaacsim_ci def test_teleop_environments(task_name, num_envs, device): diff --git a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py index 155543d0ed70..9379f0262962 100644 --- a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py +++ b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py @@ -38,7 +38,7 @@ @pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) @pytest.mark.parametrize( - "task_name", setup_environment(include_play=False, factory_envs=False, multi_agent=False, teleop_envs=True) + "task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True) ) def test_teleop_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): # skip test if stage in memory is not supported diff --git a/source/isaaclab_tasks/test/core/test_environments.py b/source/isaaclab_tasks/test/core/test_environments.py index 5e37814c2058..3947b9ec3e23 100644 --- a/source/isaaclab_tasks/test/core/test_environments.py +++ b/source/isaaclab_tasks/test/core/test_environments.py @@ -21,17 +21,19 @@ # Local imports should be imported last from env_test_utils import _run_environments, setup_environment # isort: skip +@pytest.mark.parametrize("physics_preset_name", ["newton_mjwarp", "physx", "isaacsim_physx"]) @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) @pytest.mark.parametrize( "task_name", setup_environment( - include_play=False, multi_agent=False, tier="core", ), ) @pytest.mark.isaacsim_ci -def test_environments(task_name, num_envs, device): +def test_environments(task_name, physics_preset_name, num_envs, device): # run environments without stage in memory - _run_environments(task_name, device, num_envs, create_stage_in_memory=False) + _run_environments( + task_name, device, num_envs, create_stage_in_memory=False, physics_preset_name=physics_preset_name + ) diff --git a/source/isaaclab_tasks/test/core/test_environments_newton.py b/source/isaaclab_tasks/test/core/test_environments_newton.py deleted file mode 100644 index 8618b04c6c34..000000000000 --- a/source/isaaclab_tasks/test/core/test_environments_newton.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause - -"""Launch Isaac Sim Simulator first.""" - -from isaaclab.app import AppLauncher - -# launch the simulator -app_launcher = AppLauncher(headless=True, enable_cameras=True, limit_cpu_threads=1) -simulation_app = app_launcher.app - - -"""Rest everything follows.""" - -import pytest - -import isaaclab_tasks # noqa: F401 - -# Local imports should be imported last -from env_test_utils import _run_environments, setup_environment # isort: skip - - -@pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) -@pytest.mark.parametrize( - "task_name", - setup_environment( - include_play=False, - multi_agent=False, - newton_mjwarp_envs=True, - tier="core", - ), -) -@pytest.mark.newton_ci -def test_environments_newton(task_name, num_envs, device): - # run environments with MJWarp physics preset - _run_environments(task_name, device, num_envs, physics_preset_name="newton_mjwarp", create_stage_in_memory=False) diff --git a/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py index 1457b01f9c96..ad6185ed45a6 100644 --- a/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py +++ b/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py @@ -29,7 +29,7 @@ # TODO(mtrepte): re-enable with fabric cloning fix # @pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) -# @pytest.mark.parametrize("task_name", setup_environment(include_play=False,factory_envs=False, multi_agent=False)) +# @pytest.mark.parametrize("task_name", setup_environment(factory_envs=False, multi_agent=False)) # def test_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): # # skip test if stage in memory is not supported # if get_isaac_sim_version().major < 5: @@ -43,7 +43,6 @@ @pytest.mark.parametrize( "task_name", setup_environment( - include_play=False, multi_agent=False, tier="core", ), diff --git a/source/isaaclab_tasks/test/core/test_record_video.py b/source/isaaclab_tasks/test/core/test_record_video.py index 329d42b5249a..46748e97cc8f 100644 --- a/source/isaaclab_tasks/test/core/test_record_video.py +++ b/source/isaaclab_tasks/test/core/test_record_video.py @@ -41,7 +41,7 @@ def setup_video_params(): return num_envs, device, video_length -@pytest.mark.parametrize("task_name", setup_environment(include_play=True, tier="core")) +@pytest.mark.parametrize("task_name", setup_environment(tier="core")) def test_record_video(task_name, setup_video_params): """Run random actions agent with internal VideoRecorder capturing from the active visualizer.""" num_envs, device, video_length = setup_video_params diff --git a/source/isaaclab_tasks/test/env_test_utils.py b/source/isaaclab_tasks/test/env_test_utils.py index 3547c175fd66..da645a3234e5 100644 --- a/source/isaaclab_tasks/test/env_test_utils.py +++ b/source/isaaclab_tasks/test/env_test_utils.py @@ -76,49 +76,18 @@ def _task_tier(task_spec) -> str | None: return None -def _has_physics_preset(raw_cfg, preset_name: str) -> bool: - """Check if a raw (unresolved) env config has a named physics preset. - - Must be called with the result of :func:`load_cfg_from_registry`, not - :func:`parse_env_cfg`, because the latter resolves all PresetCfg wrappers - to their default before returning. - - Args: - raw_cfg: Raw env config from :func:`load_cfg_from_registry`. - preset_name: Name of the preset to check for (e.g., 'newton_mjwarp'). - - Returns: - True if ``raw_cfg.sim.physics`` is a PresetCfg with the given preset field. - """ - if isinstance(raw_cfg, dict): - return False - # If the top-level cfg is itself a PresetCfg wrapper, unwrap to its default. - env_cfg = raw_cfg - if ( - hasattr(env_cfg, "__dataclass_fields__") - and hasattr(env_cfg, "default") - and not hasattr(type(env_cfg), "class_type") - ): - env_cfg = env_cfg.default - physics = getattr(getattr(env_cfg, "sim", None), "physics", None) - return physics is not None and hasattr(physics, preset_name) - - def setup_environment( - include_play: bool = False, factory_envs: bool | None = None, multi_agent: bool | None = None, teleop_envs: bool | None = None, cartpole_showcase_envs: bool | None = None, pickplace_stack_envs: bool | None = None, - newton_mjwarp_envs: bool | None = None, tier: str | None = None, ) -> list[str]: """ Acquire all registered Isaac environment task IDs with optional filters. Args: - include_play: If True, include environments ending in 'Play-v0'. factory_envs: - True: include only Factory environments - False: exclude Factory environments @@ -139,10 +108,6 @@ def setup_environment( - True: include only PickPlace/Stack environments - False: exclude PickPlace/Stack environments - None: include all environments regardless of pick-place/stack type - newton_mjwarp_envs: - - True: include only environments that have an MJWarp physics preset. - - False: exclude environments that have an MJWarp physics preset. - - None: include all environments regardless of MJWarp preset availability. tier: - "core": include only core environments (registered under ``isaaclab_tasks.core``). - "contrib": include only contributed environments (registered under ``isaaclab_tasks.contrib``). @@ -161,10 +126,6 @@ def setup_environment( if "Isaac" not in task_spec.id: continue - # filter Play environments, if needed - if not include_play and task_spec.id.endswith("Play-v0"): - continue - # apply core/contrib tier filter if tier is not None and _task_tier(task_spec) != tier: continue @@ -211,17 +172,6 @@ def setup_environment( continue # if None: no filter - # apply MJWarp preset filter - if newton_mjwarp_envs is not None: - # Use load_cfg_from_registry (not parse_env_cfg) so that the PresetCfg - # wrapper on sim.physics is not yet resolved to its default. - raw_cfg = load_cfg_from_registry(task_spec.id, "env_cfg_entry_point") - has_newton_mjwarp = _has_physics_preset(raw_cfg, "newton_mjwarp") - if (newton_mjwarp_envs is True and not has_newton_mjwarp) or ( - newton_mjwarp_envs is False and has_newton_mjwarp - ): - continue - # if None: no filter registered_tasks.append(task_spec.id) From c3329cbbb14e148c76a54cbfbce7559312483855 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Wed, 12 Aug 2026 21:03:22 -0700 Subject: [PATCH 02/18] Default classic tasks to Newton --- .../changelog.d/default-newton-classic.minor.rst | 6 ++++++ .../isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py | 2 +- .../core/cartpole/cartpole_manager_env_cfg.py | 2 +- source/isaaclab_tasks/isaaclab_tasks/utils/presets.py | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst diff --git a/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst b/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst new file mode 100644 index 000000000000..9d9c5ab10de1 --- /dev/null +++ b/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst @@ -0,0 +1,6 @@ +Changed +^^^^^^^ + +* **Breaking:** Changed the Cartpole task family and the default renderer preset + to Newton MJWarp and the Newton renderer. Pass explicit physics and renderer + presets to retain an Isaac Sim PhysX configuration. diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py index 751fc6d23ac3..9887b20e1e98 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py @@ -33,7 +33,6 @@ class CartpolePhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg() ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=5, @@ -51,6 +50,7 @@ class CartpolePhysicsCfg(PresetCfg): debug_mode=False, use_cuda_graph=True, ) + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_env_cfg.py index c9570664c09d..17ea5e0f5ac6 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_env_cfg.py @@ -43,7 +43,6 @@ class CartpolePhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg() ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default: PhysxCfg = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=5, @@ -56,6 +55,7 @@ class CartpolePhysicsCfg(PresetCfg): debug_mode=False, use_cuda_graph=True, ) + default: NewtonCfg = newton_mjwarp newton_kamino: NewtonCfg = NewtonCfg( solver_cfg=KaminoPADMMSolverCfg(sparse_jacobian=True), debug_mode=False, diff --git a/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py b/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py index efa77ff12ae8..2ba5760d5b7c 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py +++ b/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py @@ -22,11 +22,11 @@ class _AutoRtxRendererCfg(RendererCfg): @configclass class MultiBackendRendererCfg(PresetCfg): - default: IsaacRtxRendererCfg = IsaacRtxRendererCfg() + default: NewtonWarpRendererCfg = NewtonWarpRendererCfg() rtx: _AutoRtxRendererCfg = _AutoRtxRendererCfg() newton_renderer: NewtonWarpRendererCfg = NewtonWarpRendererCfg() ovrtx: OVRTXRendererCfg = OVRTXRendererCfg() - isaacsim_rtx = default + isaacsim_rtx: IsaacRtxRendererCfg = IsaacRtxRendererCfg() def set_isaac_rtx_global_settings(renderer_cfg: Any, **settings: Any) -> None: From 742fbf22c22b4add5d38e31ac0b834821c6b34d9 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 00:56:31 -0700 Subject: [PATCH 03/18] Collect environment objects before teardown --- source/isaaclab_tasks/test/env_test_utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/isaaclab_tasks/test/env_test_utils.py b/source/isaaclab_tasks/test/env_test_utils.py index da645a3234e5..c28dd3e699d9 100644 --- a/source/isaaclab_tasks/test/env_test_utils.py +++ b/source/isaaclab_tasks/test/env_test_utils.py @@ -5,6 +5,7 @@ """Shared test utilities for Isaac Lab environments.""" +import gc import importlib import os import sys @@ -471,6 +472,11 @@ def _check_random_actions( if env is not None: env.close() + # Drop unreachable environment objects while the device is still alive. Warp arrays + # free device memory from a finalizer, so collect them before the simulation teardown + # destroys their streams. + gc.collect() + # Clear the simulation context singleton (also closes the USD context stage) SimulationContext.clear_instance() From f416d9e166b8542949b77a0acf78e4c2c9ea3c7d Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 00:57:22 -0700 Subject: [PATCH 04/18] Update preset tests for Newton defaults --- .../test/core/test_preset_kit_decision.py | 42 ++++++++++--------- .../test/core/test_runtime_compatibility.py | 22 +++++----- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/source/isaaclab_tasks/test/core/test_preset_kit_decision.py b/source/isaaclab_tasks/test/core/test_preset_kit_decision.py index 73a119182f3c..5b14f3c7934e 100644 --- a/source/isaaclab_tasks/test/core/test_preset_kit_decision.py +++ b/source/isaaclab_tasks/test/core/test_preset_kit_decision.py @@ -15,6 +15,7 @@ import gymnasium as gym import pytest +from isaaclab_newton.physics import NewtonCfg from isaaclab_ov.physics import OvPhysxCfg from isaaclab_ov.renderers import OVRTXRendererCfg from isaaclab_physx.physics import PhysxCfg @@ -87,11 +88,12 @@ def test_isaacsim_physx_is_physics_selector(): assert "isaacsim_physx" in preset_map[PresetTarget.PHYSICS] -def test_registered_task_physx_presets_keep_auto_selection_explicit(): - """PhysX defaults are concrete while ``physx`` remains the automatic selector.""" +def test_core_task_physx_presets_keep_auto_selection_explicit(): + """Core tasks retain explicit PhysX variants alongside automatic ``physx``.""" for task_id, task_spec in gym.registry.items(): - if not task_id.startswith(("Isaac-", "IsaacContrib-")) or "env_cfg_entry_point" not in task_spec.kwargs: + entry_point = task_spec.kwargs.get("env_cfg_entry_point", "") + if not task_id.startswith("Isaac-") or "isaaclab_tasks.core" not in str(entry_point): continue env_cfg = load_cfg_from_registry(task_id, "env_cfg_entry_point") presets = collect_presets(env_cfg) @@ -137,24 +139,24 @@ def test_preset_mjwarp_ovrtx_does_not_need_kit(): assert needs_kit is False -def test_preset_rtx_with_default_physx_resolves_to_isaac_sim_backends(): - """Automatic RTX follows the default concrete Isaac Sim PhysX backend.""" +def test_preset_rtx_with_default_newton_resolves_to_isaac_sim_backends(): + """Explicit RTX retains the default Newton physics while requiring Isaac Sim.""" env_cfg = _resolve_with_presets("rtx") config_scan = _resolve_runtime_renderer(env_cfg) - assert isinstance(env_cfg.sim.physics, PhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) - assert config_scan.needs_kit is True + assert isinstance(env_cfg.sim.physics, NewtonCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False -def test_renderer_selector_rtx_with_default_physx_resolves_to_isaac_sim_backends(): - """The RTX selector follows the default concrete Isaac Sim PhysX backend.""" +def test_renderer_selector_rtx_with_default_newton_resolves_to_isaac_sim_backends(): + """The RTX selector retains the default Newton physics while requiring Isaac Sim.""" env_cfg = _resolve_with_args("renderer=rtx") config_scan = _resolve_runtime_renderer(env_cfg) - assert isinstance(env_cfg.sim.physics, PhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) - assert config_scan.needs_kit is True + assert isinstance(env_cfg.sim.physics, NewtonCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False def test_renderer_selector_physx_rtx_resolves_to_ovphysx_without_kit(): @@ -227,20 +229,20 @@ def test_preset_mjwarp_newton_renderer_does_not_need_kit(): assert needs_kit is False -def test_preset_physx_with_default_kit_camera_resolves_to_physx(): - """Automatic PhysX resolves to Isaac Sim PhysX when the default camera requires Kit.""" +def test_preset_physx_with_default_newton_camera_resolves_to_ovphysx(): + """Automatic PhysX resolves to OvPhysX when the default camera is kitless.""" env_cfg = _resolve_with_presets("physx") config_scan = scan(env_cfg) - assert isinstance(env_cfg.sim.physics, PhysxCfg) - assert config_scan.needs_kit is True + assert isinstance(env_cfg.sim.physics, OvPhysxCfg) + assert config_scan.needs_kit is False -def test_preset_default_needs_kit(): - """Default concrete Isaac Sim PhysX plus Isaac RTX requires Kit.""" +def test_preset_default_is_kitless(): + """Default Newton MJWarp plus Newton renderer does not require Kit.""" env_cfg = _resolve_with_presets("default") needs_kit = scan(env_cfg).needs_kit - assert needs_kit is True + assert needs_kit is False def test_preset_mjwarp_isaac_rtx_needs_kit(): diff --git a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py index 6ca07657def5..30acafbf7622 100644 --- a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py +++ b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py @@ -18,6 +18,7 @@ import sys import pytest +from isaaclab_newton.physics import NewtonCfg from isaaclab_ov.physics import OvPhysxCfg from isaaclab_ov.renderers import OVRTXRendererCfg from isaaclab_physx.physics import PhysxCfg @@ -226,13 +227,14 @@ def test_newton_plus_ovrtx_is_valid(): validate_runtime_compatibility(env_cfg) -def test_default_isaacsim_physx_plus_ovrtx_raises(): - """The concrete default Isaac Sim PhysX backend is incompatible with OVRTX.""" +def test_default_newton_plus_ovrtx_is_valid(): + """The default Newton backend is compatible with OVRTX.""" env_cfg = _resolve_with_presets("ovrtx") - assert isinstance(env_cfg.sim.physics, PhysxCfg) - with pytest.raises(ValueError, match="PhysxCfg"): - validate_runtime_compatibility(env_cfg) + assert isinstance(env_cfg.sim.physics, NewtonCfg) + config_scan = validate_runtime_compatibility(env_cfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False def test_explicit_auto_physx_plus_ovrtx_resolves_to_ovphysx(): @@ -302,14 +304,14 @@ def test_default_preset_is_valid(): validate_runtime_compatibility(env_cfg) -def test_rtx_with_default_physx_is_valid_and_resolves_to_isaac_sim_backends(): - """The RTX selector follows the default concrete Isaac Sim PhysX backend.""" +def test_rtx_with_default_newton_is_valid_and_resolves_to_isaac_sim_backends(): + """The RTX selector retains default Newton physics and requires Isaac Sim.""" env_cfg = _resolve_with_presets("rtx") config_scan = validate_runtime_compatibility(env_cfg) - assert isinstance(env_cfg.sim.physics, PhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) - assert config_scan.needs_kit is True + assert isinstance(env_cfg.sim.physics, NewtonCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False def test_renderer_selector_physx_rtx_is_valid_and_resolves_to_ovphysx_and_ovrtx(): From 543ee34b647c35e7c3e7c00a0938c43debcf4838 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 01:09:16 -0700 Subject: [PATCH 05/18] Format environment test updates --- .../test/contrib/test_cartpole_showcase_environments.py | 4 +--- ...est_cartpole_showcase_environments_with_stage_in_memory.py | 4 +--- .../isaaclab_tasks/test/contrib/test_teleop_environments.py | 4 +--- .../contrib/test_teleop_environments_with_stage_in_memory.py | 4 +--- source/isaaclab_tasks/test/core/test_environments.py | 2 +- source/isaaclab_tasks/test/env_test_utils.py | 1 - 6 files changed, 5 insertions(+), 14 deletions(-) diff --git a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments.py b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments.py index 7eda602252c9..207f8ec10753 100644 --- a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments.py +++ b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments.py @@ -25,9 +25,7 @@ @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) @pytest.mark.parametrize( "task_name", - setup_environment( - factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True - ), + setup_environment(factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True), ) @pytest.mark.isaacsim_ci def test_cartpole_showcase_environments(task_name, num_envs, device): diff --git a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py index 185b24bec828..2ac712a34ba3 100644 --- a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py +++ b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py @@ -26,9 +26,7 @@ @pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) @pytest.mark.parametrize( "task_name", - setup_environment( - factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True - ), + setup_environment(factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True), ) def test_cartpole_showcase_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): # skip test if stage in memory is not supported diff --git a/source/isaaclab_tasks/test/contrib/test_teleop_environments.py b/source/isaaclab_tasks/test/contrib/test_teleop_environments.py index 980b2f3046de..11e0fab76008 100644 --- a/source/isaaclab_tasks/test/contrib/test_teleop_environments.py +++ b/source/isaaclab_tasks/test/contrib/test_teleop_environments.py @@ -36,9 +36,7 @@ @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) -@pytest.mark.parametrize( - "task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True) -) +@pytest.mark.parametrize("task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True)) @pytest.mark.isaacsim_ci def test_teleop_environments(task_name, num_envs, device): # run teleop environments without stage in memory diff --git a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py index 9379f0262962..f2cfbd83f2b2 100644 --- a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py +++ b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py @@ -37,9 +37,7 @@ @pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) -@pytest.mark.parametrize( - "task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True) -) +@pytest.mark.parametrize("task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True)) def test_teleop_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): # skip test if stage in memory is not supported if get_isaac_sim_version().major < 5: diff --git a/source/isaaclab_tasks/test/core/test_environments.py b/source/isaaclab_tasks/test/core/test_environments.py index 3947b9ec3e23..ec1093971e64 100644 --- a/source/isaaclab_tasks/test/core/test_environments.py +++ b/source/isaaclab_tasks/test/core/test_environments.py @@ -21,8 +21,8 @@ # Local imports should be imported last from env_test_utils import _run_environments, setup_environment # isort: skip -@pytest.mark.parametrize("physics_preset_name", ["newton_mjwarp", "physx", "isaacsim_physx"]) +@pytest.mark.parametrize("physics_preset_name", ["newton_mjwarp", "physx", "isaacsim_physx"]) @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) @pytest.mark.parametrize( "task_name", diff --git a/source/isaaclab_tasks/test/env_test_utils.py b/source/isaaclab_tasks/test/env_test_utils.py index c28dd3e699d9..880a8668bedc 100644 --- a/source/isaaclab_tasks/test/env_test_utils.py +++ b/source/isaaclab_tasks/test/env_test_utils.py @@ -173,7 +173,6 @@ def setup_environment( continue # if None: no filter - registered_tasks.append(task_spec.id) # sort environments alphabetically From 0fddcfee09b0699fadc3a6abab718d54f507c131 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 11:17:05 -0700 Subject: [PATCH 06/18] Pin registered rendering tests to Isaac Sim --- .../core/test_rendering_registered_tasks.py | 17 ++++++++++++----- ...g => isaacsim_physx-isaacsim_rtx-albedo.png} | 0 ...ng => isaacsim_physx-isaacsim_rtx-depth.png} | 0 ....png => isaacsim_physx-isaacsim_rtx-rgb.png} | 0 ...png => isaacsim_physx-isaacsim_rtx-rgba.png} | 0 ...sim_rtx-simple_shading_constant_diffuse.png} | 0 ...isaacsim_rtx-simple_shading_diffuse_mdl.png} | 0 ...sx-isaacsim_rtx-simple_shading_full_mdl.png} | 0 ...ng => isaacsim_physx-isaacsim_rtx-depth.png} | 0 ....png => isaacsim_physx-isaacsim_rtx-rgb.png} | 0 ...png => isaacsim_physx-isaacsim_rtx-rgba.png} | 0 ...hysx-isaacsim_rtx-semantic_segmentation.png} | 0 .../default_physics-default_renderer-stage.usda | 3 --- .../default_physics-default_renderer-stage.usda | 3 --- 14 files changed, 12 insertions(+), 11 deletions(-) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/{default_physics-default_renderer-albedo.png => isaacsim_physx-isaacsim_rtx-albedo.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/{default_physics-default_renderer-depth.png => isaacsim_physx-isaacsim_rtx-depth.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/{default_physics-default_renderer-rgb.png => isaacsim_physx-isaacsim_rtx-rgb.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/{default_physics-default_renderer-rgba.png => isaacsim_physx-isaacsim_rtx-rgba.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/{default_physics-default_renderer-simple_shading_constant_diffuse.png => isaacsim_physx-isaacsim_rtx-simple_shading_constant_diffuse.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/{default_physics-default_renderer-simple_shading_diffuse_mdl.png => isaacsim_physx-isaacsim_rtx-simple_shading_diffuse_mdl.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/{default_physics-default_renderer-simple_shading_full_mdl.png => isaacsim_physx-isaacsim_rtx-simple_shading_full_mdl.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/{default_physics-default_renderer-depth.png => isaacsim_physx-isaacsim_rtx-depth.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/{default_physics-default_renderer-rgb.png => isaacsim_physx-isaacsim_rtx-rgb.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/{default_physics-default_renderer-rgba.png => isaacsim_physx-isaacsim_rtx-rgba.png} (100%) rename source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/{default_physics-default_renderer-semantic_segmentation.png => isaacsim_physx-isaacsim_rtx-semantic_segmentation.png} (100%) delete mode 100644 source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-stage.usda delete mode 100644 source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-stage.usda diff --git a/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py b/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py index 9e32e8b57c1b..6163c3c26c9d 100644 --- a/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py +++ b/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py @@ -61,6 +61,10 @@ def _collect_camera_outputs(env: object) -> dict[str, dict[str, torch.Tensor]]: return outputs +# Golden stages and images are backend-specific, so keep these checks pinned to +# the backend that produced their references instead of following task defaults. +_PINNED_PRESETS = ("isaacsim_physx", "isaacsim_rtx") + # Task IDs that expose camera/tiled_camera image observations; each is validated for non-blank # rendering. The max different pixels percentage is set based on the screen space taken up by the # env. The ``presets`` column selects a data-type variant on the consolidated cartpole camera task; @@ -96,7 +100,10 @@ def test_rendering_registered_tasks(task_id: str, presets: str | None, env_name: from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry env_cfg = load_cfg_from_registry(task_id, "env_cfg_entry_point") - env_cfg = resolve_presets(env_cfg, {presets} if presets else frozenset()) + selected = set(_PINNED_PRESETS) + if presets: + selected.add(presets) + env_cfg = resolve_presets(env_cfg, selected) env_cfg.sim.device = "cuda:0" env_cfg.scene.num_envs = 4 @@ -108,8 +115,8 @@ def test_rendering_registered_tasks(task_id: str, presets: str | None, env_name: maybe_save_stage( f"registered_tasks_{task_id}", - "default_physics", - "default_renderer", + _PINNED_PRESETS[0], + _PINNED_PRESETS[1], "stage", compare_golden=(presets is None), ) @@ -122,8 +129,8 @@ def test_rendering_registered_tasks(task_id: str, presets: str | None, env_name: validate_camera_outputs( f"registered_tasks/{task_id}", - "default_physics", - "default_renderer", + _PINNED_PRESETS[0], + _PINNED_PRESETS[1], camera_outputs, max_different_pixels_percentage=MAX_DIFFERENT_PIXELS_PERCENTAGE_BY_ENV_NAME[env_name], comparison_scores=_COMPARISON_SCORES, diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-albedo.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-albedo.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-albedo.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-albedo.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-depth.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-depth.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-depth.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-depth.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-rgb.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgb.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-rgb.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgb.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-rgba.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgba.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-rgba.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgba.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_constant_diffuse.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_constant_diffuse.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_constant_diffuse.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_constant_diffuse.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_diffuse_mdl.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_diffuse_mdl.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_diffuse_mdl.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_diffuse_mdl.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_full_mdl.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_full_mdl.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_full_mdl.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_full_mdl.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-depth.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-depth.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-depth.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-depth.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-rgb.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgb.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-rgb.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgb.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-rgba.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgba.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-rgba.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgba.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-semantic_segmentation.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-semantic_segmentation.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-semantic_segmentation.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-semantic_segmentation.png diff --git a/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-stage.usda b/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-stage.usda deleted file mode 100644 index c931c6c1b35b..000000000000 --- a/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-stage.usda +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a258c00cb0e8a5b72a4c83f327310f08a847267379b7f3c3f0618f25e99ea34d -size 54929 diff --git a/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-stage.usda b/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-stage.usda deleted file mode 100644 index a20fb62b3e41..000000000000 --- a/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-stage.usda +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:191bcbccbff3085afe9b4bbc93e55dd57638b4fa94d4c89356e66cd35970d5fd -size 10649377 From c0e5f45e532a77695aac260288d549972ae206f8 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 11:22:23 -0700 Subject: [PATCH 07/18] Release environments before simulation teardown --- source/isaaclab_tasks/test/env_test_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/source/isaaclab_tasks/test/env_test_utils.py b/source/isaaclab_tasks/test/env_test_utils.py index 880a8668bedc..cb05301cf6f3 100644 --- a/source/isaaclab_tasks/test/env_test_utils.py +++ b/source/isaaclab_tasks/test/env_test_utils.py @@ -470,6 +470,7 @@ def _check_random_actions( # Always ensure cleanup happens, regardless of success or failure if env is not None: env.close() + env = None # Drop unreachable environment objects while the device is still alive. Warp arrays # free device memory from a finalizer, so collect them before the simulation teardown From 6c98c4fd696fb5144441d67d6f7ca469a61e880e Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 13:18:42 -0700 Subject: [PATCH 08/18] Scope Newton renderer defaults to Cartpole --- .../cartpole_direct_camera_env_cfg.py | 4 +- .../cartpole_manager_camera_env_cfg.py | 4 +- .../isaaclab_tasks/utils/presets.py | 4 +- .../test/core/test_environments.py | 40 +++++++++++++++---- .../changelog.d/default-newton-classic.skip | 0 .../test/visualizer_integration_utils.py | 1 + 6 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 source/isaaclab_visualizers/changelog.d/default-newton-classic.skip diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env_cfg.py index aaf4c2101192..183ffae53562 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env_cfg.py @@ -34,7 +34,9 @@ class BaseCartpoleTiledCameraCfg(CameraCfg): ) width: int = 96 height: int = 96 - renderer_cfg: MultiBackendRendererCfg = MultiBackendRendererCfg(newton_renderer=NewtonWarpRendererCfg()) + renderer_cfg: MultiBackendRendererCfg = MultiBackendRendererCfg( + default=NewtonWarpRendererCfg(), newton_renderer=NewtonWarpRendererCfg() + ) default = BaseCartpoleTiledCameraCfg(data_types=["rgb"]) depth = BaseCartpoleTiledCameraCfg(data_types=["depth"]) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_camera_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_camera_env_cfg.py index 6f97da4ac278..845dd1f019ab 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_camera_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_camera_env_cfg.py @@ -46,7 +46,9 @@ class BaseCartpoleTiledCameraCfg(CameraCfg): ) width: int = 96 height: int = 96 - renderer_cfg: MultiBackendRendererCfg = MultiBackendRendererCfg(newton_renderer=NewtonWarpRendererCfg()) + renderer_cfg: MultiBackendRendererCfg = MultiBackendRendererCfg( + default=NewtonWarpRendererCfg(), newton_renderer=NewtonWarpRendererCfg() + ) default = BaseCartpoleTiledCameraCfg(data_types=["rgb"]) depth = BaseCartpoleTiledCameraCfg(data_types=["depth"]) diff --git a/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py b/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py index 2ba5760d5b7c..efa77ff12ae8 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py +++ b/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py @@ -22,11 +22,11 @@ class _AutoRtxRendererCfg(RendererCfg): @configclass class MultiBackendRendererCfg(PresetCfg): - default: NewtonWarpRendererCfg = NewtonWarpRendererCfg() + default: IsaacRtxRendererCfg = IsaacRtxRendererCfg() rtx: _AutoRtxRendererCfg = _AutoRtxRendererCfg() newton_renderer: NewtonWarpRendererCfg = NewtonWarpRendererCfg() ovrtx: OVRTXRendererCfg = OVRTXRendererCfg() - isaacsim_rtx: IsaacRtxRendererCfg = IsaacRtxRendererCfg() + isaacsim_rtx = default def set_isaac_rtx_global_settings(renderer_cfg: Any, **settings: Any) -> None: diff --git a/source/isaaclab_tasks/test/core/test_environments.py b/source/isaaclab_tasks/test/core/test_environments.py index ec1093971e64..75a7de889daf 100644 --- a/source/isaaclab_tasks/test/core/test_environments.py +++ b/source/isaaclab_tasks/test/core/test_environments.py @@ -16,21 +16,45 @@ import pytest +from isaaclab.physics import PhysicsCfg + import isaaclab_tasks # noqa: F401 +from isaaclab_tasks.utils.hydra import collect_presets +from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry # Local imports should be imported last from env_test_utils import _run_environments, setup_environment # isort: skip -@pytest.mark.parametrize("physics_preset_name", ["newton_mjwarp", "physx", "isaacsim_physx"]) +_PHYSICS_PRESET_NAMES = ("newton_mjwarp", "physx", "isaacsim_physx") + + +def _core_physics_params() -> list: + """Return core task/backend pairs for explicitly supported physics presets.""" + params = [] + for task_param in setup_environment(multi_agent=False, tier="core"): + task_name = getattr(task_param, "values", (task_param,))[0] + marks = getattr(task_param, "marks", ()) + env_cfg = load_cfg_from_registry(task_name, "env_cfg_entry_point") + physics_preset_groups = collect_presets(env_cfg).values() + for physics_preset_name in _PHYSICS_PRESET_NAMES: + if any( + physics_preset_name in preset_group and isinstance(preset_group[physics_preset_name], PhysicsCfg) + for preset_group in physics_preset_groups + ): + params.append( + pytest.param( + task_name, + physics_preset_name, + id=f"{task_name}-{physics_preset_name}", + marks=marks, + ) + ) + return params + + +@pytest.mark.parametrize("task_name, physics_preset_name", _core_physics_params()) @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) -@pytest.mark.parametrize( - "task_name", - setup_environment( - multi_agent=False, - tier="core", - ), -) @pytest.mark.isaacsim_ci def test_environments(task_name, physics_preset_name, num_envs, device): # run environments without stage in memory diff --git a/source/isaaclab_visualizers/changelog.d/default-newton-classic.skip b/source/isaaclab_visualizers/changelog.d/default-newton-classic.skip new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/source/isaaclab_visualizers/test/visualizer_integration_utils.py b/source/isaaclab_visualizers/test/visualizer_integration_utils.py index 17c4351ad927..284e778252be 100644 --- a/source/isaaclab_visualizers/test/visualizer_integration_utils.py +++ b/source/isaaclab_visualizers/test/visualizer_integration_utils.py @@ -1840,6 +1840,7 @@ def _make_cartpole_camera_env( env_cfg.observation_space = [th, tw, env_cfg.observation_space[2]] env_cfg.seed = None env_cfg.sim.physics, _ = _get_physics_cfg(backend_kind) + env_cfg.tiled_camera.default.renderer_cfg = env_cfg.tiled_camera.default.renderer_cfg.isaacsim_rtx visualizer_kinds = (visualizer_kind,) if isinstance(visualizer_kind, str) else tuple(visualizer_kind) visualizer_cfgs = [_get_visualizer_cfg(kind, tiled_camera=tiled_camera)[0] for kind in visualizer_kinds] env_cfg.sim.visualizer_cfgs = visualizer_cfgs[0] if len(visualizer_cfgs) == 1 else visualizer_cfgs From 1e76a29976d881922ad1b47fdbf1cff9d8f867c2 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 13:19:08 -0700 Subject: [PATCH 09/18] Clarify Cartpole renderer release note --- .../changelog.d/default-newton-classic.minor.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst b/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst index 9d9c5ab10de1..b0bf84b1aae3 100644 --- a/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst +++ b/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst @@ -1,6 +1,5 @@ Changed ^^^^^^^ -* **Breaking:** Changed the Cartpole task family and the default renderer preset - to Newton MJWarp and the Newton renderer. Pass explicit physics and renderer - presets to retain an Isaac Sim PhysX configuration. +* **Breaking:** Changed the Cartpole task family to use Newton MJWarp and the Newton renderer by default. + Pass explicit physics and renderer presets to retain an Isaac Sim PhysX configuration. From 20955dcbe8def0997ce8146ac7edb1c0df90e72f Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 15:16:21 -0700 Subject: [PATCH 10/18] Fix Cartpole backend test baselines --- source/isaaclab_rl/changelog.d/default-newton-classic.skip | 0 source/isaaclab_rl/test/test_entrypoints_common.py | 4 ++-- .../isaacsim_physx-isaacsim_rtx-stage.usda | 3 +++ .../isaacsim_physx-isaacsim_rtx-stage.usda | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 source/isaaclab_rl/changelog.d/default-newton-classic.skip create mode 100644 source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda create mode 100644 source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda diff --git a/source/isaaclab_rl/changelog.d/default-newton-classic.skip b/source/isaaclab_rl/changelog.d/default-newton-classic.skip new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/source/isaaclab_rl/test/test_entrypoints_common.py b/source/isaaclab_rl/test/test_entrypoints_common.py index 6b3932b30501..c3594644bc98 100644 --- a/source/isaaclab_rl/test/test_entrypoints_common.py +++ b/source/isaaclab_rl/test/test_entrypoints_common.py @@ -376,9 +376,9 @@ def summary(self, title: str, fields: dict[str, str]) -> None: # ``physx`` reaches the physics backend the same way ``rtx`` reaches the renderer (["physics=physx", "renderer=rtx"], "physx (ovphysx)", "rtx (ovrtx)", "none"), # a run that names no backend reports the ones the task pinned as defaults - ([], "default (isaacsim_physx)", "default (isaacsim_rtx)", "none"), + ([], "default (newton_mjwarp)", "default (newton_renderer)", "none"), # a domain preset has no row of its own - (["physics=physx", "presets=depth"], "physx (isaacsim_physx)", "default (isaacsim_rtx)", "depth"), + (["physics=physx", "presets=depth"], "physx (ovphysx)", "default (newton_renderer)", "depth"), ], ) def test_run_summary_reports_the_backends_the_run_resolves_to( diff --git a/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda b/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda new file mode 100644 index 000000000000..c931c6c1b35b --- /dev/null +++ b/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a258c00cb0e8a5b72a4c83f327310f08a847267379b7f3c3f0618f25e99ea34d +size 54929 diff --git a/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda b/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda new file mode 100644 index 000000000000..a20fb62b3e41 --- /dev/null +++ b/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:191bcbccbff3085afe9b4bbc93e55dd57638b4fa94d4c89356e66cd35970d5fd +size 10649377 From 3e5b9bef57a08a2e295526a6715e920f05f57fd5 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 17:08:20 -0700 Subject: [PATCH 11/18] Split environment smoke tests by backend --- ...wcase_environments_with_stage_in_memory.py | 37 ------------ ...eleop_environments_with_stage_in_memory.py | 47 ---------------- .../test/core/test_environments.py | 40 +------------ .../core/test_environments_isaacsim_physx.py | 31 ++++++++++ .../test/core/test_environments_newton.py | 31 ++++++++++ .../test_environments_with_stage_in_memory.py | 56 ------------------- source/isaaclab_tasks/test/env_test_utils.py | 36 +++++------- tools/test_settings.py | 8 +-- 8 files changed, 80 insertions(+), 206 deletions(-) delete mode 100644 source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py delete mode 100644 source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py create mode 100644 source/isaaclab_tasks/test/core/test_environments_isaacsim_physx.py create mode 100644 source/isaaclab_tasks/test/core/test_environments_newton.py delete mode 100644 source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py diff --git a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py deleted file mode 100644 index 2ac712a34ba3..000000000000 --- a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause - -"""Launch Isaac Sim Simulator first.""" - -from isaaclab.app import AppLauncher - -# launch the simulator -app_launcher = AppLauncher(headless=True, enable_cameras=True) -simulation_app = app_launcher.app - -from isaaclab.utils.version import get_isaac_sim_version - -"""Rest everything follows.""" - -import pytest - -import isaaclab_tasks # noqa: F401 - -# Local imports should be imported last -from env_test_utils import _run_environments, setup_environment # isort: skip - - -@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) -@pytest.mark.parametrize( - "task_name", - setup_environment(factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True), -) -def test_cartpole_showcase_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): - # skip test if stage in memory is not supported - if get_isaac_sim_version().major < 5: - pytest.skip("Stage in memory is not supported in this version of Isaac Sim") - - # run cartpole showcase environments with stage in memory - _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py deleted file mode 100644 index f2cfbd83f2b2..000000000000 --- a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause - -"""Launch Isaac Sim Simulator first.""" - -import sys - -# Import pinocchio in the main script to force the use of the dependencies -# installed by IsaacLab and not the one installed by Isaac Sim. -# pinocchio is required by the Pink IK controller used in some teleop environments -if sys.platform != "win32": - import pinocchio # noqa: F401 - -from isaaclab.app import AppLauncher - -# launch the simulator -app_launcher = AppLauncher(headless=True, enable_cameras=True) -simulation_app = app_launcher.app - -from isaaclab.utils.version import get_isaac_sim_version - -"""Rest everything follows.""" - -import pytest - -import isaaclab_tasks # noqa: F401 - -# Local imports should be imported last -from env_test_utils import _run_environments, setup_environment # isort: skip - - -# Teleop environments require isaacteleop / isaaclab_teleop and may interfere -# with other environment tests when run in the same process. They are collected -# separately here so they execute in their own test session. - - -@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) -@pytest.mark.parametrize("task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True)) -def test_teleop_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): - # skip test if stage in memory is not supported - if get_isaac_sim_version().major < 5: - pytest.skip("Stage in memory is not supported in this version of Isaac Sim") - - # run teleop environments with stage in memory - _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/core/test_environments.py b/source/isaaclab_tasks/test/core/test_environments.py index 75a7de889daf..5362b78a32b5 100644 --- a/source/isaaclab_tasks/test/core/test_environments.py +++ b/source/isaaclab_tasks/test/core/test_environments.py @@ -16,48 +16,14 @@ import pytest -from isaaclab.physics import PhysicsCfg - import isaaclab_tasks # noqa: F401 -from isaaclab_tasks.utils.hydra import collect_presets -from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry # Local imports should be imported last from env_test_utils import _run_environments, setup_environment # isort: skip -_PHYSICS_PRESET_NAMES = ("newton_mjwarp", "physx", "isaacsim_physx") - - -def _core_physics_params() -> list: - """Return core task/backend pairs for explicitly supported physics presets.""" - params = [] - for task_param in setup_environment(multi_agent=False, tier="core"): - task_name = getattr(task_param, "values", (task_param,))[0] - marks = getattr(task_param, "marks", ()) - env_cfg = load_cfg_from_registry(task_name, "env_cfg_entry_point") - physics_preset_groups = collect_presets(env_cfg).values() - for physics_preset_name in _PHYSICS_PRESET_NAMES: - if any( - physics_preset_name in preset_group and isinstance(preset_group[physics_preset_name], PhysicsCfg) - for preset_group in physics_preset_groups - ): - params.append( - pytest.param( - task_name, - physics_preset_name, - id=f"{task_name}-{physics_preset_name}", - marks=marks, - ) - ) - return params - - -@pytest.mark.parametrize("task_name, physics_preset_name", _core_physics_params()) +@pytest.mark.parametrize("task_name", setup_environment(multi_agent=False, physics_preset_name="physx", tier="core")) @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) @pytest.mark.isaacsim_ci -def test_environments(task_name, physics_preset_name, num_envs, device): - # run environments without stage in memory - _run_environments( - task_name, device, num_envs, create_stage_in_memory=False, physics_preset_name=physics_preset_name - ) +def test_environments(task_name, num_envs, device): + _run_environments(task_name, device, num_envs, physics_preset_name="physx") diff --git a/source/isaaclab_tasks/test/core/test_environments_isaacsim_physx.py b/source/isaaclab_tasks/test/core/test_environments_isaacsim_physx.py new file mode 100644 index 000000000000..56e76949d248 --- /dev/null +++ b/source/isaaclab_tasks/test/core/test_environments_isaacsim_physx.py @@ -0,0 +1,31 @@ +# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +"""Launch Isaac Sim Simulator first.""" + +from isaaclab.app import AppLauncher + +# launch the simulator +app_launcher = AppLauncher(headless=True, enable_cameras=True, limit_cpu_threads=1) +simulation_app = app_launcher.app + + +"""Rest everything follows.""" + +import pytest + +import isaaclab_tasks # noqa: F401 + +# Local imports should be imported last +from env_test_utils import _run_environments, setup_environment # isort: skip + + +@pytest.mark.parametrize( + "task_name", setup_environment(multi_agent=False, physics_preset_name="isaacsim_physx", tier="core") +) +@pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) +@pytest.mark.isaacsim_ci +def test_environments_isaacsim_physx(task_name, num_envs, device): + _run_environments(task_name, device, num_envs, physics_preset_name="isaacsim_physx") diff --git a/source/isaaclab_tasks/test/core/test_environments_newton.py b/source/isaaclab_tasks/test/core/test_environments_newton.py new file mode 100644 index 000000000000..3c2eac5c6f81 --- /dev/null +++ b/source/isaaclab_tasks/test/core/test_environments_newton.py @@ -0,0 +1,31 @@ +# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +"""Launch Isaac Sim Simulator first.""" + +from isaaclab.app import AppLauncher + +# launch the simulator +app_launcher = AppLauncher(headless=True, enable_cameras=True, limit_cpu_threads=1) +simulation_app = app_launcher.app + + +"""Rest everything follows.""" + +import pytest + +import isaaclab_tasks # noqa: F401 + +# Local imports should be imported last +from env_test_utils import _run_environments, setup_environment # isort: skip + + +@pytest.mark.parametrize( + "task_name", setup_environment(multi_agent=False, physics_preset_name="newton_mjwarp", tier="core") +) +@pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) +@pytest.mark.isaacsim_ci +def test_environments_newton(task_name, num_envs, device): + _run_environments(task_name, device, num_envs, physics_preset_name="newton_mjwarp") diff --git a/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py deleted file mode 100644 index ad6185ed45a6..000000000000 --- a/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause - -"""Launch Isaac Sim Simulator first.""" - -from isaaclab.app import AppLauncher - -# launch the simulator -app_launcher = AppLauncher(headless=True, enable_cameras=True, limit_cpu_threads=1) -simulation_app = app_launcher.app - -from isaaclab.utils.version import get_isaac_sim_version - -"""Rest everything follows.""" - -import pytest - -import isaaclab_tasks # noqa: F401 - -# Local imports should be imported last -from env_test_utils import _run_environments, setup_environment # isort: skip - - -# note, running an env test without stage in memory then -# running an env test with stage in memory causes IsaacLab to hang. -# so, here we run all envs with stage in memory separately - -# TODO(mtrepte): re-enable with fabric cloning fix -# @pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) -# @pytest.mark.parametrize("task_name", setup_environment(factory_envs=False, multi_agent=False)) -# def test_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): -# # skip test if stage in memory is not supported -# if get_isaac_sim_version().major < 5: -# pytest.skip("Stage in memory is not supported in this version of Isaac Sim") - -# # run environments with stage in memory -# _run_environments(task_name, device, num_envs, create_stage_in_memory=True) - - -@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) -@pytest.mark.parametrize( - "task_name", - setup_environment( - multi_agent=False, - tier="core", - ), -) -def test_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): - # skip test if stage in memory is not supported - if get_isaac_sim_version().major < 5: - pytest.skip("Stage in memory is not supported in this version of Isaac Sim") - - # run environments with stage in memory - _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/env_test_utils.py b/source/isaaclab_tasks/test/env_test_utils.py index cb05301cf6f3..60aaa6aefe1b 100644 --- a/source/isaaclab_tasks/test/env_test_utils.py +++ b/source/isaaclab_tasks/test/env_test_utils.py @@ -18,8 +18,8 @@ from isaaclab.app.settings_manager import get_settings_manager from isaaclab.envs.mdp.actions.actions_cfg import OperationalSpaceControllerActionCfg from isaaclab.envs.utils.spaces import sample_space +from isaaclab.physics import PhysicsCfg from isaaclab.sim import SimulationContext -from isaaclab.utils.version import get_isaac_sim_version from isaaclab_tasks.utils.hydra import apply_overrides, collect_presets from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry, parse_env_cfg @@ -83,6 +83,7 @@ def setup_environment( teleop_envs: bool | None = None, cartpole_showcase_envs: bool | None = None, pickplace_stack_envs: bool | None = None, + physics_preset_name: str | None = None, tier: str | None = None, ) -> list[str]: """ @@ -109,6 +110,7 @@ def setup_environment( - True: include only PickPlace/Stack environments - False: exclude PickPlace/Stack environments - None: include all environments regardless of pick-place/stack type + physics_preset_name: Include only environments that support this physics preset. tier: - "core": include only core environments (registered under ``isaaclab_tasks.core``). - "contrib": include only contributed environments (registered under ``isaaclab_tasks.contrib``). @@ -173,6 +175,15 @@ def setup_environment( continue # if None: no filter + if physics_preset_name is not None: + env_cfg = load_cfg_from_registry(task_spec.id, "env_cfg_entry_point") + physics_preset_groups = collect_presets(env_cfg).values() + if not any( + physics_preset_name in preset_group and isinstance(preset_group[physics_preset_name], PhysicsCfg) + for preset_group in physics_preset_groups + ): + continue + registered_tasks.append(task_spec.id) # sort environments alphabetically @@ -295,8 +306,6 @@ def _run_environments( num_envs, num_steps=20, multi_agent=False, - create_stage_in_memory=False, - disable_clone_in_fabric=False, physics_preset_name: str | None = None, ): """Run all environments and check environments return valid signals. @@ -307,16 +316,10 @@ def _run_environments( num_envs: Number of environments. num_steps: Number of simulation steps. multi_agent: Whether the environment is multi-agent. - create_stage_in_memory: Whether to create stage in memory. - disable_clone_in_fabric: Whether to disable fabric cloning. physics_preset_name: Name of the physics preset to apply (e.g., 'newton_mjwarp'). If None, uses the environment's default physics. """ - # skip test if stage in memory is not supported - if get_isaac_sim_version().major < 5 and create_stage_in_memory: - pytest.skip("Stage in memory is not supported in this version of Isaac Sim") - # skip suction gripper environments as they require CPU simulation and cannot be run with GPU simulation if "Suction" in task_name and device != "cpu": return @@ -354,8 +357,6 @@ def _run_environments( num_envs, num_steps=num_steps, multi_agent=multi_agent, - create_stage_in_memory=create_stage_in_memory, - disable_clone_in_fabric=disable_clone_in_fabric, physics_preset_name=physics_preset_name, ) print(f""">>> Closing environment: {task_name}""") @@ -368,8 +369,6 @@ def _check_random_actions( num_envs: int, num_steps: int = 20, multi_agent: bool = False, - create_stage_in_memory: bool = False, - disable_clone_in_fabric: bool = False, physics_preset_name: str | None = None, ): """Run random actions and check environments return valid signals. @@ -380,14 +379,10 @@ def _check_random_actions( num_envs: Number of environments. num_steps: Number of simulation steps. multi_agent: Whether the environment is multi-agent. - create_stage_in_memory: Whether to create stage in memory. - disable_clone_in_fabric: Whether to disable fabric cloning. physics_preset_name: Name of the physics preset to apply (e.g., 'newton_mjwarp'). If None, uses the environment's default physics. """ - # create a new context stage, if stage in memory is not enabled - if not create_stage_in_memory: - sim_utils.create_new_stage() + sim_utils.create_new_stage() # reset the rtx sensors setting to False get_settings_manager().set_bool("/isaaclab/render/rtx_sensors", False) @@ -407,11 +402,6 @@ def _check_random_actions( # the scene config with the preset's default num_envs. if num_envs is not None: env_cfg.scene.num_envs = num_envs - # set config args - env_cfg.sim.create_stage_in_memory = create_stage_in_memory - if disable_clone_in_fabric: - env_cfg.scene.clone_in_fabric = False - # filter based off multi agents mode and create env if multi_agent: if not hasattr(env_cfg, "possible_agents"): diff --git a/tools/test_settings.py b/tools/test_settings.py index 540a76ad3b39..ace16447350e 100644 --- a/tools/test_settings.py +++ b/tools/test_settings.py @@ -21,10 +21,8 @@ "test_stage_in_memory.py": 1000, "test_imu.py": 1000, "test_environments.py": 10000, # This test runs through all the environments for 100 steps each + "test_environments_isaacsim_physx.py": 10000, "test_contrib_environments_smoke.py": 10000, # Smoke test running through contributed environments - "test_environments_with_stage_in_memory.py": ( - 10000 - ), # Like the above, with stage in memory and with and without fabric cloning "test_environment_determinism.py": 1000, # This test runs through many the environments for 100 steps each "test_pickplace_stack_environments.py": 10000, # This test runs through PickPlace and Stack environments "test_factory_environments.py": 1000, # This test runs through Factory environments for 100 steps each @@ -41,9 +39,7 @@ "test_environments_skillgen.py": 1000, "test_environments_automate.py": 2500, "test_teleop_environments.py": 5000, - "test_teleop_environments_with_stage_in_memory.py": 5000, "test_cartpole_showcase_environments.py": 5000, - "test_cartpole_showcase_environments_with_stage_in_memory.py": 5000, "test_simulation_render_config.py": 1000, "test_operational_space.py": 1000, "test_non_headless_launch.py": 1000, # This test launches the app in non-headless mode and starts simulation @@ -65,7 +61,7 @@ "test_multi_tiled_camera.py": 1000, "test_multirotor.py": 1000, "test_shadow_hand_camera_presets.py": 5000, - "test_environments_newton.py": 5000, + "test_environments_newton.py": 10000, "test_surface_gripper.py": 3000, # The first test in the kitless rendering test job will take longer to run due to RTX shader compilation. "test_rendering_cartpole_kitless.py": 2000, From 9ad93dddd979cd0ddd376cf91b208362d8f78939 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 17:10:26 -0700 Subject: [PATCH 12/18] Retain stage-in-memory test utilities --- ...wcase_environments_with_stage_in_memory.py | 37 +++++++++++++++ ...eleop_environments_with_stage_in_memory.py | 47 +++++++++++++++++++ source/isaaclab_tasks/test/env_test_utils.py | 24 +++++++++- tools/test_settings.py | 2 + 4 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py create mode 100644 source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py diff --git a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py new file mode 100644 index 000000000000..2ac712a34ba3 --- /dev/null +++ b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py @@ -0,0 +1,37 @@ +# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +"""Launch Isaac Sim Simulator first.""" + +from isaaclab.app import AppLauncher + +# launch the simulator +app_launcher = AppLauncher(headless=True, enable_cameras=True) +simulation_app = app_launcher.app + +from isaaclab.utils.version import get_isaac_sim_version + +"""Rest everything follows.""" + +import pytest + +import isaaclab_tasks # noqa: F401 + +# Local imports should be imported last +from env_test_utils import _run_environments, setup_environment # isort: skip + + +@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) +@pytest.mark.parametrize( + "task_name", + setup_environment(factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True), +) +def test_cartpole_showcase_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): + # skip test if stage in memory is not supported + if get_isaac_sim_version().major < 5: + pytest.skip("Stage in memory is not supported in this version of Isaac Sim") + + # run cartpole showcase environments with stage in memory + _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py new file mode 100644 index 000000000000..f2cfbd83f2b2 --- /dev/null +++ b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py @@ -0,0 +1,47 @@ +# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +"""Launch Isaac Sim Simulator first.""" + +import sys + +# Import pinocchio in the main script to force the use of the dependencies +# installed by IsaacLab and not the one installed by Isaac Sim. +# pinocchio is required by the Pink IK controller used in some teleop environments +if sys.platform != "win32": + import pinocchio # noqa: F401 + +from isaaclab.app import AppLauncher + +# launch the simulator +app_launcher = AppLauncher(headless=True, enable_cameras=True) +simulation_app = app_launcher.app + +from isaaclab.utils.version import get_isaac_sim_version + +"""Rest everything follows.""" + +import pytest + +import isaaclab_tasks # noqa: F401 + +# Local imports should be imported last +from env_test_utils import _run_environments, setup_environment # isort: skip + + +# Teleop environments require isaacteleop / isaaclab_teleop and may interfere +# with other environment tests when run in the same process. They are collected +# separately here so they execute in their own test session. + + +@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) +@pytest.mark.parametrize("task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True)) +def test_teleop_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): + # skip test if stage in memory is not supported + if get_isaac_sim_version().major < 5: + pytest.skip("Stage in memory is not supported in this version of Isaac Sim") + + # run teleop environments with stage in memory + _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/env_test_utils.py b/source/isaaclab_tasks/test/env_test_utils.py index 60aaa6aefe1b..a2ac47f60bb4 100644 --- a/source/isaaclab_tasks/test/env_test_utils.py +++ b/source/isaaclab_tasks/test/env_test_utils.py @@ -20,6 +20,7 @@ from isaaclab.envs.utils.spaces import sample_space from isaaclab.physics import PhysicsCfg from isaaclab.sim import SimulationContext +from isaaclab.utils.version import get_isaac_sim_version from isaaclab_tasks.utils.hydra import apply_overrides, collect_presets from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry, parse_env_cfg @@ -306,6 +307,8 @@ def _run_environments( num_envs, num_steps=20, multi_agent=False, + create_stage_in_memory=False, + disable_clone_in_fabric=False, physics_preset_name: str | None = None, ): """Run all environments and check environments return valid signals. @@ -316,10 +319,16 @@ def _run_environments( num_envs: Number of environments. num_steps: Number of simulation steps. multi_agent: Whether the environment is multi-agent. + create_stage_in_memory: Whether to create stage in memory. + disable_clone_in_fabric: Whether to disable fabric cloning. physics_preset_name: Name of the physics preset to apply (e.g., 'newton_mjwarp'). If None, uses the environment's default physics. """ + # skip test if stage in memory is not supported + if get_isaac_sim_version().major < 5 and create_stage_in_memory: + pytest.skip("Stage in memory is not supported in this version of Isaac Sim") + # skip suction gripper environments as they require CPU simulation and cannot be run with GPU simulation if "Suction" in task_name and device != "cpu": return @@ -357,6 +366,8 @@ def _run_environments( num_envs, num_steps=num_steps, multi_agent=multi_agent, + create_stage_in_memory=create_stage_in_memory, + disable_clone_in_fabric=disable_clone_in_fabric, physics_preset_name=physics_preset_name, ) print(f""">>> Closing environment: {task_name}""") @@ -369,6 +380,8 @@ def _check_random_actions( num_envs: int, num_steps: int = 20, multi_agent: bool = False, + create_stage_in_memory: bool = False, + disable_clone_in_fabric: bool = False, physics_preset_name: str | None = None, ): """Run random actions and check environments return valid signals. @@ -379,10 +392,14 @@ def _check_random_actions( num_envs: Number of environments. num_steps: Number of simulation steps. multi_agent: Whether the environment is multi-agent. + create_stage_in_memory: Whether to create stage in memory. + disable_clone_in_fabric: Whether to disable fabric cloning. physics_preset_name: Name of the physics preset to apply (e.g., 'newton_mjwarp'). If None, uses the environment's default physics. """ - sim_utils.create_new_stage() + # create a new context stage, if stage in memory is not enabled + if not create_stage_in_memory: + sim_utils.create_new_stage() # reset the rtx sensors setting to False get_settings_manager().set_bool("/isaaclab/render/rtx_sensors", False) @@ -402,6 +419,11 @@ def _check_random_actions( # the scene config with the preset's default num_envs. if num_envs is not None: env_cfg.scene.num_envs = num_envs + # set config args + env_cfg.sim.create_stage_in_memory = create_stage_in_memory + if disable_clone_in_fabric: + env_cfg.scene.clone_in_fabric = False + # filter based off multi agents mode and create env if multi_agent: if not hasattr(env_cfg, "possible_agents"): diff --git a/tools/test_settings.py b/tools/test_settings.py index ace16447350e..43714a540a3d 100644 --- a/tools/test_settings.py +++ b/tools/test_settings.py @@ -39,7 +39,9 @@ "test_environments_skillgen.py": 1000, "test_environments_automate.py": 2500, "test_teleop_environments.py": 5000, + "test_teleop_environments_with_stage_in_memory.py": 5000, "test_cartpole_showcase_environments.py": 5000, + "test_cartpole_showcase_environments_with_stage_in_memory.py": 5000, "test_simulation_render_config.py": 1000, "test_operational_space.py": 1000, "test_non_headless_launch.py": 1000, # This test launches the app in non-headless mode and starts simulation From ac93fbdb621448b922fdb11db46942fb6b11646f Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 17:18:59 -0700 Subject: [PATCH 13/18] Test OV PhysX environment presets --- source/isaaclab_tasks/test/core/test_environments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/isaaclab_tasks/test/core/test_environments.py b/source/isaaclab_tasks/test/core/test_environments.py index 5362b78a32b5..694f77e08650 100644 --- a/source/isaaclab_tasks/test/core/test_environments.py +++ b/source/isaaclab_tasks/test/core/test_environments.py @@ -22,8 +22,8 @@ from env_test_utils import _run_environments, setup_environment # isort: skip -@pytest.mark.parametrize("task_name", setup_environment(multi_agent=False, physics_preset_name="physx", tier="core")) +@pytest.mark.parametrize("task_name", setup_environment(multi_agent=False, physics_preset_name="ovphysx", tier="core")) @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) @pytest.mark.isaacsim_ci def test_environments(task_name, num_envs, device): - _run_environments(task_name, device, num_envs, physics_preset_name="physx") + _run_environments(task_name, device, num_envs, physics_preset_name="ovphysx") From d1f4ef92346b2a08c263e54feef4368fd4c97983 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 18:48:42 -0700 Subject: [PATCH 14/18] Revert "Test OV PhysX environment presets" This reverts commit 16f22274800c915cec6c451c81360d2bfeb1eebb. --- source/isaaclab_tasks/test/core/test_environments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/isaaclab_tasks/test/core/test_environments.py b/source/isaaclab_tasks/test/core/test_environments.py index 694f77e08650..5362b78a32b5 100644 --- a/source/isaaclab_tasks/test/core/test_environments.py +++ b/source/isaaclab_tasks/test/core/test_environments.py @@ -22,8 +22,8 @@ from env_test_utils import _run_environments, setup_environment # isort: skip -@pytest.mark.parametrize("task_name", setup_environment(multi_agent=False, physics_preset_name="ovphysx", tier="core")) +@pytest.mark.parametrize("task_name", setup_environment(multi_agent=False, physics_preset_name="physx", tier="core")) @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) @pytest.mark.isaacsim_ci def test_environments(task_name, num_envs, device): - _run_environments(task_name, device, num_envs, physics_preset_name="ovphysx") + _run_environments(task_name, device, num_envs, physics_preset_name="physx") From d0a801761732796e3c958a5773015259a6da676c Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 18:48:42 -0700 Subject: [PATCH 15/18] Revert "Retain stage-in-memory test utilities" This reverts commit 389f780cfdeaa80dd09d26577b4812633125fa39. --- ...wcase_environments_with_stage_in_memory.py | 37 --------------- ...eleop_environments_with_stage_in_memory.py | 47 ------------------- source/isaaclab_tasks/test/env_test_utils.py | 24 +--------- tools/test_settings.py | 2 - 4 files changed, 1 insertion(+), 109 deletions(-) delete mode 100644 source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py delete mode 100644 source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py diff --git a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py deleted file mode 100644 index 2ac712a34ba3..000000000000 --- a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause - -"""Launch Isaac Sim Simulator first.""" - -from isaaclab.app import AppLauncher - -# launch the simulator -app_launcher = AppLauncher(headless=True, enable_cameras=True) -simulation_app = app_launcher.app - -from isaaclab.utils.version import get_isaac_sim_version - -"""Rest everything follows.""" - -import pytest - -import isaaclab_tasks # noqa: F401 - -# Local imports should be imported last -from env_test_utils import _run_environments, setup_environment # isort: skip - - -@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) -@pytest.mark.parametrize( - "task_name", - setup_environment(factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True), -) -def test_cartpole_showcase_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): - # skip test if stage in memory is not supported - if get_isaac_sim_version().major < 5: - pytest.skip("Stage in memory is not supported in this version of Isaac Sim") - - # run cartpole showcase environments with stage in memory - _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py deleted file mode 100644 index f2cfbd83f2b2..000000000000 --- a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause - -"""Launch Isaac Sim Simulator first.""" - -import sys - -# Import pinocchio in the main script to force the use of the dependencies -# installed by IsaacLab and not the one installed by Isaac Sim. -# pinocchio is required by the Pink IK controller used in some teleop environments -if sys.platform != "win32": - import pinocchio # noqa: F401 - -from isaaclab.app import AppLauncher - -# launch the simulator -app_launcher = AppLauncher(headless=True, enable_cameras=True) -simulation_app = app_launcher.app - -from isaaclab.utils.version import get_isaac_sim_version - -"""Rest everything follows.""" - -import pytest - -import isaaclab_tasks # noqa: F401 - -# Local imports should be imported last -from env_test_utils import _run_environments, setup_environment # isort: skip - - -# Teleop environments require isaacteleop / isaaclab_teleop and may interfere -# with other environment tests when run in the same process. They are collected -# separately here so they execute in their own test session. - - -@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) -@pytest.mark.parametrize("task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True)) -def test_teleop_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): - # skip test if stage in memory is not supported - if get_isaac_sim_version().major < 5: - pytest.skip("Stage in memory is not supported in this version of Isaac Sim") - - # run teleop environments with stage in memory - _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/env_test_utils.py b/source/isaaclab_tasks/test/env_test_utils.py index a2ac47f60bb4..60aaa6aefe1b 100644 --- a/source/isaaclab_tasks/test/env_test_utils.py +++ b/source/isaaclab_tasks/test/env_test_utils.py @@ -20,7 +20,6 @@ from isaaclab.envs.utils.spaces import sample_space from isaaclab.physics import PhysicsCfg from isaaclab.sim import SimulationContext -from isaaclab.utils.version import get_isaac_sim_version from isaaclab_tasks.utils.hydra import apply_overrides, collect_presets from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry, parse_env_cfg @@ -307,8 +306,6 @@ def _run_environments( num_envs, num_steps=20, multi_agent=False, - create_stage_in_memory=False, - disable_clone_in_fabric=False, physics_preset_name: str | None = None, ): """Run all environments and check environments return valid signals. @@ -319,16 +316,10 @@ def _run_environments( num_envs: Number of environments. num_steps: Number of simulation steps. multi_agent: Whether the environment is multi-agent. - create_stage_in_memory: Whether to create stage in memory. - disable_clone_in_fabric: Whether to disable fabric cloning. physics_preset_name: Name of the physics preset to apply (e.g., 'newton_mjwarp'). If None, uses the environment's default physics. """ - # skip test if stage in memory is not supported - if get_isaac_sim_version().major < 5 and create_stage_in_memory: - pytest.skip("Stage in memory is not supported in this version of Isaac Sim") - # skip suction gripper environments as they require CPU simulation and cannot be run with GPU simulation if "Suction" in task_name and device != "cpu": return @@ -366,8 +357,6 @@ def _run_environments( num_envs, num_steps=num_steps, multi_agent=multi_agent, - create_stage_in_memory=create_stage_in_memory, - disable_clone_in_fabric=disable_clone_in_fabric, physics_preset_name=physics_preset_name, ) print(f""">>> Closing environment: {task_name}""") @@ -380,8 +369,6 @@ def _check_random_actions( num_envs: int, num_steps: int = 20, multi_agent: bool = False, - create_stage_in_memory: bool = False, - disable_clone_in_fabric: bool = False, physics_preset_name: str | None = None, ): """Run random actions and check environments return valid signals. @@ -392,14 +379,10 @@ def _check_random_actions( num_envs: Number of environments. num_steps: Number of simulation steps. multi_agent: Whether the environment is multi-agent. - create_stage_in_memory: Whether to create stage in memory. - disable_clone_in_fabric: Whether to disable fabric cloning. physics_preset_name: Name of the physics preset to apply (e.g., 'newton_mjwarp'). If None, uses the environment's default physics. """ - # create a new context stage, if stage in memory is not enabled - if not create_stage_in_memory: - sim_utils.create_new_stage() + sim_utils.create_new_stage() # reset the rtx sensors setting to False get_settings_manager().set_bool("/isaaclab/render/rtx_sensors", False) @@ -419,11 +402,6 @@ def _check_random_actions( # the scene config with the preset's default num_envs. if num_envs is not None: env_cfg.scene.num_envs = num_envs - # set config args - env_cfg.sim.create_stage_in_memory = create_stage_in_memory - if disable_clone_in_fabric: - env_cfg.scene.clone_in_fabric = False - # filter based off multi agents mode and create env if multi_agent: if not hasattr(env_cfg, "possible_agents"): diff --git a/tools/test_settings.py b/tools/test_settings.py index 43714a540a3d..ace16447350e 100644 --- a/tools/test_settings.py +++ b/tools/test_settings.py @@ -39,9 +39,7 @@ "test_environments_skillgen.py": 1000, "test_environments_automate.py": 2500, "test_teleop_environments.py": 5000, - "test_teleop_environments_with_stage_in_memory.py": 5000, "test_cartpole_showcase_environments.py": 5000, - "test_cartpole_showcase_environments_with_stage_in_memory.py": 5000, "test_simulation_render_config.py": 1000, "test_operational_space.py": 1000, "test_non_headless_launch.py": 1000, # This test launches the app in non-headless mode and starts simulation From e8cf939dcb0833bf034262ccf160518d84fb893f Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Thu, 13 Aug 2026 18:48:42 -0700 Subject: [PATCH 16/18] Revert "Split environment smoke tests by backend" This reverts commit ed946fa3450ab7b519eb6840af26565174aa4a14. --- ...wcase_environments_with_stage_in_memory.py | 37 ++++++++++++ ...eleop_environments_with_stage_in_memory.py | 47 ++++++++++++++++ .../test/core/test_environments.py | 40 ++++++++++++- .../core/test_environments_isaacsim_physx.py | 31 ---------- .../test/core/test_environments_newton.py | 31 ---------- .../test_environments_with_stage_in_memory.py | 56 +++++++++++++++++++ source/isaaclab_tasks/test/env_test_utils.py | 36 +++++++----- tools/test_settings.py | 8 ++- 8 files changed, 206 insertions(+), 80 deletions(-) create mode 100644 source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py create mode 100644 source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py delete mode 100644 source/isaaclab_tasks/test/core/test_environments_isaacsim_physx.py delete mode 100644 source/isaaclab_tasks/test/core/test_environments_newton.py create mode 100644 source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py diff --git a/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py new file mode 100644 index 000000000000..2ac712a34ba3 --- /dev/null +++ b/source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py @@ -0,0 +1,37 @@ +# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +"""Launch Isaac Sim Simulator first.""" + +from isaaclab.app import AppLauncher + +# launch the simulator +app_launcher = AppLauncher(headless=True, enable_cameras=True) +simulation_app = app_launcher.app + +from isaaclab.utils.version import get_isaac_sim_version + +"""Rest everything follows.""" + +import pytest + +import isaaclab_tasks # noqa: F401 + +# Local imports should be imported last +from env_test_utils import _run_environments, setup_environment # isort: skip + + +@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) +@pytest.mark.parametrize( + "task_name", + setup_environment(factory_envs=False, multi_agent=False, teleop_envs=False, cartpole_showcase_envs=True), +) +def test_cartpole_showcase_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): + # skip test if stage in memory is not supported + if get_isaac_sim_version().major < 5: + pytest.skip("Stage in memory is not supported in this version of Isaac Sim") + + # run cartpole showcase environments with stage in memory + _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py new file mode 100644 index 000000000000..f2cfbd83f2b2 --- /dev/null +++ b/source/isaaclab_tasks/test/contrib/test_teleop_environments_with_stage_in_memory.py @@ -0,0 +1,47 @@ +# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +"""Launch Isaac Sim Simulator first.""" + +import sys + +# Import pinocchio in the main script to force the use of the dependencies +# installed by IsaacLab and not the one installed by Isaac Sim. +# pinocchio is required by the Pink IK controller used in some teleop environments +if sys.platform != "win32": + import pinocchio # noqa: F401 + +from isaaclab.app import AppLauncher + +# launch the simulator +app_launcher = AppLauncher(headless=True, enable_cameras=True) +simulation_app = app_launcher.app + +from isaaclab.utils.version import get_isaac_sim_version + +"""Rest everything follows.""" + +import pytest + +import isaaclab_tasks # noqa: F401 + +# Local imports should be imported last +from env_test_utils import _run_environments, setup_environment # isort: skip + + +# Teleop environments require isaacteleop / isaaclab_teleop and may interfere +# with other environment tests when run in the same process. They are collected +# separately here so they execute in their own test session. + + +@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) +@pytest.mark.parametrize("task_name", setup_environment(factory_envs=False, multi_agent=False, teleop_envs=True)) +def test_teleop_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): + # skip test if stage in memory is not supported + if get_isaac_sim_version().major < 5: + pytest.skip("Stage in memory is not supported in this version of Isaac Sim") + + # run teleop environments with stage in memory + _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/core/test_environments.py b/source/isaaclab_tasks/test/core/test_environments.py index 5362b78a32b5..75a7de889daf 100644 --- a/source/isaaclab_tasks/test/core/test_environments.py +++ b/source/isaaclab_tasks/test/core/test_environments.py @@ -16,14 +16,48 @@ import pytest +from isaaclab.physics import PhysicsCfg + import isaaclab_tasks # noqa: F401 +from isaaclab_tasks.utils.hydra import collect_presets +from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry # Local imports should be imported last from env_test_utils import _run_environments, setup_environment # isort: skip -@pytest.mark.parametrize("task_name", setup_environment(multi_agent=False, physics_preset_name="physx", tier="core")) +_PHYSICS_PRESET_NAMES = ("newton_mjwarp", "physx", "isaacsim_physx") + + +def _core_physics_params() -> list: + """Return core task/backend pairs for explicitly supported physics presets.""" + params = [] + for task_param in setup_environment(multi_agent=False, tier="core"): + task_name = getattr(task_param, "values", (task_param,))[0] + marks = getattr(task_param, "marks", ()) + env_cfg = load_cfg_from_registry(task_name, "env_cfg_entry_point") + physics_preset_groups = collect_presets(env_cfg).values() + for physics_preset_name in _PHYSICS_PRESET_NAMES: + if any( + physics_preset_name in preset_group and isinstance(preset_group[physics_preset_name], PhysicsCfg) + for preset_group in physics_preset_groups + ): + params.append( + pytest.param( + task_name, + physics_preset_name, + id=f"{task_name}-{physics_preset_name}", + marks=marks, + ) + ) + return params + + +@pytest.mark.parametrize("task_name, physics_preset_name", _core_physics_params()) @pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) @pytest.mark.isaacsim_ci -def test_environments(task_name, num_envs, device): - _run_environments(task_name, device, num_envs, physics_preset_name="physx") +def test_environments(task_name, physics_preset_name, num_envs, device): + # run environments without stage in memory + _run_environments( + task_name, device, num_envs, create_stage_in_memory=False, physics_preset_name=physics_preset_name + ) diff --git a/source/isaaclab_tasks/test/core/test_environments_isaacsim_physx.py b/source/isaaclab_tasks/test/core/test_environments_isaacsim_physx.py deleted file mode 100644 index 56e76949d248..000000000000 --- a/source/isaaclab_tasks/test/core/test_environments_isaacsim_physx.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause - -"""Launch Isaac Sim Simulator first.""" - -from isaaclab.app import AppLauncher - -# launch the simulator -app_launcher = AppLauncher(headless=True, enable_cameras=True, limit_cpu_threads=1) -simulation_app = app_launcher.app - - -"""Rest everything follows.""" - -import pytest - -import isaaclab_tasks # noqa: F401 - -# Local imports should be imported last -from env_test_utils import _run_environments, setup_environment # isort: skip - - -@pytest.mark.parametrize( - "task_name", setup_environment(multi_agent=False, physics_preset_name="isaacsim_physx", tier="core") -) -@pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) -@pytest.mark.isaacsim_ci -def test_environments_isaacsim_physx(task_name, num_envs, device): - _run_environments(task_name, device, num_envs, physics_preset_name="isaacsim_physx") diff --git a/source/isaaclab_tasks/test/core/test_environments_newton.py b/source/isaaclab_tasks/test/core/test_environments_newton.py deleted file mode 100644 index 3c2eac5c6f81..000000000000 --- a/source/isaaclab_tasks/test/core/test_environments_newton.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause - -"""Launch Isaac Sim Simulator first.""" - -from isaaclab.app import AppLauncher - -# launch the simulator -app_launcher = AppLauncher(headless=True, enable_cameras=True, limit_cpu_threads=1) -simulation_app = app_launcher.app - - -"""Rest everything follows.""" - -import pytest - -import isaaclab_tasks # noqa: F401 - -# Local imports should be imported last -from env_test_utils import _run_environments, setup_environment # isort: skip - - -@pytest.mark.parametrize( - "task_name", setup_environment(multi_agent=False, physics_preset_name="newton_mjwarp", tier="core") -) -@pytest.mark.parametrize("num_envs, device", [(2, "cuda"), (1, "cuda")]) -@pytest.mark.isaacsim_ci -def test_environments_newton(task_name, num_envs, device): - _run_environments(task_name, device, num_envs, physics_preset_name="newton_mjwarp") diff --git a/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py b/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py new file mode 100644 index 000000000000..ad6185ed45a6 --- /dev/null +++ b/source/isaaclab_tasks/test/core/test_environments_with_stage_in_memory.py @@ -0,0 +1,56 @@ +# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +"""Launch Isaac Sim Simulator first.""" + +from isaaclab.app import AppLauncher + +# launch the simulator +app_launcher = AppLauncher(headless=True, enable_cameras=True, limit_cpu_threads=1) +simulation_app = app_launcher.app + +from isaaclab.utils.version import get_isaac_sim_version + +"""Rest everything follows.""" + +import pytest + +import isaaclab_tasks # noqa: F401 + +# Local imports should be imported last +from env_test_utils import _run_environments, setup_environment # isort: skip + + +# note, running an env test without stage in memory then +# running an env test with stage in memory causes IsaacLab to hang. +# so, here we run all envs with stage in memory separately + +# TODO(mtrepte): re-enable with fabric cloning fix +# @pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) +# @pytest.mark.parametrize("task_name", setup_environment(factory_envs=False, multi_agent=False)) +# def test_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): +# # skip test if stage in memory is not supported +# if get_isaac_sim_version().major < 5: +# pytest.skip("Stage in memory is not supported in this version of Isaac Sim") + +# # run environments with stage in memory +# _run_environments(task_name, device, num_envs, create_stage_in_memory=True) + + +@pytest.mark.parametrize("num_envs, device", [(2, "cuda")]) +@pytest.mark.parametrize( + "task_name", + setup_environment( + multi_agent=False, + tier="core", + ), +) +def test_environments_with_stage_in_memory_and_clone_in_fabric_disabled(task_name, num_envs, device): + # skip test if stage in memory is not supported + if get_isaac_sim_version().major < 5: + pytest.skip("Stage in memory is not supported in this version of Isaac Sim") + + # run environments with stage in memory + _run_environments(task_name, device, num_envs, create_stage_in_memory=True, disable_clone_in_fabric=True) diff --git a/source/isaaclab_tasks/test/env_test_utils.py b/source/isaaclab_tasks/test/env_test_utils.py index 60aaa6aefe1b..cb05301cf6f3 100644 --- a/source/isaaclab_tasks/test/env_test_utils.py +++ b/source/isaaclab_tasks/test/env_test_utils.py @@ -18,8 +18,8 @@ from isaaclab.app.settings_manager import get_settings_manager from isaaclab.envs.mdp.actions.actions_cfg import OperationalSpaceControllerActionCfg from isaaclab.envs.utils.spaces import sample_space -from isaaclab.physics import PhysicsCfg from isaaclab.sim import SimulationContext +from isaaclab.utils.version import get_isaac_sim_version from isaaclab_tasks.utils.hydra import apply_overrides, collect_presets from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry, parse_env_cfg @@ -83,7 +83,6 @@ def setup_environment( teleop_envs: bool | None = None, cartpole_showcase_envs: bool | None = None, pickplace_stack_envs: bool | None = None, - physics_preset_name: str | None = None, tier: str | None = None, ) -> list[str]: """ @@ -110,7 +109,6 @@ def setup_environment( - True: include only PickPlace/Stack environments - False: exclude PickPlace/Stack environments - None: include all environments regardless of pick-place/stack type - physics_preset_name: Include only environments that support this physics preset. tier: - "core": include only core environments (registered under ``isaaclab_tasks.core``). - "contrib": include only contributed environments (registered under ``isaaclab_tasks.contrib``). @@ -175,15 +173,6 @@ def setup_environment( continue # if None: no filter - if physics_preset_name is not None: - env_cfg = load_cfg_from_registry(task_spec.id, "env_cfg_entry_point") - physics_preset_groups = collect_presets(env_cfg).values() - if not any( - physics_preset_name in preset_group and isinstance(preset_group[physics_preset_name], PhysicsCfg) - for preset_group in physics_preset_groups - ): - continue - registered_tasks.append(task_spec.id) # sort environments alphabetically @@ -306,6 +295,8 @@ def _run_environments( num_envs, num_steps=20, multi_agent=False, + create_stage_in_memory=False, + disable_clone_in_fabric=False, physics_preset_name: str | None = None, ): """Run all environments and check environments return valid signals. @@ -316,10 +307,16 @@ def _run_environments( num_envs: Number of environments. num_steps: Number of simulation steps. multi_agent: Whether the environment is multi-agent. + create_stage_in_memory: Whether to create stage in memory. + disable_clone_in_fabric: Whether to disable fabric cloning. physics_preset_name: Name of the physics preset to apply (e.g., 'newton_mjwarp'). If None, uses the environment's default physics. """ + # skip test if stage in memory is not supported + if get_isaac_sim_version().major < 5 and create_stage_in_memory: + pytest.skip("Stage in memory is not supported in this version of Isaac Sim") + # skip suction gripper environments as they require CPU simulation and cannot be run with GPU simulation if "Suction" in task_name and device != "cpu": return @@ -357,6 +354,8 @@ def _run_environments( num_envs, num_steps=num_steps, multi_agent=multi_agent, + create_stage_in_memory=create_stage_in_memory, + disable_clone_in_fabric=disable_clone_in_fabric, physics_preset_name=physics_preset_name, ) print(f""">>> Closing environment: {task_name}""") @@ -369,6 +368,8 @@ def _check_random_actions( num_envs: int, num_steps: int = 20, multi_agent: bool = False, + create_stage_in_memory: bool = False, + disable_clone_in_fabric: bool = False, physics_preset_name: str | None = None, ): """Run random actions and check environments return valid signals. @@ -379,10 +380,14 @@ def _check_random_actions( num_envs: Number of environments. num_steps: Number of simulation steps. multi_agent: Whether the environment is multi-agent. + create_stage_in_memory: Whether to create stage in memory. + disable_clone_in_fabric: Whether to disable fabric cloning. physics_preset_name: Name of the physics preset to apply (e.g., 'newton_mjwarp'). If None, uses the environment's default physics. """ - sim_utils.create_new_stage() + # create a new context stage, if stage in memory is not enabled + if not create_stage_in_memory: + sim_utils.create_new_stage() # reset the rtx sensors setting to False get_settings_manager().set_bool("/isaaclab/render/rtx_sensors", False) @@ -402,6 +407,11 @@ def _check_random_actions( # the scene config with the preset's default num_envs. if num_envs is not None: env_cfg.scene.num_envs = num_envs + # set config args + env_cfg.sim.create_stage_in_memory = create_stage_in_memory + if disable_clone_in_fabric: + env_cfg.scene.clone_in_fabric = False + # filter based off multi agents mode and create env if multi_agent: if not hasattr(env_cfg, "possible_agents"): diff --git a/tools/test_settings.py b/tools/test_settings.py index ace16447350e..540a76ad3b39 100644 --- a/tools/test_settings.py +++ b/tools/test_settings.py @@ -21,8 +21,10 @@ "test_stage_in_memory.py": 1000, "test_imu.py": 1000, "test_environments.py": 10000, # This test runs through all the environments for 100 steps each - "test_environments_isaacsim_physx.py": 10000, "test_contrib_environments_smoke.py": 10000, # Smoke test running through contributed environments + "test_environments_with_stage_in_memory.py": ( + 10000 + ), # Like the above, with stage in memory and with and without fabric cloning "test_environment_determinism.py": 1000, # This test runs through many the environments for 100 steps each "test_pickplace_stack_environments.py": 10000, # This test runs through PickPlace and Stack environments "test_factory_environments.py": 1000, # This test runs through Factory environments for 100 steps each @@ -39,7 +41,9 @@ "test_environments_skillgen.py": 1000, "test_environments_automate.py": 2500, "test_teleop_environments.py": 5000, + "test_teleop_environments_with_stage_in_memory.py": 5000, "test_cartpole_showcase_environments.py": 5000, + "test_cartpole_showcase_environments_with_stage_in_memory.py": 5000, "test_simulation_render_config.py": 1000, "test_operational_space.py": 1000, "test_non_headless_launch.py": 1000, # This test launches the app in non-headless mode and starts simulation @@ -61,7 +65,7 @@ "test_multi_tiled_camera.py": 1000, "test_multirotor.py": 1000, "test_shadow_hand_camera_presets.py": 5000, - "test_environments_newton.py": 10000, + "test_environments_newton.py": 5000, "test_surface_gripper.py": 3000, # The first test in the kitless rendering test job will take longer to run due to RTX shader compilation. "test_rendering_cartpole_kitless.py": 2000, From 5ffde719af60033faa5728e143adb3aef4ac9d43 Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Fri, 14 Aug 2026 12:40:16 -0700 Subject: [PATCH 17/18] Fix classic default backend tests --- .../core/test_rendering_registered_tasks.py | 9 ++++--- .../test/core/test_runtime_compatibility.py | 25 +++++++++++-------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py b/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py index 9e32e8b57c1b..c8e3697ebbef 100644 --- a/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py +++ b/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py @@ -63,8 +63,8 @@ def _collect_camera_outputs(env: object) -> dict[str, dict[str, torch.Tensor]]: # Task IDs that expose camera/tiled_camera image observations; each is validated for non-blank # rendering. The max different pixels percentage is set based on the screen space taken up by the -# env. The ``presets`` column selects a data-type variant on the consolidated cartpole camera task; -# ``None`` uses the default. +# env. These golden baselines validate Isaac Sim PhysX with Isaac RTX. The ``presets`` column +# selects a data-type variant on the consolidated cartpole camera task; ``None`` uses its default. _RENDER_CORRECTNESS_TASK_IDS = [ ("Isaac-Cartpole-Camera-Direct", None, "cartpole"), ("Isaac-Cartpole-Camera-Direct", "albedo", "cartpole"), @@ -96,7 +96,10 @@ def test_rendering_registered_tasks(task_id: str, presets: str | None, env_name: from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry env_cfg = load_cfg_from_registry(task_id, "env_cfg_entry_point") - env_cfg = resolve_presets(env_cfg, {presets} if presets else frozenset()) + selected_presets = {"isaacsim_physx", "isaacsim_rtx"} + if presets: + selected_presets.add(presets) + env_cfg = resolve_presets(env_cfg, selected_presets) env_cfg.sim.device = "cuda:0" env_cfg.scene.num_envs = 4 diff --git a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py index 902b9e1c3106..fce37d4d4c01 100644 --- a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py +++ b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py @@ -16,6 +16,7 @@ import sys import pytest +from isaaclab_newton.physics import NewtonCfg from isaaclab_ov.physics import OvPhysxCfg from isaaclab_ov.renderers import OVRTXRendererCfg from isaaclab_physx.physics import PhysxCfg @@ -199,13 +200,15 @@ def test_newton_plus_ovrtx_is_valid(): validate_runtime_compatibility(env_cfg) -def test_default_isaacsim_physx_plus_ovrtx_raises(): - """The concrete default Isaac Sim PhysX backend is incompatible with OVRTX.""" +def test_default_newton_plus_ovrtx_is_valid(): + """The default Newton backend supports the default OVRTX renderer.""" env_cfg = _resolve_with_presets("ovrtx") - assert isinstance(env_cfg.sim.physics, PhysxCfg) - with pytest.raises(ValueError, match="PhysxCfg"): - validate_runtime_compatibility(env_cfg) + assert isinstance(env_cfg.sim.physics, NewtonCfg) + config_scan = validate_runtime_compatibility(env_cfg) + + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False def test_explicit_auto_physx_plus_ovrtx_resolves_to_ovphysx(): @@ -270,19 +273,19 @@ def test_auto_physx_explicit_experience_resolves_to_isaac_sim_backends(): def test_default_preset_is_valid(): - """The default preset (PhysX + Isaac RTX) is supported.""" + """The default preset (Newton + Newton renderer) is supported.""" env_cfg = _resolve_with_presets("default") validate_runtime_compatibility(env_cfg) -def test_rtx_with_default_physx_is_valid_and_resolves_to_isaac_sim_backends(): - """The RTX selector follows the default concrete Isaac Sim PhysX backend.""" +def test_rtx_with_default_newton_is_valid_and_resolves_to_ovrtx(): + """The RTX selector resolves to OVRTX with the default Newton backend.""" env_cfg = _resolve_with_presets("rtx") config_scan = validate_runtime_compatibility(env_cfg) - assert isinstance(env_cfg.sim.physics, PhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) - assert config_scan.needs_kit is True + assert isinstance(env_cfg.sim.physics, NewtonCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False def test_renderer_selector_physx_rtx_is_valid_and_resolves_to_ovphysx_and_ovrtx(): From 46d2aac9a0aa4dadff2b8c735992c58f9a03a09f Mon Sep 17 00:00:00 2001 From: Mustafa Haiderbhai Date: Fri, 14 Aug 2026 21:08:07 -0700 Subject: [PATCH 18/18] Use RTX renderer for PhysX video test --- source/isaaclab_tasks/test/core/test_video_recording.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/isaaclab_tasks/test/core/test_video_recording.py b/source/isaaclab_tasks/test/core/test_video_recording.py index e0a12d953a1c..c8ba164ffa6d 100644 --- a/source/isaaclab_tasks/test/core/test_video_recording.py +++ b/source/isaaclab_tasks/test/core/test_video_recording.py @@ -100,6 +100,7 @@ def _cartpole_cfg_newton(*, num_envs: int = 1): def _cartpole_camera_cfg_physx(*, num_envs: int = 1): from isaaclab_physx.physics import PhysxCfg + from isaaclab_physx.renderers import IsaacRtxRendererCfg from isaaclab_tasks.core.cartpole.cartpole_direct_camera_env_cfg import CartpoleCameraEnvCfg @@ -107,6 +108,7 @@ def _cartpole_camera_cfg_physx(*, num_envs: int = 1): cfg = cfg.default cfg.scene.num_envs = num_envs cfg.sim.physics = PhysxCfg() + cfg.tiled_camera.renderer_cfg = IsaacRtxRendererCfg() return cfg