Skip to content

Fixes camera preset class for shadow hand - #4848

Merged
kellyguo11 merged 1 commit into
isaac-sim:developfrom
kellyguo11:fix-sh-preset
Mar 6, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:developfrom
kellyguo11:fix-sh-preset

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

Description

Fixes an error in an earlier PR where the render preset class was not using the correct MultiBackendRendererCfg configuration

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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 bug Something isn't working isaac-lab Related to Isaac Lab team labels Mar 6, 2026
@greptile-apps

greptile-apps Bot commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a bug introduced by an earlier change where _ShadowHandBaseTiledCameraCfg was using the now-removed RendererPresetCfg from isaaclab_tasks.utils.renderer_cfg instead of the current MultiBackendRendererCfg from isaaclab_tasks.utils.presets. All preset name references (warp → newton_renderer, ovrtx → ovrtx_renderer, isaacsim_rtx → isaacsim_rtx_renderer) are also brought in sync with the names defined in MultiBackendRendererCfg.

  • shadow_hand_vision_env_cfg.py: Import corrected to MultiBackendRendererCfg; renderer_cfg field type annotation and default value updated; docstrings and CLI preset examples updated to use new preset names.
  • test_shadow_hand_vision_presets.py: All preset name strings updated from old names to new names across _RENDERER_PRESETS, test_warp_renderer_has_correct_renderer_type, test_all_renderer_presets_present, _RENDER_CORRECTNESS_CASES, and the warp cross-validation tests.
  • Two minor stale references remain in the test file: the module-level docstring on line 15 still points to the removed renderer_cfg.RendererPresetCfg, and the _RENDER_CORRECTNESS_CASES test IDs and inline comments for newton_renderer cases (lines 337–342) still say "warp".

Confidence Score: 5/5

  • This PR is safe to merge — it is a targeted, low-risk bug fix with correct import and type annotation changes and matching test updates.
  • The change is straightforward: swap one import and class name for another, then align all string literals in the test. The new MultiBackendRendererCfg exists and defines the same set of renderer backends. The only remaining issues are cosmetic stale strings in the test file that do not affect correctness or CI.
  • No files require special attention beyond the minor stale labels noted in test_shadow_hand_vision_presets.py.

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/direct/shadow_hand/shadow_hand_vision_env_cfg.py Correctly replaces the stale RendererPresetCfg import with MultiBackendRendererCfg from isaaclab_tasks.utils.presets, and updates all docstring references and CLI preset examples to use the new preset names (newton_renderer, ovrtx_renderer).
source/isaaclab_tasks/test/test_shadow_hand_vision_presets.py Updates all preset name references from old names (isaacsim_rtx, warp, ovrtx) to new names (isaacsim_rtx_renderer, newton_renderer, ovrtx_renderer). Two minor stale references remain: the module-level docstring on line 15 still points to the removed renderer_cfg.RendererPresetCfg, and the _RENDER_CORRECTNESS_CASES test IDs/comments for the newton_renderer cases still say "warp" (lines 337–342).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    CLI["CLI presets argument\ne.g. presets=newton_renderer,rgb"]
    
    CLI --> RCfg["tiled_camera.renderer_cfg\nMultiBackendRendererCfg"]
    CLI --> CCfg["tiled_camera\nShadowHandVisionTiledCameraCfg"]

    RCfg --> |"default / isaacsim_rtx_renderer"| RTX["IsaacRtxRendererCfg"]
    RCfg --> |"newton_renderer"| Warp["NewtonWarpRendererCfg"]
    RCfg --> |"ovrtx_renderer"| OVRTX["OVRTXRendererCfg (disabled)"]

    CCfg --> |"rgb / albedo / shading..."| CamPreset["_ShadowHandBaseTiledCameraCfg\nwith data_types set"]

    RTX --> Validate["_validate_cfg()"]
    Warp --> Validate
    OVRTX --> Validate
    CamPreset --> Validate

    Validate --> |"newton_warp + unsupported type"| Err["ValueError raised"]
    Validate --> |"depth-only + CNN enabled"| Err
    Validate --> |"valid combo"| Env["ShadowHandVisionEnv"]
Loading

Comments Outside Diff (1)

  1. source/isaaclab_tasks/test/test_shadow_hand_vision_presets.py, line 15 (link)

    Stale class reference in module docstring

    The module-level docstring still references the old RendererPresetCfg from the removed renderer_cfg module. Since this PR renames the class to MultiBackendRendererCfg (as already reflected in test_all_renderer_presets_present's docstring on line 272), this reference should be updated for consistency.

Last reviewed commit: 5e3a6d3

Comment on lines 337 to +342
# ── PhysX physics + Warp: only rgb and depth are supported ──
pytest.param(("warp", "rgb", "physx"), id="physx-warp-rgb"),
pytest.param(("warp", "depth", "physx"), id="physx-warp-depth"),
pytest.param(("newton_renderer", "rgb", "physx"), id="physx-warp-rgb"),
pytest.param(("newton_renderer", "depth", "physx"), id="physx-warp-depth"),
# ── Newton physics + Warp: Warp renderer is physics-backend agnostic ──
pytest.param(("warp", "rgb", "newton"), id="newton-warp-rgb"),
pytest.param(("warp", "depth", "newton"), id="newton-warp-depth"),
pytest.param(("newton_renderer", "rgb", "newton"), id="newton-warp-rgb"),
pytest.param(("newton_renderer", "depth", "newton"), id="newton-warp-depth"),

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.

Stale "Warp" labels in comments and test IDs

After renaming the preset from "warp" to "newton_renderer", the inline comments and id= strings in these test cases still reference the old "Warp" terminology. This creates a mismatch between the preset name used in the tuple ("newton_renderer") and the test ID/comment that says "warp". The test IDs are stable identifiers that appear in CI output and failure reports, so keeping them aligned with the current preset name avoids confusion.

Suggested change
# ── PhysX physics + Warp: only rgb and depth are supported ──
pytest.param(("warp", "rgb", "physx"), id="physx-warp-rgb"),
pytest.param(("warp", "depth", "physx"), id="physx-warp-depth"),
pytest.param(("newton_renderer", "rgb", "physx"), id="physx-warp-rgb"),
pytest.param(("newton_renderer", "depth", "physx"), id="physx-warp-depth"),
# ── Newton physics + Warp: Warp renderer is physics-backend agnostic ──
pytest.param(("warp", "rgb", "newton"), id="newton-warp-rgb"),
pytest.param(("warp", "depth", "newton"), id="newton-warp-depth"),
pytest.param(("newton_renderer", "rgb", "newton"), id="newton-warp-rgb"),
pytest.param(("newton_renderer", "depth", "newton"), id="newton-warp-depth"),
# ── PhysX physics + Newton renderer: only rgb and depth are supported ──
pytest.param(("newton_renderer", "rgb", "physx"), id="physx-newton_renderer-rgb"),
pytest.param(("newton_renderer", "depth", "physx"), id="physx-newton_renderer-depth"),
# ── Newton physics + Newton renderer: Newton renderer is physics-backend agnostic ──
pytest.param(("newton_renderer", "rgb", "newton"), id="newton-newton_renderer-rgb"),
pytest.param(("newton_renderer", "depth", "newton"), id="newton-newton_renderer-depth"),

@bareya
bareya self-requested a review March 6, 2026 06:40
@kellyguo11
kellyguo11 merged commit 5cbf3a1 into isaac-sim:develop Mar 6, 2026
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants