11 namespace mrpt {
namespace graphslam {
namespace apps {
13 template<
class GRAPH_t>
16 sep_subheader(20,
'-')
19 template<
class GRAPH_t>
26 it = regs_descriptions.begin();
27 it != regs_descriptions.end();
32 it = optimizers_descriptions.begin();
33 it != optimizers_descriptions.end();
40 template<
class GRAPH_t>
50 node_regs_map[
"CEmptyNRD"] =
51 &createNodeRegistrationDecider<CEmptyNRD<GRAPH_t> >;
52 node_regs_map[
"CFixedIntervalsNRD"] =
53 &createNodeRegistrationDecider<CFixedIntervalsNRD<GRAPH_t> >;
55 edge_regs_map[
"CEmptyERD"] =
56 &createEdgeRegistrationDecider<CEmptyERD<GRAPH_t> >;
58 optimizers_map[
"CLevMarqGSO"] =
59 &createGraphSlamOptimizer<CLevMarqGSO<GRAPH_t> >;
60 optimizers_map[
"CEmptyGSO"] =
61 &createGraphSlamOptimizer<CLevMarqGSO<GRAPH_t> >;
64 this->_createDeciderOptimizerMappings();
70 template<
class GRAPH_t>
79 node_regs_map[
"CICPCriteriaNRD"] =
80 &createNodeRegistrationDecider<CICPCriteriaNRD<CNetworkOfPoses2DInf> >;
81 edge_regs_map[
"CICPCriteriaERD"] =
82 &createEdgeRegistrationDecider<CICPCriteriaERD<CNetworkOfPoses2DInf> >;
83 edge_regs_map[
"CLoopCloserERD"] =
84 &createEdgeRegistrationDecider<CLoopCloserERD<CNetworkOfPoses2DInf> >;
91 node_regs_map[
"CICPCriteriaNRD"] =
92 &createNodeRegistrationDecider<CICPCriteriaNRD<CNetworkOfPoses2DInf_NA> >;
93 edge_regs_map[
"CICPCriteriaERD"] =
94 &createEdgeRegistrationDecider<CICPCriteriaERD<CNetworkOfPoses2DInf_NA> >;
95 edge_regs_map[
"CLoopCloserERD"] =
96 &createEdgeRegistrationDecider<CLoopCloserERD<CNetworkOfPoses2DInf_NA> >;
105 template<
class GRAPH_t>
110 using namespace mrpt;
115 format(
"Registrar string '%s' does not match a known registrar name.\n"
116 "Specify 'node' 'edge' or 'all'", reg_type.c_str()));
121 cout << endl <<
"Available " <<
system::upperCase(reg_type) <<
" Registration Deciders: " << endl;
122 cout << sep_header << endl;
125 dec_it = regs_descriptions.begin();
126 dec_it != regs_descriptions.end(); ++dec_it) {
130 cout << sep_subheader << endl;
132 cout <<
"\t- " <<
"Rawlog Format: " << dec->
rawlog_format << endl;
133 cout <<
"\t- " <<
"Observations that can be used: " << endl;
134 cout <<
"\t- " <<
"Multi-robot SLAM capable decider: " <<
136 cout <<
"\t- " <<
"SLAM Type: " << endl;
138 cout <<
"\t\t+ " <<
"2D" << endl;
141 cout <<
"\t\t+ " <<
"3D" << endl;
146 cout <<
"\t\t+ " << *obs_it << endl;
152 dumpRegistrarsToConsole(
"node");
153 dumpRegistrarsToConsole(
"edge");
159 template<
class GRAPH_t>
165 cout << endl <<
"Available GraphSlam Optimizer classes: " << endl;
166 cout << sep_header << endl;
169 opt_it != optimizers_descriptions.end(); ++opt_it) {
171 cout << opt->
name << endl;
172 cout << sep_subheader << endl;
173 cout <<
"\t- " <<
"Description: " << opt->
description << endl;
175 cout <<
"\t- " <<
"Multi-robot SLAM capable optimizer: " <<
177 cout <<
"\t- " <<
"SLAM Type: " << endl;
179 cout <<
"\t\t+ " <<
"2D" << endl;
182 cout <<
"\t\t+ " <<
"3D" << endl;
188 template<
class GRAPH_t>
195 using namespace mrpt;
200 format(
"Registrar string \"%s\" does not match a known registrar name.\n"
201 "Specify 'node' or 'edge' ", reg_type.c_str()));
205 dec_it = regs_descriptions.begin();
206 dec_it != regs_descriptions.end(); ++dec_it) {
229 template<
class GRAPH_t>
233 using namespace mrpt;
239 opt_it = optimizers_descriptions.begin();
240 opt_it != optimizers_descriptions.end(); ++opt_it) {
260 template<
class GRAPH_t>
265 regs_descriptions.clear();
266 optimizers_descriptions.clear();
271 dec->
name =
"CFixedIntervalsNRD";
272 dec->
description =
"Register a new node if the distance from the previous node surpasses a predefined distance threshold. Uses odometry information for estimating the robot movement";
280 regs_descriptions.push_back(dec);
284 dec->
name =
"CICPCriteriaNRD";
285 dec->
description =
"Register a new node if the distance from the previous node surpasses a predefined distance threshold. Uses 2D/3D RangeScans alignment for estimating the robot movement";
292 regs_descriptions.push_back(dec);
296 dec->
name =
"CEmptyNRD";
297 dec->
description =
"Empty Decider - does nothing when its class methods are called";
304 regs_descriptions.push_back(dec);
308 dec->
name =
"CICPCriteriaERD";
309 dec->
description =
"Register a new edge by aligning the provided 2D/3D RangeScans of 2 nodes. Uses the goodness of the ICP Alignment as the criterium for adding a new edge";
316 regs_descriptions.push_back(dec);
320 dec->
name =
"CEmptyERD";
321 dec->
description =
"Empty Decider - does nothing when its class methods are called";
328 regs_descriptions.push_back(dec);
332 dec->
name =
"CLoopCloserERD";
333 dec->
description =
"Partition the map and register *sets* of edges based on the Pairwise consistency matrix of each set.";
339 regs_descriptions.push_back(dec);
345 opt->
name =
"CEmptyGSO";
346 opt->
description =
"Empty Optimizer - does nothing when its class methods are called";
351 optimizers_descriptions.push_back(opt);
356 opt->
name =
"CLevMarqGSO";
357 opt->
description =
"Levenberg-Marqurdt non-linear graphSLAM solver";
362 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 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 BASE_IMPEXP strCmpI(const std::string &s1, const std::string &s2)
Return true if the two strings are equal (case insensitive)
std::string BASE_IMPEXP 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 BASE_IMPEXP 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.
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.