最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c++ - icp registration with constraint degree of freedom( RX, RY, TX, TY, TZ ) - Stack Overflow

programmeradmin6浏览0评论

I have 2 sets of pointcloud to be registed, common results of icp is for 6dof, Is it possible to constraint the registration to 5dof(RX, RY, TX, TY, TZ)? I tried to implement my own warp_point_rigid_RxRyT.h, which is a modification of <pcl/registration/warp_point_rigid_6d.h>

The modification is as below:

void setParam(const VectorX& p) override { assert(p.rows() == this->getDimension());

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

  // Compute w from the unit quaternion
  Eigen::Quaternion<Scalar> q(0, p[3], p[4], 0);
  q.w() = static_cast<Scalar>(std::sqrt(1 - q.dot(q)));
  q.normalize();
  transform_matrix_.template topLeftCorner<3, 3>() = q.toRotationMatrix();

}

It doesn't work, the icp result is still 6dof.

发布评论

评论列表(0)

  1. 暂无评论