How to use pcl::registration::estimateRigidTransformation?
I'm trying to register two pointclouds gathered with Kinect. The two pointclouds are of type PointXYZRGB and are pre-aligned. From the signature of the function I assumed the following usage:
pcl::PointCloud<pcl::PointXYZRGB> A, B; // imagine these to be the input clouds, where A should be aligned to B
pcl::registration::TransformationEstimation<pcl::PointXYZRGB,pcl::PointXYZRGB> MyEstimation;
Eigen::Matrix4f T; // the result transformation
MyEstimation.estimateRigidTransformation( A, B, T );
This crashes in Ubuntu 10.10 x64 using diamondback with an assertion in Eigen:
Eigen::ProductBase<Derived, Lhs, Rhs>::ProductBase(const Lhs&, const Rhs&) [with Derived = Eigen::GeneralProduct<Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001, 0, -0x00000000000000001, -0x00000000000000001>, Eigen::Transpose<Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001, 0, -0x00000000000000001, -0x00000000000000001> >, 5>, Lhs = Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001, 0, -0x00000000000000001, -0x00000000000000001>, Rhs = Eigen::Transpose<Eigen::Matrix<float, -0x00000000000000001, -0x00000000000000001, 0, -0x00000000000000001, -0x00000000000000001> >]: Assertion `lhs.cols() == rhs.rows() && "invalid matrix product" && "if you wanted a coeff-wise or a dot product use the respective explicit functions"' failed.
So I'm not sure what's going wrong? Am I using the registration wrong? The pointclouds are okay, as I can concatenate and display them fine without this fine registration.