We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 909fd06 commit 5d41cccCopy full SHA for 5d41ccc
1 file changed
cppsrc/core/include/CoverageControl/coverage_system.h
@@ -335,7 +335,7 @@ class CoverageSystem {
335
}
336
auto const &history = robot_positions_history_[robot_id];
337
Point2 const last_pos = history.back();
338
- auto it_end = std::next(history.crbegin(), static_cast<int>(history.size()) - 1);
+ auto it_end = std::next(history.crbegin(), std::min(6, static_cast<int>(history.size()) - 1));
339
bool flag = false;
340
int count = 0;
341
std::for_each(history.crbegin(), it_end,
0 commit comments