Bresenham line drawing misses grid squares that the ray passes through. The supercover algorithm gets all the squares and it is the preferred algorithm to use when we search for possible collisions .
Great description in Realtime Collision Detection "7.4.2 Uniform Grid Intersection Test".
In this PR, we are replacing getLineCells (Bresenham) by supercover, which is a more conservative approach.
Note that we needed to change some tests because the resolution of the map is 1.0 and the robot size is 1.0 x 1.0, thus diagonals should cover all cells around with new supercover.
Description
As discussed here: https://github.com/magazino/move_base_flex/pull/317#discussion_r1228850967
Bresenham line drawing misses grid squares that the ray passes through. The
supercover
algorithm gets all the squares and it is the preferred algorithm to use when we search for possible collisions . Great description in Realtime Collision Detection "7.4.2 Uniform Grid Intersection Test".In this PR, we are replacing
getLineCells
(Bresenham) bysupercover
, which is a more conservative approach.Note that we needed to change some tests because the resolution of the map is 1.0 and the robot size is 1.0 x 1.0, thus diagonals should cover all cells around with new
supercover
.