Skip to content

Add PPISP camera QA demos and discovery fallback#5753

Open
moennen wants to merge 1 commit into
isaac-sim:release/3.0.0-beta2from
moennen:nicolasm/ppisp-demo-scripts-release
Open

Add PPISP camera QA demos and discovery fallback#5753
moennen wants to merge 1 commit into
isaac-sim:release/3.0.0-beta2from
moennen:nicolasm/ppisp-demo-scripts-release

Conversation

@moennen
Copy link
Copy Markdown

@moennen moennen commented May 22, 2026

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 17:25
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels May 22, 2026
@moennen
Copy link
Copy Markdown
Author

moennen commented May 22, 2026

@kellyguo11 for viz.

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

🤖 Isaac Lab Review Bot - PR #5753

Summary

This PR adds QA-oriented PPISP camera demo workflows for validating USD-authored Gaussian scenes and fixes a discovery edge case in auto_camera_ppisp_cfg(). This is a cherry-pick to release/3.0.0-beta2.


✅ Overall Assessment: Well-Structured QA Addition

The PR introduces two comprehensive QA demos (Kit-based and kit-less OVRTX) that follow Isaac Lab patterns well, along with a legitimate bug fix backed by a proper unit test.


🏗️ Architecture & Design

Aspect Status Notes
Multi-renderer support Separate scripts for Kit (newton/isaac_rtx) and kit-less OVRTX
Environment duplication Proper {ENV_REGEX_NS} pattern for multi-env tiled rendering
Resource cleanup OVRTX script uses try/finally for proper cleanup
Scene configuration Clean InteractiveSceneCfg subclasses with minimal anchor pattern

🐛 Bug Fix Analysis

Fixed issue in cfg.py:

# BEFORE (buggy): Early return blocked discovery of later PPISP RenderProducts
if shader_prim and shader_prim.IsValid():
    return ppisp_cfg_from_usd_shader(...)
return None  # ← Premature exit if first matching RP had no PPISP

# AFTER (fixed): Continue iteration to find PPISP-enabled RenderProducts
if shader_prim and shader_prim.IsValid():
    return ppisp_cfg_from_usd_shader(...)
# (no early return - loop continues)

This correctly handles the case where Isaac RTX generates transient RenderProducts targeting the same camera as authored scene RenderProducts.


🛡️ Error Handling & Edge Cases

Check Status
CLI argument validation ✅ All inputs validated before launch
Missing PPISP bindings ✅ Clear RuntimeError with available cameras listed
Division by zero protection clamp_min(1.0) in brightness ratio calculation
Stage traversal ⚠️ Acceptable for QA, though may be slow on very large stages

🧪 Test Coverage

Test Purpose
test_auto_camera_ppisp_cfg_skips_matching_render_product_without_ppisp ✅ Directly validates the bug fix
Updated docstrings ✅ Accurately describe HDR→LDR PPISP mapping tests
Multi-tile tests ✅ Already covered in existing test suite

📝 Documentation

  • ✅ Changelog fragment added for isaaclab_ppisp
  • ✅ README.md scaffolding for the extension
  • ✅ Script docstrings with clear usage examples

💡 Minor Suggestions (Non-blocking)

  1. Consistency: The Kit-based demo (ppisp_camera.py) uses del scene outside try/finally, while the OVRTX version properly uses try/finally for cleanup. Consider aligning for consistency.

  2. Diagnostic clarity: The corner_center_ratio metric returns corners/1.0 for extremely dark images - this is fine for QA but could log a warning if center < 1.0.


CI Status

Pre-commit and initial checks passing. Docker builds and extended tests pending.


Review generated by isaaclab-review-bot using ensemble multi-model analysis


Update (1191792): This commit updates test docstrings to use consistent "PPISP" terminology (instead of "ISP") and clarifies what invariants each test asserts. No functional changes to the demo scripts or the bug fix. The original assessment remains valid.


Update (commit b1adb9f): Reviewed incremental changes since 1191792.

Status of previous findings:

  • Stage traversed twice in main() (inline comment) — remains unaddressed. The original inline comment stands.
  • ✅ All other observations from the initial review remain valid.

New changes in this push:

  • ✅ Documentation reorganization: moved visualization.rst to core-concepts, added rlinf_vla_posttraining.rst, updated references. Clean restructuring.
  • ✅ Presets column formatting improvements in environments.rst — clearer physics=/renderer=/presets= labeling.
  • test_noise.py fix for NaN edge case when torch.rand returns exactly 0 with op="scale" (OMPE-94619).
  • ✅ Skip changelog entries for test-only and docstring-only changes.

No new issues found in the incremental diff. Ready for merge once CI passes.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 22, 2026

