norlab-ulaval / libpointmatcher

An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics
BSD 3-Clause "New" or "Revised" License
1.61k stars 544 forks source link

how to improve icp resolution #504

Open dbdxnuliba opened 1 year ago

dbdxnuliba commented 1 year ago

1)this is the icp result : image image

image

in the fig: white cloud :template cloud pt blue cloud:reading in cloud pt read cloud: after icp processing cloud pt 2) I got the result by : rosrun libpointmatcher pmicp -v --config src/build_depend/libpointmatcher-master/examples/icp_tutorial/icp_tutorial_cfg_body.yaml output/child_body.ply output/raw_in_base_footprint.ply

3) icp_tutorial_cfg_body.yaml is as the follwing:

readingDataPointsFilters:
  - SurfaceNormalDataPointsFilter:
        knn: 10
        keepDensities: 1

  - MaxDensityDataPointsFilter:
       maxDensity: 0.3

referenceDataPointsFilters:
  - SurfaceNormalDataPointsFilter:
      knn: 10

matcher:
  KDTreeMatcher:
    knn: 1
    epsilon: 0.0

outlierFilters:
  - TrimmedDistOutlierFilter:
      ratio: 0.75

errorMinimizer:
  PointToPlaneErrorMinimizer

transformationCheckers:
  - CounterTransformationChecker:
      maxIterationCount: 40
  - DifferentialTransformationChecker:
      minDiffRotErr: 0.001
      minDiffTransErr: 0.01
      smoothLength: 4   

inspector:
  NullInspector
#  VTKFileInspector

logger:
  NullLogger
#  FileLogger

4) the template ply file is as follows: template.zip

the reading data ply file:

reading_data.zip

Question: we can see in the above result figure,the point_cloud was not matched well, how can we improve the matching result. Any helps is pleasured!

pomerlef commented 1 year ago

It is very hard to tell without processing the data on my side and unfortunately, there are too many requests related to a specific application to handle. Just by looking at the screenshots, you should be able to adjust your yaml to get better results. It doesn't look like a tricky dataset.

I suggest you to activate VTKFileInspector and display the links (matched) in paraview along with the reading and reference to analyse the optimization process iteration by iteration. It should be easy to spot the problem.

dbdxnuliba commented 1 year ago

combine ransac with icp can get a better result with open3d