Skip to content

Commit

Permalink
fix(map_based_prediction): fix unintentional accumulation of lanelets (
Browse files Browse the repository at this point in the history
…#9950)

add clear before insert

Signed-off-by: a-maumau <[email protected]>
  • Loading branch information
a-maumau authored Jan 17, 2025
1 parent 08dd641 commit 7bc6a4e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ void PredictorVru::setLaneletMap(std::shared_ptr<lanelet::LaneletMap> lanelet_ma
const auto all_lanelets = lanelet::utils::query::laneletLayer(lanelet_map_ptr_);
const auto crosswalks = lanelet::utils::query::crosswalkLanelets(all_lanelets);
const auto walkways = lanelet::utils::query::walkwayLanelets(all_lanelets);
crosswalks_.clear();
crosswalks_.insert(crosswalks_.end(), crosswalks.begin(), crosswalks.end());
crosswalks_.insert(crosswalks_.end(), walkways.begin(), walkways.end());

Expand Down

0 comments on commit 7bc6a4e

Please sign in to comment.