Skip to content

Commit

Permalink
fix(avoidance): align execution request condition (#5266)
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored Oct 12, 2023
1 parent 10bb43c commit 021d540
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ bool AvoidanceModule::isExecutionRequested() const
return false;
}

return !avoid_data_.target_objects.empty();
return std::any_of(
avoid_data_.target_objects.begin(), avoid_data_.target_objects.end(), [](const auto & o) {
return o.is_avoidable || o.reason == AvoidanceDebugFactor::TOO_LARGE_JERK;
});
}

bool AvoidanceModule::isExecutionReady() const
Expand Down

0 comments on commit 021d540

Please sign in to comment.