Skip to content

Add PPISP camera QA demos and discovery fallback - #5748

Merged
kellyguo11 merged 1 commit into
isaac-sim:developfrom
moennen:nicolasm/ppisp-demo-scripts
May 27, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:developfrom
moennen:nicolasm/ppisp-demo-scripts

Conversation

@moennen

@moennen moennen commented May 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR adds QA-oriented PPISP camera demo workflows for USD-authored Gaussian scenes and fixes a PPISP auto-discovery edge case.

Summary:

  • Adds scripts/demos/sensors/ppisp_camera.py for Kit-based PPISP validation with newton and isaac_rtx renderers.
  • Adds scripts/demos/sensors/ppisp_camera_ovrtx.py for kit-less OVRTX PPISP validation.
  • Supports duplicated-env rendering from an input USD/USDZ scene so QA can exercise tiled camera output with num_envs > 1.
  • Saves baseline, PPISP, and absolute-difference image grids for visual validation.
  • Fixes auto_camera_ppisp_cfg() so a matching RenderProduct without a PPISP child does not prevent discovery of a later matching RenderProduct that does contain PPISP.
  • Adds a unit test covering that PPISP discovery fallback.
  • Adds missing isaaclab_ppisp docs/changelog scaffolding and a changelog fragment for the QA workflows.

Motivation/context:
Existing unit tests cover PPISP renderer integration, but QA needed a user-facing workflow that validates PPISP through CameraSensor-style rendering on a real USD-authored Gaussian scene. These
demos provide that workflow without requiring training jobs or task-specific environment changes.

Dependencies:

  • A USD/USDZ scene containing PPISP-authored RenderProduct metadata.
  • For OVRTX validation, an environment with the optional isaaclab_ov / ovrtx stack installed.
  • OVRTX PPISP/HDR validation requires:
    OVRTX_rtx_rtpt_gaussian_skipTonemapping_enabled=0

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update

Screenshots

The demo scripts generate baseline / PPISP / diff image grids under the selected --output_dir. Attach representative generated images here if desired.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@moennen
moennen requested a review from ooctipus as a code owner May 22, 2026 11:05
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label May 22, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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


Update (4f5b8594): New commits address both previous inline comments:

  • ✅ Unused rgb_hdr data type — Both demo scripts now use only data_types=["rgb"] in make_camera.
  • ✅ Unreachable final raise — resolve_source_camera_binding is restructured in both scripts; the dead-code branch is removed.

No new issues found in the incremental changes.


Update (35794d8c): Reviewed incremental diff (CI refactoring, auto_camera_ppisp_cfg bug fix, test docstring updates, rendering-correctness test reorganization). No new issues. Previous fixes remain intact. LGTM.


Update (8c345db): Reviewed incremental diff. Changes include:

  • New PPISP camera QA demos (~1200 lines) for Kit (ppisp_camera.py) and kit-less OVRTX (ppisp_camera_ovrtx.py) workflows
  • OVRTX legacy cleanup: Removed 0.2.x code paths, legacy kernels, and enable_scene_partition_workaround parameter — good housekeeping
  • Export script fix: Added missing checkpoint existence check and fixed argparse description typo
  • Tutorial fix: Added missing height_data LEAPP annotation in anymal_c_env.py
  • Test docstring accuracy: Updated test docstrings across PPISP gaussian tests to reflect actual assertions

No new issues found. LGTM.

@greptile-apps

greptile-apps Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a discovery bug in auto_camera_ppisp_cfg where an early return None would abort the search as soon as a camera-matching RenderProduct without a PPISP child was encountered, hiding any later RenderProduct that did carry PPISP. It also adds two QA demo scripts (ppisp_camera.py and ppisp_camera_ovrtx.py) for validating tiled PPISP output with duplicated-env scenes.

  • cfg.py fix: removes the premature return None so the stage traversal continues past plain (non-PPISP) RenderProduct prims; a targeted unit test covers this fallback path.
  • Demo scripts: both scripts load a USD scene, duplicate it across N envs, and periodically save baseline / PPISP / diff image grids; the OVRTX variant runs kit-less and adds make_matched_camera_prims_visible for render-product discovery.

Confidence Score: 4/5

The core bug fix is minimal and correct; the demo scripts are additive and carry only minor quality issues.

The one-line fix to cfg.py is correct and well-tested. The two new demo scripts work as intended but have a stale docstring on the fixed function, an unused rgb_hdr data type that requests an extra render pass with no consumer, and dead unreachable code in both scripts' resolve_source_camera_binding. None of these affect correctness of the primary fix or the existing library.

