# Copyright (c) 2022-2025, The Isaac Lab Project Developers.# All rights reserved.## SPDX-License-Identifier: BSD-3-Clause"""Common functions that can be used to create curriculum for the learning environment.The functions can be passed to the :class:`isaaclab.managers.CurriculumTermCfg` object to enablethe curriculum introduced by the function."""from__future__importannotationsfromcollections.abcimportSequencefromtypingimportTYPE_CHECKINGifTYPE_CHECKING:fromisaaclab.envsimportManagerBasedRLEnv
[docs]defmodify_reward_weight(env:ManagerBasedRLEnv,env_ids:Sequence[int],term_name:str,weight:float,num_steps:int):"""Curriculum that modifies a reward weight a given number of steps. Args: env: The learning environment. env_ids: Not used since all environments are affected. term_name: The name of the reward term. weight: The weight of the reward term. num_steps: The number of steps after which the change should be applied. """ifenv.common_step_counter>num_steps:# obtain term settingsterm_cfg=env.reward_manager.get_term_cfg(term_name)# update term settingsterm_cfg.weight=weightenv.reward_manager.set_term_cfg(term_name,term_cfg)