From 5988a03571687650662795d7daf28d9f29fdaf77 Mon Sep 17 00:00:00 2001 From: Ethan Uppal <113849268+ethanuppal@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:33:05 -0400 Subject: [PATCH] Update docs --- docs/_writing.html | 32 +++++++++++++-------- docs/classicp_1_1_i_c_p.html | 2 +- docs/icp_8cpp_source.html | 10 +++---- docs/icp_8h_source.html | 50 ++++++++++++++++----------------- docs/pages.html | 2 +- docs/search/all_0.js | 2 +- docs/search/all_6.js | 4 +-- docs/search/pages_0.js | 2 +- docs/search/pages_1.js | 4 +-- docs/structicp_1_1_methods.html | 6 ++-- 10 files changed, 61 insertions(+), 53 deletions(-) diff --git a/docs/_writing.html b/docs/_writing.html index 61f262b..4c33ea2 100644 --- a/docs/_writing.html +++ b/docs/_writing.html @@ -5,7 +5,7 @@ -scan matching: an ICP Implementation +scan matching: an ICP Instance @@ -73,29 +73,37 @@
-
an ICP Implementation
+
an ICP Instance
-

An ICP implementation should reside in a single C++ source file, e.g., my_icp.cpp. You should declare a final class named MyICP that inherits public icp::ICP that must provide the following functionality:

+

To write an ICP instance, create a C++ source file with at least the following:

+
    +
  1. A final class that inherits from public icp::ICP
  2. +
  3. A static initialization variable (described below)
  4. +
+

The class must define the following behavior:

    -
  • MyICP()
  • -
  • ~MyICP() override
  • +
  • A constructor that calls the icp::ICP constructor
  • +
  • An overridden destructor (which may do nothing)
  • void iterate() override
-

You may optionally override the following methods:

+

In iterate, the point clouds are given by the instance variables a and b. There are also pair and dist instance variables, each allocated to have size a.size(). At the end of iterate, the transform instance variable should have been updated (although the update may be zero).

+

Optionally, the class can override:

    -
  • setup() override
  • -
  • const std::vector<Vector>& a, const std::vector<Vector>& b) override
  • +
  • void setup() override
  • +
  • void trim(const std::vector<Vector>& a, const std::vector<Vector>& b) override
-

Finally, define the following static variable:

+

trim should initialize the instance variables a and b from the given point clouds a and b. The default behavior is to copy them over directly.

+

The static initialization is required so that users can instantiate your ICP instance. Define

++
static bool static_initialization = []() {
-
assert(ICP::register_method("my_icp", []() -> std::unique_ptr<ICP> {
-
return std::make_unique<MyICP>();
+
assert(ICP::register_method("name_of_instance", []() -> std::unique_ptr<ICP> {
+
return std::make_unique<NameOfClass>();
}));
return true;
}();
-
+

where "name_of_instance" is the name of your ICP implementation and NameOfClass is the name of the class.

+