diff --git a/LibCarla/source/carla/road/Map.cpp b/LibCarla/source/carla/road/Map.cpp index 09de412f2..5195ba1d8 100644 --- a/LibCarla/source/carla/road/Map.cpp +++ b/LibCarla/source/carla/road/Map.cpp @@ -343,6 +343,7 @@ namespace road { } else { distance_to_signal = waypoint.s - signal->GetDistance(); } + // check that the signal affects the waypoint bool is_valid = false; for (auto &validity : signal->GetValidities()) { if (waypoint.lane_id >= validity._from_lane && @@ -379,6 +380,7 @@ namespace road { } else { distance_to_signal = waypoint.s - signal->GetDistance(); } + // check that the signal affects the waypoint bool is_valid = false; for (auto &validity : signal->GetValidities()) { if (waypoint.lane_id >= validity._from_lane &&