Skip to content

Conversation

@peterd-NV
Copy link
Contributor

Description

Adds a new parameter to ManagerBasedEnv and DirectRLEnv to give users better control over rerender on reset behaviour. The new parameter num_rerenders_on_reset allows users to explicitly define the number of re-render steps after an env reset. When using DLSS, this allows for the elimination of artifacts/ghosting that are present after a single rendering step.

Add a deprecation warning for the old parameter rerender_on_reset. Functionality of old parameter is preserved.

Updates the existing visuomotor envs to use new rerendering API together with DLAA for high quality rendering.

Fixes # (issue)

Non-DLSS denoising is not supported on aarch64. There are also future plans from the rendering team to disable use of non-DLSS antialiasing for all platforms in the future. This causes an issue for visuomotor envs which suffer from image ghosting/artifacts when using DLSS. The new rerendering API allows for users of visuomotor envs to enable DLSS/DLAA while preserving image integrity.

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

Please attach before and after screenshots of the change if applicable.

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 Oct 23, 2025
@peterd-NV peterd-NV changed the title Add num_rerenders_on_reset parameter to Isaac Lab environments Add feature to specify number of rerenders after environment reset Oct 23, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

14 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@peterd-NV peterd-NV changed the title Add feature to specify number of rerenders after environment reset Add parameter to specify number of rerenders after environment reset Oct 23, 2025
@peterd-NV peterd-NV moved this to In progress in Isaac Lab Oct 23, 2025
@ooctipus
Copy link
Collaborator

ooctipus commented Oct 24, 2025

If the environment is parallel, then non-resetting environment will also gets re-rendered. If the goal is to remove artifacts or ghosting, this may work around it at the cost of dramatically increase per step cost in high number of environments. RL workflows may run over 10k envs, and you almost get reset every step,. For this reason I'd prefer this path not exist at all. Should we consult with rendering team before we workaround in this way? If the it is currently only required for mimic related take, why can't we provide it from mimic env?


rerender_on_reset: bool = False
"""Whether a render step is performed again after at least one environment has been reset.
"""[DEPRECATED] Use num_rerenders_on_reset instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use the sphinx directive for this everywhere: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-deprecated

You can add the explanation and clear the remainig docstring so that it is cleaner for users and they all are pointed to the right attribute directly. Something like:

.. deprecated: v2.3.0
   Please use :attr:`num_rerenders_on_reset`.

   Setting this flag as True is the same as setting :attr:`num_rerenders_on_reset` to one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update to use sphinx deprecation directive and following format of other existing deprecations in Isaac Lab.

self.export_IO_descriptors()

# show deprecation message for rerender_on_reset
if self.cfg.rerender_on_reset:
Copy link
Contributor

Choose a reason for hiding this comment

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

You can throw the warning and then internally set the variable num_rerenders_on_reset to 1. This then simplifies your check at other places. Also could you use deprecate warning from python instead of omni logger: https://docs.python.org/3/library/warnings.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the recommendation. Setting the variable num_rerenders_on_reset internally and removed checks elsewhere in the code to simplify.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This review covers only the changes made since the last review, not the entire PR. This change set modifies a single visuomotor environment configuration file to use the new rerendering parameter. The file now sets num_rerenders_on_reset = 1 and disables antialiasing mode (antialiasing_mode = "OFF"). However, this configuration contradicts the PR's stated objective of eliminating artifacts/ghosting in visuomotor environments by using DLAA with multiple rerenders. The PR description explicitly mentions "updates the existing visuomotor envs to use new rerendering API together with DLAA for high quality rendering," but this file does the opposite by setting antialiasing to OFF and using only 1 rerender.

Important Files Changed

Filename Score Overview
source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/stack/config/franka/stack_ik_rel_visuomotor_cosmos_env_cfg.py 2/5 Sets num_rerenders_on_reset = 1 and disables antialiasing, contradicting PR's goal of using DLAA with multiple rerenders to eliminate artifacts

Confidence score: 2/5

  • This change appears to contradict the PR's stated objectives and may reintroduce the image quality issues the PR aims to solve
  • Score reflects a direct conflict between the PR description (which claims to update visuomotor envs with DLAA and improved rerendering) and the actual implementation (which disables antialiasing and uses minimal rerendering)
  • The stack_ik_rel_visuomotor_cosmos_env_cfg.py file requires immediate attention as it sets antialiasing to OFF instead of DLAA and uses only 1 rerender instead of multiple, directly opposing the PR's goals

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This review covers only the changes made since the last review, not the entire PR. The developer has successfully addressed the previous feedback by switching from omni.log.warn to Python's standard warnings.warn for deprecation warnings, and by updating the Sphinx deprecation directives in the docstrings. The implementation now follows Python best practices by using warnings.warn with DeprecationWarning category in the runtime code, while maintaining user-facing documentation with proper Sphinx .. deprecated:: directives that clearly guide users to migrate from the boolean rerender_on_reset to the integer num_rerenders_on_reset parameter. The core logic remains the same - backward compatibility is preserved by converting rerender_on_reset=True to num_rerenders_on_reset=1 during initialization, and the rerendering loops now consistently use the new parameter to control multiple render iterations after environment reset.

