diff --git a/.github/actions/_lib/setup-docker-config/action.yml b/.github/actions/_lib/setup-docker-config/action.yml index 09effa56eaa3..6dc3403bac7c 100644 --- a/.github/actions/_lib/setup-docker-config/action.yml +++ b/.github/actions/_lib/setup-docker-config/action.yml @@ -37,7 +37,7 @@ runs: if [ -n "${NGC_API_KEY:-}" ]; then echo "🔵 Logging into nvcr.io..." - docker login -u '$oauthtoken' -p "${NGC_API_KEY}" nvcr.io + printf '%s' "${NGC_API_KEY}" | docker login -u '$oauthtoken' --password-stdin nvcr.io else echo "🟠 NGC_API_KEY not set - skipping nvcr.io login (normal for fork PRs)" fi diff --git a/.github/actions/run-package-tests/action.yml b/.github/actions/run-package-tests/action.yml index 6afdde7cbc73..880c9697250e 100644 --- a/.github/actions/run-package-tests/action.yml +++ b/.github/actions/run-package-tests/action.yml @@ -91,6 +91,10 @@ inputs: description: 'Optional digest-pinned Docker image containing /wheelhouse and /manifest.json' default: '' required: false + wheelhouse-ngc-api-key: + description: 'Optional NGC API key used only to pull the wheelhouse image' + default: '' + required: false wheelhouse-packages: description: 'Space-separated packages to install from the wheelhouse with pip --no-index' default: '' @@ -235,6 +239,8 @@ runs: - name: Setup wheelhouse registry authentication if: inputs.wheelhouse-image != '' uses: ./.github/actions/_lib/setup-docker-config + env: + NGC_API_KEY: ${{ inputs.wheelhouse-ngc-api-key != '' && inputs.wheelhouse-ngc-api-key || env.NGC_API_KEY }} - name: Extract ovphysx wheelhouse id: extract-wheelhouse @@ -269,7 +275,9 @@ runs: docker pull "$WHEELHOUSE_IMAGE" image_pulled=true - container_id="$(docker create "$WHEELHOUSE_IMAGE")" + # Wheelhouse carriers are data-only images and may be built FROM scratch + # without a default command. Supply one because the container is never run. + container_id="$(docker create "$WHEELHOUSE_IMAGE" true)" docker cp "${container_id}:/wheelhouse" "$wheelhouse_root/wheelhouse" docker cp "${container_id}:/manifest.json" "$wheelhouse_root/manifest.json" docker rm "$container_id" diff --git a/.github/actions/run-tests/run_tests.sh b/.github/actions/run-tests/run_tests.sh index dcfaed6a7981..1c2a6018083b 100755 --- a/.github/actions/run-tests/run_tests.sh +++ b/.github/actions/run-tests/run_tests.sh @@ -302,12 +302,34 @@ run_tests() { # step can still `docker kill` the container reliably. # `docker logs -f` is the foreground process and is trivially killable. echo "🔵 Starting Docker container for tests..." + local memory_limit + local cpu_limit + local gpu_devices + local cdi_device + local -a gpu_args + memory_limit=$(free -m | awk '/^Mem:/{printf "%dm", $2 * 0.9}') + cpu_limit=$(awk -v cpus="$(nproc)" 'BEGIN {printf "%.1f", cpus * 0.9}') + gpu_devices="${ISAACLAB_CI_GPU_DEVICES:-all}" + if [ "$gpu_devices" = "all" ]; then + gpu_args=(--gpus all) + elif command -v nvidia-ctk >/dev/null 2>&1; then + cdi_device=$(nvidia-ctk cdi list | awk '/^nvidia\.com\/gpu=/ && !/=all$/ {print; exit}') + if [ -z "$cdi_device" ]; then + echo "::error::No concrete NVIDIA CDI GPU device is available" + return 1 + fi + gpu_args=(--device "$cdi_device") + gpu_devices="$cdi_device" + else + gpu_args=(--runtime=nvidia -e "NVIDIA_VISIBLE_DEVICES=${gpu_devices#device=}") + fi + echo "Docker GPU selection: ${gpu_devices}" docker run -d --name $container_name \ --init --stop-timeout 5 \ - --entrypoint bash --gpus all --network=host \ + --entrypoint bash "${gpu_args[@]}" --network=host \ --security-opt=no-new-privileges:true \ - --memory=$(echo "$(free -m | awk '/^Mem:/{print $2}') * 0.9 / 1" | bc)m \ - --cpus=$(echo "$(nproc) * 0.9" | bc) \ + --memory="$memory_limit" \ + --cpus="$cpu_limit" \ --oom-kill-disable=false \ --ulimit nofile=65536:65536 \ --ulimit nproc=4096:4096 \ @@ -343,6 +365,9 @@ run_tests() { *\" ovphysx \"*) ./isaaclab.sh -p -c \"import importlib.metadata,json,os,pathlib; from packaging.version import Version; manifest=json.loads(pathlib.Path(os.environ['TEST_WHEELHOUSE_MANIFEST']).read_text(encoding='utf-8')); expected=manifest.get('ovphysx_version'); actual=importlib.metadata.version('ovphysx'); print(f'Resolved ovphysx package version: {actual}'); print(f'Wheelhouse manifest ovphysx version: {expected}'); import ovphysx; runtime=getattr(ovphysx, '__version__', actual); print(f'Imported ovphysx runtime version: {runtime}'); raise SystemExit(0 if Version(actual) == Version(expected) and Version(runtime) == Version(expected) else f'ovphysx version mismatch: installed {actual}, import {runtime}, manifest {expected}')\" ;; + *\" ovrtx \"*) + ./isaaclab.sh -p -c \"import hashlib,importlib.metadata,json,os,pathlib; from packaging.version import Version; manifest=json.loads(pathlib.Path(os.environ['TEST_WHEELHOUSE_MANIFEST']).read_text(encoding='utf-8')); record=manifest.get('ovrtx') or {}; wheel=pathlib.Path(os.environ['TEST_WHEELHOUSE_PATH']) / record.get('file', ''); expected=manifest.get('ovrtx_version'); actual=importlib.metadata.version('ovrtx'); digest=hashlib.file_digest(wheel.open('rb'), 'sha256').hexdigest(); import ovrtx; from ovrtx import _version; expected_branch=(manifest.get('source') or {}).get('ref'); expected_sha=manifest.get('ovrtx_git_sha'); print(f'Resolved ovrtx package version: {actual}'); print(f'Wheelhouse manifest ovrtx version: {expected}'); print(f'Wheelhouse ovrtx SHA-256: {digest}'); print(f'Imported ovrtx provenance: {_version.gitbranch}@{_version.githash}'); raise SystemExit(0 if Version(actual) == Version(expected) and digest == record.get('sha256') and _version.gitbranch == expected_branch and _version.githash == expected_sha else f'ovrtx wheelhouse mismatch: installed {actual}, manifest {expected}, sha {digest}, provenance {_version.gitbranch}@{_version.githash}')\" + ;; esac fi if [ -n \"\${TEST_EXTRA_PIP_PACKAGES:-}\" ]; then diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e9c1cfef4e65..312f2c4694f9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -73,6 +73,7 @@ permissions: env: NGC_API_KEY: ${{ secrets.NGC_API_KEY }} + ISAACLAB_CI_GPU_DEVICES: ${{ github.event_name == 'workflow_dispatch' && github.repository == 'nvsekkin/IsaacLab' && 'device=0' || 'all' }} jobs: changes: @@ -119,6 +120,7 @@ jobs: isaacsim_image_tag: ${{ steps.load.outputs.isaacsim_image_tag }} isaaclab_image_name: ${{ steps.load.outputs.isaaclab_image_name }} ovphysx_wheelhouse_image: ${{ steps.load.outputs.ovphysx_wheelhouse_image }} + ovrtx_wheelhouse_image: ${{ steps.load.outputs.ovrtx_wheelhouse_image }} ci_image_tag: ${{ steps.image_tag.outputs.ci_image_tag }} steps: - uses: actions/checkout@v6 @@ -134,6 +136,7 @@ jobs: echo "isaacsim_image_tag=$(yq -r .isaacsim_image_tag "$f")" >> "$GITHUB_OUTPUT" echo "isaaclab_image_name=$(yq -r .isaaclab_image_name "$f")" >> "$GITHUB_OUTPUT" echo "ovphysx_wheelhouse_image=$(yq -r '.ovphysx_wheelhouse_image // ""' "$f")" >> "$GITHUB_OUTPUT" + echo "ovrtx_wheelhouse_image=$(yq -r '.ovrtx_wheelhouse_image // ""' "$f")" >> "$GITHUB_OUTPUT" # NOTE: this ci_image_tag formula is intentionally duplicated in arm-ci.yml's # config job — the two images are independent (x86 here vs -arm64 there), so # they are not shared. Keep the two formulas in sync if either changes. @@ -161,9 +164,12 @@ jobs: #region build jobs build: name: Build Base Docker Image - runs-on: [self-hosted, gpu] + runs-on: [ovrtx-vtc] needs: [changes, config] - if: needs.changes.outputs.should_run == 'true' + if: >- + github.event_name == 'workflow_dispatch' && + github.repository == 'nvsekkin/IsaacLab' && + needs.changes.outputs.should_run == 'true' steps: - name: Checkout Code uses: actions/checkout@v6 @@ -173,6 +179,8 @@ jobs: - name: Build and push to ECR uses: ./.github/actions/ecr-build-push-pull + env: + NGC_API_KEY: ${{ secrets.ISAACSIM_NGC_API_KEY || secrets.NGC_API_KEY }} with: image-tag: ${{ needs.config.outputs.ci_image_tag }} isaacsim-base-image: ${{ needs.config.outputs.isaacsim_image_name }} @@ -186,6 +194,7 @@ jobs: needs: [changes, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.changes.outputs.should_run == 'true' steps: - name: Checkout Code @@ -214,6 +223,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -241,6 +251,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -268,6 +279,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -294,6 +306,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -318,6 +331,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -342,6 +356,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -370,6 +385,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -398,6 +414,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -431,6 +448,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -453,6 +471,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -474,6 +493,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -496,6 +516,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -512,11 +533,12 @@ jobs: test-isaaclab-visualizers: name: isaaclab_visualizers - runs-on: [self-hosted, gpu] + runs-on: [ovrtx-vtc] timeout-minutes: 180 needs: [build, config] if: >- - github.event_name != 'push' && + github.event_name == 'workflow_dispatch' && + github.repository == 'nvsekkin/IsaacLab' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -538,6 +560,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -559,6 +582,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -580,6 +604,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -597,11 +622,12 @@ jobs: test-isaaclab-physx: name: isaaclab_physx - runs-on: [self-hosted, gpu] + runs-on: [ovrtx-vtc] timeout-minutes: 180 needs: [build, config] if: >- - github.event_name != 'push' && + github.event_name == 'workflow_dispatch' && + github.repository == 'nvsekkin/IsaacLab' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -619,14 +645,16 @@ jobs: test-isaaclab-ov: name: isaaclab_ov - runs-on: [self-hosted, gpu] + runs-on: [ovrtx-vtc] timeout-minutes: 180 needs: [build, config] if: >- - github.event_name != 'push' && + github.event_name == 'workflow_dispatch' && + github.repository == 'nvsekkin/IsaacLab' && needs.build.result == 'success' env: USE_OVPHYSX_WHEELHOUSE: ${{ needs.config.outputs.ovphysx_wheelhouse_image != '' && ((github.event_name == 'pull_request' && github.base_ref == 'develop' && github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name != 'pull_request' && github.ref_name == 'develop')) }} + USE_OVRTX_WHEELHOUSE: ${{ needs.config.outputs.ovrtx_wheelhouse_image != '' }} steps: - uses: actions/checkout@v6 with: @@ -636,15 +664,18 @@ jobs: uses: ./.github/actions/resolve-ov-pins id: ov_pins - uses: ./.github/actions/run-package-tests + env: + NGC_API_KEY: ${{ secrets.ISAACSIM_NGC_API_KEY || secrets.NGC_API_KEY }} with: image-tag: ${{ needs.config.outputs.ci_image_tag }} isaacsim-base-image: ${{ needs.config.outputs.isaacsim_image_name }} isaacsim-version: ${{ needs.config.outputs.isaacsim_image_tag }} - filter-pattern: "isaaclab_ov" + filter-pattern: "isaaclab_ov/" # Volume deformable tests tetrahedralize their meshes at startup. - extra-pip-packages: pytetwild[all]>=0.3.0,<0.4 ${{ env.USE_OVPHYSX_WHEELHOUSE == 'true' && steps.ov_pins.outputs.ovrtx || format('{0} {1}', steps.ov_pins.outputs.ovrtx, steps.ov_pins.outputs.ovphysx) }} - wheelhouse-image: ${{ env.USE_OVPHYSX_WHEELHOUSE == 'true' && needs.config.outputs.ovphysx_wheelhouse_image || '' }} - wheelhouse-packages: ${{ env.USE_OVPHYSX_WHEELHOUSE == 'true' && 'ovphysx' || '' }} + extra-pip-packages: pytetwild[all]>=0.3.0,<0.4 ${{ env.USE_OVRTX_WHEELHOUSE == 'true' && steps.ov_pins.outputs.ovphysx || (env.USE_OVPHYSX_WHEELHOUSE == 'true' && steps.ov_pins.outputs.ovrtx || format('{0} {1}', steps.ov_pins.outputs.ovrtx, steps.ov_pins.outputs.ovphysx)) }} + wheelhouse-image: ${{ env.USE_OVRTX_WHEELHOUSE == 'true' && needs.config.outputs.ovrtx_wheelhouse_image || (env.USE_OVPHYSX_WHEELHOUSE == 'true' && needs.config.outputs.ovphysx_wheelhouse_image || '') }} + wheelhouse-ngc-api-key: ${{ secrets.NGC_API_KEY }} + wheelhouse-packages: ${{ env.USE_OVRTX_WHEELHOUSE == 'true' && 'ovrtx' || (env.USE_OVPHYSX_WHEELHOUSE == 'true' && 'ovphysx' || '') }} container-name: isaac-lab-ov-test # Folded from the former standalone verify-base-non-root job: reuses the @@ -681,6 +712,7 @@ jobs: needs: [build-curobo, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build-curobo.result == 'success' steps: - uses: actions/checkout@v6 @@ -731,6 +763,7 @@ jobs: needs: [build-curobo, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build-curobo.result == 'success' steps: - uses: actions/checkout@v6 @@ -755,6 +788,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'push' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' steps: - uses: actions/checkout@v6 @@ -774,11 +808,14 @@ jobs: test-rendering-correctness: name: "rendering-correctness" - runs-on: [self-hosted, gpu] + runs-on: [ovrtx-vtc] timeout-minutes: 120 continue-on-error: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} needs: [build, config] - if: needs.build.result == 'success' + if: >- + github.event_name == 'workflow_dispatch' && + github.repository == 'nvsekkin/IsaacLab' && + needs.build.result == 'success' steps: - uses: actions/checkout@v6 with: @@ -811,13 +848,17 @@ jobs: # synthetic event_name axis plus an exclude entry. test-rendering-correctness-kitless-legacy: name: "rendering-correctness-kitless (legacy)" - runs-on: [self-hosted, gpu] + runs-on: [ovrtx-vtc] timeout-minutes: 120 continue-on-error: ${{ github.event_name == 'workflow_dispatch' }} needs: [build, config] - if: needs.build.result == 'success' + if: >- + github.event_name == 'workflow_dispatch' && + github.repository == 'nvsekkin/IsaacLab' && + needs.build.result == 'success' env: USE_OVPHYSX_WHEELHOUSE: ${{ needs.config.outputs.ovphysx_wheelhouse_image != '' && ((github.event_name == 'pull_request' && github.base_ref == 'develop' && github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name != 'pull_request' && github.ref_name == 'develop')) }} + USE_OVRTX_WHEELHOUSE: ${{ needs.config.outputs.ovrtx_wheelhouse_image != '' }} steps: - uses: actions/checkout@v6 with: @@ -827,6 +868,8 @@ jobs: uses: ./.github/actions/resolve-ov-pins id: ov_pins - uses: ./.github/actions/run-package-tests + env: + NGC_API_KEY: ${{ secrets.ISAACSIM_NGC_API_KEY || secrets.NGC_API_KEY }} with: image-tag: ${{ needs.config.outputs.ci_image_tag }} isaacsim-base-image: ${{ needs.config.outputs.isaacsim_image_name }} @@ -834,9 +877,10 @@ jobs: filter-pattern: "isaaclab_tasks" extra-pip-packages: >- pytetwild[all]>=0.3.0,<0.4 - ${{ env.USE_OVPHYSX_WHEELHOUSE == 'true' && steps.ov_pins.outputs.ovrtx || format('{0} {1}', steps.ov_pins.outputs.ovrtx, steps.ov_pins.outputs.ovphysx) }} - wheelhouse-image: ${{ env.USE_OVPHYSX_WHEELHOUSE == 'true' && needs.config.outputs.ovphysx_wheelhouse_image || '' }} - wheelhouse-packages: ${{ env.USE_OVPHYSX_WHEELHOUSE == 'true' && 'ovphysx' || '' }} + ${{ env.USE_OVRTX_WHEELHOUSE == 'true' && steps.ov_pins.outputs.ovphysx || (env.USE_OVPHYSX_WHEELHOUSE == 'true' && steps.ov_pins.outputs.ovrtx || format('{0} {1}', steps.ov_pins.outputs.ovrtx, steps.ov_pins.outputs.ovphysx)) }} + wheelhouse-image: ${{ env.USE_OVRTX_WHEELHOUSE == 'true' && needs.config.outputs.ovrtx_wheelhouse_image || (env.USE_OVPHYSX_WHEELHOUSE == 'true' && needs.config.outputs.ovphysx_wheelhouse_image || '') }} + wheelhouse-ngc-api-key: ${{ secrets.NGC_API_KEY }} + wheelhouse-packages: ${{ env.USE_OVRTX_WHEELHOUSE == 'true' && 'ovrtx' || (env.USE_OVPHYSX_WHEELHOUSE == 'true' && 'ovphysx' || '') }} include-files: >- test_rendering_cartpole_kitless.py, test_rendering_lift_kuka_hetero_kitless.py, @@ -859,6 +903,7 @@ jobs: needs: [build, config] if: >- github.event_name != 'pull_request' && + github.event_name != 'workflow_dispatch' && needs.build.result == 'success' env: USE_OVPHYSX_WHEELHOUSE: ${{ needs.config.outputs.ovphysx_wheelhouse_image != '' && ((github.event_name == 'pull_request' && github.base_ref == 'develop' && github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name != 'pull_request' && github.ref_name == 'develop')) }} @@ -914,7 +959,7 @@ jobs: group: warp-cache-write-${{ github.ref }} cancel-in-progress: false if: >- - (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && + github.event_name == 'push' && needs.build.result == 'success' env: # Caches are branch-scoped: publishing only helps from a PR base branch diff --git a/.github/workflows/config.yaml b/.github/workflows/config.yaml index 33ba03dabb57..374deaf27527 100644 --- a/.github/workflows/config.yaml +++ b/.github/workflows/config.yaml @@ -13,3 +13,5 @@ isaacsim_image_name: nvcr.io/0947644777160149/internal/isaac-sim isaacsim_image_tag: latest-develop@sha256:a0fe646aa0d2c717a51231589eb210a8f59db7d3e6ccb8e8ba8b11f9ae13ed85 isaaclab_image_name: nvcr.io/0947644777160149/internal/isaac-lab ovphysx_wheelhouse_image: "" +# Temporary fork-only VTC carrier. Set to the digest-pinned OVRTX 0.4.1 RC image after publication. +ovrtx_wheelhouse_image: "nvcr.io/nvidian/isaaclab-ovrtx-wheel-experimental-ci:ovrtx-wheelhouse-v0.4.1.364340-g7f330117-w597e09f34819@sha256:9bae67cca7b01ff7c01e80a30734537012eabb1821b07e987c0ff845cb6d92bc" diff --git a/source/isaaclab_ov/changelog.d/esekkin-ovrtx-041-363792-vtc.skip b/source/isaaclab_ov/changelog.d/esekkin-ovrtx-041-363792-vtc.skip new file mode 100644 index 000000000000..4d31ac93dded --- /dev/null +++ b/source/isaaclab_ov/changelog.d/esekkin-ovrtx-041-363792-vtc.skip @@ -0,0 +1 @@ +Validation-only: enabled synchronous OVRTX texture streaming for the 0.4.1.364340 release candidate. diff --git a/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py b/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py index 46f6a1e90f35..1cbabafb6dd2 100644 --- a/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py +++ b/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py @@ -63,6 +63,7 @@ Renderer, RendererConfig, Semantic, + TextureStreamingMode, ) except ModuleNotFoundError as exc: if exc.name != "ovrtx": @@ -71,7 +72,7 @@ "The OVRTX renderer requires the optional 'ovrtx' runtime wheel, which is not installed. " "Run your command with: uv run --extra ovrtx " "(or, manually: python -m pip install --extra-index-url https://pypi.nvidia.com " - "'ovrtx>=0.4.0,<0.5.0')." + "'ovrtx>=0.4.1,<0.5.0')." ) from exc from isaaclab.cloner.clone_plan import ClonePlan @@ -394,6 +395,7 @@ def __init__(self, cfg: OVRTXRendererCfg): log_level=self.cfg.log_level, read_gpu_transforms=_read_gpu_transforms_enabled(), keep_system_alive=True, + texture_streaming_mode=TextureStreamingMode.SYNCHRONOUS, ) self._renderer = Renderer(OVRTX_CONFIG) if not self._renderer: diff --git a/source/isaaclab_tasks/changelog.d/esekkin-ovrtx-041-363792-vtc.skip b/source/isaaclab_tasks/changelog.d/esekkin-ovrtx-041-363792-vtc.skip new file mode 100644 index 000000000000..002662e0d021 --- /dev/null +++ b/source/isaaclab_tasks/changelog.d/esekkin-ovrtx-041-363792-vtc.skip @@ -0,0 +1 @@ +Test-only: removed resolved OVRTX xfails and workarounds for the 0.4.1.364340 release candidate. diff --git a/source/isaaclab_tasks/test/core/test_rendering_cartpole_kitless.py b/source/isaaclab_tasks/test/core/test_rendering_cartpole_kitless.py index 7d94751116b4..848c1e904be9 100644 --- a/source/isaaclab_tasks/test/core/test_rendering_cartpole_kitless.py +++ b/source/isaaclab_tasks/test/core/test_rendering_cartpole_kitless.py @@ -21,19 +21,10 @@ pytestmark = [pytest.mark.isaacsim_ci, pytest.mark.arm_ci] -_OVRTX_TEXTURE_READINESS_XFAIL_REASON = "OVRTX 0.4 may return before textured materials are ready (NVBUG#6505191)." _OVSTAGE_OVPHYSX_MOTION_XFAIL_REASON = ( "OVStage-backed OVRTX motion vectors do not yet match the legacy OVRTX path with OVPhysX." ) -_BASE_RENDERING_PARAMS = make_kitless_rendering_params( - make_xfail_rendering_params( - KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS, - { - ("ovphysx", "ovrtx_renderer", data_type): _OVRTX_TEXTURE_READINESS_XFAIL_REASON - for data_type in ("albedo", "simple_shading_diffuse_mdl", "simple_shading_full_mdl") - }, - ) -) +_BASE_RENDERING_PARAMS = make_kitless_rendering_params(KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS) _RENDERING_PARAMS = make_xfail_rendering_params( _BASE_RENDERING_PARAMS, {("ovstage", "ovphysx", "ovrtx_renderer", "motion_vectors"): _OVSTAGE_OVPHYSX_MOTION_XFAIL_REASON}, diff --git a/source/isaaclab_tasks/test/core/test_rendering_franka_cloth_kitless.py b/source/isaaclab_tasks/test/core/test_rendering_franka_cloth_kitless.py index 6aab270465ba..37419b007c6e 100644 --- a/source/isaaclab_tasks/test/core/test_rendering_franka_cloth_kitless.py +++ b/source/isaaclab_tasks/test/core/test_rendering_franka_cloth_kitless.py @@ -19,7 +19,7 @@ pytestmark = pytest.mark.isaacsim_ci -_RENDERING_PARAMS = make_kitless_rendering_params_franka(include_cloth_motion_vectors=True) +_RENDERING_PARAMS = make_kitless_rendering_params_franka() _COMPARISON_SCORES: list[dict] = [] _determinism_fixture = make_determinism_fixture() diff --git a/source/isaaclab_tasks/test/core/test_rendering_lift_kuka_homo_kitless.py b/source/isaaclab_tasks/test/core/test_rendering_lift_kuka_homo_kitless.py index d83efa817571..6064e8a6b31c 100644 --- a/source/isaaclab_tasks/test/core/test_rendering_lift_kuka_homo_kitless.py +++ b/source/isaaclab_tasks/test/core/test_rendering_lift_kuka_homo_kitless.py @@ -19,7 +19,7 @@ pytestmark = [pytest.mark.isaacsim_ci, pytest.mark.arm_ci] -_RENDERING_PARAMS = make_kitless_rendering_params_lift(include_texture_readiness_xfail=True) +_RENDERING_PARAMS = make_kitless_rendering_params_lift() _COMPARISON_SCORES: list[dict] = [] _determinism_fixture = make_determinism_fixture() diff --git a/source/isaaclab_tasks/test/golden_images/cartpole/ovphysx-ovrtx_renderer-motion_vectors.png b/source/isaaclab_tasks/test/golden_images/cartpole/ovphysx-ovrtx_renderer-motion_vectors.png index a3202d4c0b4a..e1d021954dff 100644 --- a/source/isaaclab_tasks/test/golden_images/cartpole/ovphysx-ovrtx_renderer-motion_vectors.png +++ b/source/isaaclab_tasks/test/golden_images/cartpole/ovphysx-ovrtx_renderer-motion_vectors.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6eaa711657b634cf8381a4b45fbfd4728411b3ccf4ec240b6b85b52f2224406 -size 890 +oid sha256:2b385323bf9c45faeb3e06d3aad4e9f47487b3fb0f3f1b6051232fcb5adff291 +size 1132 diff --git a/source/isaaclab_tasks/test/golden_images/franka_cloth/newton-ovrtx_renderer-simple_shading_full_mdl.png b/source/isaaclab_tasks/test/golden_images/franka_cloth/newton-ovrtx_renderer-simple_shading_full_mdl.png index 5cd337fa002f..f7d46f820832 100644 --- a/source/isaaclab_tasks/test/golden_images/franka_cloth/newton-ovrtx_renderer-simple_shading_full_mdl.png +++ b/source/isaaclab_tasks/test/golden_images/franka_cloth/newton-ovrtx_renderer-simple_shading_full_mdl.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0283812849e0192c0e6c213bc5a9aeee6a7d28276ebaa133906d5dbbf6e42f8a -size 6022 +oid sha256:3021cb42ac72600023446a1932d76882e35e42c26bd70691e2502d20df0c660d +size 17324 diff --git a/source/isaaclab_tasks/test/golden_images/franka_soft/newton-ovrtx_renderer-simple_shading_full_mdl.png b/source/isaaclab_tasks/test/golden_images/franka_soft/newton-ovrtx_renderer-simple_shading_full_mdl.png index 7e92474e23a9..41c6377080ae 100644 --- a/source/isaaclab_tasks/test/golden_images/franka_soft/newton-ovrtx_renderer-simple_shading_full_mdl.png +++ b/source/isaaclab_tasks/test/golden_images/franka_soft/newton-ovrtx_renderer-simple_shading_full_mdl.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:29deb44916f01f68755004976aa1b30d20eb812ac5e5d2baec915dc67680bf16 -size 6454 +oid sha256:1c5e20f58ad34e365ca900f9016b6035108f878d588ec8cc2cd9e9c05be552fb +size 16217 diff --git a/source/isaaclab_tasks/test/golden_images/lift_kuka_hetero/newton-ovrtx_renderer-albedo.png b/source/isaaclab_tasks/test/golden_images/lift_kuka_hetero/newton-ovrtx_renderer-albedo.png index ed149e34cb83..14425c4a6403 100644 --- a/source/isaaclab_tasks/test/golden_images/lift_kuka_hetero/newton-ovrtx_renderer-albedo.png +++ b/source/isaaclab_tasks/test/golden_images/lift_kuka_hetero/newton-ovrtx_renderer-albedo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a58c732a7d6c862182babc64c3322b139d87f5324d41b8bbe34cb9d553e2316 -size 2820 +oid sha256:62ec96075ad7f857f647e8ff037aaacb4dd17ebcefef80f629e636c55184dbc8 +size 3990 diff --git a/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/newton-ovrtx_renderer-albedo.png b/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/newton-ovrtx_renderer-albedo.png index 28b6f4608781..041ac2ad222e 100644 --- a/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/newton-ovrtx_renderer-albedo.png +++ b/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/newton-ovrtx_renderer-albedo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8beaee6aeffc7ae23d601c5d8e68a597c1a169a18ad86dddbe5f981ada805594 -size 2143 +oid sha256:0a8021bf2ae969c949ee3729d76f3719c304154c9e6a4c7c07b7e1aed9281c57 +size 3941 diff --git a/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/ovphysx-ovrtx_renderer-albedo.png b/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/ovphysx-ovrtx_renderer-albedo.png index 28b6f4608781..041ac2ad222e 100644 --- a/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/ovphysx-ovrtx_renderer-albedo.png +++ b/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/ovphysx-ovrtx_renderer-albedo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8beaee6aeffc7ae23d601c5d8e68a597c1a169a18ad86dddbe5f981ada805594 -size 2143 +oid sha256:0a8021bf2ae969c949ee3729d76f3719c304154c9e6a4c7c07b7e1aed9281c57 +size 3941 diff --git a/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/ovphysx-ovrtx_renderer-motion_vectors.png b/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/ovphysx-ovrtx_renderer-motion_vectors.png index 4737660d1785..a2ea986ce22b 100644 --- a/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/ovphysx-ovrtx_renderer-motion_vectors.png +++ b/source/isaaclab_tasks/test/golden_images/lift_kuka_homo/ovphysx-ovrtx_renderer-motion_vectors.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e72b387dc3b2876421edde21b437ea2b9754c540a7f31fc3b27ee38fd7d97e7 -size 1758 +oid sha256:9324b498534f3ce292ca56f299895a87ec3ecf751a6e5f7d5f66c0bcb6b7beec +size 2208 diff --git a/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-albedo.png b/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-albedo.png index 7ee6b3307da5..0149911f68d5 100644 --- a/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-albedo.png +++ b/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-albedo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a840351a95b90ff31de25ff4bcc9b9f2a9e82242d21ea3d6964b896b06982ba7 -size 2720 +oid sha256:f2f4f93114a5d1ad2c3a086db2a676fa4b0573d856adb37a47060b686e358a05 +size 3739 diff --git a/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-simple_shading_diffuse_mdl.png b/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-simple_shading_diffuse_mdl.png index 62aae4e1e927..db337919961b 100644 --- a/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-simple_shading_diffuse_mdl.png +++ b/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-simple_shading_diffuse_mdl.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5fcbf0f8e0810df3052896e6ef1550bca60e316f6adf8589e3979048eaf8a130 -size 5803 +oid sha256:f60f90f91ce2b4d0f83abc25e747924997eebc3d4790bcd4bb29f4fd348b0ed2 +size 6351 diff --git a/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-simple_shading_full_mdl.png b/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-simple_shading_full_mdl.png index a0d6f6eeea62..71b99d020848 100644 --- a/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-simple_shading_full_mdl.png +++ b/source/isaaclab_tasks/test/golden_images/shadow_hand/newton-ovrtx_renderer-simple_shading_full_mdl.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84cfe77c1b6f0ba690d97ae899c7619f33c2ecad696b0b3e4d4b3920177b5fa1 -size 7160 +oid sha256:564eafa2469ebb6fb09255b3d61275d8ace352d6530ab93a254bc7e2817c0bdf +size 7611 diff --git a/source/isaaclab_tasks/test/golden_images/shadow_hand/ovphysx-ovrtx_renderer-motion_vectors.png b/source/isaaclab_tasks/test/golden_images/shadow_hand/ovphysx-ovrtx_renderer-motion_vectors.png index 6c987c110701..83e759dc4b73 100644 --- a/source/isaaclab_tasks/test/golden_images/shadow_hand/ovphysx-ovrtx_renderer-motion_vectors.png +++ b/source/isaaclab_tasks/test/golden_images/shadow_hand/ovphysx-ovrtx_renderer-motion_vectors.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f7009076462f09c4b640c2fe1ebce8dfc625c0adb29d4d55e0113cfdd63e47a -size 4108 +oid sha256:013d552b83019bd98a130ab72e3c4813cb98f3f71454cbc2094bcbe8aac06338 +size 4977 diff --git a/source/isaaclab_tasks/test/rendering_test_utils.py b/source/isaaclab_tasks/test/rendering_test_utils.py index 1d02ea357d29..ef58115f9cc0 100644 --- a/source/isaaclab_tasks/test/rendering_test_utils.py +++ b/source/isaaclab_tasks/test/rendering_test_utils.py @@ -60,6 +60,20 @@ "lift_kuka_hetero": 8.0, } +# OVRTX 0.4.1 RC rendering is deterministic, so cap its environment-specific +# pixel-difference tolerance at the upper end of the agreed 1-3% range. +_OVRTX_MAX_DIFFERENT_PIXELS_PERCENTAGE = 3.0 +_OVRTX_SCALE_SENSITIVE_DATA_TYPES = {"depth", "distance_to_camera", "distance_to_image_plane"} + + +def _max_different_pixels_percentage(env_name: str, renderer: str, data_type: str) -> float: + """Return the image-difference tolerance for an environment and renderer.""" + threshold = MAX_DIFFERENT_PIXELS_PERCENTAGE_BY_ENV_NAME[env_name] + if renderer == "ovrtx_renderer" and data_type not in _OVRTX_SCALE_SENSITIVE_DATA_TYPES: + return min(threshold, _OVRTX_MAX_DIFFERENT_PIXELS_PERCENTAGE) + return threshold + + # Allow OVRTX Cartpole RGB/RGBA variation tracked by NVBUG#6152566; the SSIM gate remains enabled. The # deterministic Warp rasterizer and the Isaac RTX reference path keep the stricter env-wide threshold. _CARTPOLE_OVRTX_RGB_MAX_DIFFERENT_PIXELS_PERCENTAGE = 2.0 @@ -155,15 +169,8 @@ # Users should use ``instance_segmentation`` or ``semantic_segmentation`` instead. _OVRTX_DATA_TYPES = tuple(dt for dt in _DEFAULT_SENSOR_DATA_TYPES if dt != "instance_id_segmentation_fast") -_OVRTX_TEXTURE_READINESS_DATA_TYPES = ( - "albedo", - "simple_shading_diffuse_mdl", - "simple_shading_full_mdl", -) -_OVRTX_TEXTURE_READINESS_XFAIL_REASON = "OVRTX 0.4 may return before textured materials are ready (NVBUG#6505191)." _KITLESS_STAGE_VARIANTS = ("legacy", "ovstage") _LIFT_RENDERER_CRASH_SKIP_REASON = "Lift kitless OVRTX MDL rendering can kill the test process (NVBUG#6524987)." -_OVRTX_CLOTH_MOTION_XFAIL_REASON = "Missing cloth in OVRTX 0.4 motion vectors (NVBUG#6489754)." def make_xfail_rendering_params( @@ -300,40 +307,21 @@ def _make_sensor_data_type_params( ), ] -KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS = make_xfail_rendering_params( - [ - *_make_sensor_data_type_params("ovphysx", "ovrtx", _OVRTX_DATA_TYPES), - *_make_sensor_data_type_params("newton", "ovrtx", _OVRTX_DATA_TYPES), - *_make_sensor_data_type_params( - "ovphysx", "newton", _NEWTON_WARP_DATA_TYPES, flaky=False, renderer_label="newton_warp" - ), - *_make_sensor_data_type_params( - "newton", "newton", _NEWTON_WARP_DATA_TYPES, flaky=False, renderer_label="newton_warp" - ), - ], - { - ("newton", "ovrtx_renderer", data_type): _OVRTX_TEXTURE_READINESS_XFAIL_REASON - for data_type in _OVRTX_TEXTURE_READINESS_DATA_TYPES - }, -) - +KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS = [ + *_make_sensor_data_type_params("ovphysx", "ovrtx", _OVRTX_DATA_TYPES), + *_make_sensor_data_type_params("newton", "ovrtx", _OVRTX_DATA_TYPES), + *_make_sensor_data_type_params( + "ovphysx", "newton", _NEWTON_WARP_DATA_TYPES, flaky=False, renderer_label="newton_warp" + ), + *_make_sensor_data_type_params( + "newton", "newton", _NEWTON_WARP_DATA_TYPES, flaky=False, renderer_label="newton_warp" + ), +] -def make_kitless_rendering_params_lift(*, include_texture_readiness_xfail: bool = False) -> list[pytest.param]: - """Create kitless Lift parameters with known failures isolated. - Args: - include_texture_readiness_xfail: Whether to mark the OVPhysX OVRTX albedo cases as expected failures. - """ +def make_kitless_rendering_params_lift() -> list[pytest.param]: + """Create kitless Lift parameters with native-crash cases isolated.""" params = make_kitless_rendering_params(KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS) - if include_texture_readiness_xfail: - params = make_xfail_rendering_params( - params, - { - (variant, "ovphysx", "ovrtx_renderer", "albedo"): _OVRTX_TEXTURE_READINESS_XFAIL_REASON - for variant in _KITLESS_STAGE_VARIANTS - }, - ) - # Both backends can SIGSEGV on the MDL AOVs, which loses the JUnit report for the whole file, # so xfail cannot express these. return make_skip_rendering_params( @@ -347,18 +335,9 @@ def make_kitless_rendering_params_lift(*, include_texture_readiness_xfail: bool ) -def make_kitless_rendering_params_franka(*, include_cloth_motion_vectors: bool = False) -> list[pytest.param]: - """Create kitless Franka parameters with the cloth-only motion-vector regression optionally marked.""" - params = make_kitless_rendering_params(KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS) - if not include_cloth_motion_vectors: - return params - return make_xfail_rendering_params( - params, - { - (variant, "newton", "ovrtx_renderer", "motion_vectors"): _OVRTX_CLOTH_MOTION_XFAIL_REASON - for variant in _KITLESS_STAGE_VARIANTS - }, - ) +def make_kitless_rendering_params_franka() -> list[pytest.param]: + """Create kitless Franka rendering parameters.""" + return make_kitless_rendering_params(KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS) # Tolerances for the numeric transform comparison. Transform entries mix unit-scale rotation @@ -958,7 +937,6 @@ def _require_ovlibs_install(request, monkeypatch: pytest.MonkeyPatch): return if callspec.params.get("renderer") == "ovrtx_renderer": - monkeypatch.setenv("ISAAC_LAB_OVRTX_READ_GPU_TRANSFORMS", "0") try: import ovrtx @@ -1292,7 +1270,9 @@ def _as_multiset(semantics: list[dict[str, str]]) -> list[tuple[tuple[str, str], ) -def maybe_step_env_for_motion(env: Any, data_type: str, num_steps: int = 2, action_value: float = 0.0) -> None: +def maybe_step_env_for_motion( + env: Any, data_type: str, num_steps: int = 2, action_value: float = 0.0, renderer: str | None = None +) -> None: """Step ``env`` so motion-vector AOVs have real inter-frame motion to encode. Motion vectors compare the current frame's transforms against the previous frame's; the first frame @@ -1307,10 +1287,16 @@ def maybe_step_env_for_motion(env: Any, data_type: str, num_steps: int = 2, acti action_value: Constant value applied to every action component on every step. Defaults to ``0.0`` (motion then comes only from physics already in flight, e.g. gravity/initial velocity). Pass a non-zero value to additionally induce actuated motion (e.g. cartpole cart translation). + renderer: Renderer under test. OVRTX 0.4.1 requires one additional history step. """ if data_type != "motion_vectors": return + # OVRTX 0.4.1 populates its previous-position history one frame later than the other + # renderers. Remove the extra step when OVRTX 0.5 resolves NVBUG#6565960. + if renderer == "ovrtx_renderer": + num_steps += 1 + action = torch.full(env.action_space.shape, action_value, device=env.device) for _ in range(num_steps): env.step(action) @@ -1364,7 +1350,7 @@ class _ShadowHandCameraTestEnvCfg(ShadowHandCameraEnvCfg): try: env = ShadowHandCameraEnv(env_cfg) - maybe_step_env_for_motion(env, data_type) + maybe_step_env_for_motion(env, data_type, renderer=renderer) maybe_save_stage("shadow_hand", physics_backend, renderer, data_type) validate_camera_outputs( @@ -1372,7 +1358,7 @@ class _ShadowHandCameraTestEnvCfg(ShadowHandCameraEnvCfg): physics_backend, renderer, env._tiled_camera.data.output, - max_different_pixels_percentage=MAX_DIFFERENT_PIXELS_PERCENTAGE_BY_ENV_NAME["shadow_hand"], + max_different_pixels_percentage=_max_different_pixels_percentage("shadow_hand", renderer, data_type), comparison_scores=comparison_scores, ) @@ -1452,7 +1438,7 @@ class _YellowBgEnvCfg(ShadowHandCameraEnvCfg): physics_backend, renderer, env._tiled_camera.data.output, - max_different_pixels_percentage=MAX_DIFFERENT_PIXELS_PERCENTAGE_BY_ENV_NAME["shadow_hand"], + max_different_pixels_percentage=_max_different_pixels_percentage("shadow_hand", renderer, "rgb"), comparison_scores=comparison_scores, ) finally: @@ -1541,7 +1527,7 @@ class _CartpoleCameraTestEnvCfg(CartpoleCameraEnvCfg): env = CartpoleCameraEnv(env_cfg) # Nudge the cart with a small constant force so motion vectors also capture cart translation, # not just pole dynamics already in flight from the randomized reset. - maybe_step_env_for_motion(env, data_type, action_value=0.5) + maybe_step_env_for_motion(env, data_type, action_value=0.5, renderer=renderer) camera_outputs = env._tiled_camera.data.output if renderer == "ovrtx_renderer": # The first output access creates the selected OVRTX render-variable mapping. Give @@ -1563,7 +1549,7 @@ class _CartpoleCameraTestEnvCfg(CartpoleCameraEnvCfg): data_type, compare_golden=compare_golden and data_type == "rgb", ) - max_different_pixels_percentage = MAX_DIFFERENT_PIXELS_PERCENTAGE_BY_ENV_NAME["cartpole"] + max_different_pixels_percentage = _max_different_pixels_percentage("cartpole", renderer, data_type) if renderer == "ovrtx_renderer" and data_type in ("rgb", "rgba"): max_different_pixels_percentage = _CARTPOLE_OVRTX_RGB_MAX_DIFFERENT_PIXELS_PERCENTAGE validate_camera_outputs( @@ -1712,14 +1698,14 @@ class _KukaAllegroLiftCameraTestEnvCfg(KukaAllegroLiftCameraEnvCfg): try: env = ManagerBasedRLEnv(env_cfg) - maybe_step_env_for_motion(env, data_type) + maybe_step_env_for_motion(env, data_type, renderer=renderer) maybe_save_stage(test_name, physics_backend, renderer, data_type) validate_camera_outputs( test_name, physics_backend, renderer, env.scene.sensors["base_camera"].data.output, - max_different_pixels_percentage=MAX_DIFFERENT_PIXELS_PERCENTAGE_BY_ENV_NAME[test_name], + max_different_pixels_percentage=_max_different_pixels_percentage(test_name, renderer, data_type), comparison_scores=comparison_scores, ) finally: @@ -1812,7 +1798,7 @@ def rendering_test_franka_cloth( physics_backend, renderer, env.scene.sensors["base_camera"].data.output, - max_different_pixels_percentage=MAX_DIFFERENT_PIXELS_PERCENTAGE_BY_ENV_NAME[test_name], + max_different_pixels_percentage=_max_different_pixels_percentage(test_name, renderer, data_type), comparison_scores=comparison_scores, ) finally: @@ -1881,7 +1867,7 @@ def rendering_test_franka_soft( physics_backend, renderer, env.scene.sensors["base_camera"].data.output, - max_different_pixels_percentage=MAX_DIFFERENT_PIXELS_PERCENTAGE_BY_ENV_NAME[test_name], + max_different_pixels_percentage=_max_different_pixels_percentage(test_name, renderer, data_type), comparison_scores=comparison_scores, ) finally: diff --git a/source/isaaclab_tasks/test/test_parametrization_helpers.py b/source/isaaclab_tasks/test/test_parametrization_helpers.py index 7998b99320ab..542904032284 100644 --- a/source/isaaclab_tasks/test/test_parametrization_helpers.py +++ b/source/isaaclab_tasks/test/test_parametrization_helpers.py @@ -19,9 +19,38 @@ make_kitless_rendering_params_lift, make_skip_rendering_params, make_xfail_rendering_params, + maybe_step_env_for_motion, ) +@pytest.mark.parametrize( + ("env_name", "renderer", "data_type", "expected"), + [ + ("franka_soft", "ovrtx_renderer", "albedo", 3.0), + ("franka_soft", "isaacsim_rtx_renderer", "albedo", 8.0), + ("cartpole", "ovrtx_renderer", "rgb", 1.5), + ("shadow_hand", "ovrtx_renderer", "depth", 5.0), + ], +) +def test_ovrtx_image_difference_threshold_is_capped( + env_name: str, renderer: str, data_type: str, expected: float +) -> None: + """OVRTX should use a tighter cap without loosening stricter environment thresholds.""" + assert rendering_test_utils._max_different_pixels_percentage(env_name, renderer, data_type) == expected + + +@pytest.mark.parametrize(("renderer", "expected_steps"), [("ovrtx_renderer", 3), ("isaacsim_rtx_renderer", 2)]) +def test_motion_warmup_adds_one_ovrtx_history_step(renderer: str, expected_steps: int) -> None: + """OVRTX 0.4.1 should receive one additional motion-history step.""" + env = Mock() + env.action_space.shape = (2, 3) + env.device = "cpu" + + maybe_step_env_for_motion(env, "motion_vectors", renderer=renderer) + + assert env.step.call_count == expected_steps + + def test_make_kitless_rendering_params_expands_only_ovrtx() -> None: """OVStage variants should be emitted only for the OVRTX renderer.""" params = [ @@ -95,17 +124,14 @@ def test_make_skip_rendering_params_overrides_xfail_and_flaky_marks() -> None: assert marked[0].marks[0].kwargs["reason"] == "Native renderer crash." -def test_kitless_matrix_scopes_texture_readiness_xfail_to_newton() -> None: - """OVPhysX textured AOVs pass outside Lift, so the shared readiness xfail stays Newton-only.""" +def test_kitless_matrix_has_no_texture_readiness_xfails() -> None: + """OVRTX 0.4.1 textured AOVs should run without readiness xfails.""" params = {param.id: param for param in KITLESS_PHYSICS_RENDERER_AOV_COMBINATIONS} for data_type in ("albedo", "simple_shading_diffuse_mdl", "simple_shading_full_mdl"): - newton_param = params[f"newton-ovrtx-{data_type}"] - assert [mark.name for mark in newton_param.marks] == ["xfail"] - assert "NVBUG#6505191" in newton_param.marks[0].kwargs["reason"] - - ovphysx_param = params[f"ovphysx-ovrtx-{data_type}"] - assert "xfail" not in [mark.name for mark in ovphysx_param.marks] + for physics_backend in ("newton", "ovphysx"): + param = params[f"{physics_backend}-ovrtx-{data_type}"] + assert "xfail" not in [mark.name for mark in param.marks] def test_lift_factory_applies_shared_native_crash_policy() -> None: @@ -123,18 +149,13 @@ def test_lift_factory_applies_shared_native_crash_policy() -> None: assert "xfail" not in [mark.name for mark in params["legacy-ovphysx-ovrtx-albedo"].marks] -def test_franka_factory_adds_cloth_only_motion_policy() -> None: - """Only the cloth suite should carry the motion-vector xfail.""" - soft_params = {param.id: param for param in make_kitless_rendering_params_franka()} - cloth_params = { - param.id: param for param in make_kitless_rendering_params_franka(include_cloth_motion_vectors=True) - } +def test_franka_factory_has_no_cloth_motion_xfail() -> None: + """OVRTX 0.4.1 cloth motion vectors should run without an xfail.""" + params = {param.id: param for param in make_kitless_rendering_params_franka()} for variant in ("legacy", "ovstage"): motion_id = f"{variant}-newton-ovrtx-motion_vectors" - assert "xfail" not in [mark.name for mark in soft_params[motion_id].marks] - assert [mark.name for mark in cloth_params[motion_id].marks] == ["xfail"] - assert "NVBUG#6489754" in cloth_params[motion_id].marks[0].kwargs["reason"] + assert "xfail" not in [mark.name for mark in params[motion_id].marks] def test_html_report_labels_xfail_and_xpass_outcomes(monkeypatch, tmp_path: Path) -> None: