Introduction
Testing autonomous vehicle software in real-world scenarios presents significant safety and financial challenges. While simulation offers a viable alternative, existing tools often force a compromise between high-level traffic simulation (e.g., SUMO) and low-level physical fidelity (e.g., Gazebo). High-level simulators lack the granular detail required for vehicle dynamics, while low-level simulators often struggle with large-scale environmental realism and lack native support for Component & Connector (C&C) modeling patterns prevalent in automotive engineering. This paper introduces MontiSim, a simulation framework designed to bridge this "missing middle" by combining large-scale environmental realism with fine-grained vehicle physics and automated regression testing.
Methods
MontiSim is built upon the MontiCAR modeling language, emphasizing a modular architecture that decouples vehicle logic into sensors, actuators, and controllers.
As shown in the framework architecture, MontiSim integrates various inputs—including 3D models, C&C models, and environment data—into a central simulation engine. This engine facilitates the interaction between simulated sensors and actuators, often developed by different domain experts. To ensure high performance, MontiCAR models are translated into multi-threaded C++ code and integrated into the Java-based simulator via the Java Native Interface (JNI).
Modular C&C Architecture
A core feature of MontiSim is its native support for C&C models. This allows for high flexibility; for instance, a "perfect" sensor can be easily swapped for a "noisy" one to test controller robustness without rebuilding the entire simulation.
The car model definition (e.g., AC-SE001) specifies physical dimensions, weight, and the associated controller and sensor suite. This modularity allows developers to focus on specific components while the framework handles the integration and execution order.
Environmental and Testing Integration
MontiSim imports real-world road networks directly from OpenStreetMap (OSM), providing a realistic backdrop for testing. The framework also includes a suite for automated regression testing, supporting both unit tests (via Stream Test Models) and integration tests that measure vehicle deviation from optimal paths in a full 3D environment.
Key Insights and Results
MontiSim demonstrates that high-fidelity physics and large-scale traffic simulation are not mutually exclusive. The framework can simulate up to 50 vehicles in 2D or 5 vehicles in high-detail 3D simultaneously. A comparative analysis against 13 popular simulators revealed that MontiSim was the only framework to satisfy all seven key requirements, including native C&C execution and OSM integration.
Quantitatively, the framework enables precise measurement of sub-degree steering deviations caused by sensor noise. It also features automatic SI unit handling during code generation, which prevents common integration errors by ensuring unit compatibility between connected components (e.g., automatically converting km/h to m/s).
Limitations and Future Work
Despite its strengths, MontiSim faces challenges regarding the "third dimension" in OSM data, which often lacks elevation information. Current environmental modeling for weather effects like rain is primarily visual and does not yet account for physical impacts on sensor performance. Additionally, the browser-based 3D visualization is currently limited to a small number of vehicles, indicating a need for more optimized rendering pipelines to support massive city-scale simulations.
Summary updated