elevation_mapping_cupy icon indicating copy to clipboard operation
elevation_mapping_cupy copied to clipboard

Inquiry of 'script/elevation_mapping_cupy/custom_kernels.py'

Open wjd123ap opened this issue 3 years ago • 1 comments

Hello In custom_kernels.py, A function called 'map_utils' is declared and this fuction have cuda kernel templete. I think there is an error in 'get_idx' function here. device int get_idx(float16 x, float16 y, float16 center_x, float16 center_y) { int idx_x = clamp(get_x_idx(x, center_x), 0, ${width} - 1); int idx_y = clamp(get_y_idx(y, center_y), 0, ${height} - 1); return ${width} * idx_x + idx_y; I think '${width} * idx_x + idx_y;' should be modified into '${width} * idx_y + idx_x;'. What do you think about this?

wjd123ap avatar Aug 25 '22 09:08 wjd123ap

thank you for your comment! I think what you suggests makes more sense. I'll have a look at the code.

mktk1117 avatar Oct 18 '22 12:10 mktk1117