Important Files Changed

Filename Score Overview
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 5/5 Updated deprecation documentation to use Sphinx directive with clear migration guidance
source/isaaclab/isaaclab/envs/direct_rl_env.py 5/5 Replaced omni.log.warn with warnings.warn for deprecation warning
source/isaaclab/isaaclab/envs/manager_based_env.py 5/5 Replaced omni.log.warn with warnings.warn for deprecation warning
source/isaaclab/isaaclab/envs/manager_based_env_cfg.py 5/5 Updated deprecation documentation to use Sphinx directive with clear migration guidance
source/isaaclab/isaaclab/envs/manager_based_rl_env.py 5/5 No deprecation warning in this file, only uses new num_rerenders_on_reset parameter

Confidence score: 5/5

  • This PR is safe to merge with minimal risk
  • Score reflects proper implementation of standard Python deprecation practices, correct use of Sphinx documentation directives, clean backward compatibility handling, and addressing all previous review feedback
  • No files require special attention - all deprecation warnings now follow Python standards and documentation is clear and consistent

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This review covers only the changes made since the last review, not the entire PR. The latest changes implement the previously requested improvements to the deprecation handling. The developer has successfully migrated from omni.log.warn() to Python's standard warnings.warn() with FutureWarning categorization, which provides better integration with Python's warning system. The implementation now automatically converts the deprecated rerender_on_reset boolean parameter to the new num_rerenders_on_reset integer parameter (setting it to 1 when True), simplifying the logic at usage sites. The changes maintain full backward compatibility while encouraging users to migrate to the more flexible API that supports multiple render iterations after reset, addressing DLSS/DLAA ghosting artifacts in visuomotor environments.

Important Files Changed

Filename Score Overview
source/isaaclab/isaaclab/envs/manager_based_env.py 5/5 Successfully migrated to Python warnings module with automatic parameter conversion from deprecated rerender_on_reset to new num_rerenders_on_reset
source/isaaclab/isaaclab/envs/direct_rl_env.py 4/5 Implements the same deprecation pattern but contains a copy-paste error in the warning message that incorrectly references ManagerBasedEnvCfg instead of DirectRLEnvCfg

Confidence score: 4/5

  • This PR is safe to merge with only a minor cosmetic issue that should be addressed
  • Score lowered by one point due to the copy-paste error in the deprecation warning message in direct_rl_env.py (lines 223-230) which incorrectly references "ManagerBasedEnvCfg" instead of "DirectRLEnvCfg" - while this doesn't affect functionality, it will confuse users of DirectRLEnv
  • The deprecation warning in source/isaaclab/isaaclab/envs/direct_rl_env.py should be corrected to reference the correct class name before merging

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

