Fix test #103 that requires deterministic values from rand(3).

This patch has now been merged upstream. Drop next update.
Commit: 48c49ce1e8dc8e7c4c12c91325aa1d8112a1c038

See also https://github.com/PointCloudLibrary/pcl/issues/6178
Index: test/registration/test_registration.cpp
--- test/registration/test_registration.cpp.orig
+++ test/registration/test_registration.cpp
@@ -155,30 +155,26 @@ TEST (PCL, findFeatureCorrespondences)
 
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // This test if the ICP algorithm can successfully find the transformation of a cloud that has been
-// moved 0.7 in x direction.
+// moved 0.2 in z direction.
 // It indirectly test the KDTree doesn't get an empty input cloud, see #3624
 // It is more or less a copy of https://github.com/PointCloudLibrary/pcl/blob/cc7fe363c6463a0abc617b1e17e94ab4bd4169ef/doc/tutorials/content/sources/iterative_closest_point/iterative_closest_point.cpp
 TEST(PCL, ICP_translated)
 {
-  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_in(new pcl::PointCloud<pcl::PointXYZ>(5,1));
+  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_in(new pcl::PointCloud<pcl::PointXYZ>);
   pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_out(new pcl::PointCloud<pcl::PointXYZ>);
 
   // Fill in the CloudIn data
-  for (auto& point : *cloud_in)
-  {
-    point.x = 1024 * rand() / (RAND_MAX + 1.0f);
-    point.y = 1024 * rand() / (RAND_MAX + 1.0f);
-    point.z = 1024 * rand() / (RAND_MAX + 1.0f);
-  }
+  *cloud_in = cloud_source;
 
   *cloud_out = *cloud_in;
 
   for (auto& point : *cloud_out)
-    point.x += 0.7f;
+    point.z += 0.2f;
 
   pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ> icp;
   icp.setInputSource(cloud_in);
   icp.setInputTarget(cloud_out);
+  icp.setMaximumIterations (50);
 
   pcl::PointCloud<pcl::PointXYZ> Final;
   icp.align(Final);
@@ -190,9 +186,12 @@ TEST(PCL, ICP_translated)
   EXPECT_LT(icp.getFitnessScore(), 1e-6);
 
   // Ensure that the translation found is within acceptable threshold.
-  EXPECT_NEAR(icp.getFinalTransformation()(0, 3), 0.7, 2e-3);
+  EXPECT_NEAR(icp.getFinalTransformation()(0, 0), 1.0, 2e-3);
+  EXPECT_NEAR(icp.getFinalTransformation()(1, 1), 1.0, 2e-3);
+  EXPECT_NEAR(icp.getFinalTransformation()(2, 2), 1.0, 2e-3);
+  EXPECT_NEAR(icp.getFinalTransformation()(0, 3), 0.0, 2e-3);
   EXPECT_NEAR(icp.getFinalTransformation()(1, 3), 0.0, 2e-3);
-  EXPECT_NEAR(icp.getFinalTransformation()(2, 3), 0.0, 2e-3);
+  EXPECT_NEAR(icp.getFinalTransformation()(2, 3), 0.2, 2e-3);
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
