Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Member Functions | Public Attributes
mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t > Struct Template Reference

Detailed Description

template<class GRAPH_t>
struct mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >

Class containing the declarations of supplementary methods that can be used in application-related code.

Class instance can be handy for adding keeping the available deciders/optimizers in a compact manner and for verifying whether a given decider can be used.

Definition at line 106 of file TUserOptionsChecker.h.

#include <mrpt/graphslam/apps_related/TUserOptionsChecker.h>

Inheritance diagram for mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >:
Inheritance graph

Public Types

handy typedefs for the creation of deciders/optimzer instances from

the corresponding strings

typedef GRAPH_t::constraint_t constraint_t
 
typedef GRAPH_t::constraint_t::type_value pose_t
 
typedef std::map< std::string, mrpt::graphslam::deciders::CNodeRegistrationDecider< GRAPH_t > *(*)()> node_regs_t
 
typedef std::map< std::string, mrpt::graphslam::deciders::CEdgeRegistrationDecider< GRAPH_t > *(*)()> edge_regs_t
 
typedef std::map< std::string, mrpt::graphslam::optimizers::CGraphSlamOptimizer< GRAPH_t > *(*)()> optimizers_t
 

Public Member Functions

 TUserOptionsChecker ()
 Constructor. More...
 
virtual ~TUserOptionsChecker ()
 Destructor. More...
 
virtual void createDeciderOptimizerMappings ()
 Create the necessary mappings from strings to the corresponding instance creation functors. More...
 
virtual void _createDeciderOptimizerMappings ()
 
virtual void populateDeciderOptimizerProperties ()
 Populate the available decider, optimizer classes available in user applications. More...
 
virtual bool checkRegistrationDeciderExists (std::string given_reg, std::string reg_type) const
 Check if the given registrator decider exists in the vector of deciders. More...
 
virtual bool checkOptimizerExists (std::string given_opt) const
 Check if the given optimizer exists in the vector of optimizers. More...
 
virtual void dumpRegistrarsToConsole (std::string reg_type="all") const
 Print the registration deciders vector in a formatted manner to the standard output. More...
 
virtual void dumpOptimizersToConsole () const
 Print the optimizers vector in a formatted manner to the standard output. More...
 
void _createDeciderOptimizerMappings ()
 
void _createDeciderOptimizerMappings ()
 
void _createDeciderOptimizerMappings ()
 

Static Public Member Functions

Methods for initializing decider/optimizer instances based on the

user command line choices - http://stackoverflow.com/a/582456/2843583

Warning
Caller is responsible for deleting the initialized instances
template<class T >
static mrpt::graphslam::deciders::CNodeRegistrationDecider< GRAPH_t > * createNodeRegistrationDecider ()
 
template<class T >
static mrpt::graphslam::deciders::CEdgeRegistrationDecider< GRAPH_t > * createEdgeRegistrationDecider ()
 
template<class T >
static mrpt::graphslam::optimizers::CGraphSlamOptimizer< GRAPH_t > * createGraphSlamOptimizer ()
 

Public Attributes

const std::string sep_header
 
const std::string sep_subheader
 
Mappings from registration decider/optimizer names to functors

}

for creating instances of the corresponding classes

node_regs_t node_regs_map
 
edge_regs_t edge_regs_map
 
optimizers_t optimizers_map
 
Vectors containing descriptions about the available

deciders/optimizers.

Handy for displaying information to the user (e.g. in help text)

std::vector< TRegistrationDeciderProps * > regs_descriptions
 
std::vector< TOptimizerProps * > optimizers_descriptions
 

Member Typedef Documentation

◆ constraint_t

template<class GRAPH_t >
typedef GRAPH_t::constraint_t mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::constraint_t

Definition at line 112 of file TUserOptionsChecker.h.

◆ edge_regs_t

template<class GRAPH_t >
typedef std::map< std::string, mrpt::graphslam::deciders::CEdgeRegistrationDecider<GRAPH_t>* (*)()> mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::edge_regs_t

Definition at line 121 of file TUserOptionsChecker.h.

◆ node_regs_t

template<class GRAPH_t >
typedef std::map< std::string, mrpt::graphslam::deciders::CNodeRegistrationDecider<GRAPH_t>* (*)()> mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::node_regs_t

Definition at line 117 of file TUserOptionsChecker.h.

◆ optimizers_t

template<class GRAPH_t >
typedef std::map< std::string, mrpt::graphslam::optimizers::CGraphSlamOptimizer<GRAPH_t>* (*)()> mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::optimizers_t

Definition at line 125 of file TUserOptionsChecker.h.

◆ pose_t

template<class GRAPH_t >
typedef GRAPH_t::constraint_t::type_value mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::pose_t

Definition at line 113 of file TUserOptionsChecker.h.

Constructor & Destructor Documentation

◆ TUserOptionsChecker()

Constructor.

Definition at line 18 of file TUserOptionsChecker_impl.h.

◆ ~TUserOptionsChecker()

template<class GRAPH_t >
mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::~TUserOptionsChecker
virtual

Destructor.

Definition at line 24 of file TUserOptionsChecker_impl.h.

Member Function Documentation

◆ _createDeciderOptimizerMappings() [1/4]

template<class GRAPH_t >
void mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::_createDeciderOptimizerMappings
virtual

Definition at line 75 of file TUserOptionsChecker_impl.h.

◆ _createDeciderOptimizerMappings() [2/4]

Definition at line 82 of file TUserOptionsChecker_impl.h.

◆ _createDeciderOptimizerMappings() [3/4]

Definition at line 95 of file TUserOptionsChecker_impl.h.

◆ _createDeciderOptimizerMappings() [4/4]

Definition at line 110 of file TUserOptionsChecker_impl.h.

◆ checkOptimizerExists()

template<class GRAPH_t >
bool mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::checkOptimizerExists ( std::string  given_opt) const
virtual

Check if the given optimizer exists in the vector of optimizers.

Returns
True if it exists, false otherwise

Definition at line 274 of file TUserOptionsChecker_impl.h.

References IS_CLASS, mrpt::graphslam::apps::TRegistrationDeciderOrOptimizerProps::is_slam_2d, mrpt::graphslam::apps::TRegistrationDeciderOrOptimizerProps::is_slam_3d, MRPT_END, MRPT_START, mrpt::graphslam::apps::TRegistrationDeciderOrOptimizerProps::name, and mrpt::system::strCmpI().

Here is the call graph for this function:

◆ checkRegistrationDeciderExists()

template<class GRAPH_t >
bool mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::checkRegistrationDeciderExists ( std::string  given_reg,
std::string  reg_type 
) const
virtual

Check if the given registrator decider exists in the vector of deciders.

Parameters
[in]given_regString specifying the type of decider - This should either be "node" or "edge"
Returns
True if it exists, false otherwise

Definition at line 226 of file TUserOptionsChecker_impl.h.

References ASSERTMSG_, mrpt::format(), IS_CLASS, mrpt::graphslam::apps::TRegistrationDeciderOrOptimizerProps::is_slam_2d, mrpt::graphslam::apps::TRegistrationDeciderOrOptimizerProps::is_slam_3d, MRPT_END, MRPT_START, mrpt::graphslam::apps::TRegistrationDeciderOrOptimizerProps::name, mrpt::system::strCmpI(), and mrpt::graphslam::apps::TRegistrationDeciderProps::type.

Here is the call graph for this function:

◆ createDeciderOptimizerMappings()

template<class GRAPH_t >
void mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::createDeciderOptimizerMappings
virtual

Create the necessary mappings from strings to the corresponding instance creation functors.

Method is used for populating a map from string to instance creation function. The decider/optimzer can then be spawned according to the user selection.

Definition at line 45 of file TUserOptionsChecker_impl.h.

References MRPT_END, and MRPT_START.

◆ createEdgeRegistrationDecider()

template<class GRAPH_t >
template<class T >
static mrpt::graphslam::deciders::CEdgeRegistrationDecider<GRAPH_t>* mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::createEdgeRegistrationDecider ( )
inlinestatic

Definition at line 192 of file TUserOptionsChecker.h.

◆ createGraphSlamOptimizer()

template<class GRAPH_t >
template<class T >
static mrpt::graphslam::optimizers::CGraphSlamOptimizer<GRAPH_t>* mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::createGraphSlamOptimizer ( )
inlinestatic

Definition at line 198 of file TUserOptionsChecker.h.

◆ createNodeRegistrationDecider()

template<class GRAPH_t >
template<class T >
static mrpt::graphslam::deciders::CNodeRegistrationDecider<GRAPH_t>* mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::createNodeRegistrationDecider ( )
inlinestatic

Definition at line 186 of file TUserOptionsChecker.h.

◆ dumpOptimizersToConsole()

template<class GRAPH_t >
void mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::dumpOptimizersToConsole
virtual

◆ dumpRegistrarsToConsole()

template<class GRAPH_t >
void mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::dumpRegistrarsToConsole ( std::string  reg_type = "all") const
virtual

Print the registration deciders vector in a formatted manner to the standard output.

Parameters
[in]reg_typeMethod prints both the node registration and edge registration deciders of the given vector unless specified otherwise. The available argument options are "node", "edge", "all"

Definition at line 115 of file TUserOptionsChecker_impl.h.

References ASSERTMSG_, mrpt::format(), MRPT_START, and mrpt::system::strCmpI().

Here is the call graph for this function:

◆ populateDeciderOptimizerProperties()

template<class GRAPH_t >
void mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::populateDeciderOptimizerProperties
virtual

Member Data Documentation

◆ edge_regs_map

template<class GRAPH_t >
edge_regs_t mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::edge_regs_map

Definition at line 209 of file TUserOptionsChecker.h.

◆ node_regs_map

template<class GRAPH_t >
node_regs_t mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::node_regs_map

Definition at line 208 of file TUserOptionsChecker.h.

◆ optimizers_descriptions

template<class GRAPH_t >
std::vector<TOptimizerProps*> mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::optimizers_descriptions

Definition at line 220 of file TUserOptionsChecker.h.

◆ optimizers_map

template<class GRAPH_t >
optimizers_t mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::optimizers_map

Definition at line 210 of file TUserOptionsChecker.h.

◆ regs_descriptions

template<class GRAPH_t >
std::vector<TRegistrationDeciderProps*> mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::regs_descriptions

Definition at line 219 of file TUserOptionsChecker.h.

◆ sep_header

template<class GRAPH_t >
const std::string mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::sep_header

Definition at line 223 of file TUserOptionsChecker.h.

◆ sep_subheader

template<class GRAPH_t >
const std::string mrpt::graphslam::apps::TUserOptionsChecker< GRAPH_t >::sep_subheader

Definition at line 224 of file TUserOptionsChecker.h.




Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 63ea9d1f1 Thu Nov 23 00:06:53 2017 +0100 at mar 26 may 2026 12:19:29 CEST