PCL ICP Transformation Accuracy Varying With Initial Translation [closed]

asked 2020-02-13 14:40:01 -0500

rwbot gravatar image

Good day to all,

I've been building a point cloud perception pipeline for my robot in simulation using Point Cloud Library (PCL) and specifically the Iterative Closest Point (ICP) module. I'm having difficulty getting the correct transformation matrix from PCL ICP. I initially thought it was something with my particular point clouds or my code, but the same happens using the tutorial code and point cloud.

For a minimum working example, I copied the Interactive ICP code, compiled and used the monkey.ply file and it works as expected. However, when I change only the translational component of the transformation from the initial value in the tutorial of t = < 0.0, 0.0, 0.4 > to t = < 1.0, 1.0, 0.0 >, the ICP output transformation matrix is off by at least 0.2 in each axis including the untranslated Z axis.

Is there something I'm missing when it comes to the initial translation between the clouds? Is there a minimum translation between clouds for ICP to work?

See the output below using the monkey.ply file, I shortened the output so its more readable:

CODE COPIED FROM interactive_icp.cpp

Applying this rigid transformation to: cloud_in -> cloud_icp
Rotation matrix :
     |  0.924 -0.383  0.000 | 
R =  |  0.383  0.924  0.000 | 
     |  0.000  0.000  1.000 | 
Translation vector :
t = <  0.000,  0.000,  0.400 >

Applied 1 ICP iteration(s) in 11 ms

ICP has converged, score is 0.0256485
ICP has converged, score is +2e-02
~
~
ICP has converged, score is +8e-06-> cloud_in
ICP has converged, score is +3e-12-> cloud_in
ICP transformation 14 : cloud_icp -> cloud_in
ICP transformation 15 : cloud_icp -> cloud_in
Rotation matrix :81 -0.036 |
     |  0.924  0.381 -0.036 |
R =  | -0.381  0.924  0.012 |
     |  0.037  0.003  0.999 |
Translation vector :, -0.402
t = <  0.016, -0.006, -0.402 >

CHANGED TRANSLATION FROM t = < 0.0, 0.0, 0.4 > to t = < 1.0, 1.0, 0.0 >

Rotation matrix :
     |  0.924 -0.383  0.000 | 
R =  |  0.383  0.924  0.000 | 
     |  0.000  0.000  1.000 | 
Translation vector :
t = <  1.000,  1.000,  0.000 >

Applied 1 ICP iteration(s) in 11 ms

ICP has converged, score is 0.157621
ICP has converged, score is +2e-01
~
~
ICP has converged, score is +8e-09-> cloud_in
ICP has converged, score is +5e-12-> cloud_in
ICP transformation 24 : cloud_icp -> cloud_in
ICP transformation 25 : cloud_icp -> cloud_in
Rotation matrix :75 -0.025 |
     |  0.927  0.375 -0.025 |
R =  | -0.375  0.927  0.029 |
     |  0.034 -0.017  0.999 |
Translation vector :,  0.265
t = < -1.391, -0.471,  0.265 >

Any help at all would be appreciated!

Mahalo,

Chris Rowe

edit retag flag offensive reopen merge delete

Closed for the following reason PCL Question: The PCL community prefers to answer questions at http://www.pcl-users.org/ by gvdhoorn
close date 2020-02-14 01:56:36.569731

Comments

Even though we are definitely users of PCL in the ROS community, we're not the maintainers, nor is this the support forum for it.

As your question is purely a PCL one, I suggest you post it on a more suitable forum.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-14 01:57:48 -0500 )edit