# Copyright (c) 2022-2025, The Isaac Lab Project Developers.# All rights reserved.## SPDX-License-Identifier: BSD-3-Clausefrom__future__importannotationsimporttorchfromcollections.abcimportCallablefromdataclassesimportMISSINGfromtypingimportLiteralfromisaaclab.utilsimportconfigclassfrom.importnoise_model
[docs]@configclassclassNoiseCfg:"""Base configuration for a noise term."""func:Callable[[torch.Tensor,NoiseCfg],torch.Tensor]=MISSING"""The function to be called for applying the noise. Note: The shape of the input and output tensors must be the same. """operation:Literal["add","scale","abs"]="add""""The operation to apply the noise on the data. Defaults to "add"."""
[docs]@configclassclassConstantNoiseCfg(NoiseCfg):"""Configuration for an additive constant noise term."""func=noise_model.constant_noisebias:torch.Tensor|float=0.0"""The bias to add. Defaults to 0.0."""
[docs]@configclassclassUniformNoiseCfg(NoiseCfg):"""Configuration for a additive uniform noise term."""func=noise_model.uniform_noisen_min:torch.Tensor|float=-1.0"""The minimum value of the noise. Defaults to -1.0."""n_max:torch.Tensor|float=1.0"""The maximum value of the noise. Defaults to 1.0."""
[docs]@configclassclassGaussianNoiseCfg(NoiseCfg):"""Configuration for an additive gaussian noise term."""func=noise_model.gaussian_noisemean:torch.Tensor|float=0.0"""The mean of the noise. Defaults to 0.0."""std:torch.Tensor|float=1.0"""The standard deviation of the noise. Defaults to 1.0."""
### Noise models##
[docs]@configclassclassNoiseModelCfg:"""Configuration for a noise model."""class_type:type=noise_model.NoiseModel"""The class type of the noise model."""noise_cfg:NoiseCfg=MISSING"""The noise configuration to use."""
[docs]@configclassclassNoiseModelWithAdditiveBiasCfg(NoiseModelCfg):"""Configuration for an additive gaussian noise with bias model."""class_type:type=noise_model.NoiseModelWithAdditiveBiasbias_noise_cfg:NoiseCfg=MISSING"""The noise configuration for the bias. Based on this configuration, the bias is sampled at every reset of the noise model. """