Skip to content

Commit e5c2e71

Browse files
authored
fix invert logic (#2772)
1 parent b201d05 commit e5c2e71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎nav2_costmap_2d/src/costmap_layer.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void CostmapLayer::clearArea(int start_x, int start_y, int end_x, int end_y, boo
6969
bool xrange = x > start_x && x < end_x;
7070

7171
for (int y = 0; y < static_cast<int>(getSizeInCellsY()); y++) {
72-
if ((xrange && y > start_y && y < end_y) != invert) {
72+
if ((xrange && y > start_y && y < end_y) == invert) {
7373
continue;
7474
}
7575
int index = getIndex(x, y);

0 commit comments

Comments
 (0)