Skip to content

Commit

Permalink
fix(avoidance): align execution request condition
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota committed Oct 11, 2023
1 parent 3a8ff49 commit f0b5b40
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;
});

Check warning on line 177 in planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp#L177

Added line #L177 was not covered by tests
}

bool AvoidanceModule::isExecutionReady() const
Expand Down

0 comments on commit f0b5b40

Please sign in to comment.