Unverified Commit 5ca0c323 authored by matthewtrepte's avatar matthewtrepte Committed by GitHub

Updates app pathing for user provided rendering preset mode (#3148)

# Description

<!--
Thank you for your interest in sending a pull request. Please make sure
to check the contribution guidelines.

Link:
https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html
-->

Update rendering preset mode pathing to be compatible when an experience
file is set.

<!-- 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)

## 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
- [x] 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 avatarooctipus <zhengyuz@nvidia.com>
Co-authored-by: 's avatarooctipus <zhengyuz@nvidia.com>
parent 8dabd3f1
Changelog
---------
0.44.11 (2025-08-11)
~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixed rendering preset mode when an experience CLI arg is provided.
0.44.10 (2025-08-06)
~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* The old termination manager in :class:`~isaaclab.managers.TerminationManager` term_done logging logs the instantaneous
term done count at reset. This let to inaccurate aggregation of termination count, obscuring the what really happening
during the traing. Instead we log the episodic term done.
* Fixed the old termination manager in :class:`~isaaclab.managers.TerminationManager` term_done logging that logs the
instantaneous term done count at reset. This let to inaccurate aggregation of termination count, obscuring the what really
happeningduring the traing. Instead we log the episodic term done.
0.44.9 (2025-07-30)
......
......@@ -349,11 +349,14 @@ class SimulationContext(_SimulationContext):
f"RenderCfg rendering mode '{rendering_mode}' not in supported modes {supported_rendering_modes}."
)
# parse preset file
repo_path = os.path.join(carb.tokens.get_tokens_interface().resolve("${app}"), "..")
# grab isaac lab apps path
isaaclab_app_exp_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), *[".."] * 4, "apps")
# for Isaac Sim 4.5 compatibility, we use the 4.5 rendering mode app files in a different folder
if float(".".join(self._isaacsim_version[2])) < 5:
repo_path = os.path.join(repo_path, "..")
preset_filename = os.path.join(repo_path, f"apps/rendering_modes/{rendering_mode}.kit")
isaaclab_app_exp_path = os.path.join(isaaclab_app_exp_path, "isaacsim_4_5")
# grab preset settings
preset_filename = os.path.join(isaaclab_app_exp_path, f"rendering_modes/{rendering_mode}.kit")
with open(preset_filename) as file:
preset_dict = toml.load(file)
preset_dict = dict(flatdict.FlatDict(preset_dict, delimiter="."))
......
......@@ -14,12 +14,14 @@ simulation_app = AppLauncher(headless=True, enable_cameras=True).app
"""Rest everything follows."""
import os
import toml
import carb
import flatdict
import pytest
from isaacsim.core.utils.carb import get_carb_setting
from isaacsim.core.version import get_version
from isaaclab.sim.simulation_cfg import RenderCfg, SimulationCfg
from isaaclab.sim.simulation_context import SimulationContext
......@@ -101,8 +103,15 @@ def test_render_cfg_presets():
rendering_modes = ["performance", "balanced", "quality"]
for rendering_mode in rendering_modes:
# grab groundtruth preset settings
preset_filename = f"apps/rendering_modes/{rendering_mode}.kit"
# grab isaac lab apps path
isaaclab_app_exp_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), *[".."] * 4, "apps")
# for Isaac Sim 4.5 compatibility, we use the 4.5 rendering mode app files in a different folder
isaac_sim_version = float(".".join(get_version()[2]))
if isaac_sim_version < 5:
isaaclab_app_exp_path = os.path.join(isaaclab_app_exp_path, "isaacsim_4_5")
# grab preset settings
preset_filename = os.path.join(isaaclab_app_exp_path, f"rendering_modes/{rendering_mode}.kit")
with open(preset_filename) as file:
preset_dict = toml.load(file)
preset_dict = dict(flatdict.FlatDict(preset_dict, delimiter="."))
......
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