Enabling Time Synchronization with Hardware-in-the-Loop Integration on a Data-Driven Middleware for Autonomous Vehicles Simulations - Pfleger Júnior, Ilton; Passig Horstmann, Leonardo; Fröhlich, Antônio A. (Anais do Workshop Latinoamericano de Dependabilidade e Segurança em Sistemas Veiculares (SSV); 2024: Anais do I Workshop Latinoamericano de Dependabilidade e Segurança em Sistemas VeicularesDO - 10.5753/ssv.2024.32620, 2024)
Building reliable simulation scenarios and digital twins is a keystone for the development process of critical systems such as autonomous vehicles. In this sense, the ability to integrate simulators with software-, hardware-, and even vehicles-in-the-loop is fundamental for increasing the reliability of the simulations. Nevertheless, guaranteeing time synchronization amongst the different components of the system is a challenging task that must consider the different capabilities regarding timing in each device. In this work, we build upon a data-driven middleware to provide transparent hardware-in-the-loop integration to an autonomous vehicle simulation scenario and extend the original implementation to account for time synchronization by taking advantage of a high-precision time source provided by the hardware components. We operate the middleware in Linux over a NVIDIA Jetson Orin AGX, measuring an average deviation of 6ms when compared to the high-precision hardware-in-the-loop timestamps, with the deviation exceeding the established safe margin over 69% of the observations. The attained results corroborate the need for time synchronization on digital twins, especially when considering the strict timing requirements of critical systems such as autonomous vehicles.