Configuration helpers to control Simulator and IntegratorBase settings.
Functions | |
template<typename T > | |
IntegratorBase< T > & | ResetIntegratorFromFlags (Simulator< T > *simulator, const std::string &scheme, const T &max_step_size) |
Resets the integrator used to advanced the continuous time dynamics of the system associated with simulator according to the given arguments. More... | |
const std::vector< std::string > & | GetIntegrationSchemes () |
Returns the allowed string values for the scheme parameter in ResetIntegratorFromFlags() and SimulatorConfig::integration_scheme. More... | |
template<typename T > | |
void | ApplySimulatorConfig (const SimulatorConfig &config, drake::systems::Simulator< T > *simulator) |
Modifies the simulator based on the given config . More... | |
template<typename T > | |
SimulatorConfig | ExtractSimulatorConfig (const drake::systems::Simulator< T > &simulator) |
Reports the simulator's current configuration, including the configuration of the integrator. More... | |
void drake::systems::ApplySimulatorConfig | ( | const SimulatorConfig & | config, |
drake::systems::Simulator< T > * | simulator | ||
) |
Modifies the simulator
based on the given config
.
(Always replaces the Integrator with a new one; be careful not to keep old references around.)
[in] | config | Configuration to be used. Contains values for both the integrator and the simulator. |
[in,out] | simulator | On input, a valid pointer to a Simulator. On output the integrator for simulator is reset according to the given config . |
T | The scalar type, which must be one of the default nonsymbolic scalars. |
SimulatorConfig drake::systems::ExtractSimulatorConfig | ( | const drake::systems::Simulator< T > & | simulator | ) |
Reports the simulator's current configuration, including the configuration of the integrator.
[in] | simulator | The Simulator to extract the configuration from. |
T | The scalar type, which must be one of the default nonsymbolic scalars. |
const std::vector<std::string>& drake::systems::GetIntegrationSchemes | ( | ) |
Returns the allowed string values for the scheme
parameter in ResetIntegratorFromFlags() and SimulatorConfig::integration_scheme.
IntegratorBase<T>& drake::systems::ResetIntegratorFromFlags | ( | Simulator< T > * | simulator, |
const std::string & | scheme, | ||
const T & | max_step_size | ||
) |
Resets the integrator used to advanced the continuous time dynamics of the system associated with simulator
according to the given arguments.
[in,out] | simulator | On input, a valid pointer to a Simulator. On output the integrator for simulator is reset according to the given arguments. |
[in] | scheme | Integration scheme to be used, e.g., "runge_kutta2". See GetIntegrationSchemes() for a the list of valid options. |
[in] | max_step_size | The IntegratorBase::set_maximum_step_size() value. |
simulator
. T | The scalar type, which must be one of the default nonsymbolic scalars. |