69 template <
typename LayerT>
72 return !closePrimitives.empty();
78 template <
typename LayerT>
86 template <
typename MatchVectorT>
89 MatchVectorT compliantMatches = matches;
90 compliantMatches.erase(
91 std::remove_if(compliantMatches.begin(), compliantMatches.end(),
92 [&trafficRulesPtr](
auto& match) {
return !trafficRulesPtr->canPass(match.lanelet); }),
93 compliantMatches.end());
94 return compliantMatches;
std::vector< LaneletMatchProbabilistic > getProbabilisticMatches(LaneletMap &map, const ObjectWithCovariance2d &obj, double maxDist)
get probabilistic lanelet matches of an object with a maximum deterministic euler distance of maxDist...
MatchVectorT removeNonRuleCompliantMatches(const MatchVectorT &matches, const lanelet::traffic_rules::TrafficRulesPtr &trafficRulesPtr)
Remove non traffic rule compliant probabilistic lanelet matches.
std::vector< LaneletMatch > getDeterministicMatches(LaneletMap &map, const Object2d &obj, double maxDist)
get deterministic lanelet matches of an object with a maximum distance of maxDist, sorted ascending by distance
auto findWithin(LayerT &map, const Object2d &obj, double maxDist) -> std::vector< std::pair< double, traits::LayerPrimitiveType< LayerT >>>
Find all primitives as close as or closer than maxDist to an object.
bool isCloseTo(const LayerT &map, const Object2d &obj, double maxDist)
Determine whether an object is within a maximum distance to any primitive of the layer.
bool isWithin(const LayerT &map, const Object2d &obj)
Determine whether an object is (at least partially) within any primitive of the layer.
std::shared_ptr< TrafficRules > TrafficRulesPtr