Skip to content

Commit

Permalink
Revert "Fixed tm loosing control of cars with low fps"
Browse files Browse the repository at this point in the history
This reverts commit 30fc87a.
  • Loading branch information
Axel1092 authored and bernatx committed Dec 22, 2020
1 parent 3f4eed2 commit 3bb3b0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion LibCarla/source/carla/trafficmanager/TrafficManagerLocal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit 3bb3b0d

Please # to comment.