Hello, I wanted to ask how I do rotate a cloud around it's origin. Before I used the sensor_orientation attribute but it proved troublesome when computing and displaying normals, keypoints and the rest.
So now I just attach orientation sensor data to point cloud at the start by rotating them. But it seems to rotate around an origin that is far away from the point cloud and gives me this affect which impacts registration negatively:
(as you can see the green point cloud rotates around an origin that is far away from it)
The code i used as a test:
//Load point clouds here
You are doing exactly what you say, you are rotating the point cloud around it's origin (the coordinate system displayed on your image is the origin of the point cloud).
But I guess that's not what you want to do, you probably want to rotate the point cloud around it's centroid!
My solution to do that is to apply a transformation to the centroid and get the vector between the non-rotated centroid and the rotated centroid, by withdrawing that translation you rotate around the centroid.