From 397685bada014f4911a4f3f05b80d4e464cb0b7c Mon Sep 17 00:00:00 2001 From: hougantc Date: Fri, 21 Aug 2026 14:32:47 +0000 Subject: [PATCH] Make XR experiences show all partitions Set the spectator policy in both OpenXR app configs. This makes direct launches match AppLauncher XR behavior. Add a static contract assertion for both experiences. --- apps/isaaclab.python.xr.openxr.headless.kit | 1 + apps/isaaclab.python.xr.openxr.kit | 1 + .../hougantc-xr-show-all-scene-partitions.rst | 5 ++++ .../test/app/test_experience_files.py | 28 +++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 source/isaaclab/changelog.d/hougantc-xr-show-all-scene-partitions.rst diff --git a/apps/isaaclab.python.xr.openxr.headless.kit b/apps/isaaclab.python.xr.openxr.headless.kit index aa2903920315..cce59d5c1aa8 100644 --- a/apps/isaaclab.python.xr.openxr.headless.kit +++ b/apps/isaaclab.python.xr.openxr.headless.kit @@ -23,6 +23,7 @@ app.useFabricSceneDelegate = true # Temporary, should be enabled by default in Kit soon rtx.hydra.readTransformsFromFabricInRenderDelegate = true renderer.scenePartitioning.enabled = true # Enable before RTX initialization so env-root partitions are honored +rtx.scenePartitioning.showAllPartitionsByDefault = true # xr optimizations xr.skipInputDeviceUSDWrites = true diff --git a/apps/isaaclab.python.xr.openxr.kit b/apps/isaaclab.python.xr.openxr.kit index 113376a240e0..a9ad5e5fcef4 100644 --- a/apps/isaaclab.python.xr.openxr.kit +++ b/apps/isaaclab.python.xr.openxr.kit @@ -35,6 +35,7 @@ app.useFabricSceneDelegate = true # Temporary, should be enabled by default in Kit soon rtx.hydra.readTransformsFromFabricInRenderDelegate = true renderer.scenePartitioning.enabled = true # Enable before RTX initialization so env-root partitions are honored +rtx.scenePartitioning.showAllPartitionsByDefault = true # xr optimizations xr.skipInputDeviceUSDWrites = true diff --git a/source/isaaclab/changelog.d/hougantc-xr-show-all-scene-partitions.rst b/source/isaaclab/changelog.d/hougantc-xr-show-all-scene-partitions.rst new file mode 100644 index 000000000000..4cb18d8174a6 --- /dev/null +++ b/source/isaaclab/changelog.d/hougantc-xr-show-all-scene-partitions.rst @@ -0,0 +1,5 @@ +Fixed +^^^^^ + +* Fixed the OpenXR experiences to expose content from all Isaac RTX scene + partitions when launched directly. diff --git a/source/isaaclab/test/app/test_experience_files.py b/source/isaaclab/test/app/test_experience_files.py index 175bfba3fd12..1d9bddbee4fa 100644 --- a/source/isaaclab/test/app/test_experience_files.py +++ b/source/isaaclab/test/app/test_experience_files.py @@ -37,6 +37,25 @@ def _kit_dependencies(experience: str) -> set[str]: return dependencies +def _kit_setting_values(experience: str, setting: str) -> list[str]: + """Collect values assigned to a setting in an experience file's settings sections.""" + values: list[str] = [] + in_settings = False + + for line in (APPS_DIR / experience).read_text(encoding="utf-8").splitlines(): + section = _SECTION_RE.match(line) + if section is not None: + in_settings = section.group("name").strip() == "settings" + continue + if not in_settings: + continue + key, separator, value = line.partition("=") + if separator and key.strip() == setting: + values.append(value.partition("#")[0].strip()) + + return values + + @pytest.mark.parametrize("experience", ["isaaclab.python.kit", "isaaclab.python.headless.kit"]) def test_base_experiences_enable_native_storage(experience: str): """Test the base experiences load the extension that applies ``ISAACSIM_ASSET_ROOT``.""" @@ -55,3 +74,12 @@ def test_base_experiences_enable_native_storage(experience: str): def test_derived_experiences_inherit_native_storage(experience: str, base: str): """Test the derived experiences inherit native storage from a base experience.""" assert base in _kit_dependencies(experience) + + +@pytest.mark.parametrize( + "experience", + ["isaaclab.python.xr.openxr.kit", "isaaclab.python.xr.openxr.headless.kit"], +) +def test_xr_experiences_show_all_scene_partitions(experience: str): + """Test each XR experience configures its spectator view before RTX starts.""" + assert _kit_setting_values(experience, "rtx.scenePartitioning.showAllPartitionsByDefault") == ["true"]