stable_learning_control.disturbers
Contains the disturbers that are available in the SLC package.
Note
These disturbers are implemented as gymnasium:gymnasium wrappers <api/wrappers/>.
Because of this, they can be used with any gymnasium environment. If
you want to add a new disturber, you only have to ensure that it is a Python class
that inherits from the gym.Wrapper
class.
Submodules
Classes
A gymnasium wrapper that can be used to disturb the action of a gymnasium |
|
A gymnasium wrapper that can be used to disturb the action of a gymnasium |
|
A gymnasium wrapper that can be used to disturb a physics parameter of a |
|
A gymnasium wrapper that can be used to disturb the observation of a gymnasium |
Package Contents
- class stable_learning_control.disturbers.ActionImpulseDisturber(env, magnitude, time)[source]
Bases:
gymnasium.ActionWrapper
A gymnasium wrapper that can be used to disturb the action of a gymnasium environment with a impulse applied at a certain time step.
Initialise the ActionImpulseDisturber object.
- Parameters:
- time_warning = False
- time_step_warning = False
- _track_time = False
- _time_step_attr = None
- _time_attr = None
- magnitude
- impulse_time
- max_episode_steps
- class stable_learning_control.disturbers.ActionRandomNoiseDisturber(env, mean, std)[source]
Bases:
gymnasium.ActionWrapper
A gymnasium wrapper that can be used to disturb the action of a gymnasium environment with normally distributed random noise.
Initialise the ActionRandomNoiseDisturber object.
- Parameters:
- mean
- std
- class stable_learning_control.disturbers.EnvAttributesDisturber(env, attributes, values)[source]
Bases:
gymnasium.Wrapper
A gymnasium wrapper that can be used to disturb a physics parameter of a gymnasium environment.
- disturbance_label
A label for the disturbance that can be used for logging or plotting. Used in the
eval_robustness
utility.- Type:
Initialise the EnvAttributesDisturber object.
- Parameters:
- Raises:
ValueError – The number of parameters and values must be the same.
AttributeError – The parameter does not exist in the environment.
- attributes
- values
- class stable_learning_control.disturbers.ObservationRandomNoiseDisturber(env, mean, std)[source]
Bases:
gymnasium.ObservationWrapper
A gymnasium wrapper that can be used to disturb the observation of a gymnasium environment with normally distributed random noise.
Initialise the ObservationRandomNoiseDisturber object.
- Parameters:
- mean
- std