Skip to content

Commit 3c3103f

Browse files
Fixes env test failure for Isaac-Stack-Cube-Franka-IK-Rel-Blueprint-v0 (#2156)
# 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 --> Fixes the environment test failure for Isaac-Stack-Cube-Franka-IK-Rel-Blueprint-v0. The env uses a custom image observation term which tries to access an element in the recorder manager. During env creation, the observation manager is initialized before the recorder manager, thus causing an error in the observation term. The custom image obs term has been updated to only try to access the element in the recorder manager if it exists. Fixes # (issue) Environment test failure of Isaac-Stack-Cube-Franka-IK-Rel-Blueprint-v0 ## Type of change - 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 - [x] 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 - [x] 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 --> --------- Co-authored-by: Kelly Guo <kellyg@nvidia.com>
1 parent 76d46ee commit 3c3103f

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

source/isaaclab/isaaclab/managers/recorder_manager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ def exported_successful_episode_count(self, env_id=None) -> int:
223223
Returns:
224224
The number of successful episodes.
225225
"""
226+
if not hasattr(self, "_exported_successful_episode_count"):
227+
return 0
226228
if env_id is not None:
227229
return self._exported_successful_episode_count.get(env_id, 0)
228230
return sum(self._exported_successful_episode_count.values())
@@ -237,6 +239,8 @@ def exported_failed_episode_count(self, env_id=None) -> int:
237239
Returns:
238240
The number of failed episodes.
239241
"""
242+
if not hasattr(self, "_exported_failed_episode_count"):
243+
return 0
240244
if env_id is not None:
241245
return self._exported_failed_episode_count.get(env_id, 0)
242246
return sum(self._exported_failed_episode_count.values())

source/isaaclab_tasks/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
# Note: Semantic Versioning is used: https://semver.org/
4-
version = "0.10.26"
4+
version = "0.10.27"
55

66
# Description
77
title = "Isaac Lab Environments"

source/isaaclab_tasks/docs/CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Changelog
22
---------
33

4+
0.10.27 (2025-03-25)
5+
~~~~~~~~~~~~~~~~~~~~
6+
7+
Fixed
8+
^^^^^
9+
10+
* Fixed environment test failure for ``Isaac-Stack-Cube-Franka-IK-Rel-Blueprint-v0``.
11+
12+
413
0.10.26 (2025-03-18)
514
~~~~~~~~~~~~~~~~~~~~
615

source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/stack/config/franka/stack_ik_rel_blueprint_env_cfg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def image(
8484
if images.dtype == torch.uint8:
8585
images = images.float() / 255.0
8686
# Get total successful episodes
87-
total_successes = sum(env.recorder_manager._exported_successful_episode_count.values())
87+
total_successes = 0
88+
if hasattr(env, "recorder_manager") and env.recorder_manager is not None:
89+
total_successes = env.recorder_manager.exported_successful_episode_count
8890

8991
for tile in range(images.shape[0]):
9092
tile_chw = torch.swapaxes(images[tile : tile + 1].unsqueeze(1), 1, -1).squeeze(-1)

0 commit comments

Comments
 (0)