Skip to content

Update cartpole golden images and clean up rendering correctness test#5169

Merged
huidongc merged 3 commits intoisaac-sim:developfrom
huidongc:minor-test-cleanup
Apr 4, 2026
Merged

Update cartpole golden images and clean up rendering correctness test#5169
huidongc merged 3 commits intoisaac-sim:developfrom
huidongc:minor-test-cleanup

Conversation

@huidongc
Copy link
Copy Markdown
Collaborator

@huidongc huidongc commented Apr 4, 2026

Description

  • Updated golden images due to the content change - upscaling the slider (rail) of the cartpole env
  • Committed minor cleanup for the rendering correctness test code: doc, html report, assertion error message, redundant writing of actual image.

Type of change

  • Testing

Screenshots

See diff of the golden images.

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

@github-actions github-actions bot added the isaac-lab Related to Isaac Lab team label Apr 4, 2026
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.

Good cleanup. The docstring fixes are accurate (reset not step), and consolidating the failure path to use the comparison-images directory instead of polluting golden_images/ with timestamped debug artifacts is a clear improvement.

One minor inline comment below — otherwise LGTM.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 4, 2026

Greptile Summary

This PR updates 31 cartpole golden-image baselines (across physx/newton backends, isaacsim_rtx/newton_renderer renderers, and various AOVs) following a cartpole slider upscaling change that altered the rendered output. It also includes minor cleanup of test_rendering_correctness.py.

Key changes:

  • Updated golden images for all cartpole test combinations (physx + newton backends × rtx + newton renderers × rgb/rgba/depth/albedo/segmentation/simple-shading AOVs), as well as the registered-task golden images for all Cartpole camera task IDs.
  • The cartpole pixel-diff threshold remains at 2.0%, which is the tightest threshold in the suite and appropriate for a deterministic cartpole scene.
  • Minor test cleanup in test_rendering_correctness.py — the current file state is well-structured with sound logic.

Confidence Score: 5/5

Safe to merge — golden image refresh following a confirmed rendering change, with no logic modifications to the test harness.

All 31 updated golden images are a straightforward refresh caused by the cartpole slider upscaling change. The test file cleanup introduces no new logic. No P0 or P1 issues found.

No files require special attention.

Important Files Changed

Filename Overview
source/isaaclab_tasks/test/test_rendering_correctness.py Minor cleanup pass; overall structure and logic are sound. The cartpole pixel-diff threshold (2.0%) is the tightest in the suite and is consistent with a deterministic cartpole scene.
source/isaaclab_tasks/test/golden_images/cartpole/physx-isaacsim_rtx_renderer-rgb.png Updated golden image baseline following cartpole slider upscaling change.
source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-RGB-Camera-Direct-v0/default_physics-default_renderer-rgb.png Updated registered-task golden image baseline for the RGB Cartpole camera task.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["pytest parametrize\n(physics_backend, renderer, data_type)"] --> B["cartpole_env / shadow_hand_env fixture\nBuilds env with preset overrides\nnum_envs=4, seed=42"]
    B --> C["env.reset()"]
    C --> D["_validate_camera_outputs()"]
    D --> E["For each data_type in sensor output"]
    E --> F["_normalize_tensor() → [0,1] float32"]
    F --> G["_make_grid() → tiled PIL Image"]
    G --> H{"Golden image\nexists?"}
    H -- No --> I["Save as new golden\npytest.fail()"]
    H -- Yes --> J["_compare_images()\npixel L2 norm diff"]
    J --> K{"diff_pct ≤\nthreshold?"}
    K -- Yes --> L["_ssim() score\n(reference only)"]
    K -- No --> M["pytest.fail()"]
    L --> N["Append to _COMPARISON_SCORES"]
    N --> O["Session end:\n_generate_html_report()"]
Loading

Greploops — Automatically fix all review issues by running /greploops in Claude Code. It iterates: fix, push, re-review, repeat until 5/5 confidence.
Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal.

Reviews (2): Last reviewed commit: "new golden image due to cartpole slider ..." | Re-trigger Greptile

@huidongc huidongc changed the title minor test cleanup Update cartpole golden images and clean up rendering correctness test Apr 4, 2026
@huidongc huidongc marked this pull request as draft April 4, 2026 01:27
@huidongc huidongc marked this pull request as ready for review April 4, 2026 04:41
@huidongc huidongc force-pushed the minor-test-cleanup branch from 80dbcc2 to 6c0a17c Compare April 4, 2026 10:18
```
docs/source/policy_deployment/04_reach/reach_policy.rst:670: WARNING: undefined label: 'sim2real' [ref.ref]
```
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 4, 2026
@huidongc huidongc merged commit 7f4b072 into isaac-sim:develop Apr 4, 2026
28 of 29 checks passed
@huidongc huidongc deleted the minor-test-cleanup branch April 4, 2026 12:35
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