1
votes

I'm trying to pairwise register clouds to get a 3D template, but i get the warnings

[pcl::SampleConsensusModelRegistration::computeSampleDistanceThreshold] Covariance matrix has NaN values! Is the input cloud finite?
[pcl::RandomSampleConsensus::computeModel] No samples could be selected!

followed by signal SIGSEGV, segmentation fault:

0x00007ffff344114d in pcl::registration::TransformationEstimationSVD<pcl::PointXYZRGBA, pcl::PointXYZRGBA, float>::estimateRigidTransformation(pcl::ConstCloudIterator<pcl::PointXYZRGBA>&, pcl::ConstCloudIterator<pcl::PointXYZRGBA>&, Eigen::Matrix<float, 4, 4, 0, 4, 4>&) const ()

My code is:

    registration->setInputSource(source);
    registration->setInputTarget(target);
    registration->setMaxCorrespondenceDistance(0.3);
    registration->setRANSACOutlierRejectionThreshold(0.00001);
    registration->setTransformationEpsilon(10e-6);
    registration->setMaximumIterations(400);
    registration->setRANSACIterations(10);
    CloudMapper::Cloud::Ptr c(new CloudMapper::Cloud);
    registration->align(*c);

Any ideas why the covariance matrix could have NaN values? The clouds are from different frames from a kinect stream.

1
The cov matrix uses the correspondence points of your source and target point clouds. You set a max correspondence distance of 0.3, but maybe the correspondences in your clouds have a greater distance. So you have no correspondences to build a cov matrix.bashbug

1 Answers

0
votes

It was indeed the CorrespondenceDistance. My point clouds were in a different scale. In the PCL documentation, the distances are in meters but my point clouds are in millimeters, so i need a correspondence distance *1000