Class ICP
Defined in File ICP.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Types
public mrpt::system::COutputLogger
public mrpt::rtti::CObject
Derived Type
public mp2p_icp::ICP_LibPointmatcher
(Class ICP_LibPointmatcher)
Class Documentation
-
class ICP : public mrpt::system::COutputLogger, public mrpt::rtti::CObject
Generic ICP algorithm container: builds a custom ICP pipeline by selecting algorithm and parameter for each stage.
The main API entry point is align().
A convenient way to create an ICP pipeline instance is using a YAML configuration file and calling mp2p_icp::icp_pipeline_from_yaml().
- Todo:
Add pipeline picture.
Several solvers may exists, but the output from the first one returning
true
will be used. This is by design, to enable different solver algorithms depending on the ICP iteration or the type of geometric entities.Subclassed by mp2p_icp::ICP_LibPointmatcher
Module: Solver instances
-
void initialize_solvers(const mrpt::containers::yaml ¶ms)
Create and configure one or more “Solver” modules from YAML-like config block. Config must be a sequence of one or more entries, each with a
class
and aparams
dictionary entries.Read the comments for ICP on the possible existence of more than one solver.
Example:
- class: mp2p_icp::Solver_Horn params: # Parameters depend on the particular class # none
Alternatively, the objects can be directly created via solvers().
See also
mp2p_icp::icp_pipeline_from_yaml()
-
inline const solver_list_t &solvers() const
-
inline solver_list_t &solvers()
-
static void initialize_solvers(const mrpt::containers::yaml ¶ms, ICP::solver_list_t &lst)
-
static bool run_solvers(const solver_list_t &solvers, const Pairings &pairings, OptimalTF_Result &out, const SolverContext &sc = {})
Runs a set of solvers.
Module: QualityEvaluator instances
-
using quality_eval_list_t = std::vector<QualityEvaluatorEntry>
-
void initialize_quality_evaluators(const mrpt::containers::yaml ¶ms)
Create and configure one or more “QualityEvaluator” modules from YAML-like config block. Config must be a sequence of one or more entries, each with a
class
and aparams
dictionary entries.Example:
- class: mp2p_icp::QualityEvaluator_PairedRatio weight: 1.0 # (Optional if only one quality evaluator is defined) params: # Parameters depend on the particular class # xxx: yyyy
Alternatively, the objects can be directly created via matchers().
See also
mp2p_icp::icp_pipeline_from_yaml()
-
inline const quality_eval_list_t &quality_evaluators() const
-
inline quality_eval_list_t &quality_evaluators()
-
static void initialize_quality_evaluators(const mrpt::containers::yaml ¶ms, quality_eval_list_t &lst)
-
static double evaluate_quality(const quality_eval_list_t &evaluators, const metric_map_t &pcGlobal, const metric_map_t &pcLocal, const mrpt::poses::CPose3D &localPose, const Pairings &finalPairings)
Module: Matcher instances
-
void initialize_matchers(const mrpt::containers::yaml ¶ms)
Create and configure one or more “Match” modules from YAML-like config block. Config must be a sequence of one or more entries, each with a
class
and aparams
dictionary entries.Example:
- class: mp2p_icp::Matcher_Points_DistanceThreshold params: # Parameters depend on the particular class threshold: 1.0
Alternatively, the objects can be directly created via matchers().
See also
mp2p_icp::icp_pipeline_from_yaml()
-
inline const matcher_list_t &matchers() const
-
inline matcher_list_t &matchers()
-
static void initialize_matchers(const mrpt::containers::yaml ¶ms, matcher_list_t &lst)
Public Types
-
using iteration_hook_t = std::function<IterationHook_Output(const IterationHook_Input&)>
Public Functions
-
virtual void align(const metric_map_t &pcLocal, const metric_map_t &pcGlobal, const mrpt::math::TPose3D &initialGuessLocalWrtGlobal, const Parameters &p, Results &result, const std::optional<mrpt::poses::CPose3DPDFGaussianInf> &prior = std::nullopt, const mrpt::optional_ref<LogRecord> &outputDebugInfo = std::nullopt)
Register (align) two point clouds (possibly after having been preprocessed to extract features, etc.) and returns the relative pose of pcLocal with respect to pcGlobal.
-
inline void attachToParameterSource(ParameterSource &source)
-
inline virtual void initialize_derived(const mrpt::containers::yaml &p)
For whole-ICP overriden classes (e.g. external ICP library wrappers), initialize those external libraries with these parameters. Invoked from mp2p_icp::icp_pipeline_from_yaml().
See also
mp2p_icp::icp_pipeline_from_yaml()
-
inline void setIterationHook(const iteration_hook_t &ih)
-
inline const mrpt::system::CTimeLogger &profiler() const
-
inline mrpt::system::CTimeLogger &profiler()
Protected Attributes
-
solver_list_t solvers_
-
matcher_list_t matchers_
-
quality_eval_list_t quality_evaluators_ = {{QualityEvaluator_PairedRatio::Create(), 1.0}}
-
iteration_hook_t iteration_hook_
-
mrpt::system::CTimeLogger profiler_ = {false, "mp2p_icp::ICP"}
Protected Static Functions
-
static void save_log_file(const LogRecord &log, const Parameters &p)
-
struct ICP_State
Public Functions
-
inline ICP_State(const metric_map_t &pcsGlobal, const metric_map_t &pcsLocal)
-
inline ICP_State(const metric_map_t &pcsGlobal, const metric_map_t &pcsLocal)
-
struct IterationHook_Output
Public Functions
-
IterationHook_Output() = default
Public Members
-
bool request_stop = false
-
IterationHook_Output() = default
-
struct QualityEvaluatorEntry
Public Functions
-
inline QualityEvaluatorEntry(mp2p_icp::QualityEvaluator::Ptr o, double w)
-
inline QualityEvaluatorEntry(mp2p_icp::QualityEvaluator::Ptr o, double w)