[registration] icp with TransformationEstimationPointToPlane can not give right result.

未关闭
#6,060 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp

调研方向

使用 issue 中的代码、报告中链接的 PCD 文件以及 Windows 上的 PCL 1.14.1.99 重现该结果。先从 pcl/registration/icp.h 和 pcl/registration/transformation_estimation_point_to_plane.h 开始,然后比较 point-to-plane 方法及其收敛输出。完成的标准是确定该方法返回单位矩阵的原因,并通过可复现的验证记录或修正该行为。

由索引模型根据 Issue 内容生成。

描述

kind: bug module: registration

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

主要语言
C++
星标
11.2k
派生
4.7k
平均合并
6 天 13 小时
30 天内合并 PR
10

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PointCloudLibrary/pcl 的其他 Issue

查看 PointCloudLibrary/pcl 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。