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.