Unverified Commit cc0dab6c authored by matthewtrepte's avatar matthewtrepte Committed by GitHub

Fixes rendering preset (#561)

# Description

Fixes regression in parsing render preset modes.
Updates renders with recent TOT

<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- This change requires a documentation update

## Screenshots

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

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

- [X] I have run the [`pre-commit` checks](https://pre-commit.com/) 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
- [X] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------
Signed-off-by: 's avatarmatthewtrepte <mtrepte@nvidia.com>
Signed-off-by: 's avatarKelly Guo <kellyg@nvidia.com>
Co-authored-by: 's avatarKelly Guo <kellyg@nvidia.com>
parent c80e2afb
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.42.26"
version = "0.42.27"
# Description
title = "Isaac Lab framework for Robot Learning"
......
Changelog
---------
0.42.27 (2025-07-21)
~~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixed rendering preset mode regression.
0.42.26 (2025-07-22)
~~~~~~~~~~~~~~~~~~~~
......@@ -9,6 +18,7 @@ Changed
* Updated teleop scripts to print to console vs omni log.
0.42.25 (2025-07-17)
~~~~~~~~~~~~~~~~~~~~
......
......@@ -18,11 +18,8 @@ import os
import re
import signal
import sys
import toml
from typing import Any, Literal
import flatdict
with contextlib.suppress(ModuleNotFoundError):
import isaacsim # noqa: F401
......@@ -865,7 +862,7 @@ class AppLauncher:
play_button_group._stop_button = None # type: ignore
def _set_rendering_mode_settings(self, launcher_args: dict) -> None:
"""Set RTX rendering settings to the values from the selected preset."""
"""Store RTX rendering mode in carb settings."""
import carb
from isaacsim.core.utils.carb import set_carb_setting
......@@ -879,23 +876,12 @@ class AppLauncher:
if rendering_mode is None:
rendering_mode = "balanced"
# parse preset file
repo_path = os.path.join(carb.tokens.get_tokens_interface().resolve("${app}"), "..")
if self.is_isaac_sim_version_4_5():
repo_path = os.path.join(repo_path, "..")
preset_filename = os.path.join(repo_path, f"apps/rendering_modes/{rendering_mode}.kit")
with open(preset_filename) as file:
preset_dict = toml.load(file)
preset_dict = dict(flatdict.FlatDict(preset_dict, delimiter="."))
# set presets
carb_setting = carb.settings.get_settings()
for key, value in preset_dict.items():
key = "/" + key.replace(".", "/") # convert to carb setting format
set_carb_setting(carb_setting, key, value)
# store rendering mode in carb settings
carb_settings = carb.settings.get_settings()
set_carb_setting(carb_settings, "/isaaclab/rendering/rendering_mode", rendering_mode)
def _set_animation_recording_settings(self, launcher_args: dict) -> None:
"""Set animation recording settings."""
"""Store animation recording settings in carb settings."""
import carb
from isaacsim.core.utils.carb import set_carb_setting
......
......@@ -333,8 +333,12 @@ class SimulationContext(_SimulationContext):
not_carb_settings = ["rendering_mode", "carb_settings", "antialiasing_mode"]
# set preset settings (same behavior as the CLI arg --rendering_mode)
# grab rendering mode, defaulting first to the CLI arg --rendering_mode
rendering_mode = get_carb_setting(self.carb_settings, "/isaaclab/rendering/rendering_mode")
if rendering_mode is None:
rendering_mode = self.cfg.render.rendering_mode
# set preset settings (same behavior as the CLI arg --rendering_mode)
if rendering_mode is not None:
# check if preset is supported
supported_rendering_modes = ["performance", "balanced", "quality"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment