Skip to content

Commit 7166229

Browse files
authored
Skip cloner perf test and fix ray caster intrinsics camera pose (isaac-sim#5470)
# Description Two unrelated CI flakes in the same test infrastructure area, bundled because both are minimal targeted fixes. ### 1. `test_disabled_fabric_change_notifies_speedup_regression` (`source/isaaclab_physx/test/sim/test_cloner.py`) This is a wall-clock perf regression test that's intended to run **locally only** — it asserts a >= 1.2× speedup of clone+reset with listener suspension. The result is platform-sensitive (deferred Fabric resync in `sim.reset` can offset the scene-time savings on some hardware), so it was meant to be skipped in CI. The original guard was `if os.getenv(\"CI\", \"\").lower() in (\"true\", \"1\"): pytest.skip(...)` inside the test body. However, this project's CI doesn't set the `CI` env var — it selects tests via the `isaacsim_ci` pytest marker registered in `pyproject.toml` and applied module-wide via `pytestmark` at the top of `test_cloner.py`. Result: the env-var skip never fires, and the test runs (and occasionally flakes) on CI. Fix: replace the dead env-var branch with a top-level `@pytest.mark.skip(...)` decorator so the test is collected and skipped unconditionally regardless of how CI selects tests. The correctness of the suspension mechanism is still covered by `test_disabled_fabric_change_notifies_toggles_ifabricusd_flag`, which is unaffected. Re-enable the perf test manually when touching listener suspension. ### 2. `test_output_equal_to_usd_camera_when_intrinsics_set` (`source/isaaclab/test/sensors/test_ray_caster_camera.py`) Intermittent CI failure where the ray caster camera output mismatched the USD camera reference with inf-valued differences across all 518400 elements: ``` E Mismatched elements: 518400 / 518400 (100.0%) E Greatest absolute difference: inf at index (0, 0, 0, 0) (up to 0.0001 allowed) E Greatest relative difference: inf at index (0, 0, 0, 0) (up to 0.005 allowed) ``` Root cause: the test placed the camera at `eye=(0, 0, 5)` looking at `target=(0, 0, 0)`, which is colinear with the default up vector and produces a degenerate view transform. Fix: nudge `eye` to `(0.001, 0, 5)` for both the ray caster and USD camera, keeping them at identical poses while breaking the singularity. The underlying degeneracy is tracked in a separate internal ticket; this is the test-side mitigation. Fixes # (n/a) ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Screenshots N/A — test infrastructure changes. ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent 8bb6eff commit 7166229

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

source/isaaclab/test/sensors/test_ray_caster_camera.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,11 +898,11 @@ def test_output_equal_to_usd_camera_when_intrinsics_set(setup_sim, focal_length_
898898

899899
# set camera position
900900
camera_warp.set_world_poses_from_view(
901-
eyes=torch.tensor([[0.0, 0.0, 5.0]], device=camera_warp.device),
901+
eyes=torch.tensor([[0.001, 0.0, 5.0]], device=camera_warp.device),
902902
targets=torch.tensor([[0.0, 0.0, 0.0]], device=camera_warp.device),
903903
)
904904
camera_usd.set_world_poses_from_view(
905-
eyes=torch.tensor([[0.0, 0.0, 5.0]], device=camera_usd.device),
905+
eyes=torch.tensor([[0.001, 0.0, 5.0]], device=camera_usd.device),
906906
targets=torch.tensor([[0.0, 0.0, 0.0]], device=camera_usd.device),
907907
)
908908

source/isaaclab_physx/test/sim/test_cloner.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,17 @@ def test_disabled_fabric_change_notifies_toggles_ifabricusd_flag(sim):
552552
assert bindings.is_enabled(fabric_id), "outer exit should restore the flag"
553553

554554

555+
@pytest.mark.skip(
556+
reason=(
557+
"Local-only perf regression; correctness is covered by"
558+
" test_disabled_fabric_change_notifies_toggles_ifabricusd_flag."
559+
" Re-enable manually when touching listener suspension."
560+
)
561+
)
555562
def test_disabled_fabric_change_notifies_speedup_regression():
556563
"""Local-only perf regression: listener suspension speeds up clone+reset by >= 1.2x.
557564
558-
Skipped under ``CI=true`` — the suspension mechanism's correctness is covered by
565+
Skipped unconditionally — the suspension mechanism's correctness is covered by
559566
:func:`test_disabled_fabric_change_notifies_toggles_ifabricusd_flag`; the wall-clock
560567
win is platform-sensitive (deferred Fabric resync in ``sim.reset`` can offset the
561568
scene-time savings on some hardware). Re-verify locally when touching the suspension.
@@ -564,7 +571,6 @@ def test_disabled_fabric_change_notifies_speedup_regression():
564571
``replicate_physics=True`` is required (drops to ~1.19x without), and 16 bodies x
565572
4096 envs ≈ 64K firings keeps listener cost above noise. See PR #5432.
566573
"""
567-
import os
568574
import time
569575

570576
import isaaclab.cloner._fabric_notices as fabric_notices_mod
@@ -573,8 +579,6 @@ def test_disabled_fabric_change_notifies_speedup_regression():
573579
from isaaclab.scene import InteractiveScene, InteractiveSceneCfg
574580
from isaaclab.utils import configclass
575581

576-
if os.getenv("CI", "").lower() in ("true", "1"):
577-
pytest.skip("CI: covered by toggle test; perf is platform-sensitive — re-verify locally")
578582
if fabric_notices_mod.get_bindings() is None:
579583
pytest.skip("omni::fabric::IFabricUsd unavailable")
580584

0 commit comments

Comments
 (0)