Revert "Fixed tm loosing control of cars with low fps"
This reverts commit 30fc87a11a
.
This commit is contained in:
parent
3f4eed2239
commit
3bb3b0d3d5
|
@ -128,6 +128,7 @@ void TrafficManagerLocal::Run() {
|
|||
while (run_traffic_manger.load()) {
|
||||
|
||||
bool synchronous_mode = parameters.GetSynchronousMode();
|
||||
bool hybrid_physics_mode = parameters.GetHybridPhysicsMode();
|
||||
|
||||
// Wait for external trigger to initiate cycle in synchronous mode.
|
||||
if (synchronous_mode) {
|
||||
|
@ -137,7 +138,7 @@ void TrafficManagerLocal::Run() {
|
|||
}
|
||||
|
||||
// Skipping velocity update if elapsed time is less than 0.05s in asynchronous, hybrid mode.
|
||||
if (!synchronous_mode) {
|
||||
if (!synchronous_mode && hybrid_physics_mode) {
|
||||
TimePoint current_instance = chr::system_clock::now();
|
||||
chr::duration<float> elapsed_time = current_instance - previous_update_instance;
|
||||
chr::duration<float> time_to_wait = chr::duration<float>(HYBRID_MODE_DT) - elapsed_time;
|
||||
|
|
Loading…
Reference in New Issue