Skip to content

Commit

Permalink
Adapt GICP6D test
Browse files Browse the repository at this point in the history
  • Loading branch information
mvieth committed Sep 25, 2023
1 parent f9ead32 commit c4d3494
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/registration/test_registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,7 @@ TEST (PCL, GeneralizedIterativeClosestPoint6D)
PointCloud<PointT>::Ptr src_full (new PointCloud<PointT>);
copyPointCloud (cloud_with_color, *src_full);
PointCloud<PointT>::Ptr tgt_full (new PointCloud<PointT>);
sampleRandomTransform (delta_transform, M_PI/0.1, .03);
std::cout << "ground truth transformation:" << std::endl << delta_transform.matrix() << std::endl;
sampleRandomTransform (delta_transform, 0.25*M_PI, .03);
pcl::transformPointCloud (cloud_with_color, *tgt_full, delta_transform);
PointCloud<PointT> output;

Expand All @@ -607,7 +606,6 @@ TEST (PCL, GeneralizedIterativeClosestPoint6D)
sor.filter (*src);
sor.setInputCloud (tgt_full);
sor.filter (*tgt);
std::cout << "src->size()=" << src->size() << " tgt->size()=" << tgt->size() << std::endl;

GeneralizedIterativeClosestPoint6D reg;
reg.setInputSource (src);
Expand All @@ -618,10 +616,7 @@ TEST (PCL, GeneralizedIterativeClosestPoint6D)
// Register
reg.align (output);
EXPECT_EQ (output.size (), src->size ());
std::cout << "final transformation:" << std::endl << reg.getFinalTransformation() << std::endl;
const double fitscore = reg.getFitnessScore ();
std::cout << "fitness score=" << fitscore << std::endl;
EXPECT_LT (fitscore, 0.003);
EXPECT_LT (reg.getFitnessScore (), 1e-4);

// Check again, for all possible caching schemes
for (int iter = 0; iter < 4; iter++)
Expand All @@ -642,7 +637,7 @@ TEST (PCL, GeneralizedIterativeClosestPoint6D)
// Register
reg.align (output);
EXPECT_EQ (output.size (), src->size ());
EXPECT_LT (reg.getFitnessScore (), 0.003);
EXPECT_LT (reg.getFitnessScore (), 1e-4);
}
}

Expand Down

0 comments on commit c4d3494

Please sign in to comment.