The docstring in cfg.py and the data_types list in ppisp_camera_ovrtx.py are the two spots worth a second look.

Important Files Changed

Filename Overview
source/isaaclab_ppisp/isaaclab_ppisp/cfg.py One-line bug fix removes the early return None that prevented the loop from continuing when a matching RenderProduct lacked a PPISP child; docstring is now stale and should be updated to reflect the new exhaustive-search behavior.
source/isaaclab_ppisp/test/test_ppisp.py Adds a well-targeted regression test that exercises the fallback case: a plain RenderProduct (no PPISP child) followed by one that has PPISP; correctly asserts the cfg is found and its inputs match.
scripts/demos/sensors/ppisp_camera.py New Kit-based PPISP QA demo; logic is sound, but resolve_source_camera_binding contains unreachable dead code (the final raise after an always-taken if-branch), and find_ppisp_camera_bindings is called twice in main() when the result could be reused.
scripts/demos/sensors/ppisp_camera_ovrtx.py New kit-less OVRTX PPISP QA demo; same unreachable-code issue as ppisp_camera.py, plus the PPISP camera requests rgb_hdr data that is never consumed by run_simulator, wasting a render pass.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[auto_camera_ppisp_cfg\ncalled with camera_prim_path] --> B[Traverse stage prims]
    B --> C{prim type ==\nRenderProduct?}
    C -- No --> B
    C -- Yes --> D{camera rel\ntargets camera_prim_path?}
    D -- No --> B
    D -- Yes --> E{PPISP child\nshader exists?}
    E -- No --> B
    E -- Yes --> F[Parse & return PpispCfg]
    B -- exhausted --> G[return None]
    style E fill:#c8f7c5,stroke:#27ae60
    style G fill:#fadbd8,stroke:#e74c3c
    H[OLD behavior removed\nreturn None immediately\nif matching RP lacks PPISP] -.->|was here| E
Loading

Comments Outside Diff (1)

  1. source/isaaclab_ppisp/isaaclab_ppisp/cfg.py, line 240-246 (link)

    P2 The docstring still describes the old (pre-fix) behavior. It now incorrectly states the function returns None when a matching RenderProduct has no PPISP child — the whole point of this PR is that the loop now continues in that case. A future reader consulting this docstring will be misled about what the fallback behavior actually is.

Reviews (1): Last reviewed commit: "Add PPISP camera QA demos" | Re-trigger Greptile

Comment on lines +463 to +469
ppisp_camera = make_camera(
camera_prim_path,
ppisp_cfg=ppisp_cfg,
width=width,
height=height,
data_types=["rgb", "rgb_hdr"],
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 The PPISP camera is configured with data_types=["rgb", "rgb_hdr"], but run_simulator only ever accesses data.output["rgb"]. The "rgb_hdr" channel is never read, so it requests an extra render pass (and any associated GPU memory / bandwidth) with no benefit.

Suggested change
ppisp_camera = make_camera(
camera_prim_path,
ppisp_cfg=ppisp_cfg,
width=width,
height=height,
data_types=["rgb", "rgb_hdr"],
)
ppisp_camera = make_camera(
camera_prim_path,
ppisp_cfg=ppisp_cfg,
width=width,
height=height,
data_types=["rgb"],
)

Comment thread scripts/demos/sensors/ppisp_camera.py Outdated
Comment on lines +222 to +229
)
raise RuntimeError(f"Failed to resolve PPISP binding for camera: {camera_prim_path}")


def source_camera_path_to_env_regex(source_stage, source_camera_prim_path: str) -> str:
"""Map a source camera path to the duplicated-env camera regex."""
default_prim = source_stage.GetDefaultPrim()
if not default_prim:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Unreachable final raise in resolve_source_camera_binding

After the for-loop completes without returning, camera_prim_path is by definition absent from ppisp_camera_prim_paths (if it were present the loop would have matched and returned). Therefore the if camera_prim_path not in ppisp_camera_prim_paths: branch is always taken, and the final raise RuntimeError(f"Failed to resolve PPISP binding for camera: ...") on line 229 is dead code. The same pattern is duplicated in ppisp_camera_ovrtx.py.

@moennen
moennen force-pushed the nicolasm/ppisp-demo-scripts branch from 63bbb5c to 6b0b554 Compare May 22, 2026 11:09
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 22, 2026
@isaaclab-review-bot