Greptile Summary

This PR adds two QA-oriented demo scripts for PPISP camera validation (ppisp_camera.py for Kit-based rendering and ppisp_camera_ovrtx.py for kit-less OVRTX), and fixes a one-line discovery bug in auto_camera_ppisp_cfg where an early return None caused the scanner to stop at the first camera-bound RenderProduct lacking PPISP rather than continuing to find a later one that does.

  • Bug fix (cfg.py): Removes the early return None inside the RenderProduct loop so a PPISP-free transient product no longer shadows a later authored product; a targeted unit test in test_ppisp.py covers the exact failure scenario.
  • Demo scripts: Both scripts render a USD-authored Gaussian scene through duplicated-env tiling and save baseline, PPISP, and absolute-difference image grids; however, ~250 lines of utility logic are duplicated verbatim between the two files.
  • Docstring/changelog scaffolding: Test docstrings are updated to reflect the HDR-source + LDR-mapping invariant framing; new isaaclab_ppisp docs/changelog stubs and a changelog fragment are added.

Confidence Score: 4/5

Safe to merge; the core bug fix is a single-line removal that is well-covered by a new unit test, and the demo scripts are additive with no impact on production paths.

The bug fix and its test are correct. The demo scripts work as described but duplicate a large block of utility logic that could diverge silently over time, and the auto_camera_ppisp_cfg docstring still describes the old behavior after the fix.

The auto_camera_ppisp_cfg docstring in cfg.py needs a one-line update to reflect the new behavior. The two demo scripts (ppisp_camera.py and ppisp_camera_ovrtx.py) share ~250 lines of identical utility code that would benefit from extraction into a shared module.

Important Files Changed

Filename Overview
source/isaaclab_ppisp/isaaclab_ppisp/cfg.py One-line fix removes an early return None in auto_camera_ppisp_cfg that prevented discovery of a later PPISP-bearing RenderProduct when an earlier matching product lacked PPISP; fix is correct but the function docstring still describes the old behavior.
scripts/demos/sensors/ppisp_camera.py New Kit-based PPISP camera QA demo with newton/isaac_rtx renderer support, duplicated-env tiling, and comparison image saving; ~250 lines of utility code are duplicated verbatim with ppisp_camera_ovrtx.py, and the stage is traversed twice in main().
scripts/demos/sensors/ppisp_camera_ovrtx.py New kit-less OVRTX PPISP demo, functionally parallel to ppisp_camera.py; shares the same double-traversal issue and carries the same large block of duplicated utility functions.
source/isaaclab_ppisp/test/test_ppisp.py Adds a focused unit test for the discovery-fallback fix: stages two RenderProducts (one without PPISP, one with) and asserts the correct cfg is returned; test logic is correct and covers the bug exactly.
source/isaaclab/test/sensors/test_camera_ppisp_gaussian.py Docstring-only updates to align invariant descriptions with the new HDR-source + LDR-mapping framing; no logic changes.
source/isaaclab/test/sensors/test_camera_ppisp_gaussian_newton.py Docstring-only updates renaming ISP to PPISP and clarifying invariant descriptions; no logic changes.
source/isaaclab/test/sensors/test_camera_ppisp_gaussian_ovrtx.py Docstring-only updates reflecting the revised aggressive-cfg parameters and HDR/LDR invariant framing; no logic changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[stage.Traverse] --> B{prim type == RenderProduct?}
    B -- No --> A
    B -- Yes --> C{camera rel targets camera_prim_path?}
    C -- No --> A
    C -- Yes --> D{PPISP shader child exists?}
    D -- Yes --> E[return ppisp_cfg_from_usd_shader]
    D -- No --> F["(old) return None — BUG REMOVED"]
    D -- No --> G[continue to next prim — FIX]
    G --> A
    A -- exhausted --> H[return None]
Loading

Comments Outside Diff (2)

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

    P2 Stale docstring describes the old (buggy) behavior

    The docstring still says "Returns None if no matching RenderProduct is found, or if it has no PPISP shader child." After the fix, the second clause is wrong: a matching RenderProduct without a PPISP child no longer terminates search — scanning continues to the next RenderProduct. A caller reading the docstring would expect the function to stop at the first camera-bound product regardless of PPISP presence, which is the exact behavior the PR is correcting.

  2. scripts/demos/sensors/ppisp_camera.py, line 318-484 (link)

    P2 ~250 lines of logic duplicated verbatim between the two demo scripts

    find_ppisp_camera_bindings, resolve_source_camera_binding, source_camera_path_to_env_regex, get_render_product_resolution, resolve_image_shape, make_ppisp_cfg, save_images_grid, make_tiled_image, save_tensor_image, and corner_center_ratio are identical (or differ by at most one comment) between ppisp_camera.py and ppisp_camera_ovrtx.py. Any future bug fix or behavioural change in one copy must be manually mirrored to the other. Extracting these into a shared _ppisp_demo_utils.py module would eliminate the duplication.

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

