RocketInputGenerator#
- class do_dpc.environments.rocket_env.rocket_data_collection.RocketInputGenerator(input_limits, pid_combo, exc_gen)[source]#
Bases:
objectGenerates pre-stabilized random inputs for rocket control.
- exc_gen#
Gaussian noise generator for random inputs.
- Type:
Methods#
clip_action#
- do_dpc.environments.rocket_env.rocket_data_collection.RocketInputGenerator.clip_action(self, action)#
Clips the action values to stay within the defined input limits.
- Parameters:
action (np.ndarray) – Computed action values.
- Returns:
Clipped action values.
- Return type:
np.ndarray
compute_action#
- do_dpc.environments.rocket_env.rocket_data_collection.RocketInputGenerator.compute_action(self, output)#
Computes the appropriate action based on the PID controller or noise generator.
If the rocket is within reasonable bounds, PID-based control is applied. Otherwise, a random noise-based action is generated.
- Parameters:
output (np.ndarray) – Current system output to evaluate.
- Returns:
Clipped action values within allowed limits.
- Return type:
np.ndarray