Connecting SUMO with Unreal Engine 4 (UE4) through Simulink
In recent years, co-simulation became an exciting area in the industry as well as in the industry. The aim of co-simulation is creating synergies between different simulation software. In the following example the traffic simulator SUMO is connected to a visualization module built in Unreal Engine 4, through Simulink.
The Vehicle Dynamics Blockset of Matlab Simulink provides interface blocks to connect with scenes, created with UE4. SUMO cannot directly connect to Simulink, but it can be interfaced with Matlab through TraCI. To circumvent this limitation of Simulink, a set of embedded Matlab function blocks are created. These blocks initialize a predefined traffic simulation network and communicate with it. Relevant states (vehicle ID, position, velocity, and heading) are continuously read from SUMO and output to Simulink. The states of each individual vehicle are passed to 3D vehicle simulation blocks that can be directly visualized in UE4.
The simulation example is based on the models SmartCity module of the ZalaZone automotive proving ground. The accurate models of the test track are available in different file formats: https://github.com/BMEAutomatedDrive/ZalaZONE-automotive-proving-ground-virtual-simulation-models.