Open namdre opened 6 years ago
It would be nice set the viable distance for all lanes in the bestLanes data structure just as it is done when the ego vehicle needs to stop. However, the relevant information is not easily retrievable at that point
An alternative solution which may be more feasible would be to solve both issues separately
1) only updating the bestLanes when being the first vehicle at an intersection and keepClear-behavior prevents continuation and there is an alternative connection
2) recognize stopped leader and modify usableDist dynamically (taking into account whether neighLeader is stopped as well) (implemented)
there two cases where this plays a role: 1) when standing in front of a junction and deciding among different target lanes on the next edge 2)
when being blocked by a stopped leader on a multi-lane road (#3103)(fixed)Currently, the relevant data-structure is only updated when moving to a new edge (updateBestLanes()). Instead this should also happen when the stopped status of the leader vehicle changes.
Neighboring lanes must also be checked for stopped vehicles to avoid oscillation.
related: #7157