Open flm8620 opened 8 months ago
I believe the fourth entry is set to zero/one so the behaviour is consistent with the SSE/AVX implementations of so3/se3.
But I used a customized point type where I pack the intensity value of point into the fourth entry, instead of using the predefined pcl::PointXYZI type where the intensity is stored separately from the four floats of xyzw
Out of interest: why do you do this?
Because it can save a lot of memory. I only need x,y,z and intensity, four float values. And I never use the fourth entry as the homogenous coordinate.
Indeed this is pretty hacky. But at version 1.8.0, the SIMD optimization is not here yet and the previous code worked for my project. So I consider this as a breaking change.
I know most SIMD instructions operate on 4 float or 4 double numbers, which makes it convenient if we always store x,y,z,w as a pack.
Describe the bug
In release 1.9.0, After the commit
04ae840eb43c78f0e348c35271932c5d6d350759
, "Improve speed of transformPointCloud/WithNormals() functions by SSE2/AVX intrinsic", the behavior of transformPointCloud is changed.In the old code, the x,y,z component are transformed, and the fourth entry (w) is not touched.
But in the above commit, the transformation is unified to a
so3()
/se3()
function. And in those functions, the fourth entry of point is changed to zero or one. Why do we need this change ?Normally if a user use the predefined point type in PCL, there will be no different. But I used a customized point type where I pack the intensity value of point into the fourth entry, instead of using the predefined pcl::PointXYZI type where the intensity is stored separately from the four floats of xyzw.
Context
The behavior of
transformPointcloud()
function changed at release 1.9.0Expected behavior
The fourth entry of point should not be changed.
Current Behavior
The fourth entry of point is changed to zero or one
To Reproduce
Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. A reproducible example helps to provide faster answers. If you load data e.g. from a PCD or PLY file, please provide the file.
Screenshots/Code snippets
code
Possible Solution
Just stick to the old behavior ?