16.2.0
Abstract
This pull request enhances pedestrian obstacle detection by adding a maximum detection range, so that only pedestrians within a specified distance from the ego vehicle are considered when evaluating lane obstacles.
Background
The previous implementation only checked whether a pedestrian occupied a lane and was ahead, causing the vehicle to react even to distant pedestrians. This could lead to unnecessary stops or unnatural behavior. Introducing a distance threshold ensures more realistic and efficient obstacle detection.
Details
-
Extended the signature of the
hasObstacleInPedestrianLanes
lambda to accept a new parameter,max_detect_length
(maximum detection distance). -
Calculated the Euclidean distance between the ego vehicle and each pedestrian; only if
norm < max_detect_length
are the pedestrian’s lane IDs collected. -
Updated the call within
FollowLaneAction::detectObstacleInLane
from:hasObstacleInPedestrianLanes(pedestrian_lanes)
to:
hasObstacleInPedestrianLanes(pedestrian_lanes, 10)
where 10.0 m is the default detection range.
Before
before.mov
After
after.mov
References
Destructive Changes
N/A
Known Limitations
N/A