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)

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 most recent change is a correction to a deprecation warning message in direct_rl_env.py. Previously, the warning incorrectly referenced ManagerBasedEnvCfg when it should have referenced DirectRLEnvCfg, since the code is part of the DirectRLEnv class. This fix ensures users receive accurate information about which configuration parameter to update when migrating from the deprecated rerender_on_reset boolean to the new num_rerenders_on_reset integer parameter. The change is purely cosmetic to the warning text and does not affect functionality.

Important Files Changed

Filename Score Overview
source/isaaclab/isaaclab/envs/direct_rl_env.py 5/5 Fixed deprecation warning to correctly reference DirectRLEnvCfg instead of ManagerBasedEnvCfg

Confidence score: 5/5

  • This change is safe to merge with minimal risk - it only corrects a string in a deprecation warning message
  • Score reflects that this is a trivial text correction with no logic changes, addressing feedback from previous reviews
  • No files require special attention - the change is self-contained and straightforward

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@isaac-sim isaac-sim deleted a comment from greptile-apps bot Oct 29, 2025
@isaac-sim isaac-sim deleted a comment from greptile-apps bot Oct 29, 2025
@isaac-sim isaac-sim deleted a comment from greptile-apps bot Oct 29, 2025
@peterd-NV
Copy link
Contributor Author

Thanks for the comments and suggestions @Mayankm96. I've updated the PR to use the proper deprecation directives and simplify the code by always setting the new parameter internally and using that throughout the code.

I've also validated policy performance with the new rendering settings on both Franka/GR1 and can confirm that they are expected with the latest iteration of this PR.

@peterd-NV peterd-NV moved this from In progress to In review in Isaac Lab Oct 29, 2025
@isaac-sim isaac-sim deleted a comment from greptile-apps bot Oct 29, 2025
@isaac-sim isaac-sim deleted a comment from greptile-apps bot Oct 29, 2025
@peterd-NV peterd-NV requested a review from Mayankm96 October 29, 2025 19:06
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 adds a new num_rerenders_on_reset parameter to both ManagerBasedEnv and DirectRLEnv to provide fine-grained control over the number of render steps performed after environment reset. This addresses DLSS/DLAA ghosting artifacts that occur with a single render step.

Key Changes:

  • Added num_rerenders_on_reset parameter (defaults to 0) in both environment config classes
  • Deprecated rerender_on_reset boolean parameter with migration warnings
  • Updated reset methods to loop num_rerenders_on_reset times instead of single conditional render
  • Migrated visuomotor environments to use new API with num_rerenders_on_reset=3 and DLAA antialiasing
  • Updated camera resolution from 84x84 to 200x200 in Franka visuomotor environments
  • Added new BC-RNN training config for 200x200 images

Issues Found:

  • Critical logic bug in deprecation handling: if users set both rerender_on_reset=True and num_rerenders_on_reset=3, the code unconditionally overwrites num_rerenders_on_reset to 1, losing their configuration

Confidence Score: 3/5

  • This PR has a logic bug in backward compatibility that could silently break user configurations
  • The implementation is mostly sound with proper deprecation warnings and documentation, but the deprecation logic has a critical flaw where it unconditionally overwrites num_rerenders_on_reset when rerender_on_reset=True, even if the user explicitly set a different value. This creates a backward compatibility issue that could cause subtle bugs during migration.
  • Pay close attention to source/isaaclab/isaaclab/envs/manager_based_env.py and source/isaaclab/isaaclab/envs/direct_rl_env.py - both have the same deprecation logic bug

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/envs/manager_based_env.py 3/5 Added deprecation logic and updated reset methods to use num_rerenders_on_reset - has logic issue with backward compatibility
source/isaaclab/isaaclab/envs/direct_rl_env.py 3/5 Added deprecation logic and updated reset methods to use num_rerenders_on_reset - has logic issue with backward compatibility
source/isaaclab/isaaclab/envs/manager_based_env_cfg.py 5/5 Added new num_rerenders_on_reset parameter with clear documentation and deprecation notice
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 5/5 Added new num_rerenders_on_reset parameter with clear documentation and deprecation notice

Sequence Diagram

sequenceDiagram
    participant User
    participant EnvConfig
    participant Environment
    participant SimulationManager
    
    User->>EnvConfig: Set num_rerenders_on_reset=3
    User->>EnvConfig: (Optional) Set rerender_on_reset=True (deprecated)
    User->>Environment: Initialize environment
    
    alt rerender_on_reset is True
        Environment->>Environment: Show deprecation warning
        Environment->>EnvConfig: Set num_rerenders_on_reset=1 (overwrites!)
    end
    
    User->>Environment: Call reset()
    Environment->>Environment: Perform reset logic
    Environment->>SimulationManager: write_data_to_sim()
    Environment->>SimulationManager: forward()
    
    alt has_rtx_sensors() AND num_rerenders_on_reset > 0
        loop num_rerenders_on_reset times
            Environment->>SimulationManager: render()
            Note over SimulationManager: Updates sensor data with DLSS/DLAA
        end
    end
    
    Environment->>User: Return observations with updated sensor data
