### Test Environment Setup Start Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Logs the start of the global test environment setup. This is typically called once before any tests begin execution. ```cpp void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart( const UnitTest& /*unit_test*/) { ColoredPrintf(COLOR_GREEN, "[----------] "); printf("Global test environment set-up.\n"); fflush(stdout); } ``` -------------------------------- ### OnEnvironmentsSetUpStart Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_func_o.html Callback function executed at the start of environment setup. ```APIDOC ## OnEnvironmentsSetUpStart() ### Description This function is called before the test environment setup begins. ### Method Callback ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response - **testing::EmptyTestEventListener, testing::internal::PrettyUnitTestResultPrinter, testing::internal::TestEventRepeater, testing::TestEventListener**: Returns various listener and printer types. ``` -------------------------------- ### Setup() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1Test.html A method named Setup, likely a typo for SetUp. ```APIDOC ## ◆ Setup() | virtual Setup_should_be_spelled_SetUp* testing::Test::Setup | ( | | ) | ---|---|---|---|--- inlineprivatevirtual Definition at line 17864 of file gtest.h. ``` -------------------------------- ### Setup Function Call Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/setup_8py_source.html Configures the package setup using setuptools. It specifies the packages to include, data files, version, and the custom distribution class. ```python setup(packages=find_packages(include=["pypointmatcher*"]), package_data={"": ["*.so"]}, version=version, distclass=BinaryDistribution ) ``` -------------------------------- ### Transformation Checker Setup Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/Transformations_8cpp_source.html The SetUp method for the TransformationCheckerTest fixture. This is where test-specific resources and configurations are initialized before each test. ```cpp virtual void SetUp() ``` -------------------------------- ### Main function for ICP example Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/icp__simple_8cpp.html This is the main entry point for the ICP simple example. It sets up and runs the ICP algorithm to compute the transformation between two point clouds. It requires command-line arguments for input files. ```cpp #include "pointmatcher/PointMatcher.h" #include #include ``` -------------------------------- ### icp_simple.py Example Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/dir_d050070cc3e4bbd91d897ff8856046e0.html This script provides a simple and straightforward example of using the ICP algorithm for point cloud alignment. ```python from libpointmatcher.icp_simple import icp_simple aligned_point_cloud = icp_simple(point_cloud1, point_cloud2) ``` -------------------------------- ### version Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/namespacemembers_vars_v.html Represents the setup version of the library. ```APIDOC ## Variable: version ### Description This variable holds the setup version information for the libpointmatcher library. ### Type setup ``` -------------------------------- ### SetUp Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classOutlierFilterTest.html Sets up the test environment for OutlierFilterTest. ```APIDOC ## SetUp() ### Description Sets up the test environment for OutlierFilterTest. This method is called before each test. ### Method virtual void ### Response #### Success Response (void) This method does not return a value. ``` -------------------------------- ### Google Test Fixture Setup Method Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Provides a hook for setting up the test fixture before each test is run. Sub-classes can override this method to perform custom setup logic. ```cpp void Test::SetUp() { } ``` -------------------------------- ### RunSetUpTestCase() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1TestCase.html Runs the setup function for the test case. ```APIDOC ## RunSetUpTestCase() ### Description Runs the setup function for the test case. ``` -------------------------------- ### file Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/namespacemembers_f.html Variable 'file' in the setup namespace. ```APIDOC ## file ### Description Variable 'file' in namespace setup. ### Namespace setup ``` -------------------------------- ### icp.py Example Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/dir_d050070cc3e4bbd91d897ff8856046e0.html This script provides a basic example of using the Iterative Closest Point (ICP) algorithm for point cloud registration. ```python from libpointmatcher.icp import icp aligned_point_cloud = icp(point_cloud1, point_cloud2, parameters) ``` -------------------------------- ### Setup Test Case in Testing::Test Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classTransformationCheckerTest.html Static method to set up the entire test case before any test functions are run. This is typically used for class-level setup. ```cpp static void SetUpTestCase () ``` -------------------------------- ### SetUp() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classDataFilterTest.html Sets up the test environment before each test case. Reimplemented from testing::Test. ```APIDOC ## SetUp() ### Description Sets up the test environment before each test case. This method is reimplemented from the testing::Test base class. ### Method Signature virtual void DataFilterTest::SetUp() ``` -------------------------------- ### Get Descriptor Starting Row Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/pointmatcher_2DataPoints_8cpp_source.html Retrieves the starting row index for a descriptor by its name. Useful for understanding data layout. ```cpp unsigned PointMatcher::DataPoints::getDescriptorStartingRow(const std::string& name) const { return getFieldStartingRow(name, descriptorLabels); } ``` -------------------------------- ### setupOptions Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/eval__solution_8cpp.html Sets up command-line options description for the program. ```APIDOC ## setupOptions() ### Description Sets up command-line options description for the program. ### Parameters - **_name_** (const string &) - The name to be used for the options description. ### Return Value po::options_description - The configured options description object. ``` -------------------------------- ### Get Feature Starting Row Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/pointmatcher_2DataPoints_8cpp_source.html Returns the starting row index for a given feature. This can be helpful for understanding the internal layout of features. ```cpp template unsigned PointMatcher::DataPoints::getFeatureStartingRow(const std::string& name) const { return getFieldStartingRow(name, featureLabels); } ``` -------------------------------- ### SetUp() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1Test.html Sets up the test fixture. Protected virtual method, reimplemented in derived classes. ```APIDOC ## ◆ SetUp() | void testing::Test::SetUp | ( | | ) | ---|---|---|---|--- protectedvirtual Reimplemented in IOLoadSaveTest, GenericTest, TransformationCheckerTest, DataFilterTest, MatcherTest, OutlierFilterTest, and ErrorMinimizerTest. Definition at line 3387 of file gtest-all.cc. ``` -------------------------------- ### getFieldStartingRow() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_func_g.html Gets the starting row index for a field in DataPoints. ```APIDOC ## getFieldStartingRow() ### Description Returns the starting row index for a specified field within the DataPoints structure. ### Signature `int getFieldStartingRow(const std::string& fieldName) const` ``` -------------------------------- ### Csetup.BinaryDistribution Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/hierarchy.html Represents a binary distribution setup. ```APIDOC ## Csetup.BinaryDistribution ### Description Configuration for binary distribution. ``` -------------------------------- ### getFeatureStartingRow() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_func_g.html Gets the starting row index for feature data. ```APIDOC ## getFeatureStartingRow() ### Description Returns the starting row index for the feature data within the DataPoints structure. ### Signature `int getFeatureStartingRow() const` ``` -------------------------------- ### SetUpEnvironment Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc.html Sets up the testing environment. ```APIDOC ## testing::internal::SetUpEnvironment ### Description Initializes the testing environment. ### Parameters - `env` (Environment*) - A pointer to the environment object to set up. ``` -------------------------------- ### getDescriptorStartingRow() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_func_g.html Gets the starting row index for descriptor data. ```APIDOC ## getDescriptorStartingRow() ### Description Returns the starting row index for the descriptor data within the DataPoints structure. ### Signature `int getDescriptorStartingRow() const` ``` -------------------------------- ### Main Application Entry Point Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/main_8cpp_source.html Sets up a Qt application and displays the LAUPointMatcherWidget. This is the main entry point for the application. ```cpp int main(int argc, char *argv[]) { QApplication a(argc, argv); LAUPointMatcherWidget w; w.show(); return a.exec(); } ``` -------------------------------- ### Get Field Starting Row Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/pointmatcher_2DataPoints_8cpp_source.html Calculates and returns the starting row index for a given field within the DataPoints matrix based on the labels. ```cpp template unsigned PointMatcher::DataPoints::getFieldStartingRow(const std::string& name, const Labels& labels) const { unsigned row(0); for(BOOST_AUTO(it, labels.begin()); it != labels.end(); ++it) { if (it->text == name) return row; row += it->span; } return 0; } ``` -------------------------------- ### Get Time Field Starting Row Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/pointmatcher_2DataPoints_8cpp_source.html Retrieves the starting row index for a time field by its name. Useful for understanding time data layout. ```cpp unsigned PointMatcher::DataPoints::getTimeStartingRow(const std::string& name) const { return getFieldStartingRow(name, timeLabels); } ``` -------------------------------- ### SetUpTestCase() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1Test.html Sets up the test case. Static method. ```APIDOC ## ◆ SetUpTestCase() | static void testing::Test::SetUpTestCase | ( | | ) | ---|---|---|---|--- inlinestatic Definition at line 17778 of file gtest.h. ``` -------------------------------- ### List Modules Example Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/dir_d28a4824dc47e487b107a5db32ef43c4.html Demonstrates how to list available modules in libpointmatcher. ```cpp #include int main(int argc, char **argv) { // Get a list of available modules auto modules = PointMatcherSupport::getModules(); // Print the module names for (const auto& module : modules) { std::cout << "Module: " << module << std::endl; } return 0; } ``` -------------------------------- ### getTimeStartingRow Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_func_g.html Gets the starting row index for time data in DataPoints. ```APIDOC ## getTimeStartingRow() ### Description Retrieves the starting row index for the time data within the `DataPoints` object. ### Signature `int getTimeStartingRow() const` ### Returns An integer representing the starting row index of the time data. ``` -------------------------------- ### Build Map Example Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/dir_d28a4824dc47e487b107a5db32ef43c4.html Shows how to build a 3D map from a sequence of point clouds. ```cpp #include int main(int argc, char **argv) { // Create a new PointMatcher PointMatcher matcher; // Load a sequence of point clouds auto sequence = matcher.loadSequence("path/to/sequence.m3d"); // Build a map from the sequence auto map = matcher.buildMap(sequence); // Save the map matcher.saveMap(map, "path/to/map.vtk"); return 0; } ``` -------------------------------- ### Related Functions starting with 'a' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_rela.html Details functions related to test environment setup and addition. ```APIDOC ## a AddGlobalTestEnvironment ### Description Adds a global test environment to the testing framework. ### Related Functions - AddGlobalTestEnvironment : testing::UnitTest ``` -------------------------------- ### OnEnvironmentsSetUpStart Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1EmptyTestEventListener.html Called at the beginning of the environment set up phase for all tests. ```APIDOC ## OnEnvironmentsSetUpStart() ### Description This method is called before any test environments are set up. ### Method `virtual void OnEnvironmentsSetUpStart(const UnitTest &)` ### Parameters * **`const UnitTest &`**: A reference to the UnitTest object. ### Remarks Implements testing::TestEventListener. ``` -------------------------------- ### Get Google Test Environments Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Returns a reference to the vector of environments that require setup and teardown before and after test execution. ```cpp std::vector& environments() { return environments_; } ``` -------------------------------- ### OnEnvironmentsSetUpEnd Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1internal_1_1XmlUnitTestResultPrinter.html Called after the environment setup for tests is completed. ```APIDOC ## OnEnvironmentsSetUpEnd ### Description This method is called after the setup phase for the test environments has concluded. ### Method virtual void ### Parameters #### Path Parameters - **unit_test** (const UnitTest &) - Required - The `UnitTest` object associated with the environment setup. ``` -------------------------------- ### Get Random Seed Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Returns the random seed used at the start of the current test run. This is a const method of the UnitTest class. ```C++ // Returns the random seed used at the start of the current test run. int UnitTest::random_seed() const { return impl_->random_seed(); } ``` -------------------------------- ### OnEnvironmentsSetUpStart Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1EmptyTestEventListener.html Called before any environments are set up. Override this method to perform actions before the setup phase begins. ```APIDOC ## OnEnvironmentsSetUpStart() ### Description Called before any environments are set up. Override this method to perform actions before the setup phase begins. ### Method `virtual void` ### Signature `OnEnvironmentsSetUpStart(const UnitTest &)` ### Inheritance Implements `testing::TestEventListener`. ``` -------------------------------- ### Get Start Timestamp - C++ Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Retrieves the timestamp indicating when the test program began execution, measured in milliseconds since the Unix epoch. ```cpp internal::TimeInMillis UnitTest::start_timestamp() const { return impl()->start_timestamp(); } ``` -------------------------------- ### SetUp Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classIOLoadSaveTest.html Sets up the test environment before each test case. This typically involves initializing necessary data structures. ```APIDOC ## SetUp ### Description Virtual function called before each test case to set up the test environment. ### Signature ```cpp virtual void SetUp() ``` ``` -------------------------------- ### Get Elapsed Time - C++ Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Returns the total elapsed time of the test execution, measured in milliseconds. This reflects the duration from start to the current point. ```cpp internal::TimeInMillis UnitTest::elapsed_time() const { return impl()->elapsed_time(); } ``` -------------------------------- ### SetUp Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classErrorMinimizerTest.html Virtual function to set up the test environment before each test case. Inherited from testing::Test. ```APIDOC ## SetUp() ### Description Virtual function to set up the test environment before each test case. ### Signature virtual void SetUp() ### Inheritance Inherited from testing::Test. ``` -------------------------------- ### main() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/main_8cpp.html The main function is the entry point of the C++ application. It initializes the Qt application and sets up the main widget. ```APIDOC ## main() ### Description The main function is the entry point of the C++ application. It initializes the Qt application and sets up the main widget. ### Signature ```cpp int main(int _argc_, char *_argv_[]) ``` ### Parameters - **_argc_** (int) - The number of command-line arguments. - **_argv_[]** (char *) - An array of strings representing the command-line arguments. ### Return Value - (int) - The exit status of the application. ``` -------------------------------- ### get(const std::string ¶mName) Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/structOctreeGridDataPointsFilter-members.html Gets the value of a parameter. ```APIDOC ## get(const std::string ¶mName) ### Description Gets the value of a parameter. ### Method inline ### Endpoint PointMatcherSupport::Parametrizable ``` -------------------------------- ### setupArgs Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/build__map_8cpp.html Sets up command-line arguments for the build_map process, including start ID, end ID, and file extension. ```APIDOC ## ◆ setupArgs() void setupArgs | ( | int | _argc_ , ---|---|---|--- | | char * | _argv_[], | | unsigned int & | _startId_ , | | unsigned int & | _endId_ , | | string & | _extension_ | ) | | ``` -------------------------------- ### Set Starting Index for I Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/namespacecompute__overlap.html Sets the starting index for the outer loop or iteration related to 'I'. ```python compute_overlap.starting_I = 0 ``` -------------------------------- ### setupArgs() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/compute__overlap_8cpp.html A helper function to parse and set up command-line arguments for the program, likely to configure parameters like start ID, end ID, and file extension. ```APIDOC ## ◆ setupArgs() void setupArgs | ( | int | _argc_ , ---|---|---|--- | | char * | _argv_[], | | unsigned int & | _startId_ , | | unsigned int & | _endId_ , | | string & | _extension_ | ) ### Description Parses command-line arguments to configure the program's behavior. It extracts parameters such as the starting and ending IDs for processing and the file extension for input/output. ### Parameters - **_argc_** (int) - The number of command-line arguments. - **_argv_[]** (char *) - An array of strings representing the command-line arguments. - **_startId_** (unsigned int &) - A reference to an unsigned integer that will store the starting ID. - **_endId_** (unsigned int &) - A reference to an unsigned integer that will store the ending ID. - **_extension_** (string &) - A reference to a string that will store the file extension. ``` -------------------------------- ### Initialize Bibliography with Mode Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/Bibliography_8cpp_source.html Constructor for the CurrentBibliography class, setting the output mode. ```cpp CurrentBibliography::CurrentBibliography(Mode mode): mode(mode) {} ``` -------------------------------- ### ICP Simple Example Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/dir_d28a4824dc47e487b107a5db32ef43c4.html A basic example demonstrating the Iterative Closest Point (ICP) algorithm. ```cpp #include int main(int argc, char **argv) { // Create a new PointMatcher PointMatcher matcher; // Load two point clouds auto cloud1 = matcher.load("path/to/cloud1.vtk"); auto cloud2 = matcher.load("path/to/cloud2.vtk"); // Perform ICP auto transformation = matcher.icp(cloud1, cloud2); // Print the transformation std::cout << "Transformation: " << transformation << std::endl; return 0; } ``` -------------------------------- ### Related Functions starting with ':' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_rela.html Lists related functions that start with a colon, showing their association with testing utilities. ```APIDOC ## : :testing::UnitTest ### Description Provides a reference to the testing::UnitTest class. ### Related Functions - ::testing::UnitTest : testing::internal::UnitTestImpl ``` -------------------------------- ### main() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/globals_func.html The entry point of the program. ```APIDOC ## main() ### Description The primary entry point for the application. This function is found in various executable files and test suites. ### Method Not applicable (function call) ### Endpoint Not applicable (function call) ### Parameters Typically `int argc, char **argv` for command-line arguments, though not explicitly detailed here. ### Request Example ```cpp int main(int argc, char **argv) { // Program logic return 0; } ``` ### Response Returns an integer status code (typically 0 for success). ``` -------------------------------- ### Namespace Members - Functions starting with 'c' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_type_c.html This section lists functions within the namespaces that start with the letter 'c'. ```APIDOC ## Namespace Members - Functions starting with 'c' This section lists functions within the namespaces that start with the letter 'c'. ### const_iterator * **Description**: Represents a constant iterator for `PointMatcher< T >::DataPoints::Labels`. * **Type**: `PointMatcher< T >::DataPoints::Labels::const_iterator` ### ContainerType * **Description**: Alias for `testing::internal::ValuesInIteratorRangeGenerator< T >`. * **Type**: `testing::internal::ValuesInIteratorRangeGenerator< T >` ### CovarianceSamplingDataPointsFilter * **Description**: A data points filter for covariance sampling, derived from `DataPointsFiltersImpl< T >`. * **Type**: `DataPointsFiltersImpl< T >` ### CutAtDescriptorThresholdDataPointsFilter * **Description**: A data points filter for cutting at a descriptor threshold, derived from `DataPointsFiltersImpl< T >`. * **Type**: `DataPointsFiltersImpl< T >` ``` -------------------------------- ### setupOptions Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/globals_s.html Configures the options for evaluation. This function is defined in eval_solution.cpp. ```APIDOC ## setupOptions() ### Description Configures the options for evaluation. ### Source File eval_solution.cpp ``` -------------------------------- ### Initialize PointMatcher and Load Data Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/compute__overlap_8cpp_source.html Sets up the PointMatcher library, loads point cloud data from a list of files, and prepares for transformation processing. Requires ground truth transformation matrices. ```cpp PMIO::FileInfoVector list(argv[1]); bool debugMode = false; if (argc == 4) debugMode = true; if(debugMode) setLogger(PM::get().LoggerRegistrar.create("FileLogger")); // Prepare transformation chain for maps std::shared_ptr rigidTransform; rigidTransform = PM::get().TransformationRegistrar.create("RigidTransformation"); PM::Transformations transformations; transformations.push_back(rigidTransform); DP reading, reference; TP Tread = TP::Identity(4,4); DP mapCloud; TP Tref = TP::Identity(4,4); unsigned startingI = 0; unsigned listSizeI = list.size(); unsigned listSizeJ = list.size(); if(debugMode) { startingI = boost::lexical_cast(argv[2]); listSizeI = startingI + 1; } PM::Matrix overlapResults = PM::Matrix::Ones(listSizeJ, listSizeI); for(unsigned i = startingI; i < listSizeI; i++) { unsigned startingJ = i+1; if(debugMode) { startingJ = boost::lexical_cast(argv[3]); listSizeJ = startingJ + 1; } for(unsigned j = startingJ; j < listSizeJ; j++) { // Load point clouds reading = DP::load(list[i].readingFileName); reference = DP::load(list[j].readingFileName); cout << "Point cloud loaded" << endl; // Load transformation matrices if(list[i].groundTruthTransformation.rows() != 0) { Tread = list[i].groundTruthTransformation; Tref = list[j].groundTruthTransformation; } else { cout << "ERROR: fields gTXX (i.e., ground truth matrix) is required" << endl; abort(); } // Move point cloud in global frame transformations.apply(reading, Tread); transformations.apply(reference, Tref); ``` -------------------------------- ### Get Registrar Macro Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/Registrar_8h.html Use this macro to get a reference to a previously defined registrar. It simplifies accessing the registrar instance. ```cpp #define REG(name) name##Registrar ``` -------------------------------- ### Begin() Method Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1internal_1_1RangeGenerator.html Returns a pointer to the beginning of the parameter range. Implements testing::internal::ParamGeneratorInterface< T >. ```APIDOC ## ◆ Begin() template | virtual ParamIteratorInterface* testing::internal::RangeGenerator< T, IncrementT >::Begin | ( | | ) | const ---|---|---|---|--- inlinevirtual Implements testing::internal::ParamGeneratorInterface< T >. Definition at line 10189 of file gtest.h. ``` -------------------------------- ### Individual Test Start Logging Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Logs the start of an individual test, indicating it is running. It uses PrintTestName to format the output. ```cpp void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) { ColoredPrintf(COLOR_GREEN, "[ RUN ] "); PrintTestName(test_info.test_case_name(), test_info.name()); printf("\n"); fflush(stdout); } ``` -------------------------------- ### Variables starting with 't' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/namespacemembers_vars_t.html This section details variables in the libpointmatcher namespace that start with 't'. It includes their associated functions and classes. ```APIDOC ## Variables starting with 't' This section details variables in the libpointmatcher namespace that start with 't'. It includes their associated functions and classes. ### T - **build_map**: Used in `build_map`. - **icp**: Used in `icp`, `icp_advance_api`, `icp_customized`, `icp_simple`. - **icp_advance_api**: Used in `icp_advance_api`. - **icp_customized**: Used in `icp_customized`. - **icp_simple**: Used in `icp_simple`. ### T_to_map_from_new - **align_sequence**: Used in `align_sequence`. ### target - **compute_overlap**: Used in `compute_overlap`. ### target_matches - **compute_overlap**: Used in `compute_overlap`. ### target_pts_count - **compute_overlap**: Used in `compute_overlap`. ### target_ratio - **compute_overlap**: Used in `compute_overlap`. ### test_base - **icp**: Used in `icp`, `icp_advance_api`, `icp_customized`, `icp_simple`, `point_cloud_generator`. - **icp_advance_api**: Used in `icp_advance_api`. - **icp_customized**: Used in `icp_customized`. - **icp_simple**: Used in `icp_simple`. - **point_cloud_generator**: Used in `point_cloud_generator`. ### total_point_count - **build_map**: Used in `build_map`. ### transformation - **build_map**: Used in `build_map`. ### transformations - **compute_overlap**: Used in `compute_overlap`. ### translation - **icp**: Used in `icp`, `icp_advance_api`, `point_cloud_generator`. - **icp_advance_api**: Used in `icp_advance_api`. - **point_cloud_generator**: Used in `point_cloud_generator`. ### Tread - **compute_overlap**: Used in `compute_overlap`. ### Tref - **compute_overlap**: Used in `compute_overlap`. ### trim - **icp_customized**: Used in `icp_customized`. ### TypeId - **testing::internal**: Used in `testing::internal`. ``` -------------------------------- ### Global Members starting with 'q' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/globals_q.html This section details global members in libpointmatcher whose names start with the letter 'q'. ```APIDOC ## Global Members starting with 'q' ### Description This section details global members in libpointmatcher whose names start with the letter 'q'. ### Members - **Quadtree** : Defined in `octree.h` - **Quaternion** : Defined in `pypoint_matcher_helper.h` - **QuaternionVector** : Defined in `pypoint_matcher_helper.h` ``` -------------------------------- ### Initialize PointMatcher Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/namespacecompute__overlap.html Initializes the PointMatcher library. This is a common setup step. ```python compute_overlap.PM = pm.PointMatcher ``` -------------------------------- ### Functions and Macros starting with 'a' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/globals_defs_a.html This section lists functions and macros available in the libpointmatcher library whose names start with the letter 'a'. ```APIDOC ## ADD_FAILURE ### Description Adds a failure to the current test. ### Method N/A (Function) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ADD_FAILURE_AT ### Description Adds a failure to the current test at a specific file and line number. ### Method N/A (Function) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ADD_TO_REGISTRAR ### Description Adds a component to the registrar. ### Method N/A (Function) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ADD_TO_REGISTRAR_NO_PARAM ### Description Adds a component to the registrar without parameters. ### Method N/A (Function) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_ANY_THROW ### Description Asserts that the code inside the statement throws an exception. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_DEATH_IF_SUPPORTED ### Description Asserts that the code inside the statement dies if the platform supports it. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_DOUBLE_EQ ### Description Asserts that two double-precision floating-point values are approximately equal. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_EQ ### Description Asserts that two values are equal. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_FALSE ### Description Asserts that a condition is false. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_FLOAT_EQ ### Description Asserts that two single-precision floating-point values are approximately equal. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_GE ### Description Asserts that the first value is greater than or equal to the second value. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_GT ### Description Asserts that the first value is greater than the second value. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_LE ### Description Asserts that the first value is less than or equal to the second value. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_LT ### Description Asserts that the first value is less than the second value. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_NE ### Description Asserts that two values are not equal. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_NEAR ### Description Asserts that two double-precision floating-point values are close to each other within a specified tolerance. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_NO_FATAL_FAILURE ### Description Asserts that the code inside the statement does not cause a fatal failure. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_NO_THROW ### Description Asserts that the code inside the statement does not throw an exception. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED1 ### Description Asserts that a predicate with one argument holds true. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED2 ### Description Asserts that a predicate with two arguments holds true. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED3 ### Description Asserts that a predicate with three arguments holds true. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED4 ### Description Asserts that a predicate with four arguments holds true. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED5 ### Description Asserts that a predicate with five arguments holds true. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED_FORMAT1 ### Description Asserts that a predicate with one argument holds true, using a custom format for failure messages. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED_FORMAT2 ### Description Asserts that a predicate with two arguments holds true, using a custom format for failure messages. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED_FORMAT3 ### Description Asserts that a predicate with three arguments holds true, using a custom format for failure messages. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED_FORMAT4 ### Description Asserts that a predicate with four arguments holds true, using a custom format for failure messages. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_PRED_FORMAT5 ### Description Asserts that a predicate with five arguments holds true, using a custom format for failure messages. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_STRCASEEQ ### Description Asserts that two strings are equal, ignoring case. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_STRCASENE ### Description Asserts that two strings are not equal, ignoring case. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_STREQ ### Description Asserts that two strings are equal. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_STRNE ### Description Asserts that two strings are not equal. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_THROW ### Description Asserts that the code inside the statement throws an exception of a specified type. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ## ASSERT_TRUE ### Description Asserts that a condition is true. ### Method N/A (Macro) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### MatcherTest::SetUp Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classMatcherTest.html Sets up the test environment before each test case. ```APIDOC ## MatcherTest::SetUp ### Description Sets up the test environment before each test case. This is a virtual function that can be overridden by derived classes. ### Method void ### Endpoint N/A (Test setup method) ### Parameters None ### Request Example N/A ### Response This function does not return a value. ``` -------------------------------- ### Class Variables starting with 'w' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_vars_w.html This section lists variables within the classes of the libpointmatcher library that start with the letter 'w'. ```APIDOC ## Class Variables (w) ### Description Variables within the classes that start with the letter 'w'. ### Variables - **w** (Type: Unknown) ``` -------------------------------- ### Namespace Variables starting with 'w' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_vars_w.html This section lists variables within the namespaces of the libpointmatcher library that start with the letter 'w'. ```APIDOC ## Namespace Variables (w) ### Description Variables within the namespaces that start with the letter 'w'. ### Variables - **warningFileName** (PointMatcherSupport::FileLogger) - **warningPrinted** (OutlierFiltersImpl< T >::SurfaceNormalOutlierFilter) - **warpedXYZ** (GestaltDataPointsFilter< T >::BuildData) - **weightedPointUsedRatio** (PointMatcher< T >::ErrorMinimizer::ErrorElements) - **weights** (ElipsoidsDataPointsFilter< T >::BuildData , PointMatcher< T >::ErrorMinimizer::ErrorElements) - **width** (PointMatcherIO< T >::PCDheader) ``` -------------------------------- ### setupArgs Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/globals_s.html Sets up command-line arguments. This function is defined in build_map.cpp and compute_overlap.cpp. ```APIDOC ## setupArgs() ### Description Sets up command-line arguments. ### Source Files build_map.cpp compute_overlap.cpp ``` -------------------------------- ### File Macros starting with 'w' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_vars_w.html This section lists macros defined at the file level in the libpointmatcher library that start with the letter 'w'. ```APIDOC ## File Macros (w) ### Description Macros defined at the file level that start with the letter 'w'. ### Macros - **w** (Type: Unknown) ``` -------------------------------- ### SetUpEnvironment Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/namespacemembers_func_s.html Sets up the testing environment for test cases within the testing::internal namespace. ```APIDOC ## SetUpEnvironment() ### Description Initializes the testing environment. ### Namespace testing::internal ``` -------------------------------- ### build_map.py Example Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/dir_d050070cc3e4bbd91d897ff8856046e0.html This script shows how to use the build_map function to construct a map from point cloud data. ```python from libpointmatcher.build_map import build_map build_map(input_dir, output_file, parameters) ``` -------------------------------- ### Get Class Description Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/Registrar_8h_source.html Retrieves the description of a class by its name. This method is part of the Registrar class and is used to get metadata about registered classes. ```cpp const std::string getDescription(const std::string &name) const ``` -------------------------------- ### SetUp Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classTransformationCheckerTest-members.html Sets up the test environment for TransformationCheckerTest. This method is called before each test case. ```APIDOC ## SetUp() ### Description Virtual method to set up the test environment before each test. ### Method SetUp ### Parameters None ``` -------------------------------- ### Test Environment Teardown Start Logging Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Logs the start of the global test environment teardown. This is typically called once after all tests have finished execution. ```cpp void PrettyUnitTestResultPrinter::OnEnvironmentsTearDownStart( const UnitTest& /*unit_test*/) { ColoredPrintf(COLOR_GREEN, "[----------] "); printf("Global test environment tear-down\n"); fflush(stdout); } ``` -------------------------------- ### testing::internal::SetUpEnvironment Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Sets up the testing environment for a given environment object. ```APIDOC ## SetUpEnvironment ### Description Sets up the testing environment for a given environment object. ### Signature ```cpp static void testing::internal::SetUpEnvironment(Environment *env) ``` ``` -------------------------------- ### Main Function for ICP Examples Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/examples_2icp_8cpp.html The main entry point for the ICP examples. It handles argument parsing and orchestrates the execution of various ICP-related functionalities. ```cpp int main (int argc, const char *argv[]); ``` -------------------------------- ### Align Sequence Example Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/dir_d28a4824dc47e487b107a5db32ef43c4.html Demonstrates how to align a sequence of point clouds using libpointmatcher. ```cpp #include int main(int argc, char **argv) { // Create a new PointMatcher PointMatcher matcher; // Load a sequence of point clouds auto sequence = matcher.loadSequence("path/to/sequence.m3d"); // Align the sequence auto alignedSequence = matcher.alignSequence(sequence); // Save the aligned sequence matcher.saveSequence(alignedSequence, "path/to/aligned_sequence.m3d"); return 0; } ``` -------------------------------- ### Begin Method Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1internal_1_1RangeGenerator-members.html Returns the starting value of the range. ```APIDOC ## Begin Method ### Description Provides access to the starting point of the range. ### Signature Begin() const -> T ### Returns The starting value of the range. ``` -------------------------------- ### Set Starting Index for J Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/namespacecompute__overlap.html Sets the starting index for the inner loop or iteration related to 'J'. It is typically set to the current index of 'i' plus one. ```python compute_overlap.starting_J = i + 1 ``` -------------------------------- ### init() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/structMatchersImpl_1_1NullMatcher.html Initializes the NullMatcher with a reference set of data points. ```APIDOC ## init() ### Description Initializes this matcher to find nearest neighbors within the provided `filteredReference`. ### Signature `virtual void init(const DataPoints &filteredReference)` ### Parameters - **filteredReference** (const DataPoints &) - The reference data points to be used for neighbor searching. ### Implements `PointMatcher< T >::Matcher::init` ### Definition `MatchersImpl.cpp:41` ``` -------------------------------- ### Test Case Start Logging Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html Logs the start of a test case, including the number of tests within it and its name. It also handles printing type parameter information if available. ```cpp void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) { const std::string counts = FormatCountableNoun(test_case.test_to_run_count(), "test", "tests"); ColoredPrintf(COLOR_GREEN, "[----------] "); printf("%s from %s", counts.c_str(), test_case.name()); if (test_case.type_param() == NULL) { printf("\n"); } else { printf(", where %s = %s\n", kTypeParamLabel, test_case.type_param()); } fflush(stdout); } ``` -------------------------------- ### SetUpTestCaseFunc Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1Test.html Typedef for the SetUpTestCaseFunc in testing::Test. ```APIDOC ## ◆ SetUpTestCaseFunc typedef internal::SetUpTestCaseFunc testing::Test::SetUpTestCaseFunc --- Definition at line 17766 of file gtest.h. ``` -------------------------------- ### Usage information for the convert utility Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/convert_8cpp_source.html Displays the correct command-line usage and provides examples for running the convert utility. This function is called when the number of arguments is insufficient. ```cpp void usage(char *argv[]) { cerr << "Usage " << argv[0] << " [CONFIG.yaml] INPUT.csv/.vtk/.ply OUTPUT.csv/.vtk/.ply" << endl; cerr << endl << "Example:" << endl; cerr << argv[0] << " ../examples/data/default-convert.yaml ../examples/data/cloud.00000.vtk /tmp/output.vtk" << endl << endl; cerr << " or " << endl; cerr << argv[0] << "../examples/data/cloud.00000.vtk /tmp/output.csv" << endl << endl; } ``` -------------------------------- ### Translation, Rotation, and Upscaling Transformation Example Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/Transformations_8cpp_source.html Example of creating a 3D transformation that includes translation, rotation, and upscaling, then applying and asserting its effect on DataPoints. This is part of a test case. ```cpp { const Eigen::Matrix translation{ 1, -3, -4 }; const Eigen::Quaternion rotation{ 0, -2.54, 0, 0.5 }; const NumericType scale{ 1.9 }; const Eigen::Transform transformation = buildUpTransformation3D(translation, rotation, scale); // Transform and assert on the result. assertOnDataPointsTransformation(trajectory, transformation.matrix(), transformator, 1e-6); } ``` -------------------------------- ### Test Execution Flow (C++) Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/gtest-all_8cc_source.html This method orchestrates the execution of a test, including calling SetUp(), the test body, and TearDown(). It ensures TearDown() is called even if SetUp() or the test body fails. ```cpp void Test::Run() { if (!HasSameFixtureClass()) return; internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()") // We will run the test only if SetUp() was successful. if (!HasFatalFailure()) { impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported( this, &Test::TestBody, "the test body"); } // However, we want to clean up as much as possible. Hence we will // always call TearDown(), even if SetUp() or the test body has // failed. impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported( this, &Test::TearDown, "TearDown()"); } ``` -------------------------------- ### OnTestStart Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1EmptyTestEventListener.html Called at the beginning of a test. ```APIDOC ## OnTestStart() ### Description This method is called before a test begins execution. ### Method `virtual void OnTestStart(const TestInfo &)` ### Parameters * **`const TestInfo &`**: A reference to the TestInfo object. ### Remarks Implements testing::TestEventListener. ``` -------------------------------- ### ICP Setup and Configuration Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/icp_8py_source.html Imports necessary libraries and sets up configuration parameters for ICP. This includes options for saving transformations, verbosity, configuration file paths, output directories, and dimensionality (2D/3D). ```python import numpy as np from pypointmatcher import pointmatcher as pm from utils import parse_translation, parse_rotation PM = pm.PointMatcher DP = PM.DataPoints # Save transformation matrix in three different files: # - BASEFILENAME_inti_transfo.txt # - BASEFILENAME_icp_transfo.txt # - BASEFILENAME_complete_transfo.txt # (default: false) is_transfo_saved = False # Be more verbose (info logging to the console) is_verbose = True # Load the config from a YAML file (default: default.yaml) # Leave empty to set the ICP default configuration config_file = "../data/default.yaml" # Path of output directory (default: tests/icp/) # The output directory must already exist # Leave empty to save in the current directory output_base_directory = "tests/icp/" # Name of output files (default: test) output_base_file = "test" # Toggle to switch between 2D and 3D point clouds is_3D = True # Add an initial 3D translation before applying ICP (default: 0,0,0) # Add an initial 2D translation before applying ICP (default: 0,0) ``` -------------------------------- ### Class Members starting with 'w' Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/functions_w.html This section lists members of classes within the libpointmatcher library whose names start with the letter 'w'. It includes variables and functions with their respective class scopes. ```APIDOC ## Class Members starting with 'w' ### Description Lists members of classes within the libpointmatcher library whose names start with the letter 'w'. It includes variables and functions with their respective class scopes. ### Members - **warningFileName** : PointMatcherSupport::FileLogger - **warningPrinted** : OutlierFiltersImpl< T >::SurfaceNormalOutlierFilter - **warningStream()** : PointMatcherSupport::FileLogger , PointMatcherSupport::Logger - **warpedXYZ** : GestaltDataPointsFilter< T >::BuildData - **weightedPointUsedRatio** : PointMatcher< T >::ErrorMinimizer::ErrorElements - **weights** : ElipsoidsDataPointsFilter< T >::BuildData , PointMatcher< T >::ErrorMinimizer::ErrorElements - **Welsch** : OutlierFiltersImpl< T >::RobustOutlierFilter - **WideCStringEquals()** : testing::internal::String - **width** : PointMatcherIO< T >::PCDheader ``` -------------------------------- ### GenericTest Class Definition Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/GeneralTests_8cpp_source.html Defines a base class for ICP tests, providing SetUp and TearDown methods. SetUp is called before each test, and TearDown is called after. It includes commented-out code for setting up a file logger. ```cpp class GenericTest: public IcpHelper { public: // Will be called for every tests virtual void SetUp() { icp.setDefault(); // Uncomment for consol outputs //setLogger(PM::get().LoggerRegistrar.create("FileLogger")); } // Will be called for every tests virtual void TearDown() { } }; ``` -------------------------------- ### Begin() Source: https://docs.ros.org/en/noetic/api/libpointmatcher/html/classtesting_1_1internal_1_1ValuesInIteratorRangeGenerator.html Returns a pointer to the beginning of the parameter iterator interface. ```APIDOC ## Begin() template virtual ParamIteratorInterface* testing::internal::ValuesInIteratorRangeGenerator< T >::Begin() const ```