diff --git a/CMakeLists.txt b/CMakeLists.txt index c83af3bd66ab395c465600fc2f604f04c1d453ed..e7f34ccf0332605785330279b5337edd29cf5789 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 c627cdf13b79c2c9fc8dc773024ce5467d432cdc..61aae0d387ebd7b5d2fe0c49686c51d47835f166 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 e6d39686f4a0cebde5e0ac1f49e9b75c927b808f..13dda71c7965bea296f53dd0910e6e8e955ac230 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;