Skip to content

Commit

Permalink
fix(behavior_velocity): clear values before adding partition (tier4#590)
Browse files Browse the repository at this point in the history
Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
  • Loading branch information
taikitanaka3 authored and boyali committed Oct 19, 2022
1 parent 64a7d19 commit edfb248
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ void extractClosePartition(
const geometry_msgs::msg::Point position, const BasicPolygons2d & all_partitions,
BasicPolygons2d & close_partition, const double distance_thresh)
{
close_partition.clear();
for (const auto & p : all_partitions) {
if (boost::geometry::distance(Point2d(position.x, position.y), p) < distance_thresh) {
close_partition.emplace_back(p);
Expand Down

0 comments on commit edfb248

Please sign in to comment.