I am trying to convert point clouds sampled and stored in XYZij data (which, according to them, store data in camera space) into a global coordinate system so that they can be combined. The frame parade that I use for the Tango listener has COORDINATE_FRAME_START_OF_SERVICEboth a base frame and COORDINATE_FRAME_DEVICEa target frame.
COORDINATE_FRAME_START_OF_SERVICE
COORDINATE_FRAME_DEVICE
So I implement the conversion:
Remove the quaternion of rotation from TangoPoseData.getRotationAsFloats()as q_rand the position of the point from XYZijas p.
TangoPoseData.getRotationAsFloats()
q_r
XYZij
p
Apply the following rotation, where q_multis the helper method calculating the Hamilton product of two quaternions (I tested this method against another math library):
q_mult
p_transformed = q_mult(q_mult(q_r, p), q_r_conjugated);
Add the translation received from TangoPoseData.getTranslationAsFloats()to p_transformed.
TangoPoseData.getTranslationAsFloats()
p_transformed
But in the end, the points in p_transformedalways end up in a mess of partially overlapped point clouds instead of an aligned, united point cloud.
Am I missing something? Is there a conceptual error in the transformation?
Thanks in advance.
Ken and Vincenzo, thanks for the answer.
- , ICP CloudCompare , . ~ 30 . , . CloudCompare .
, , , , ( ), , , , OpenGL, , . .
, . , , Tango .
, , .
"" . , .. X j k, , .. X y z w. Tango API TangoPoseData:: x y z w. x j k. , , .
? , , XYZij? "timestamp" XYZij.
, . XYZij.
roomplan.de , pcl . pointclouds (ServiceOf Service Frame). : https://github.com/roomplan/tango-examples-java/tree/master/PointCloudJava_with_PCL funtion jni/jni_part.cpp: Java_com_tangoproject_experiments_javapointcloud_PointCloudActivity_saveRotatedPointCloud
, , pcl . , , -.
Examples of pictures can be viewed in the demo application in the game store. (Cant them still here) https://play.google.com/store/apps/details?id=com.tangoproject.experiments.javapointcloud&hl=en