Comment on lines +456 to +463
ppisp_cfg = make_ppisp_cfg(shader_prim, len(find_ppisp_camera_bindings(source_stage)))
camera_prim_path = source_camera_path_to_env_regex(source_stage, source_camera_prim_path)
width, height = resolve_image_shape(render_product_prim)

sim_utils.create_new_stage()
sim_cfg = make_sim_cfg()
sim = sim_utils.SimulationContext(sim_cfg)
sim.set_camera_view(eye=[2.5, 2.5, 2.5], target=[0.0, 0.0, 0.0])
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 Stage traversed twice in main()

find_ppisp_camera_bindings(source_stage) is traversed once inside resolve_source_camera_binding() and again on the next line to compute num_ppisp_bindings for the log message. For large USD scenes this can be noticeable; resolve_source_camera_binding could return the full binding list alongside the selected tuple, or the count could be stored as len(ppisp_bindings) from the first call. The same pattern exists in ppisp_camera_ovrtx.py at the equivalent main() block.

@moennen moennen force-pushed the nicolasm/ppisp-demo-scripts-release branch 2 times, most recently from 1191792 to b1adb9f Compare May 24, 2026 14:54
@isaaclab-review-bot
Copy link
Copy Markdown

🔄 Review Update (b1adb9f)

Reviewed incremental changes since 1191792. The new commits add:

  • Documentation reorganization (moving visualization docs to core-concepts)
  • Test docstring cleanups for PPISP tests
  • Fix for auto_camera_ppisp_cfg discovery to not mask camera-bound PPISP shaders
  • Test fix for NaN issues in test_noise.py
  • New PPISP camera QA demo scripts

Previous inline comment status:

  • The P2 comment about double-traversal of find_ppisp_camera_bindings(source_stage) in main() was not addressed in these commits. The same pattern still exists in both ppisp_camera.py and ppisp_camera_ovrtx.py.

✅ No new issues introduced in the incremental changes.

@moennen moennen force-pushed the nicolasm/ppisp-demo-scripts-release branch 2 times, most recently from cc19adb to 828ea5d Compare May 25, 2026 10:36
@moennen moennen force-pushed the nicolasm/ppisp-demo-scripts-release branch 2 times, most recently from 2cee9a7 to 9d21585 Compare May 25, 2026 10:39
@isaaclab-review-bot
Copy link
Copy Markdown

Review Update (9d21585):

Reviewed the incremental changes from b1adb9f...9d21585. New commits include:

  • Docstring cleanup: ISP → PPISP terminology across test files
  • Bugfix in `auto_camera_ppisp_cfg`: Removed premature `return None` that prevented discovering PPISP shaders on later RenderProducts when an earlier generated RenderProduct lacked a PPISP child. Good fix with proper test coverage.
  • Cross-platform OVRTX log path: Uses `tempfile.gettempdir()` instead of hardcoded `/tmp`
  • Test infrastructure: Added `_redirect_ovrtx_renderer_log_to_stdout` helper, removed duplicate render correctness test block from `test_shadow_hand_vision_presets.py`
  • Docs: Added README.md and CHANGELOG.rst for isaaclab_ppisp

No new issues found. Previous inline comment (double stage traversal in `main()`) remains unaddressed but is low priority (P2).

@moennen moennen force-pushed the nicolasm/ppisp-demo-scripts-release branch from 9d21585 to a053f9a Compare May 26, 2026 13:38
@isaaclab-review-bot
Copy link
Copy Markdown

🔄 Review Update (a053f9a)

Reviewed incremental changes since initial review at 9d21585:

Change Status
Bug fix: auto_camera_ppisp_cfg discovery now correctly continues scanning when a RenderProduct lacks a PPISP child ✅ Good fix with regression test
CI improvements: New exclude-pattern input for test filtering, JUnit XML uploads, non-root verification folded into existing jobs ✅ Cleaner CI architecture
Test docstrings: Clarified PPISP test documentation (HDR→LDR mapping invariants) ✅ Documentation improvement
Documentation: Added changelog entries and README for PPISP extension ✅ Good

Previous Concerns

  • P2 (dual stage traversal in main()): Still present in both ppisp_camera.py and ppisp_camera_ovrtx.py. Minor optimization issue—not blocking.

Summary

No new issues introduced. LGTM for these incremental changes.

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 infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant