16.3.3
Description
This PR implements optimization of calculating actual distance in ActionNode::getDistanceToTargetEntity only for nearest NPCs.
This PR is blocked by #1567 and base merge will be changed after blocking PR is merged.
Abstract
ActionNode::getDistanceToTargetEntity should calculate boundingBoxLaneLongitudinalDistance only for nearest NPC. This is done based on EuclideanDistancesMap containg euclidean distance between mapPose of NPCs.
Details
- Euclidean distance between all NPCs is calculated only once for each update in EntityManager.
- sharred_ptr of this map is passed to behavior_tree and used ActionNode::getDistanceToTargetEntity.
- Nearest NPCs are NPCs in distance of maximum value from NPC spline length and NPC stop distance.
Destructive Changes
--
Known Limitations
--