17 template <
class GRAPH_t>
19 : sep_header(40,
'='), sep_subheader(20,
'-')
23 template <
class GRAPH_t>
31 regs_descriptions.begin();
32 it != regs_descriptions.end(); ++it)
37 optimizers_descriptions.begin();
38 it != optimizers_descriptions.end(); ++it)
44 template <
class GRAPH_t>
55 node_regs_map[
"CEmptyNRD"] =
56 &createNodeRegistrationDecider<CEmptyNRD<GRAPH_t>>;
57 node_regs_map[
"CFixedIntervalsNRD"] =
58 &createNodeRegistrationDecider<CFixedIntervalsNRD<GRAPH_t>>;
60 edge_regs_map[
"CEmptyERD"] =
61 &createEdgeRegistrationDecider<CEmptyERD<GRAPH_t>>;
63 optimizers_map[
"CLevMarqGSO"] =
64 &createGraphSlamOptimizer<CLevMarqGSO<GRAPH_t>>;
65 optimizers_map[
"CEmptyGSO"] =
66 &createGraphSlamOptimizer<CLevMarqGSO<GRAPH_t>>;
69 this->_createDeciderOptimizerMappings();
74 template <
class GRAPH_t>
86 node_regs_map[
"CICPCriteriaNRD"] =
87 &createNodeRegistrationDecider<CICPCriteriaNRD<CNetworkOfPoses2DInf>>;
88 edge_regs_map[
"CICPCriteriaERD"] =
89 &createEdgeRegistrationDecider<CICPCriteriaERD<CNetworkOfPoses2DInf>>;
90 edge_regs_map[
"CLoopCloserERD"] =
91 &createEdgeRegistrationDecider<CLoopCloserERD<CNetworkOfPoses2DInf>>;
99 node_regs_map[
"CICPCriteriaNRD"] = &createNodeRegistrationDecider<
101 edge_regs_map[
"CICPCriteriaERD"] = &createEdgeRegistrationDecider<
103 edge_regs_map[
"CLoopCloserERD"] =
104 &createEdgeRegistrationDecider<CLoopCloserERD<CNetworkOfPoses2DInf_NA>>;
114 template <
class GRAPH_t>
120 using namespace mrpt;
126 "Registrar string '%s' does not match a known registrar name.\n"
127 "Specify 'node' 'edge' or 'all'",
134 <<
" Registration Deciders: " << endl;
135 cout << sep_header << endl;
138 regs_descriptions.begin();
139 dec_it != regs_descriptions.end(); ++dec_it)
145 cout << sep_subheader << endl;
151 <<
"Observations that can be used: " << endl;
153 <<
"Multi-robot SLAM capable decider: "
156 <<
"SLAM Type: " << endl;
172 cout <<
"\t\t+ " << *obs_it << endl;
179 dumpRegistrarsToConsole(
"node");
180 dumpRegistrarsToConsole(
"edge");
186 template <
class GRAPH_t>
193 cout << endl <<
"Available GraphSlam Optimizer classes: " << endl;
194 cout << sep_header << endl;
197 optimizers_descriptions.begin();
198 opt_it != optimizers_descriptions.end(); ++opt_it)
201 cout << opt->
name << endl;
202 cout << sep_subheader << endl;
207 <<
"Multi-robot SLAM capable optimizer: "
210 <<
"SLAM Type: " << endl;
225 template <
class GRAPH_t>
232 using namespace mrpt;
239 "Registrar string \"%s\" does not match a known registrar name.\n"
240 "Specify 'node' or 'edge' ",
245 regs_descriptions.begin();
246 dec_it != regs_descriptions.end(); ++dec_it)
273 template <
class GRAPH_t>
279 using namespace mrpt;
285 optimizers_descriptions.begin();
286 opt_it != optimizers_descriptions.end(); ++opt_it)
309 template <
class GRAPH_t>
315 regs_descriptions.clear();
316 optimizers_descriptions.clear();
321 dec->
name =
"CFixedIntervalsNRD";
323 "Register a new node if the distance from the previous node "
324 "surpasses a predefined distance threshold. Uses odometry "
325 "information for estimating the robot movement";
333 regs_descriptions.push_back(dec);
337 dec->
name =
"CICPCriteriaNRD";
339 "Register a new node if the distance from the previous node "
340 "surpasses a predefined distance threshold. Uses 2D/3D RangeScans "
341 "alignment for estimating the robot movement";
348 regs_descriptions.push_back(dec);
352 dec->
name =
"CEmptyNRD";
354 "Empty Decider - does nothing when its class methods are called";
361 regs_descriptions.push_back(dec);
365 dec->
name =
"CICPCriteriaERD";
367 "Register a new edge by aligning the provided 2D/3D RangeScans of "
368 "2 nodes. Uses the goodness of the ICP Alignment as the criterium "
369 "for adding a new edge";
373 "CObservation2DRangeScan - Format #1, #2");
377 regs_descriptions.push_back(dec);
381 dec->
name =
"CEmptyERD";
383 "Empty Decider - does nothing when its class methods are called";
390 regs_descriptions.push_back(dec);
394 dec->
name =
"CLoopCloserERD";
396 "Partition the map and register *sets* of edges based on the "
397 "Pairwise consistency matrix of each set.";
401 "CObservation2DRangeScan - Format #1, #2");
404 regs_descriptions.push_back(dec);
410 opt->
name =
"CEmptyGSO";
412 "Empty Optimizer - does nothing when its class methods are called";
417 optimizers_descriptions.push_back(opt);
422 opt->
name =
"CLevMarqGSO";
423 opt->
description =
"Levenberg-Marqurdt non-linear graphSLAM solver";
428 optimizers_descriptions.push_back(opt);
#define IS_CLASS(ptrObj, class_name)
Evaluates to true if the given pointer to an object (derived from mrpt::utils::CSerializable) is of t...
A directed graph of pose constraints, with edges being the relative poses between pairs of nodes iden...
ICP-based Edge Registration.
ICP-based Fixed Intervals Node Registration.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
const Scalar * const_iterator
GLsizei const GLchar ** string
bool strCmpI(const std::string &s1, const std::string &s2)
Return true if the two strings are equal (case insensitive)
std::string upperCase(const std::string &str)
Returns a upper-case version of a string.
#define ASSERTMSG_(f, __ERROR_MSG)
Abstract graph and tree data structures, plus generic graph algorithms.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
Properties struct for the Optimizer classes.
std::string name
Name of the decider or optimizer class.
std::string description
General description of the decicder or optimizer class.
bool is_mr_slam_class
Class indicating if the current decider/optimizer class can be used in a multi-robot SLAM operation.
Properties struct for the Registration Decider classes.
std::vector< std::string > observations_used
Measurements that the current decider class can utilize.
std::string rawlog_format
Rawlog formats that the decider can be used in.
std::string type
Type of decider.
Class containing the declarations of supplementary methods that can be used in application-related co...
virtual bool checkOptimizerExists(std::string given_opt) const
Check if the given optimizer exists in the vector of optimizers.
virtual ~TUserOptionsChecker()
Destructor.
virtual void populateDeciderOptimizerProperties()
Populate the available decider, optimizer classes available in user applications.
TUserOptionsChecker()
Constructor.
virtual void createDeciderOptimizerMappings()
Create the necessary mappings from strings to the corresponding instance creation functors.
virtual void dumpOptimizersToConsole() const
Print the optimizers vector in a formatted manner to the standard output.
GRAPH_t::constraint_t::type_value pose_t
virtual void _createDeciderOptimizerMappings()
virtual bool checkRegistrationDeciderExists(std::string given_reg, std::string reg_type) const
Check if the given registrator decider exists in the vector of deciders.
virtual void dumpRegistrarsToConsole(std::string reg_type="all") const
Print the registration deciders vector in a formatted manner to the standard output.