autonomy/simulation/activity_factory/activity_factory.h (line 39)
Factory class for creating activities for autonomy simulation.
The ActivityFactory implements the IActivityFactory interface to provide mechanisms for creating and managing simulation activities. It supports creating both generic and FMU-based activities, allowing for flexible integration into various simulation workflows.
The class also manages the base cycle time for the simulation, which can be retrieved or modified as needed.
See also: core::lifecycle::IActivityFactory, core::lifecycle::IActivity, core::SimulationParameters
Inherits from:
Members
- ActivityFactory
- Create
- CreateFmuActivity
- GetSimulationBaseCycleTime
- IfAvxSensorSettingsDefined
- SetSimulationBaseCycleTime
- ~IActivityFactory
Public functions
Function ActivityFactory
ActivityFactory instance.
Initializes the factory with the simulation parameters and an optional base cycle time.
Parameters:
- sim_params: The simulation parameters used to configure activities created by this factory.
- base_cycle_time: The base cycle time for the simulation (default: 50 milliseconds).
- const core::SimulationParameters & sim_params
- const time::milliseconds & base_cycle_time = time::milliseconds{50}
Function Create
- activity_name: The name of the activity to create.
- type: The type of scheduler client to associate with the activity (default:
core::scheduling::SchedulerClientType::kDUMMY).
core::lifecycle::IActivity instance.
Exceptions:
- std::runtime_error: if the activity creation fails.
- const std::string & activity_name
- const core::scheduling::SchedulerClientType type = core::scheduling::SchedulerClientType::kDUMMY
Function CreateFmuActivity
- activity_name: The name of the FMU activity to create.
- fmu_config: The configuration details for the FMU.
- type: The type of scheduler client to associate with the activity (default:
core::scheduling::SchedulerClientType::kDUMMY).
IActivity instance.
Exceptions:
- std::runtime_error: if the FMU activity creation fails.
- const std::string & activity_name
- const core::lifecycle::FmuConfig & fmu_config
- const scheduling::SchedulerClientType type = scheduling::SchedulerClientType::kDUMMY
Function GetSimulationBaseCycleTime
Function SetSimulationBaseCycleTime
- time: The new base cycle time in milliseconds.
- const time::milliseconds & time