Skip to content

Commit d41c5a9

Browse files
Fixes modify_action_space in RslRlVecEnvWrapper (#2185)
# Description This PR corrects the position of the method `self._modify_action_space()` in the RSL-RL Wrapper, so that it is only called after retrieving the dimensions of the environment, preventing errors related to the use of uninitialized attributes when using `clip_actions` in `RslRlVecEnvWrapper`. Fixes #2184 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## 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 - [X] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com> Co-authored-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>
1 parent 02d79b9 commit d41c5a9

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Guidelines for modifications:
4949
* CY (Chien-Ying) Chen
5050
* David Yang
5151
* Dorsa Rohani
52+
* Felipe Mohr
5253
* Felix Yu
5354
* Gary Lvov
5455
* Giulio Romualdi

source/isaaclab_rl/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.1.2"
4+
version = "0.1.3"
55

66
# Description
77
title = "Isaac Lab RL"

source/isaaclab_rl/docs/CHANGELOG.rst

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

4+
0.1.3 (2025-03-31)
5+
~~~~~~~~~~~~~~~~~~
6+
7+
Fixed
8+
^^^^^
9+
10+
* Fixed the location of :meth:`isaaclab_rl.rsl_rl.RslRlOnPolicyRunnerCfg._modify_action_space`
11+
to be called only after retrieving the dimensions of the environment, preventing errors
12+
related to accessing uninitialized attributes.
13+
14+
415
0.1.2 (2025-03-28)
516
~~~~~~~~~~~~~~~~~~
617

source/isaaclab_rl/isaaclab_rl/rsl_rl/vecenv_wrapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ def __init__(self, env: ManagerBasedRLEnv | DirectRLEnv, clip_actions: float | N
5858
self.device = self.unwrapped.device
5959
self.max_episode_length = self.unwrapped.max_episode_length
6060

61-
# modify the action space to the clip range
62-
self._modify_action_space()
63-
6461
# obtain dimensions of the environment
6562
if hasattr(self.unwrapped, "action_manager"):
6663
self.num_actions = self.unwrapped.action_manager.total_action_dim
@@ -81,6 +78,9 @@ def __init__(self, env: ManagerBasedRLEnv | DirectRLEnv, clip_actions: float | N
8178
else:
8279
self.num_privileged_obs = 0
8380

81+
# modify the action space to the clip range
82+
self._modify_action_space()
83+
8484
# reset at the start since the RSL-RL runner does not call reset
8585
self.env.reset()
8686

0 commit comments

Comments
 (0)