Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion source/isaaclab/config/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

# Note: Semantic Versioning is used: https://semver.org/
version = "0.40.5"
version = "0.40.6"

# Description
title = "Isaac Lab framework for Robot Learning"
Expand Down
9 changes: 9 additions & 0 deletions source/isaaclab/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
---------

0.40.6 (2025-06-13)
~~~~~~~~~~~~~~~~~~~

Added
^^^^^

* Added :meth:`~isaaclab.env.mdp.curriculums.modify_environment_parameter``


0.40.5 (2025-05-22)
~~~~~~~~~~~~~~~~~~~

Expand Down
24 changes: 24 additions & 0 deletions source/isaaclab/isaaclab/envs/mdp/curriculums.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,27 @@ def modify_reward_weight(env: ManagerBasedRLEnv, env_ids: Sequence[int], term_na
# update term settings
term_cfg.weight = weight
env.reward_manager.set_term_cfg(term_name, term_cfg)


def modify_environment_parameter(
env: ManagerBasedRLEnv,
env_ids: Sequence[int],
get_term_fn: callable,
modify_term_fn: callable,
value: float,
num_steps: int,
):
"""General function to modify termination, reward, or command parameters in an RL environment.
Args:
env: The learning environment.
env_ids: Not used since all environments are affected.
get_term_fn: Function to retrieve the term configuration.
modify_term_fn: Function to modify and set the retrieved term configuration.
value: Value for command modifications, how it is used should be defined via modify_term_fn.
num_steps: The step interval at which the modification is applied
(i.e., at steps num_steps, 2*num_steps, 3*num_steps, etc., but not at step 0).
"""
# Check if it's time to apply the modification
if env.common_step_counter % num_steps == 0 and env.common_step_counter != 0:
term_cfg = get_term_fn(env)
modify_term_fn(env, term_cfg, value)