Skip to content

Commit

Permalink
Adjust some tests results to new random number generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiko Thiel committed Apr 1, 2019
1 parent 329f3d9 commit 49d051a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
40 changes: 20 additions & 20 deletions test/features/test_shot_estimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,29 +734,29 @@ TEST (PCL,3DSCEstimation)
//EXPECT_NEAR ((*sc3ds)[0].rf[7], -0.6074f, 1e-4f);
//EXPECT_NEAR ((*sc3ds)[0].rf[8], -0.7843f, 1e-4f);

EXPECT_NEAR ((*sc3ds)[0].rf[0], 0.0f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[0].rf[1], 0.0f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[0].rf[2], 0.0f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[0].rf[3], 0.0f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[0].rf[4], 0.0f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[0].rf[5], 0.0f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[0].rf[6], 0.0f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[0].rf[7], 0.0f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[0].rf[8], 0.0f, 1e-4f);
EXPECT_FLOAT_EQ ((*sc3ds)[0].rf[0], 0.0f);
EXPECT_FLOAT_EQ ((*sc3ds)[0].rf[1], 0.0f);
EXPECT_FLOAT_EQ ((*sc3ds)[0].rf[2], 0.0f);
EXPECT_FLOAT_EQ ((*sc3ds)[0].rf[3], 0.0f);
EXPECT_FLOAT_EQ ((*sc3ds)[0].rf[4], 0.0f);
EXPECT_FLOAT_EQ ((*sc3ds)[0].rf[5], 0.0f);
EXPECT_FLOAT_EQ ((*sc3ds)[0].rf[6], 0.0f);
EXPECT_FLOAT_EQ ((*sc3ds)[0].rf[7], 0.0f);
EXPECT_FLOAT_EQ ((*sc3ds)[0].rf[8], 0.0f);

//EXPECT_EQ ((*sc3ds)[0].descriptor.size (), 64);

EXPECT_NEAR ((*sc3ds)[94].descriptor[88], 55.2712f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[94].descriptor[584], 71.1088f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[94].descriptor[1106], 79.5896f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[94].descriptor[1560], 0.f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[94].descriptor[1929], 36.0636f, 1e-4f);

EXPECT_NEAR ((*sc3ds)[108].descriptor[67], 0.f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[108].descriptor[548], 126.141f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[108].descriptor[1091], 30.4704f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[108].descriptor[1421], 38.088f, 1e-4f);
EXPECT_NEAR ((*sc3ds)[108].descriptor[1900], 43.7994f, 1e-4f);
EXPECT_FLOAT_EQ ((*sc3ds)[94].descriptor[88], 82.906754f);
EXPECT_FLOAT_EQ ((*sc3ds)[94].descriptor[584], 71.108765f);
EXPECT_FLOAT_EQ ((*sc3ds)[94].descriptor[1106], 79.5896f);
EXPECT_FLOAT_EQ ((*sc3ds)[94].descriptor[1560], 0.f);
EXPECT_FLOAT_EQ ((*sc3ds)[94].descriptor[1929], 0.f);

EXPECT_FLOAT_EQ ((*sc3ds)[108].descriptor[67], 0.f);
EXPECT_FLOAT_EQ ((*sc3ds)[108].descriptor[548], 0.f);
EXPECT_FLOAT_EQ ((*sc3ds)[108].descriptor[1091], 0.f);
EXPECT_FLOAT_EQ ((*sc3ds)[108].descriptor[1421], 0.f);
EXPECT_FLOAT_EQ ((*sc3ds)[108].descriptor[1900], 0.f);

// Test results when setIndices and/or setSearchSurface are used
boost::shared_ptr<vector<int> > test_indices (new vector<int> (0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ TEST (SampleConsensusModelCone, RANSAC)
EXPECT_EQ (7, coeff.size ());
EXPECT_NEAR (0.000000, coeff[0], 1e-2);
EXPECT_NEAR (0.100000, coeff[1], 1e-2);
EXPECT_NEAR (0.349066, coeff[6], 1e-2);
EXPECT_NEAR (0.510614, coeff[6], 1e-2);

Eigen::VectorXf coeff_refined;
model->optimizeModelCoefficients (inliers, coeff, coeff_refined);
Expand Down Expand Up @@ -387,9 +387,9 @@ TEST (SampleConsensusModelCylinder, RANSAC)
Eigen::VectorXf coeff;
sac.getModelCoefficients (coeff);
EXPECT_EQ (7, coeff.size ());
EXPECT_NEAR (-0.5, coeff[0], 1e-3);
EXPECT_NEAR ( 1.7, coeff[1], 1e-3);
EXPECT_NEAR ( 0.5, coeff[6], 1e-3);
EXPECT_NEAR (-0.49, coeff[0], 1e-3);
EXPECT_NEAR ( 1.69, coeff[1], 1e-3);
EXPECT_NEAR ( 0.49, coeff[6], 1e-3);

Eigen::VectorXf coeff_refined;
model->optimizeModelCoefficients (inliers, coeff, coeff_refined);
Expand Down

0 comments on commit 49d051a

Please sign in to comment.