Loading

16 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 PR introduces num_rerenders_on_reset to replace the boolean rerender_on_reset parameter, enabling fine-grained control over rendering after environment resets. This addresses DLSS ghosting/artifacts by allowing multiple render passes, which is critical for visuomotor learning environments.

Key Changes:

  • Added num_rerenders_on_reset parameter to ManagerBasedEnvCfg and DirectRLEnvCfg (defaults to 0)
  • Deprecated rerender_on_reset with proper warnings in both environment classes
  • Updated all visuomotor environments to use num_rerenders_on_reset=3 with DLAA antialiasing
  • Increased camera resolution from 84x84 to 200x200 for Franka stack environment
  • Added corresponding robomimic BC-RNN config for 200x200 images

Issues Found (from previous comments):

  • CHANGELOG dates use year 2025 instead of 2024 in both source/isaaclab/docs/CHANGELOG.rst and source/isaaclab_tasks/docs/CHANGELOG.rst
  • Warning message in direct_rl_env.py:224 incorrectly references ManagerBasedEnvCfg instead of DirectRLEnvCfg
  • Deprecation logic will overwrite user's num_rerenders_on_reset value if they set both old and new parameters

Confidence Score: 3/5

  • This PR is mostly safe but has several issues that should be addressed before merge
  • The implementation is sound and the feature is well-designed, but there are 4 issues flagged in previous comments: incorrect CHANGELOG dates (2025 vs 2024), incorrect class name in deprecation warning, and a logic bug where setting both deprecated and new parameters causes the new parameter to be overwritten. These are straightforward fixes but should be resolved to avoid confusion and unexpected behavior.
  • Pay close attention to source/isaaclab/isaaclab/envs/manager_based_env.py, source/isaaclab/isaaclab/envs/direct_rl_env.py for the deprecation logic bug, and both CHANGELOG files for date corrections

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 deprecation notice for rerender_on_reset
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 5/5 Added num_rerenders_on_reset parameter with proper deprecation notice for rerender_on_reset
source/isaaclab/isaaclab/envs/manager_based_env.py 3/5 Implemented deprecation warning and loop-based rerendering. Has previous comment about overwrite bug when both old and new params set
source/isaaclab/isaaclab/envs/direct_rl_env.py 3/5 Implemented deprecation warning and loop-based rerendering. Has previous comment about incorrect warning message and overwrite bug
source/isaaclab/docs/CHANGELOG.rst 3/5 Added version 0.47.5 changelog entry. Has previous comment about incorrect date (2025-10-31 should be 2024-10-31)
source/isaaclab_tasks/docs/CHANGELOG.rst 3/5 Added version 0.11.7 changelog entry. Has previous comment about incorrect date (2025-10-29 should be 2024-10-29)

Sequence Diagram

sequenceDiagram
    participant User
    participant EnvConfig as ManagerBasedEnvCfg/DirectRLEnvCfg
    participant Env as ManagerBasedEnv/DirectRLEnv
    participant Sim as Simulation

    Note over User,Sim: Environment Initialization
    User->>EnvConfig: Set num_rerenders_on_reset=3
    User->>EnvConfig: Set rerender_on_reset=True (deprecated)
    EnvConfig->>Env: Initialize environment
    
    alt If rerender_on_reset is True
        Env->>Env: Show deprecation warning
        Env->>EnvConfig: Set num_rerenders_on_reset=1
    end

    Note over User,Sim: Environment Reset Flow
    User->>Env: reset()
    Env->>Env: _reset_idx(env_ids)
    Env->>Sim: write_data_to_sim()
    Env->>Sim: forward()
    
    alt If has_rtx_sensors() and num_rerenders_on_reset > 0
        loop num_rerenders_on_reset times
            Env->>Sim: render()
            Note over Sim: Additional render step<br/>to eliminate DLSS artifacts
        end
    end
    
    Env->>User: Return observations

    Note over User,Sim: Step with Partial Reset
    User->>Env: step(actions)
    Env->>Env: Process actions
    
    alt If some environments need reset
        Env->>Env: _reset_idx(reset_env_ids)
        alt If has_rtx_sensors() and num_rerenders_on_reset > 0
            loop num_rerenders_on_reset times
                Env->>Sim: render()
            end
        end
    end
    
    Env->>User: Return obs, rewards, dones, info
