PointCloudLibrary / PointCloudLibrary/pcl
[registration] icp with TransformationEstimationPointToPlane can not give right result.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
If icp uses TransformationEstimationPointToPlane as the transformation estimation method, meaningless results will be obtained
I am testing to compare the performance of different ICP methods.
Currently, PCL has an ICPWithNormals type, which is based on the PointToPlane principle of LLS. There are also two other transformation estimation methods based on PointToPlane that are based on LM, but I tried these two methods and could not get meaningful results , only an identity matrix.
My code:
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/registration/icp.h>
#include <pcl/registration/transformation_estimation_point_to_plane.h>
#include <iostream>
int main(int argc, char **argv) {
pcl::PointCloud<pcl::PointNormal>::Ptr source_cloud(
new pcl::PointCloud<pcl::PointNormal>);
pcl::PointCloud<pcl::PointNormal>::Ptr target_cloud(
new pcl::PointCloud<pcl::PointNormal>);
pcl::io::loadPCDFile<pcl::PointNormal>("D:\\program_on_git\\own\\test\\pcl_test\\source\\normalcloud1.pcd", *source_cloud);
pcl::io::loadPCDFile<pcl::PointNormal>("D:\\program_on_git\\own\\test\\pcl_test\\source\\normalcloud2.pcd", *target_cloud) ;
pcl::IterativeClosestPoint<pcl::PointNormal, pcl::PointNormal> icp;
icp.setInputSource(source_cloud);
icp.setInputTarget(target_cloud);
icp.setTransformationEstimation(std::make_shared<pcl::registration::TransformationEstimationPointToPlane<pcl::PointNormal, pcl::PointNormal>>());
std::cout << "transformation epsilon: " << icp.getTransformationEpsilon()
<< std::endl;
std::cout << "euclidean fitness epsilon: " << icp.getEuclideanFitnessEpsilon()
<< std::endl;
pcl::PointCloud<pcl::PointNormal> Final;
icp.align(Final);
std::cout << "has converged:" << icp.hasConverged() << std::endl;
std::cout << "score: " << icp.getFitnessScore() << std::endl;
std::cout << icp.getFinalTransformation() << std::endl;
return 0;
}
my file: https://ufile.io/f/vpq0a
result:
transformation epsilon: 0
euclidean fitness epsilon: -1.79769e+308
has converged:1
score: 24.1359
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Your Environment (please complete the following information):
OS: Windows 10
Compiler: MSVC 2022
PCL Version 1.14.1.99(https://github.com/PointCloudLibrary/pcl/commit/2d5101a59b75551f5300b78586b5521d006aa5cf)
GPU:1060 6GB
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the result using the code in the issue, the PCD files linked in the report, and PCL 1.14.1.99 on Windows. Start with pcl/registration/icp.h and pcl/registration/transformation_estimation_point_to_plane.h, then compare the point-to-plane methods and their convergence output. Done means identifying why the method returns the identity matrix and documenting or correcting the behavior with a reproducible validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100