Skip to content

Commit

Permalink
fix(static_obstacle_avoidance): target object sorting (autowarefounda…
Browse files Browse the repository at this point in the history
…tion#8545)

* fix compensateLostTargetObjects function

Signed-off-by: Go Sakayori <[email protected]>

* remove empty case

Signed-off-by: Go Sakayori <[email protected]>

---------

Signed-off-by: Go Sakayori <[email protected]>
  • Loading branch information
go-sakayori committed Aug 28, 2024
1 parent 30a9576 commit 83aa6bf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1674,8 +1674,8 @@ void compensateLostTargetObjects(
const std::shared_ptr<AvoidanceParameters> & parameters)
{
const auto include = [](const auto & objects, const auto & search_id) {
return std::all_of(objects.begin(), objects.end(), [&search_id](const auto & o) {
return o.object.object_id != search_id;
return std::any_of(objects.begin(), objects.end(), [&search_id](const auto & o) {
return o.object.object_id == search_id;
});
};

Expand Down

0 comments on commit 83aa6bf

Please sign in to comment.