[BHM] Pedestrians ignore thin obstacles
Behavioral Heuristics Model: Pedestrian ignores thin obstacles
Summary
A pedestrian's evasion strategy (after an agent-agent collision) can yield a 'nextPosition' that lies behind a thin obstacle, e.g., topography bounds.
What is the current bug behavior?
The following behavior was observed for the pedestrian with id 12 in the scenario Corridor-BHM-Defaults-WithFloorField-CounterflowCognitionModel (cd4f5cc8), but this may also occur in other scenarios with dense crowds that are guided by thin (roughly 0.5m) obstacles:
The agent seems to teleport outside the topography after an agent-agent collision test followed by an evasion move. One of the two calculated evasion spots lies outside of the topography and gets chosen as the destination. This behavior probably occurs because NavigationEvation.getNavigationPosition() yields an evasion strategy that does not collide with the bounding box (obstacle). Since the evasion step or the step length > bounding box width, the next position is outside the topography. Once outside the topography, the agent does not get back easily. At t=31.737..., the agent re-enters the topography because the evasion strategy yields a next position that does not collide with the bounding box VPoint(x=4.443..., y=0.502...).
What is the expected correct behavior?
The evasion strategy should not yield destinations behind obstacles (and/or outside the topography).
Steps to reproduce
- Checkout 340-target-waiting/cd4f5cc8
- Run the BHM test scenario
Corridor-BHM-Defaults-WithFloorField-CounterflowCognitionModel.scenario
Related
Issue #266 (closed) may be related, but here we even employ a floor field.
Starting point
A quick fix could be:
- to increase the bounding box width such that the BHM evasion strategy can never skip the bounding box.
- to decrease the stepLength of the evasion strategy (this is probably not a good idea because this affects the BHM in general)
A better solution could be:
- Adapt evasion strategy such that the line segment from the current position to the next position does not collide with obstacles (and pedestrians, unless cooperative behavior is expected).
- If the pedestrians respect relatively 'thin' walls, the second problem of pedestrians outside the topography bounds is solved automatically. If we want to treat this separately, a better solution prohibits any position outside the topography, i.e. introduce a check if the next position is outside the bounds.