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 Sep 3, 2024
1 parent 30a9576 commit 5d7305b
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 5d7305b

Please sign in to comment.