collect_trajectory_data_env#
Class method.
- do_dpc.environments.rocket_env.rocket_data_collection.collect_trajectory_data_env(env, m, p, n_samples=800)[source]#
Collects trajectory data from the given environment.
- Parameters:
env (
RocketEnvFacade) – The environment object with get_output() and done attributes.m (int) – Number of system inputs.
p (int) – Number of system outputs.
n_samples (int, optional) – Number of samples to collect. Defaults to N_SAMPLES.
- Returns:
The collected trajectory data, or None if data collection fails.
- Return type:
- Raises:
AttributeError – If env does not have the required attributes or methods.
ValueError – If n_samples is not a positive integer.
RuntimeError – If the environment is already done before collecting data.