-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Overview
The current implementation of the simulation clock in clock.cpp relies on an operating system thread for time progression ([see line 210](
ProjectAirSim/core_sim/src/clock.cpp
Line 210 in 00c7afb
| th_ = std::thread(&ScheduledExecutor::ExecutorLoop, this); |
Enhancement Details
We propose refactoring the clock mechanism to eliminate the dependency on a separate OS-level thread. Instead, the simulation clock should be driven by Unreal Engine's main tick or another deterministic timing source provided by the engine. This would:
- Ensure tighter integration and synchronization with Unreal Engine's frame updates.
- Improve determinism and reproducibility of simulation results.
- Reduce timing drift during prolonged simulation runs.
A similar solution exists in CARLA, which could serve as a reference or be adapted for ProjectAirSim.
Type of Request
- Enhancement
- New Feature
- Other (please specify)
Justification
Tightly synchronizing the simulation clock with Unreal Engine is essential for scenarios involving Unreal Engine assets that depend on UE's clock. It also enhances determinism in simulations that rely on UE-based features such as collision detection and image acquisition.
We welcome discussion on implementation strategies and are open to contributing to this enhancement.