Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.

Commit 2269488

Browse files
committed
bug fix about issue #5
1 parent ab20e02 commit 2269488

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

costmap_generator/nodes/costmap_generator/points_to_costmap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ grid_map::Index PointsToCostmap::fetchGridIndexFromPoint(const pcl::PointXYZ& po
7070
double mapped_x = (grid_length_x_ - origin_x_offset - point.x) / grid_resolution_;
7171
double mapped_y = (grid_length_y_ - origin_y_offset - point.y) / grid_resolution_;
7272

73-
int mapped_x_ind = std::ceil(mapped_x);
74-
int mapped_y_ind = std::ceil(mapped_y);
73+
int mapped_x_ind = (int)mapped_x;
74+
int mapped_y_ind = (int)mapped_y;
7575
grid_map::Index index(mapped_x_ind, mapped_y_ind);
7676
return index;
7777
}

0 commit comments

Comments
 (0)