A TrueSim run starts by initializing the Carla environment with a given map and scenario as defined by the user. It then spawns actors within the scene that perform actions related to the scenario.
TrueSim consists of four primary components:
- Scenario Instances
The Server component is responsible for creating and maintaining connections to the Carla environment, as well as managing any initialization of the world environment. It has the capability of launching Carla on its own if needed.
Given that PreAct simulations have specific frame-rate requirements for the sensor models, the system typically uses Carla’s “synchronous mode”, which allows the simulation to run as slow or fast as needed to run at a given rendering speed, generating timestamps that are faster/slower than the real system clock.
Scenarios define the parameters of a particular scene and the environment within the simulator. They establish the map that is used, the rendering frame-rate, the timelines for spawning vehicles, and all other information related to the complete data run.
A scenario instance is used to load up a base scenario, apply an optional set of parameters to the original scenario, and run the scenario with those modifications. All scenario instances are responsible for storing their data in the output directory with a unique identifier for the instance, and will generate a runnable scenario file for its parameters, if they exist. The stable output files from a scenario instance allow us to quickly re-run a specific set of parameters to examine the behavior. For example, a user could set up a procedure that runs multiple scenario instances with varying, say, just the driving behaviors of selected actors. This could be used in a Monte Carla approach to developing crash statistics and timelines associated with how well a PreAct precrash protects people given different kinds of crash safety actuators (electric seat belts, prelaunch airbags, etc.).
An actor is any object in the scene that can move or be manipulated by the scenario. In a precrash case, these are mostly vehicles that are spawned, modified, and manipulated to meet the simulation requirements. Many types of actors have been created to include pedestrians, bicyclists, robots of various sorts and of course, automobiles and trucks.
Each actor in a scene can have one or more sensors attached to it. The sensors are responsible for spawning themselves in the correct location relative to the parent actor, handling data as it streams in from the engine, and recording any output data into a data file.
TrueSim is a powerful design tool that can predict likely system performance across scenarios and environments. Since PreAct constantly updates it as more real-world data become available, it’s predictive capabilities improve with each software update.