autoware_ai_perception icon indicating copy to clipboard operation
autoware_ai_perception copied to clipboard

what does mean mult = (points_num - 1.0) / points_num in line 408 in the VoxelGrid.cu of ndt_gpu?

Open nonlinear1 opened this issue 3 years ago • 3 comments

I am studying the ndt_gpu of autoware_ai_perception. I found a mult is multiplied to the covariace matrix in line 408 in VoxelGrid.cu of ndt_gpu. the snip of sources code which includes the mult is from line 408 to line 411 is as follow:

double mult = (points_num - 1.0) / points_num;

cov(0, 0) = ((cov(0, 0) - 2.0 * p0 * c0) / points_num + c0 * c0) * mult; cov(0, 1) = ((cov(0, 1) - 2.0 * p0 * c1) / points_num + c0 * c1) * mult;

Could someone know this mult means? Thank you very much!

nonlinear1 avatar Jun 22 '22 05:06 nonlinear1

@anhnv3991 Could you please answer this question?

YamatoAndo avatar Jun 22 '22 05:06 YamatoAndo

@nonlinear1 I implemented this CUDA code based on the very old version of PCL 1.7, so this must be a bug then. It should be points_num / (points_num - 1.0). Thanks for reporting.

anhnv3991 avatar Jun 22 '22 08:06 anhnv3991

Thank you very much!!!

nonlinear1 avatar Jun 22 '22 08:06 nonlinear1