Copy link
Copy Markdown
Contributor

Re-review update (6b0b554d): Reviewed incremental changes since previous review (63bbb5ce).

✅ Good changes:

  • The cfg.py fix for auto_camera_ppisp_cfg discovery (removing premature return None) correctly addresses a bug where generated RenderProduct prims without PPISP could mask later camera-bound PPISP render products. Test coverage added.
  • Documentation updates in teleop_replay_agent.py appropriately generalize "Kit" references to "simulator".
  • Changelog and docs additions are appropriate.

⚠️ Previous comments still open:
The two P2 inline comments from the earlier review remain unaddressed in the PPISP demo scripts:

  1. Unused rgb_hdr data type in ppisp_camera_ovrtx.py
  2. Unreachable final raise in resolve_source_camera_binding (both demo scripts)

@moennen
moennen force-pushed the nicolasm/ppisp-demo-scripts branch from 6b0b554 to 13204ce Compare May 22, 2026 11:17
@isaaclab-review-bot

Copy link
Copy Markdown
Contributor

Review Update (13204ce3)

✅ Both previous concerns have been addressed:

  1. data_types fix: OVRTX demo now correctly uses only ["rgb"] - no unused rgb_hdr channel
  2. Dead code fix: resolve_source_camera_binding refactored to eliminate unreachable final raise

Additional improvement in this commit:

  • Fixed auto_camera_ppisp_cfg discovery so generated RenderProduct prims without PPISP do not mask later camera-bound PPISP render products (with corresponding test coverage)

LGTM 👍

@moennen

moennen commented May 22, 2026

Copy link
Copy Markdown
Collaborator Author

@kellyguo11 : here is the QA PR (cannot add you as a reviewer)

@moennen
moennen force-pushed the nicolasm/ppisp-demo-scripts branch from 13204ce to ac44ee0 Compare May 22, 2026 11:37
@isaaclab-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab Review Bot - Follow-up Review

Commit: ac44ee0a8de431e7141a6f7bac30f2b7437bd3f2

Previous Issues Status

✅ Fixed: Unused "rgb_hdr" data type removed from make_camera - now only requests ["rgb"].

✅ Fixed: Unreachable code in resolve_source_camera_binding removed - function rewritten with cleaner binding lookup logic.

New Changes in This Commit

  • Docstring improvements across PPISP test files (ISP → PPISP, clarified invariants)
  • Bug fix for auto_camera_ppisp_cfg discovery (with new test case)
  • Changelog and README additions for isaaclab_ppisp

Summary

All previous review comments have been addressed. No new issues identified.

LGTM ✅

@moennen
moennen force-pushed the nicolasm/ppisp-demo-scripts branch from ac44ee0 to 6132e0e Compare May 22, 2026 11:55
@isaaclab-review-bot

Copy link
Copy Markdown
Contributor

Re-review Update (6132e0e5)

Both previous concerns have been addressed:

✅ P2 (data_types): ppisp_camera_ovrtx.py now uses data_types=["rgb"] instead of requesting unused rgb_hdr.

✅ P2 (unreachable code): The dead raise RuntimeError after the loop has been removed. The logic now cleanly returns the binding when found, or raises a clear error with available options if no match exists.

Additionally, this commit:

  • Fixes auto_camera_ppisp_cfg discovery to continue scanning when a RenderProduct without PPISP is encountered (with test coverage)
  • Improves docstring consistency (ISP → PPISP terminology)
  • Adds changelog and README documentation

LGTM 👍

@moennen
moennen force-pushed the nicolasm/ppisp-demo-scripts branch from 6132e0e to 1f8ab7a Compare May 22, 2026 12:25
@isaaclab-review-bot

Copy link
Copy Markdown
Contributor

🤖 Review Update (1f8ab7a2)

✅ Both previous concerns addressed:

  1. Unused rgb_hdr in ppisp_camera_ovrtx.py — Fixed. The make_camera function now uses data_types=["rgb"] only.

  2. Unreachable final raise in resolve_source_camera_binding — Fixed in both ppisp_camera.py and ppisp_camera_ovrtx.py. The dead code has been replaced with a clear error message listing available PPISP-bound cameras.

LGTM — no new issues found in the incremental changes.

