Skip to content

Commit 5d41ccc

Browse files
author
Saurav Agarwal
committed
Update CheckCollision
1 parent 909fd06 commit 5d41ccc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cppsrc/core/include/CoverageControl/coverage_system.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ class CoverageSystem {
335335
}
336336
auto const &history = robot_positions_history_[robot_id];
337337
Point2 const last_pos = history.back();
338-
auto it_end = std::next(history.crbegin(), static_cast<int>(history.size()) - 1);
338+
auto it_end = std::next(history.crbegin(), std::min(6, static_cast<int>(history.size()) - 1));
339339
bool flag = false;
340340
int count = 0;
341341
std::for_each(history.crbegin(), it_end,

0 commit comments

Comments
 (0)