Simulation Configuration
Last update: 16.07.2025 The Simulation Framework command-line interface (simfwk_cli) serves as the primary entry point for executing a simulation loop using the Simulation Framework.
To align with AVx Architecture 2.0, simfwk_cli now requires a single mandatory simulation configuration file in JSON format. This file is referred to as the "solver setting configuration" throughout this documentation and represents the simulation configuration file.
To perform a quick test with the default solver setting configuration, use the following command:
As shown above, the minimum input required to run the simulation is a single configuration file. This configuration file is defined in JSON format and contains two mandatory fields.
"simulation_parameters"
Mandatory parameters:
input_open_scenario: Specifies the file containing the autonomy simulation scenario.output_directory: Specifies the directory where simulation outputs will be saved.
Optional parameters:
input_driver_input: Defines the file for driver's input data. This file will be used if "dummy_driver_activity" is applied in scheduling configuration. If not given, a default input driver file will be generated under path"/tmp/simulation_framework/default_data/driver_input_default.json"and be applied for simulation.input_user_settings: Provides the file containing user-specific settings for Gt-gen. This becomes a mandatory parameter if "groundtruth_generator_activity" is applied in scheduling configuration. If other customized world simulator is used, this can be ignored.job_id: A string describes the simulation instance
Note: If relative paths are used for files or the output directory, they must be relative to the simfwk_cli binary, located in the bin folder.
"simulation_scheduling"
This section is specifically designed for setting up simulation scheduling. It allows users to define the Activities and configure their behavior during simulations. Below is an example of simulation_scheduling.
For a detailed explanation, please refer to the dedicated chapter: Simulation Scheduling.
Running Simulation Framework using the CLI executable
Different arguments can be passed as options to configure the simulation:
where -s <simulation_configuration.json> is only mandatory argument. If extra inputs file are required by customized autonomy simulation, they can be given through cli. Thus, the file path can be retrieved by using getter API of any activity. More explaination about getter API in activity can be found here.
E.g. if you want a file named "file_foo" with path "path/to/file_foo.txt", following command can be given using cli:
If more files are required by your simulation, the same pattern should be followed:
Batch Mode Usage
If you want to execute the scenario and simply have the output, simfwk_cli can be executed using the command below:
Interactive Usage
Additionally, you can trigger the cli controller mode by option -c true
this enables the user control of simulation framework via cli_controller, instead of just running through of your scenario. With the cli controller , the user can send commands like run , pause , resume , restart , step or kill , to interact with simulation.
Interact with simulation using the cli_controller
When the -c true is applied, a server will be created for listening to the user command. To control the simulation, following command are available:
Supported commands:
Example
- First start your simulation and enable user control:
- Then you will see following message in the console, if the default controller port is not changed:
- Open a new terminal, and try trigger the simulation:
- After a successful execution, the console shows
Cli Controller Executation Status OK!. Then you can see the simulation started.
Note: In this control mode, the simulation process simfwk_cli will not terminate unless you send kill from the cli_controller or manually send ctrl+c.