@moennen
moennen force-pushed the nicolasm/ppisp-demo-scripts branch 3 times, most recently from 4f5b859 to 35794d8 Compare May 25, 2026 10:37
Comment thread scripts/demos/sensors/ppisp_camera.py Outdated
from isaaclab.app import AppLauncher

# add argparse arguments
DEFAULT_INPUT_SCENE = "omniverse://isaac-dev.ov.nvidia.com/Isaac/Samples/Scene_ParticleField/valiant_auto.usdz"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you update this to the path from S3?

@moennen
moennen force-pushed the nicolasm/ppisp-demo-scripts branch from 35794d8 to 8c345db Compare May 26, 2026 23:38
@kellyguo11
kellyguo11 merged commit 294a7c3 into isaac-sim:develop May 27, 2026
36 of 37 checks passed
hujc7 added a commit to hujc7/IsaacLab that referenced this pull request May 28, 2026
The isaaclab_ppisp package shipped with a 20-byte CHANGELOG.rst
(``Changelog\n---------\n``) that has no blank line after the underline.
The nightly compile's header regex needs that blank line as an insertion
anchor, so the next run (isaac-sim#5748 + accumulated minor fragments) raised
``Could not locate changelog header`` and skipped the commit/push step.

Seed isaaclab_ppisp's CHANGELOG.rst with a real 0.1.0 entry so the
header has a stable anchor that pre-commit's end-of-file fixer cannot
strip away.

Hoist the compile-time header regex into ``CHANGELOG_HEADER_RE`` so the
producer (write_changelog_entry) and the new gate share one source of
truth.

Extend ``cmd_check`` to walk Package.discover() and emit ``::error::``
on any managed CHANGELOG.rst that fails the same regex compile uses.
The PR-time gate now mirrors the compile-time precondition, so a future
PR adding a malformed stub is blocked at review.

Wire ``tools/changelog/test/`` into the changelog-check workflow with a
path filter, so cli.py refactors are gated by the existing unit-test
suite (86 tests, ~0.2s) only when the tool itself changes.

Add three regression tests covering minimum-stub acceptance,
unterminated-stub rejection, and a Package.discover() walk over every
managed package on disk.
kellyguo11 pushed a commit that referenced this pull request May 29, 2026
…ab_ppisp (#5831)

## 1. Summary

- Unblocks nightly compile job
https://github.com/isaac-sim/IsaacLab/actions/runs/26494922179 by
seeding `source/isaaclab_ppisp/docs/CHANGELOG.rst` with a real `0.1.0`
entry.
- Layered prevention so this class of incident cannot wedge the nightly
again: self-heal in compile (auto-fix the narrow stub shape) + cmd_check
walk (block truly broken shapes at PR time) + per-package isolation in
`cmd_compile` (one bad package no longer kills the batch) + workflow
tolerance (commit/push still runs on partial success).
- 6 files changed: 234 insertions, 6 deletions.

## 2. Background

The `isaaclab_ppisp` package landed via #5499 (directory) + #5748
(CHANGELOG.rst + extension.toml) with the file containing exactly 20
bytes:

```
Changelog
---------
```

The compile-time regex in `Package.write_changelog_entry` requires a
blank line after the underline as an anchor for the prepend:

```python
re.search(r"^Changelog\n-+\s*\n\s*\n", text, re.MULTILINE)
```

The stub satisfies header + underline but not the trailing blank line.
The PR gate only inspected fragment-diff content, so the malformed
target file slipped through. When the next `nicolasm-ppisp-*.minor.rst`
fragments accumulated and the nightly compile tried to prepend, the
regex match failed, `cmd_compile` exited non-zero on the first package
error, and the workflow's commit/push step was skipped under default
`if: success()` — every successfully-compiled package's writes were
discarded with the failing one.

## 3. Changes

### 3.1 Seed entry for `isaaclab_ppisp`

`source/isaaclab_ppisp/docs/CHANGELOG.rst` carries a real `0.1.0
(2026-05-20)` Added section. Pre-commit's end-of-file fixer strips
trailing blank lines, so a content-bearing seed is the only stable shape
— relying on a bare `Changelog\n---------\n\n` would lose the blank line
on the next PR that touches the file.

### 3.2 Single source of truth for the header regex

```python
CHANGELOG_HEADER_RE = re.compile(r"^Changelog\n-+\s*\n\s*\n", re.MULTILINE)
```

Hoisted to module level in `tools/changelog/cli.py`. The producer
(`write_changelog_entry`) and the gate (`cmd_check`) share the same
compiled regex object — drift between gate and compile is structurally
impossible.

### 3.3 Self-healing compile

`write_changelog_entry` now normalizes the file in-memory before the
regex search:

```python
text = re.sub(r"^(Changelog\n-+)\n(?!\n)", r"\1\n\n", text, count=1, flags=re.MULTILINE)
```

Matches "header + dashes + one newline NOT followed by another newline"
and inserts the missing `\n`. Idempotent on well-formed files via the
negative lookahead. The compile writes the normalized text back to disk,
so a malformed file becomes canonical on first compile. The original
ppisp 20-byte stub would have self-healed silently without this PR.

### 3.4 PR-gate header walk

`cmd_check` walks `Package.discover()` and applies the same self-heal
normalization, then asserts `CHANGELOG_HEADER_RE` matches. The narrow
"missing blank line" case passes silently (the system will auto-fix).
Genuinely broken shapes — no `Changelog` line, no underline, wrong
underline char, leading whitespace, misspelled header — fail with an
`::error::` annotation listing the offending file and the seed-template
snippet contributors should copy.

### 3.5 Per-package isolation in `cmd_compile`

The compile loop replaces fail-fast `return 1` with `failures.append +
continue`. A package whose CHANGELOG.rst raises is skipped; the rest of
the batch continues. Exit code is non-zero only if any package failed,
with a summary block naming each failure. Defense-in-depth for failure
modes the PR gate doesn't catch: version mismatch between
`extension.toml` and `pyproject.toml`, filesystem permission errors,
direct pushes bypassing the PR gate, future failure modes added to
`Package.compile`.

### 3.6 Workflow tolerance for partial success

`.github/workflows/nightly-changelog.yml`:

- Compile step gets `continue-on-error: true` and a step id.
- Commit/push step guard changes from `if: ${{ !inputs.dry_run }}` to
`if: ${{ always() && !inputs.dry_run }}`. Successful packages' on-disk
writes are committed and pushed even when compile reported partial
failure.
- Trailing step `if: ${{ steps.compile.outcome == 'failure' }}`
re-asserts non-zero so the job tile stays red and the maintainer is
notified.

### 3.7 Per-PR pytest gate, path-filtered

`.github/workflows/changelog-check.yml` runs `pytest
tools/changelog/test/ -q` only when the PR touches `tools/changelog/**`
(inline `git diff` check, no third-party action). PRs that only add
fragments under `source/<pkg>/changelog.d/` skip the pytest step at zero
overhead.

### 3.8 Regression coverage

Six new tests in `tools/changelog/test/test_validate.py`:

- `test_changelog_header_re_accepts_minimum_stub` — locks the
minimum-valid shape.
- `test_changelog_header_re_rejects_unterminated_stub` — exact 20-byte
ppisp shape rejected by the raw regex.
- `test_every_managed_package_has_parseable_changelog_header` — walks
every managed package on disk, applies self-heal, asserts the regex
matches.
- `test_write_changelog_entry_self_heals_missing_blank_line` — compile
against the 20-byte stub produces a well-formed file.
- `test_write_changelog_entry_self_heal_is_noop_on_well_formed` —
well-formed files are unchanged (idempotence).
- `test_cmd_compile_continues_after_per_package_failure` — one bad
package, one good; good ships, bad is named in the summary, exit code 1.

## 4. Verification

- `pytest tools/changelog/test/` — 89 passed (was 83; +6).
- `./isaaclab.sh -f` — pre-commit clean.
- Self-heal verified: re-introduced the 20-byte stub, ran a synthetic
compile, on-disk file came back canonical with the new entry on top.
- Gate path verified: with a genuinely broken `CHANGELOG.rst` (no header
at all), `cli.py check develop` emits `::error::Malformed CHANGELOG.rst
…`. With the 20-byte self-healable stub, `cli.py check` passes (compile
would auto-fix).
- Per-package isolation verified: synthetic two-package fixture with one
broken, ran `cmd_compile --all`, good package wrote its CHANGELOG.rst
and deleted fragments, bad package was named in the failure summary,
exit 1.

## 5. Out of scope / follow-ups

- Cherry-pick to `release/3.0.0-beta2` (carries the same 20-byte stub).
Follow-up after this lands on develop.

## 6. Test plan

- [x] `pytest tools/changelog/test/` — 89/89 pass.
- [x] `./isaaclab.sh -f` — pre-commit clean.
- [x] Regression verified by reverting the seed.
- [ ] CI green on this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants