Classes | Public Types | Public Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
mp2p_icp::ICP Class Reference

#include <ICP.h>

Inheritance diagram for mp2p_icp::ICP:
Inheritance graph
[legend]

Classes

struct  ICP_State
 
struct  IterationHook_Input
 
struct  IterationHook_Output
 
struct  QualityEvaluatorEntry
 

Public Types

using iteration_hook_t = std::function< IterationHook_Output(const IterationHook_Input &)>
 

Public Member 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)
 
void attachToParameterSource (ParameterSource &source)
 
virtual void initialize_derived ([[maybe_unused]] const mrpt::containers::yaml &p)
 
mrpt::system::CTimeLogger & profiler ()
 
const mrpt::system::CTimeLogger & profiler () const
 
void setIterationHook (const iteration_hook_t &ih)
 

Static Protected Member Functions

static void save_log_file (const LogRecord &log, const Parameters &p)
 

Protected Attributes

iteration_hook_t iteration_hook_
 
matcher_list_t matchers_
 
mrpt::system::CTimeLogger profiler_ {false , "mp2p_icp::ICP"}
 
quality_eval_list_t quality_evaluators_
 
solver_list_t solvers_
 

Private Attributes

ParameterSource ownParamSource_
 

Module: Solver instances

using solver_list_t = std::vector< mp2p_icp::Solver::Ptr >
 
void initialize_solvers (const mrpt::containers::yaml &params)
 
const solver_list_tsolvers () const
 
solver_list_tsolvers ()
 
static void initialize_solvers (const mrpt::containers::yaml &params, ICP::solver_list_t &lst)
 
static bool run_solvers (const solver_list_t &solvers, const Pairings &pairings, OptimalTF_Result &out, const SolverContext &sc={})
 

Module: Matcher instances

void initialize_matchers (const mrpt::containers::yaml &params)
 
const matcher_list_tmatchers () const
 
matcher_list_tmatchers ()
 
static void initialize_matchers (const mrpt::containers::yaml &params, matcher_list_t &lst)
 

Module: QualityEvaluator instances

using quality_eval_list_t = std::vector< QualityEvaluatorEntry >
 
void initialize_quality_evaluators (const mrpt::containers::yaml &params)
 
const quality_eval_list_tquality_evaluators () const
 
quality_eval_list_tquality_evaluators ()
 
static void initialize_quality_evaluators (const mrpt::containers::yaml &params, 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)
 

Detailed Description

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.

Definition at line 51 of file ICP.h.

Member Typedef Documentation

◆ iteration_hook_t

Definition at line 223 of file ICP.h.

◆ quality_eval_list_t

Definition at line 148 of file ICP.h.

◆ solver_list_t

using mp2p_icp::ICP::solver_list_t = std::vector<mp2p_icp::Solver::Ptr>

Definition at line 70 of file ICP.h.

Member Function Documentation

◆ align()

void ICP::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 
)
virtual

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.

Reimplemented in mp2p_icp::ICP_LibPointmatcher.

Definition at line 27 of file mp2p_icp/src/ICP.cpp.

◆ attachToParameterSource()

void mp2p_icp::ICP::attachToParameterSource ( ParameterSource source)
inline

Definition at line 185 of file ICP.h.

◆ evaluate_quality()

double ICP::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 
)
static

Definition at line 596 of file mp2p_icp/src/ICP.cpp.

◆ initialize_derived()

virtual void mp2p_icp::ICP::initialize_derived ( [[maybe_unused] ] const mrpt::containers::yaml &  p)
inlinevirtual

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()

Definition at line 199 of file ICP.h.

◆ initialize_matchers() [1/2]

void ICP::initialize_matchers ( const mrpt::containers::yaml &  params)

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 a params dictionary entries.

Example:

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()

Definition at line 526 of file mp2p_icp/src/ICP.cpp.

◆ initialize_matchers() [2/2]

void ICP::initialize_matchers ( const mrpt::containers::yaml &  params,
matcher_list_t lst 
)
static

Definition at line 531 of file mp2p_icp/src/ICP.cpp.

◆ initialize_quality_evaluators() [1/2]

void ICP::initialize_quality_evaluators ( const mrpt::containers::yaml &  params)

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 a params dictionary entries.

Example:

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()

Definition at line 591 of file mp2p_icp/src/ICP.cpp.

◆ initialize_quality_evaluators() [2/2]

void ICP::initialize_quality_evaluators ( const mrpt::containers::yaml &  params,
ICP::quality_eval_list_t lst 
)
static

Definition at line 558 of file mp2p_icp/src/ICP.cpp.

◆ initialize_solvers() [1/2]

void ICP::initialize_solvers ( const mrpt::containers::yaml &  params)

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 a params dictionary entries.

Read the comments for ICP on the possible existence of more than one solver.

Example:

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()

Definition at line 494 of file mp2p_icp/src/ICP.cpp.

◆ initialize_solvers() [2/2]

void ICP::initialize_solvers ( const mrpt::containers::yaml &  params,
ICP::solver_list_t lst 
)
static

Definition at line 499 of file mp2p_icp/src/ICP.cpp.

◆ matchers() [1/2]

matcher_list_t& mp2p_icp::ICP::matchers ( )
inline

Definition at line 131 of file ICP.h.

◆ matchers() [2/2]

const matcher_list_t& mp2p_icp::ICP::matchers ( ) const
inline

Definition at line 130 of file ICP.h.

◆ profiler() [1/2]

mrpt::system::CTimeLogger& mp2p_icp::ICP::profiler ( )
inline

Definition at line 231 of file ICP.h.

◆ profiler() [2/2]

const mrpt::system::CTimeLogger& mp2p_icp::ICP::profiler ( ) const
inline

Definition at line 230 of file ICP.h.

◆ quality_evaluators() [1/2]

quality_eval_list_t& mp2p_icp::ICP::quality_evaluators ( )
inline

Definition at line 176 of file ICP.h.

◆ quality_evaluators() [2/2]

const quality_eval_list_t& mp2p_icp::ICP::quality_evaluators ( ) const
inline

Definition at line 172 of file ICP.h.

◆ run_solvers()

bool ICP::run_solvers ( const solver_list_t solvers,
const Pairings pairings,
OptimalTF_Result out,
const SolverContext sc = {} 
)
static

Runs a set of solvers.

Definition at line 482 of file mp2p_icp/src/ICP.cpp.

◆ save_log_file()

void ICP::save_log_file ( const LogRecord log,
const Parameters p 
)
staticprotected

Definition at line 391 of file mp2p_icp/src/ICP.cpp.

◆ setIterationHook()

void mp2p_icp::ICP::setIterationHook ( const iteration_hook_t ih)
inline

Definition at line 225 of file ICP.h.

◆ solvers() [1/2]

solver_list_t& mp2p_icp::ICP::solvers ( )
inline

Definition at line 97 of file ICP.h.

◆ solvers() [2/2]

const solver_list_t& mp2p_icp::ICP::solvers ( ) const
inline

Definition at line 96 of file ICP.h.

Member Data Documentation

◆ iteration_hook_

iteration_hook_t mp2p_icp::ICP::iteration_hook_
protected

Definition at line 239 of file ICP.h.

◆ matchers_

matcher_list_t mp2p_icp::ICP::matchers_
protected

Definition at line 235 of file ICP.h.

◆ ownParamSource_

ParameterSource mp2p_icp::ICP::ownParamSource_
private

Definition at line 261 of file ICP.h.

◆ profiler_

mrpt::system::CTimeLogger mp2p_icp::ICP::profiler_ {false , "mp2p_icp::ICP"}
protected

Definition at line 241 of file ICP.h.

◆ quality_evaluators_

quality_eval_list_t mp2p_icp::ICP::quality_evaluators_
protected
Initial value:
= {
{QualityEvaluator_PairedRatio::Create(), 1.0}}

Definition at line 236 of file ICP.h.

◆ solvers_

solver_list_t mp2p_icp::ICP::solvers_
protected

Definition at line 234 of file ICP.h.


The documentation for this class was generated from the following files:
Parameters
PM::Parameters Parameters
Definition: filterProfiler.cpp:20
mp2p_icp::Matcher_Points_DistanceThreshold
Definition: Matcher_Points_DistanceThreshold.h:30
mp2p_icp::QualityEvaluator_PairedRatio
Definition: QualityEvaluator_PairedRatio.h:26
mp2p_icp::Solver_Horn
Definition: Solver_Horn.h:22


mp2p_icp
Author(s):
autogenerated on Wed Oct 23 2024 02:45:42