Skip to content

Commit

Permalink
fix(behavior_velocity): clear values before adding partition (#590)
Browse files Browse the repository at this point in the history
Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
  • Loading branch information
taikitanaka3 authored Mar 28, 2022
1 parent 35fd3e3 commit 21a3037
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 21a3037

Please sign in to comment.