13 template <
class GRAPH_t>
15 : sep_header(40,
'='), sep_subheader(20,
'-')
19 template <
class GRAPH_t>
26 for (
auto it = regs_descriptions.begin(); it != regs_descriptions.end();
31 for (
auto it = optimizers_descriptions.begin();
32 it != optimizers_descriptions.end(); ++it)
38 template <
class GRAPH_t>
49 node_regs_map[
"CEmptyNRD"] =
50 &createNodeRegistrationDecider<CEmptyNRD<GRAPH_t>>;
51 node_regs_map[
"CFixedIntervalsNRD"] =
52 &createNodeRegistrationDecider<CFixedIntervalsNRD<GRAPH_t>>;
54 edge_regs_map[
"CEmptyERD"] =
55 &createEdgeRegistrationDecider<CEmptyERD<GRAPH_t>>;
57 optimizers_map[
"CLevMarqGSO"] =
58 &createGraphSlamOptimizer<CLevMarqGSO<GRAPH_t>>;
59 optimizers_map[
"CEmptyGSO"] =
60 &createGraphSlamOptimizer<CLevMarqGSO<GRAPH_t>>;
63 this->_createDeciderOptimizerMappings();
68 template <
class GRAPH_t>
80 node_regs_map[
"CICPCriteriaNRD"] =
81 &createNodeRegistrationDecider<CICPCriteriaNRD<CNetworkOfPoses2DInf>>;
82 edge_regs_map[
"CICPCriteriaERD"] =
83 &createEdgeRegistrationDecider<CICPCriteriaERD<CNetworkOfPoses2DInf>>;
84 edge_regs_map[
"CLoopCloserERD"] =
85 &createEdgeRegistrationDecider<CLoopCloserERD<CNetworkOfPoses2DInf>>;
93 node_regs_map[
"CICPCriteriaNRD"] = &createNodeRegistrationDecider<
95 edge_regs_map[
"CICPCriteriaERD"] = &createEdgeRegistrationDecider<
97 edge_regs_map[
"CLoopCloserERD"] =
98 &createEdgeRegistrationDecider<CLoopCloserERD<CNetworkOfPoses2DInf_NA>>;
108 template <
class GRAPH_t>
110 std::string reg_type )
const 114 using namespace mrpt;
120 "Registrar string '%s' does not match a known registrar name.\n" 121 "Specify 'node' 'edge' or 'all'",
128 <<
" Registration Deciders: " << endl;
129 cout << sep_header << endl;
131 for (
auto dec_it = regs_descriptions.begin();
132 dec_it != regs_descriptions.end(); ++dec_it)
137 cout << dec->
name << endl;
138 cout << sep_subheader << endl;
144 <<
"Observations that can be used: " << endl;
146 <<
"Multi-robot SLAM capable decider: " 149 <<
"SLAM Type: " << endl;
164 cout <<
"\t\t+ " << *obs_it << endl;
171 dumpRegistrarsToConsole(
"node");
172 dumpRegistrarsToConsole(
"edge");
178 template <
class GRAPH_t>
185 cout << endl <<
"Available GraphSlam Optimizer classes: " << endl;
186 cout << sep_header << endl;
188 for (
auto opt_it = optimizers_descriptions.begin();
189 opt_it != optimizers_descriptions.end(); ++opt_it)
192 cout << opt->
name << endl;
193 cout << sep_subheader << endl;
198 <<
"Multi-robot SLAM capable optimizer: " 201 <<
"SLAM Type: " << endl;
216 template <
class GRAPH_t>
218 std::string given_reg, std::string reg_type)
const 223 using namespace mrpt;
230 "Registrar string \"%s\" does not match a known registrar name.\n" 231 "Specify 'node' or 'edge' ",
235 for (
auto dec_it = regs_descriptions.begin();
236 dec_it != regs_descriptions.end(); ++dec_it)
263 template <
class GRAPH_t>
265 std::string given_opt)
const 269 using namespace mrpt;
274 for (
auto opt_it = optimizers_descriptions.begin();
275 opt_it != optimizers_descriptions.end(); ++opt_it)
298 template <
class GRAPH_t>
304 regs_descriptions.clear();
305 optimizers_descriptions.clear();
310 dec->
name =
"CFixedIntervalsNRD";
312 "Register a new node if the distance from the previous node " 313 "surpasses a predefined distance threshold. Uses odometry " 314 "information for estimating the robot movement";
316 dec->rawlog_format =
"Both";
317 dec->observations_used.emplace_back(
318 "CActionRobotMovement2D - Format #1");
319 dec->observations_used.emplace_back(
"CObservationOdometry - Format #2");
320 dec->is_slam_2d =
true;
321 dec->is_slam_3d =
true;
323 regs_descriptions.push_back(dec);
327 dec->
name =
"CICPCriteriaNRD";
329 "Register a new node if the distance from the previous node " 330 "surpasses a predefined distance threshold. Uses 2D/3D RangeScans " 331 "alignment for estimating the robot movement";
333 dec->rawlog_format =
"#2 - Observation-only";
334 dec->observations_used.emplace_back(
335 "CObservation2DRangeScan - Format #2");
336 dec->observations_used.emplace_back(
337 "CObservation3DRangeScan - Format #2");
338 dec->is_slam_2d =
true;
340 regs_descriptions.push_back(dec);
344 dec->
name =
"CEmptyNRD";
346 "Empty Decider - does nothing when its class methods are called";
348 dec->rawlog_format =
"Both";
349 dec->is_mr_slam_class =
true;
350 dec->is_slam_2d =
true;
351 dec->is_slam_3d =
true;
353 regs_descriptions.push_back(dec);
357 dec->
name =
"CICPCriteriaERD";
359 "Register a new edge by aligning the provided 2D/3D RangeScans of " 360 "2 nodes. Uses the goodness of the ICP Alignment as the criterium " 361 "for adding a new edge";
363 dec->rawlog_format =
"Both";
364 dec->observations_used.emplace_back(
365 "CObservation2DRangeScan - Format #1, #2");
366 dec->observations_used.emplace_back(
367 "CObservation3DRangeScan - Format #2");
368 dec->is_slam_2d =
true;
370 regs_descriptions.push_back(dec);
374 dec->
name =
"CEmptyERD";
376 "Empty Decider - does nothing when its class methods are called";
378 dec->rawlog_format =
"Both";
379 dec->is_mr_slam_class =
true;
380 dec->is_slam_2d =
true;
381 dec->is_slam_3d =
true;
383 regs_descriptions.push_back(dec);
387 dec->
name =
"CLoopCloserERD";
389 "Partition the map and register *sets* of edges based on the " 390 "Pairwise consistency matrix of each set.";
392 dec->rawlog_format =
"Both";
393 dec->observations_used.emplace_back(
394 "CObservation2DRangeScan - Format #1, #2");
395 dec->is_slam_2d =
true;
397 regs_descriptions.push_back(dec);
403 opt->
name =
"CEmptyGSO";
405 "Empty Optimizer - does nothing when its class methods are called";
406 opt->is_mr_slam_class =
true;
407 opt->is_slam_2d =
true;
408 opt->is_slam_3d =
true;
410 optimizers_descriptions.push_back(opt);
415 opt->
name =
"CLevMarqGSO";
416 opt->description =
"Levenberg-Marqurdt non-linear graphSLAM solver";
417 opt->is_mr_slam_class =
true;
418 opt->is_slam_2d =
true;
419 opt->is_slam_3d =
true;
421 optimizers_descriptions.push_back(opt);
Class containing the declarations of supplementary methods that can be used in application-related co...
ICP-based Edge Registration.
TUserOptionsChecker()
Constructor.
std::string std::string format(std::string_view fmt, ARGS &&... args)
Abstract graph and tree data structures, plus generic graph algorithms.
Properties struct for the Registration Decider classes.
ICP-based Fixed Intervals Node Registration.
std::vector< std::string > observations_used
Measurements that the current decider class can utilize.
bool is_mr_slam_class
Class indicating if the current decider/optimizer class can be used in a multi-robot SLAM operation...
A directed graph of pose constraints, with edges being the relative poses between pairs of nodes iden...
std::string type
Type of decider.
typename GRAPH_T ::constraint_t::type_value pose_t
#define IS_CLASS(obj, class_name)
True if the given reference to object (derived from mrpt::rtti::CObject) is of the given class...
std::string description
General description of the decicder or optimizer class.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
#define ASSERTDEBMSG_(f, __ERROR_MSG)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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).
std::string name
Name of the decider or optimizer class.
std::string upperCase(const std::string &str)
Returns a upper-case version of a string.
Properties struct for the Optimizer classes.
std::string rawlog_format
Rawlog formats that the decider can be used in.
bool strCmpI(const std::string &s1, const std::string &s2)
Return true if the two strings are equal (case insensitive)