kctess5 / range_libc

A collection of optimized ray cast methods for 2D occupancy grids including the CDDT algorithm. Written in C++ and CUDA with Python wrappers.
Other
88 stars 51 forks source link

(Question/Bug) Why we rotate obstacle only at the origin of map when performing raycasting? #14

Closed qlibp closed 1 year ago

qlibp commented 1 year ago

The method CDDT used to compute range is not consistent with the definition of ray casting as we only store LUT with rotation on obstacle around the origin of map.

Isn't that the exact method should be rotating obstacles around each grid cell?

qlibp commented 1 year ago

The method CDDT used to compute range is not consistent with the definition of ray casting as we only store LUT with rotation on obstacle around the origin of map.

Isn't that the exact method should be rotating obstacles around each grid cell?

Nop, the code should work. We could merely rotate the map with respect to its origin and when we query, we actually transform the robot/sensor heading to the correct index, so that the robot/sensor heading is aligned with the rotated x-axis