# show deprecation message for rerender_on_reset
if self.cfg.rerender_on_reset:
warnings.warn(
f"\033[93m\033[1m[DEPRECATION WARNING] ManagerBasedEnvCfg.rerender_on_reset is deprecated. Use ManagerBasedEnvCfg.num_rerenders_on_reset instead.\033[0m",
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Warning message incorrectly references ManagerBasedEnvCfg instead of DirectRLEnvCfg

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This review covers only the changes made since the last review, not the entire PR. The developer has addressed previous review comments by: (1) removing the unused omni.log import from manager_based_rl_env.py, (2) reformatting deprecation warning messages to split long lines for better readability, and (3) fixing documentation formatting issues with deprecation directives. The core PR functionality remains unchanged - it introduces num_rerenders_on_reset as a more flexible integer parameter to replace the deprecated boolean rerender_on_reset, allowing multiple render iterations after environment resets to eliminate DLSS artifacts in visuomotor environments.

Important Files Changed

Filename Score Overview
source/isaaclab/isaaclab/envs/manager_based_rl_env.py 5/5 Removed unused omni.log import as part of cleanup
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 4/5 Added num_rerenders_on_reset parameter with deprecation notice; minor doc formatting issue with blank line before deprecation directive
source/isaaclab/isaaclab/envs/manager_based_env.py 5/5 Implemented deprecation handling with multi-line warning message formatting
source/isaaclab/isaaclab/envs/manager_based_env_cfg.py 5/5 Added num_rerenders_on_reset parameter with properly formatted deprecation notice
source/isaaclab/isaaclab/envs/direct_rl_env.py 2/5 Reformatted deprecation warning but incorrectly references ManagerBasedEnvCfg instead of DirectRLEnvCfg

Confidence score: 3/5

  • This PR introduces useful functionality but contains a critical error that will confuse users
  • Score reduced due to incorrect class name in deprecation warning (ManagerBasedEnvCfg instead of DirectRLEnvCfg in direct_rl_env.py), and a minor documentation formatting issue (blank line before deprecation directive in direct_rl_env_cfg.py line 226)
  • Pay close attention to source/isaaclab/isaaclab/envs/direct_rl_env.py (lines 226-227) and source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py (line226)

5 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This review covers only the changes made since the last review, not the entire PR. The developer has successfully addressed previous feedback by removing incorrect blank lines in deprecation directives and fixing incorrect class name references in warning messages. The changes focus on improving documentation formatting and ensuring deprecation warnings correctly reference DirectRLEnvCfg instead of ManagerBasedEnvCfg. These are minor but important fixes that ensure proper documentation rendering and accurate deprecation messages for users migrating from the old rerender_on_reset parameter to the new num_rerenders_on_reset parameter. The updates align with the broader PR goal of providing better control over DLSS rendering behavior in visuomotor environments by allowing multiple re-render iterations after environment resets.

Important Files Changed

Filename Score Overview
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 5/5 Fixed documentation formatting by removing blank lines after deprecation directives
source/isaaclab/isaaclab/envs/manager_based_env_cfg.py 5/5 Corrected trailing newline before deprecation directive for proper doc rendering
source/isaaclab/isaaclab/envs/direct_rl_env.py 5/5 Fixed deprecation warning message to correctly reference DirectRLEnvCfg instead of ManagerBasedEnvCfg

Confidence score: 5/5

  • This PR is safe to merge with minimal risk, addressing documentation and warning message correctness
  • Score reflects that all previous feedback has been properly addressed with no new issues introduced - the changes are documentation-only improvements that fix formatting and messaging accuracy
  • No files require special attention - all changes are straightforward corrections to deprecation messages and documentation formatting

14 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

Changelog
---------

0.11.2 (2025-10-23)
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Date is in the future (2025-10-23) - should likely be 2024-10-23

Changelog
---------

0.47.2 (2025-10-23)
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: date format is MM-DD instead of YYYY-MM-DD - should be 2025-01-23 not 2025-10-23 based on the pattern in the file (version 0.47.1 is dated 2025-10-17, and versions progress chronologically)

@kellyguo11
Copy link
Contributor

hmm the linter check is failing with a strange error. are you seeing that locally as well?

@peterd-NV
Copy link
Contributor Author

hmm the linter check is failing with a strange error. are you seeing that locally as well?

No I’m not seeing it locally when running isaaclab.sh -f. I reran the linter job on github earlier and it failed with the same error.

kwargs={
"env_cfg_entry_point": stack_ik_rel_visuomotor_env_cfg.FrankaCubeStackVisuomotorEnvCfg,
"robomimic_bc_cfg_entry_point": os.path.join(agents.__path__[0], "robomimic/bc_rnn_image_84.json"),
"robomimic_bc_cfg_entry_point": os.path.join(agents.__path__[0], "robomimic/bc_rnn_image_200.json"),
Copy link
Contributor

@Mayankm96 Mayankm96 Nov 3, 2025

Choose a reason for hiding this comment

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

NIT: unrelated changes. could we remove them from this MR?

Copy link
Contributor Author

@peterd-NV peterd-NV Nov 3, 2025

Choose a reason for hiding this comment

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

Hi Mayank, this change is required for this MR as changing the re-render API and using DLAA requires an update to the visuomotor envs to still get policy success in our franka demo workflow. In my testing, the old 84x84 camera/policy does not work with DLAA and requires a higher resolution. Thus I've updated both the camera res to 200x200 and included the new training config.

@peterd-NV peterd-NV requested a review from Mayankm96 November 3, 2025 17:59
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Adds num_rerenders_on_reset parameter to replace deprecated rerender_on_reset boolean, enabling multiple render passes after environment reset to eliminate DLSS artifacts.

Key changes:

  • Replaces single boolean rerender_on_reset with integer num_rerenders_on_reset for fine-grained control
  • Implements deprecation warnings when old parameter is used
  • Updates reset logic in both ManagerBasedEnv and DirectRLEnv to loop through multiple renders
  • Applied to reset(), _reset_idx(), and step-based reset methods

Critical issue found:

  • Deprecation logic unconditionally overwrites num_rerenders_on_reset = 1 when old parameter is True, silently ignoring any explicit value the user may have set for the new parameter

Confidence Score: 2/5

  • Not safe to merge - contains critical logic bug in deprecation handling that causes silent data loss
  • The deprecation logic unconditionally overwrites num_rerenders_on_reset when rerender_on_reset=True, which will silently ignore users who set both parameters. This creates unexpected behavior where an explicit configuration value is discarded without warning. The fix is simple (add conditional check), but the current implementation breaks expected behavior.
  • Both files require the same fix: add conditional check if self.cfg.num_rerenders_on_reset == 0 before overwriting in deprecation handler

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/envs/direct_rl_env.py 2/5 Adds deprecation handling for rerender_on_reset and implements loop for multiple rerenders. Critical issue: unconditionally overwrites num_rerenders_on_reset which silently ignores user's explicit setting.
source/isaaclab/isaaclab/envs/manager_based_env.py 2/5 Adds deprecation handling for rerender_on_reset and implements loop for multiple rerenders in two reset methods. Critical issue: unconditionally overwrites num_rerenders_on_reset which silently ignores user's explicit setting.

Sequence Diagram

sequenceDiagram
    participant User
    participant Env as Environment (DirectRLEnv/ManagerBasedEnv)
    participant Sim as Simulator
    participant Sensors as RTX Sensors
    
    User->>Env: Initialize with cfg
    alt cfg.rerender_on_reset == True
        Env->>Env: Show deprecation warning
        Env->>Env: Set cfg.num_rerenders_on_reset = 1
    end
    
    User->>Env: reset() or step()
    Env->>Env: Perform reset logic
    Env->>Sim: forward()
    
    alt sim.has_rtx_sensors() && cfg.num_rerenders_on_reset > 0
        loop num_rerenders_on_reset times
            Env->>Sim: render()
            Sim->>Sensors: Update sensor data
        end
    end
    
    Env-->>User: Return observation
Loading

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@isaac-sim isaac-sim deleted a comment from greptile-apps bot Nov 3, 2025
@isaac-sim isaac-sim deleted a comment from greptile-apps bot Nov 3, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Added num_rerenders_on_reset parameter to ManagerBasedEnvCfg and DirectRLEnvCfg to control the number of render steps after environment reset, replacing the boolean rerender_on_reset parameter. This provides better control over DLSS/DLAA rendering behavior to eliminate ghosting artifacts.

Key Changes:

  • New num_rerenders_on_reset parameter (default: 0) replaces boolean rerender_on_reset
  • Deprecation warnings added for old rerender_on_reset parameter
  • Updated visuomotor environments to use num_rerenders_on_reset=3 with DLAA antialiasing
  • Rendering loop updated to support multiple render iterations after reset

Issues Found:

  • Deprecation handling unconditionally overwrites user-provided num_rerenders_on_reset values when rerender_on_reset=True
  • Warning message in DirectRLEnv incorrectly references ManagerBasedEnvCfg instead of DirectRLEnvCfg
  • Changelog dates are in the future (likely typo - should be 2024 not 2025)

Confidence Score: 3/5

  • PR has valuable functionality but contains logic bugs that could cause unexpected behavior
  • While the feature implementation is solid, there are critical issues with deprecation handling that would silently override user-provided values, plus incorrect error messages that could confuse users
  • Pay close attention to manager_based_env.py and direct_rl_env.py for the deprecation logic issues

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/envs/manager_based_env.py 3/5 Implemented deprecation handling and updated rendering loop, but has issue with overwriting user-provided values
source/isaaclab/isaaclab/envs/direct_rl_env.py 3/5 Implemented deprecation handling with incorrect class name reference in warning message
source/isaaclab/docs/CHANGELOG.rst 4/5 Added changelog entry for version 0.47.7 with date in future (2025-11-03)
source/isaaclab_tasks/docs/CHANGELOG.rst 4/5 Added changelog entry for version 0.11.7 with date in future (2025-10-29)

Sequence Diagram

sequenceDiagram
    participant User
    participant EnvCfg as Environment Config
    participant Env as Environment Instance
    participant SimRender as Simulation Renderer
    
    User->>EnvCfg: Set num_rerenders_on_reset=3
    User->>EnvCfg: (Optional) Set deprecated rerender_on_reset=True
    
    User->>Env: Initialize Environment
    
    alt rerender_on_reset is True
        Env->>Env: Log deprecation warning
        Env->>EnvCfg: Override num_rerenders_on_reset=1
    end
    
    User->>Env: reset(env_ids)
    Env->>Env: Apply reset logic
    Env->>Env: scene.write_data_to_sim()
    Env->>SimRender: sim.forward()
    
    alt has_rtx_sensors AND num_rerenders_on_reset > 0
        loop num_rerenders_on_reset times
            Env->>SimRender: sim.render()
        end
    end
    
    Env-->>User: Return observations
Loading

16 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR introduces a new num_rerenders_on_reset parameter to replace the boolean rerender_on_reset parameter in both ManagerBasedEnv and DirectRLEnv. This allows users to specify an explicit number of render steps after environment reset, which is critical for eliminating DLSS/DLAA ghosting artifacts in visuomotor tasks.

Key Changes:

  • New num_rerenders_on_reset integer parameter added to ManagerBasedEnvCfg and DirectRLEnvCfg (defaults to 0)
  • Deprecation warning added for old rerender_on_reset boolean parameter
  • Multiple render loop implemented based on num_rerenders_on_reset value
  • Visuomotor environments updated to use num_rerenders_on_reset=3 with DLAA antialiasing
  • Camera resolution increased from 84x84 to 200x200 in some visuomotor configs

Issues Found:

  • DirectRLEnv deprecation message references wrong class name (ManagerBasedEnvCfg instead of DirectRLEnvCfg) - already flagged in previous comments

Confidence Score: 4/5

  • This PR is generally safe to merge with one minor fix needed for the deprecation warning message
  • The implementation is sound and backward compatible. The deprecation handling properly converts the old boolean parameter to the new integer parameter. The only issue is a copy-paste error in the DirectRLEnv deprecation message that references the wrong class name, which has already been flagged in previous comments. The core logic for multiple render loops is straightforward and all visuomotor environments have been properly updated.
  • source/isaaclab/isaaclab/envs/direct_rl_env.py needs the deprecation message corrected (line 226-227)

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/envs/manager_based_env.py 4/5 Adds deprecation warning for rerender_on_reset and implements loop for multiple render calls based on num_rerenders_on_reset
source/isaaclab/isaaclab/envs/direct_rl_env.py 3/5 Adds deprecation warning with incorrect class name reference in message (should be DirectRLEnvCfg, not ManagerBasedEnvCfg)
source/isaaclab/isaaclab/envs/manager_based_env_cfg.py 5/5 Adds new num_rerenders_on_reset parameter with proper documentation and deprecation notice for old parameter
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 5/5 Adds new num_rerenders_on_reset parameter with proper documentation and deprecation notice for old parameter

Sequence Diagram

sequenceDiagram
    participant User
    participant Env as ManagerBasedEnv/DirectRLEnv
    participant Config as EnvCfg
    participant Sim as SimulationContext
    participant Sensors as RTX Sensors

    User->>Env: reset() or step() triggers reset
    Env->>Config: Check cfg.num_rerenders_on_reset
    alt num_rerenders_on_reset > 0
        Env->>Sim: scene.write_data_to_sim()
        Env->>Sim: forward()
        Env->>Sim: has_rtx_sensors()?
        alt has RTX sensors
            loop num_rerenders_on_reset times
                Env->>Sim: render()
                Sim->>Sensors: Update sensor data with DLSS/DLAA
                Sensors-->>Sim: Fresh image data
            end
        end
    else num_rerenders_on_reset == 0
        Note over Env,Sensors: No re-rendering, sensor data may be stale
    end
    Env-->>User: Updated environment with fresh sensor data
Loading

16 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR introduces a new parameter num_rerenders_on_reset to replace the deprecated boolean rerender_on_reset parameter, giving users finer control over render behavior after environment resets. The change addresses artifacts and ghosting in visuomotor environments when using DLSS/DLAA antialiasing.

Key Changes:

  • Added num_rerenders_on_reset parameter (integer) to ManagerBasedEnvCfg and DirectRLEnvCfg, replacing boolean rerender_on_reset
  • Updated render logic to loop num_rerenders_on_reset times instead of single render when > 0
  • Added deprecation warnings for rerender_on_reset with automatic migration to new parameter
  • Updated visuomotor environments to use num_rerenders_on_reset=3 with DLAA antialiasing for higher quality rendering
  • Increased camera resolution from 84x84 to 200x200 in stack environments
  • Added new robomimic training config for 200x200 images

Issues Found:

  • Duplicate version number (0.47.7) in isaaclab CHANGELOG
  • Incorrect class name reference in DirectRLEnv deprecation warning message (says ManagerBasedEnvCfg instead of DirectRLEnvCfg)
  • Future date in isaaclab_tasks CHANGELOG (2025-10-29)

Confidence Score: 4/5

  • PR is mostly safe to merge with minor documentation fixes needed
  • The core implementation is solid with proper deprecation handling and backward compatibility. The render loop logic is straightforward and correct. However, there are three minor issues that should be fixed: (1) duplicate version number in CHANGELOG, (2) incorrect class name in deprecation message, and (3) future date in CHANGELOG. These are documentation/messaging issues that don't affect functionality but should be corrected before merge.
  • Pay close attention to CHANGELOG files and the deprecation warning message in direct_rl_env.py

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/envs/manager_based_env_cfg.py 5/5 Added new num_rerenders_on_reset parameter with proper deprecation notice for old parameter
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 5/5 Added new num_rerenders_on_reset parameter with proper deprecation notice for old parameter
source/isaaclab/isaaclab/envs/manager_based_env.py 5/5 Implemented deprecation handling and updated render loop to support multiple rerenders on reset
source/isaaclab/isaaclab/envs/direct_rl_env.py 4/5 Implemented deprecation handling and updated render loop; contains incorrect class name in warning message
source/isaaclab/docs/CHANGELOG.rst 3/5 Added changelog entry but has duplicate version number 0.47.7
source/isaaclab_tasks/docs/CHANGELOG.rst 4/5 Added changelog entry with future date (2025-10-29)

Sequence Diagram

sequenceDiagram
    participant User
    participant Env as ManagerBasedEnv/DirectRLEnv
    participant Sim as SimulationContext
    participant Sensors as RTX Sensors
    
    User->>Env: reset() or step()
    Env->>Env: Check if reset needed
    alt Environment Reset Required
        Env->>Env: Perform reset logic
        Env->>Sim: write_data_to_sim()
        Env->>Sim: forward()
        
        alt RTX Sensors Present
            Env->>Env: Check cfg.num_rerenders_on_reset > 0
            alt num_rerenders_on_reset > 0
                loop num_rerenders_on_reset times
                    Env->>Sim: render()
                    Sim->>Sensors: Update sensor data
                    Note over Sensors: DLSS/DLAA antialiasing<br/>applied if configured
                end
            else num_rerenders_on_reset == 0
                Note over Env: Skip rerender<br/>(stale sensor data)
            end
        end
        
        Env->>User: Return observations
        Note over User: Fresh sensor data<br/>without artifacts
    end
Loading

15 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

* Changed Null Space matrix computation in Pink IK's Null Space Posture Task to a faster matrix pseudo inverse computation.


0.47.7 (2025-11-03)
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Duplicate version number 0.47.7 - there are two entries with this version (lines 4 and 14)

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR introduces a new num_rerenders_on_reset parameter to both ManagerBasedEnvCfg and DirectRLEnvCfg, replacing the boolean rerender_on_reset parameter with an integer that specifies the exact number of render steps to perform after environment reset. This enhancement addresses DLSS rendering artifacts/ghosting that occur with single render passes, allowing users to specify multiple render iterations (typically 3) combined with DLAA antialiasing mode for high-quality visuomotor observations.

Major changes:

  • Added num_rerenders_on_reset parameter (default: 0) to environment configs with comprehensive documentation
  • Deprecated rerender_on_reset with proper warnings and automatic migration (True → 1, False → 0)
  • Updated reset logic in ManagerBasedEnv, DirectRLEnv, and ManagerBasedRLEnv to loop num_rerenders_on_reset times
  • Migrated visuomotor environments to use new API with num_rerenders_on_reset=3 and DLAA antialiasing
  • Increased camera resolution from 84x84 to 200x200 in Franka stack environments with corresponding robomimic config updates

Issues identified:

  • Deprecation message in direct_rl_env.py:226 incorrectly references ManagerBasedEnvCfg instead of DirectRLEnvCfg (already reported)

Confidence Score: 4/5

  • This PR is safe to merge with one minor fix needed for the deprecation warning message
  • The implementation is well-structured with proper deprecation handling, comprehensive documentation, and consistent application across all environment types. The core logic correctly replaces a boolean flag with an integer loop count, and the migration of existing visuomotor environments demonstrates proper usage. The score is 4 instead of 5 due to one syntax error in the deprecation warning message (incorrect config class reference) that was already identified in previous comments and needs correction before merge
  • source/isaaclab/isaaclab/envs/direct_rl_env.py requires a one-line fix to correct the deprecation warning message

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/docs/CHANGELOG.rst 3/5 Added entry for version 0.47.8 documenting new parameter and deprecation warning - has pre-existing chronological inconsistency in base branch
source/isaaclab/isaaclab/envs/direct_rl_env.py 3/5 Added deprecation logic and updated render loop to use num_rerenders_on_reset - deprecation message incorrectly references ManagerBasedEnvCfg

Sequence Diagram

sequenceDiagram
    participant User
    participant Env as ManagerBasedEnv/DirectRLEnv
    participant Config as EnvCfg
    participant Sim as Simulator
    
    User->>Env: Initialize Environment
    Env->>Config: Check rerender_on_reset (deprecated)
    alt rerender_on_reset is True
        Config-->>Env: Show deprecation warning
        Env->>Config: Set num_rerenders_on_reset = 1
    end
    
    User->>Env: reset() or step()
    Env->>Env: _reset_idx(env_ids)
    Env->>Sim: write_data_to_sim()
    Env->>Sim: forward()
    
    alt has RTX sensors AND num_rerenders_on_reset > 0
        loop num_rerenders_on_reset times
            Env->>Sim: render()
            Note over Sim: Each render updates sensor data<br/>Multiple renders eliminate DLSS artifacts
        end
    end
    
    Env-->>User: Return observation with clean sensor data
Loading

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@kellyguo11 kellyguo11 left a comment

Choose a reason for hiding this comment

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

should we also update the note on limitation we added in the spark section of the docs?

"[DEPRECATION WARNING] ManagerBasedEnvCfg.rerender_on_reset is deprecated. Use"
" ManagerBasedEnvCfg.num_rerenders_on_reset instead."
)
omni.log.warn(msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

we are trying to move away from omni.log, we can probably remove this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed the spark limitation from the docs and removed omni.log.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 6, 2025
@peterd-NV peterd-NV requested a review from kellyguo11 November 6, 2025 02:24
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR introduces a new num_rerenders_on_reset parameter to replace the boolean rerender_on_reset, enabling fine-grained control over the number of render steps performed after environment reset. This addresses DLSS/DLAA ghosting artifacts in visuomotor environments that require multiple render passes to stabilize.

Key Changes:

  • Added num_rerenders_on_reset: int = 0 to ManagerBasedEnvCfg and DirectRLEnvCfg
  • Deprecated rerender_on_reset with proper warnings and backward compatibility
  • Updated all visuomotor environment configs to use num_rerenders_on_reset=3 with DLAA antialiasing (except Cosmos env which uses 1 with antialiasing OFF)
  • Increased camera resolution from 84x84 to 200x200 in Franka stack environments
  • Added new robomimic config bc_rnn_image_200.json for updated resolution

Issues Found:

  • Deprecation handling unconditionally overrides num_rerenders_on_reset to 1 when rerender_on_reset=True, even if user explicitly set a different value
  • Changelog has formatting issues (duplicate version number 0.47.7, incorrect date format)

Confidence Score: 4/5

  • Safe to merge with minor fix recommended for deprecation handling
  • Core implementation is solid with proper deprecation warnings and backward compatibility. The unconditional override in deprecation handling could cause confusion if users set both parameters, but this is an edge case. Changelog formatting issues are non-critical. The feature addresses a real need (DLSS artifacts) and all visuomotor environments are properly updated.
  • Pay attention to source/isaaclab/isaaclab/envs/manager_based_env.py and source/isaaclab/isaaclab/envs/direct_rl_env.py for the deprecation handling logic

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/envs/manager_based_env_cfg.py 5/5 Added num_rerenders_on_reset parameter with deprecation notice for rerender_on_reset
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 5/5 Added num_rerenders_on_reset parameter with deprecation notice for rerender_on_reset
source/isaaclab/isaaclab/envs/manager_based_env.py 4/5 Implements deprecation warning for rerender_on_reset and uses new num_rerenders_on_reset parameter in loop; potential issue with unconditional override
source/isaaclab/isaaclab/envs/direct_rl_env.py 4/5 Implements deprecation warning for rerender_on_reset and uses new num_rerenders_on_reset parameter in loop; potential issue with unconditional override
source/isaaclab/docs/CHANGELOG.rst 3/5 Added changelog entry for new feature; has duplicate version number and incorrect date format
source/isaaclab_tasks/docs/CHANGELOG.rst 3/5 Added changelog entry describing visuomotor env changes; has date in future (2025-10-23)

Sequence Diagram

sequenceDiagram
    participant User
    participant EnvConfig
    participant Env as ManagerBasedEnv/DirectRLEnv
    participant Sim as SimulationInterface
    participant Sensors as RTX Sensors

    User->>EnvConfig: Set num_rerenders_on_reset=3
    Note over EnvConfig: Replaces deprecated rerender_on_reset
    
    User->>Env: Initialize Environment
    Env->>EnvConfig: Check rerender_on_reset
    alt rerender_on_reset is True (deprecated)
        Env->>Env: Show deprecation warning
        Env->>EnvConfig: Set num_rerenders_on_reset=1
    end
    
    User->>Env: reset()
    Env->>Env: _reset_idx(env_ids)
    Env->>Sim: forward()
    
    alt has_rtx_sensors() AND num_rerenders_on_reset > 0
        loop num_rerenders_on_reset times
            Env->>Sim: render()
            Sim->>Sensors: Update sensor data
            Note over Sensors: Eliminates DLSS/DLAA ghosting artifacts
        end
    end
    
    Env-->>User: Return reset observations
Loading

17 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 195 to 205
if self.cfg.rerender_on_reset:
msg = (
f"\033[93m\033[1m[DEPRECATION WARNING] ManagerBasedEnvCfg.rerender_on_reset is deprecated. Use"
f" ManagerBasedEnvCfg.num_rerenders_on_reset instead.\033[0m"
)
warnings.warn(
msg,
FutureWarning,
stacklevel=2,
)
self.cfg.num_rerenders_on_reset = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: if user sets both rerender_on_reset=True AND num_rerenders_on_reset=5, this unconditionally overrides to 1

Suggested change
if self.cfg.rerender_on_reset:
msg = (
f"\033[93m\033[1m[DEPRECATION WARNING] ManagerBasedEnvCfg.rerender_on_reset is deprecated. Use"
f" ManagerBasedEnvCfg.num_rerenders_on_reset instead.\033[0m"
)
warnings.warn(
msg,
FutureWarning,
stacklevel=2,
)
self.cfg.num_rerenders_on_reset = 1
# show deprecation message for rerender_on_reset
if self.cfg.rerender_on_reset:
msg = (
f"\033[93m\033[1m[DEPRECATION WARNING] ManagerBasedEnvCfg.rerender_on_reset is deprecated. Use"
f" ManagerBasedEnvCfg.num_rerenders_on_reset instead.\033[0m"
)
warnings.warn(
msg,
FutureWarning,
stacklevel=2,
)
if self.cfg.num_rerenders_on_reset == 0:
self.cfg.num_rerenders_on_reset = 1

Copy link
Contributor

Choose a reason for hiding this comment

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

this seems like a good suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in latest commit

Comment on lines 224 to 234
if self.cfg.rerender_on_reset:
msg = (
f"\033[93m\033[1m[DEPRECATION WARNING] DirectRLEnvCfg.rerender_on_reset is deprecated. Use"
f" DirectRLEnvCfg.num_rerenders_on_reset instead.\033[0m"
)
warnings.warn(
msg,
FutureWarning,
stacklevel=2,
)
self.cfg.num_rerenders_on_reset = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: if user sets both rerender_on_reset=True AND num_rerenders_on_reset=5, this unconditionally overrides to 1

Suggested change
if self.cfg.rerender_on_reset:
msg = (
f"\033[93m\033[1m[DEPRECATION WARNING] DirectRLEnvCfg.rerender_on_reset is deprecated. Use"
f" DirectRLEnvCfg.num_rerenders_on_reset instead.\033[0m"
)
warnings.warn(
msg,
FutureWarning,
stacklevel=2,
)
self.cfg.num_rerenders_on_reset = 1
# show deprecation message for rerender_on_reset
if self.cfg.rerender_on_reset:
msg = (
f"\033[93m\033[1m[DEPRECATION WARNING] DirectRLEnvCfg.rerender_on_reset is deprecated. Use"
f" DirectRLEnvCfg.num_rerenders_on_reset instead.\033[0m"
)
warnings.warn(
msg,
FutureWarning,
stacklevel=2,
)
if self.cfg.num_rerenders_on_reset == 0:
self.cfg.num_rerenders_on_reset = 1

@kellyguo11
Copy link
Contributor

could you also help take a look at the linter failure?

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR introduces better control over rendering behavior after environment reset by adding a new num_rerenders_on_reset parameter to replace the boolean rerender_on_reset flag.

Key Changes:

  • Added num_rerenders_on_reset: int parameter (default: 0) to ManagerBasedEnvCfg and DirectRLEnvCfg
  • Deprecated rerender_on_reset with proper warnings and backward compatibility
  • Updated reset logic to perform multiple render steps in a loop when num_rerenders_on_reset > 0
  • Updated visuomotor environments to use num_rerenders_on_reset=3 with DLAA antialiasing (instead of antialiasing OFF)
  • Increased camera resolution from 84x84 to 200x200 in stack visuomotor environment
  • Version bumps: isaaclab 0.47.7→0.47.8, isaaclab_tasks 0.11.6→0.11.7

Rationale:
With DLSS/DLAA enabled, a single render step after reset causes image ghosting artifacts. Multiple render steps (typically 3) eliminate these artifacts while maintaining high rendering quality. The cosmos environment uses num_rerenders_on_reset=1 with antialiasing OFF since it doesn't support DLSS.

Confidence Score: 5/5

  • This PR is safe to merge with no critical issues found
  • Clean implementation with proper deprecation handling, backward compatibility preserved, consistent updates across all affected environments, and appropriate changelog/version updates
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/envs/manager_based_env_cfg.py 5/5 Added num_rerenders_on_reset parameter with proper documentation and marked rerender_on_reset as deprecated
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 5/5 Added num_rerenders_on_reset parameter with proper documentation and marked rerender_on_reset as deprecated
source/isaaclab/isaaclab/envs/manager_based_env.py 5/5 Implements deprecation warning for rerender_on_reset and uses num_rerenders_on_reset in reset logic with loop
source/isaaclab/isaaclab/envs/direct_rl_env.py 5/5 Implements deprecation warning for rerender_on_reset and uses num_rerenders_on_reset in reset logic with loop
source/isaaclab/isaaclab/envs/manager_based_rl_env.py 5/5 Updated reset method to use num_rerenders_on_reset with loop for multiple render steps
source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/stack/config/franka/stack_ik_rel_visuomotor_env_cfg.py 5/5 Updated to use num_rerenders_on_reset=3 with DLAA antialiasing and increased camera resolution to 200x200

Sequence Diagram

sequenceDiagram
    participant User
    participant Env as Environment (ManagerBasedEnv/DirectRLEnv)
    participant Sim as Simulation
    participant Sensors as RTX Sensors

    User->>Env: Create environment with num_rerenders_on_reset=3
    
    Note over Env: __init__() checks deprecated rerender_on_reset
    alt rerender_on_reset is True
        Env->>Env: Show deprecation warning
        Env->>Env: Set num_rerenders_on_reset=1 (if was 0)
    end
    
    User->>Env: reset()
    Env->>Env: _reset_idx(env_ids)
    Env->>Sim: write_data_to_sim()
    Env->>Sim: forward()
    
    alt has_rtx_sensors() AND num_rerenders_on_reset > 0
        loop num_rerenders_on_reset times (e.g., 3)
            Env->>Sim: render()
            Sim->>Sensors: Update sensor data (eliminate DLSS artifacts)
        end
    end
    
    Env->>Env: compute observations
    Env-->>User: Return fresh observations (no ghosting)
Loading

17 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@github-actions github-actions bot added the isaac-mimic Related to Isaac Mimic team label Nov 6, 2025
@peterd-NV
Copy link
Contributor Author

Thanks @kellyguo11 @Mayankm96 for the reviews. I've addressed all comments and cleared out the lint errors. Should be ready for a final pass :)

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 isaac-mimic Related to Isaac Mimic team

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants