Skip to content

Fixes modify_action_space in RslRlVecEnvWrapper #2185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Guidelines for modifications:
* CY (Chien-Ying) Chen
* David Yang
* Dorsa Rohani
* Felipe Mohr
* Felix Yu
* Gary Lvov
* Giulio Romualdi
Expand Down
11 changes: 11 additions & 0 deletions source/isaaclab_rl/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Changelog
---------

0.1.2 (2025-03-29)
~~~~~~~~~~~~~~~~~~

Fixed
^^^^^

* Fixed the location of :meth:`isaaclab_rl.rsl_rl.RslRlOnPolicyRunnerCfg._modify_action_space`
to be called only after retrieving the dimensions of the environment, preventing errors
related to accessing uninitialized attributes.


0.1.1 (2025-03-10)
~~~~~~~~~~~~~~~~~~

Expand Down
6 changes: 3 additions & 3 deletions source/isaaclab_rl/isaaclab_rl/rsl_rl/vecenv_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ def __init__(self, env: ManagerBasedRLEnv | DirectRLEnv, clip_actions: float | N
self.device = self.unwrapped.device
self.max_episode_length = self.unwrapped.max_episode_length

# modify the action space to the clip range
self._modify_action_space()

# obtain dimensions of the environment
if hasattr(self.unwrapped, "action_manager"):
self.num_actions = self.unwrapped.action_manager.total_action_dim
Expand All @@ -81,6 +78,9 @@ def __init__(self, env: ManagerBasedRLEnv | DirectRLEnv, clip_actions: float | N
else:
self.num_privileged_obs = 0

# modify the action space to the clip range
self._modify_action_space()

# reset at the start since the RSL-RL runner does not call reset
self.env.reset()

Expand Down