首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将PCL ICP输出从6dof限制为仅3dof翻译

将PCL ICP输出从6dof限制为仅3dof翻译
EN

Stack Overflow用户
提问于 2020-03-01 13:53:37
回答 1查看 333关注 0票数 0

我想为2组点云实现pcl icp。然而,当我想要进一步添加一些约束来修复3d空间中的旋转轴时,问题浮出水面。我意识到我可以通过以下命令将其限制为3dof (1次旋转和2次平移):https://github.com/PointCloudLibrary/pcl/blob/master/tools/icp2d.cpp

但是,如果我想在某些特定的dof上进行自定义约束,是否可以??(例如,删除所有3个-axis旋转)

P/s:可以使用icp.setTransformationEstimation (te)更远的pcl::registration::TransformationEstimationLM来完成吗

EN

回答 1

Stack Overflow用户

发布于 2020-03-20 18:06:30

考虑到这一点,我设法通过拥有自己的WrapPoingRigid6D.h来约束它,这是<pcl/registration/warp_point_rigid_6d.h>的一个修改

修改如下:

代码语言:javascript
复制
  void 
  setParam (const VectorX & p) override
  {
    assert (p.rows () == this->getDimension ());

    // Copy the rotation and translation components
    transform_matrix_.setZero ();
    transform_matrix_.setIdentity ();   
    transform_matrix_ (0, 3) = p[0];
    transform_matrix_ (1, 3) = p[1];
    transform_matrix_ (2, 3) = p[2];
  }

创建自己的WarpPointRigid3DTrans后,通过以下方式将其传递给pcl icp:

代码语言:javascript
复制
  WarpPointRigid3DTrans<pcl::PointXYZ, pcl::PointXYZ>::Ptr warp_fcn 
    (new camera_lib::WarpPointRigid3DTrans<pcl::PointXYZ, pcl::PointXYZ>);
  pcl::registration::TransformationEstimationLM<pcl::PointXYZ, pcl::PointXYZ>::Ptr te 
    (new pcl::registration::TransformationEstimationLM<pcl::PointXYZ, pcl::PointXYZ>);
  te->setWarpFunction (warp_fcn);
  icp.setTransformationEstimation (te);

这将在需要时工作。因此,您可以拥有自己的自定义wrappointrigid来满足您的需求。干杯!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60472401

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档