From 2cbcc8211b9e92bd51b380400fe2e14f9742e1d9 Mon Sep 17 00:00:00 2001
From: joanvallve <jvallve@iri.upc.edu>
Date: Mon, 1 Jul 2024 11:44:16 +0200
Subject: [PATCH] [skip ci] small changes

---
 CMakeLists.txt     | 10 +---------
 src/icp.cpp        |  2 +-
 test/gtest_icp.cpp |  3 ++-
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c83af3b..e7f34cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,14 +39,6 @@ IF(NOT BUILD_DEMOS)
   OPTION(BUILD_DEMOS "Build demos" ON)
 ENDIF(NOT BUILD_DEMOS)
 
-if(BUILD_TESTS)
-    # Enables testing for this directory and below.
-    # Note that ctest expects to find a test file in the build directory root.
-    # Therefore, this command should be in the source directory root.
-    #include(CTest) # according to http://public.kitware.com/pipermail/cmake/2012-June/050853.html
-    enable_testing()
-endif()
-
 # ============ DEPENDENCIES ============ 
 FIND_PACKAGE(Eigen3 3.3 REQUIRED CONFIG)
 FIND_PACKAGE(falkolib QUIET)
@@ -171,7 +163,7 @@ ENDIF(BUILD_DEMOS)
 #Build tests
 IF(BUILD_TESTS)
   MESSAGE("Building tests.")
-  set(_LASER_SCAN_UTILS_ROOT_DIR ${CMAKE_SOURCE_DIR})
+  enable_testing()
   add_subdirectory(test)
 ENDIF(BUILD_TESTS)
 
diff --git a/src/icp.cpp b/src/icp.cpp
index c627cdf..61aae0d 100644
--- a/src/icp.cpp
+++ b/src/icp.cpp
@@ -210,7 +210,7 @@ icpOutput ICP::align(const LaserScan &_current_ls,
 
     } while (not result.valid and result.attempts < _icp_params.icp_attempts);
 
-    // if valid, copy values and grow covariance
+    // if valid, copy transformation values and grow covariance
     if (result.valid)
     {
         result.res_transf(0) = csm_output.x[0];
diff --git a/test/gtest_icp.cpp b/test/gtest_icp.cpp
index e6d3968..13dda71 100644
--- a/test/gtest_icp.cpp
+++ b/test/gtest_icp.cpp
@@ -26,7 +26,7 @@
 using namespace laserscanutils;
 
 int N = 50;
-int n_attempts = 10;
+unsigned int n_attempts = 10;
 
 const Eigen::Vector2d A = Eigen::Vector2d::Zero();
 const Eigen::Vector2d B = (Eigen::Vector2d() << 0, 40).finished();
@@ -422,6 +422,7 @@ TEST(TestIcp, TestIcp10)
 
   auto icp_params = icp_params_default;
   icp_params.icp_attempts = n_attempts;
+  icp_params.verbose = true;
 
   double pert = 0.0;
 
-- 
GitLab