Loading

16 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@isaac-sim isaac-sim deleted a comment from greptile-apps bot Oct 30, 2025
@isaac-sim isaac-sim deleted a comment from greptile-apps bot Oct 30, 2025
@kellyguo11 kellyguo11 changed the title Add parameter to specify number of rerenders after environment reset Adds parameter to specify number of rerenders after environment reset Oct 31, 2025
# show deprecation message for rerender_on_reset
if self.cfg.rerender_on_reset:
warnings.warn(
"\033[93m\033[1m[DEPRECATION WARNING] DirectRLEnvCfg.rerender_on_reset is deprecated. Use"
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the purpose of \033[93m\033[1m?

Copy link
Contributor Author

@peterd-NV peterd-NV Oct 31, 2025

Choose a reason for hiding this comment

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

This is to format the string to be bolded and yellow. Without it, I find the message is very easily lost in the Isaac Lab logs.

warnings.warn(
"\033[93m\033[1m[DEPRECATION WARNING] DirectRLEnvCfg.rerender_on_reset is deprecated. Use"
" DirectRLEnvCfg.num_rerenders_on_reset instead.\033[0m",
FutureWarning,
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason to use this instead of DeprecationWarning?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By default in python warnings, DeprecationWarning is not shown to users running the code. Using FutureWarning ensures the warning is printed and shown in the logs.

to reflect the latest states from the reset. This comes at a cost of performance as an additional render
step will be performed after each time an environment is reset.
.. deprecated:: 0.47.2
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can use 2.3.1 for the version instead. I'm not sure if 0.47.2 is as obvious to users

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, that makes it easier to understand. I've updated to 2.3.1

@kellyguo11
Copy link
Contributor

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?

I think I can see this being a valid option for RL environments as well. We should note for sure that it will come at a high performance cost, but if users really need the extra quality for renderer convergence, then the same path could still be applied.

@peterd-NV peterd-NV requested a review from kellyguo11 October 31, 2025 17:53
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 a new num_rerenders_on_reset parameter to ManagerBasedEnvCfg and DirectRLEnvCfg that replaces the boolean rerender_on_reset parameter. This allows users to specify the exact number of re-render steps after environment reset, enabling better control over DLSS/DLAA rendering to eliminate ghosting artifacts.

Key Changes:

  • New num_rerenders_on_reset: int = 0 parameter in both config classes
  • Deprecated rerender_on_reset: bool with proper warning messages in implementation files
  • Backward compatibility: rerender_on_reset=True is automatically converted to num_rerenders_on_reset=1
  • Updated render logic to loop num_rerenders_on_reset times instead of single conditional render
  • CHANGELOG updated for version 0.47.5

Issues Already Noted:
The previous review already identified syntax issues in other files (direct_rl_env.py, CHANGELOG.rst files). The config files themselves have no issues.

Confidence Score: 4/5

  • This PR is safe to merge with minor issues already identified in previous comments
  • The implementation is clean and well-documented with proper deprecation handling. The new parameter provides more flexibility while maintaining backward compatibility. Score is 4 instead of 5 due to syntax issues in other files (incorrect class name reference in warning message, and date formatting issues in CHANGELOG files) that were already identified in previous review comments.
  • No files in this changeset require special attention - the config files are properly implemented. Issues exist in implementation files (direct_rl_env.py) and CHANGELOG files per previous comments.

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/envs/direct_rl_env_cfg.py 5/5 Adds num_rerenders_on_reset parameter and deprecates rerender_on_reset with proper documentation
source/isaaclab/isaaclab/envs/manager_based_env_cfg.py 5/5 Adds num_rerenders_on_reset parameter and deprecates rerender_on_reset with proper documentation

Sequence Diagram

sequenceDiagram
    participant User
    participant Env as Environment (DirectRLEnv/ManagerBasedEnv)
    participant Sim as Simulation
    participant RTX as RTX Sensors
    
    User->>Env: reset() or step()
    Env->>Env: _reset_idx(env_ids)
    Env->>Sim: write_data_to_sim()
    Env->>Sim: forward()
    
    alt num_rerenders_on_reset > 0 and has RTX sensors
        Env->>Sim: Check has_rtx_sensors()
        Sim-->>Env: True
        loop num_rerenders_on_reset times
            Env->>Sim: render()
            Sim->>RTX: Update sensor data
            RTX-->>Sim: Fresh data with DLSS/DLAA
        end
    end
    
    Env-->>User: Return observations with updated sensor data
Loading

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants