Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions nav2_costmap_2d/test/regression/costmap_bresenham_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class CostmapAction
ASSERT_TRUE(off < size_);
costmap_[off] = mark_val_;
}

inline unsigned int get(unsigned int off)
{
return costmap_[off];
Expand Down Expand Up @@ -107,29 +108,25 @@ TEST(costmap_2d, bresenham2DBoundariesCheck)

// Running on (x, 0) edge
y1 = 0;
for (unsigned int i = 0; i < sz_x; i++) {
x1 = i;
for (x1 = 0; x1 < sz_x; x1++) {
ct.raytraceLine(ca, x0, y0, x1, y1, max_length, min_length);
}

// Running on (x, sz_y) edge
y1 = sz_y - 1;
for (unsigned int i = 0; i < sz_x; i++) {
x1 = i;
for (x1 = 0; x1 < sz_x; x1++) {
ct.raytraceLine(ca, x0, y0, x1, y1, max_length, min_length);
}

// Running on (0, y) edge
x1 = 0;
for (unsigned int j = 0; j < sz_y; j++) {
y1 = j;
for (y1 = 0; y1 < sz_y; y1++) {
ct.raytraceLine(ca, x0, y0, x1, y1, max_length, min_length);
}

// Running on (sz_x, y) edge
x1 = sz_x;
for (unsigned int j = 0; j < sz_y; j++) {
y1 = j;
x1 = sz_x - 1;
for (y1 = 0; y1 < sz_y; y1++) {
ct.raytraceLine(ca, x0, y0, x1, y1, max_length, min_length);
}
}
Expand Down