MRPT  1.9.9
CIncrementalNodeRegistrationDecider.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
14 #include <mrpt/poses/CPose2D.h>
15 #include <mrpt/poses/CPose3D.h>
16 
18 
20 {
21 /**\brief Incremental Node registration decider. Decider adds new nodes in the
22  * graph in an incremental fashion (adding nodes at the end of the graph)
23  *
24  * ### .ini Configuration Parameters
25  *
26  * \htmlinclude config_params_preamble.txt
27  *
28  * - \b class_verbosity
29  * + \a Section : NodeRegistrationDeciderParameters
30  * + \a default value : 1 (mrpt::system::LVL_INFO)
31  * + \a Required : FALSE
32  *
33  * - \b registration_max_distance
34  * + \a Section : NodeRegistrationDeciderParameters
35  * + \a Default value : 0.5 // meters
36  * + \a Required : FALSE
37  *
38  * - \b registration_max_angle
39  * + \a Section : NodeRegistrationDeciderParameters
40  * + \a Default value : 10 // degrees
41  * + \a Required : FALSE
42  *
43  * \ingroup mrpt_graphslam_grp
44  *
45  */
46 template <class GRAPH_T>
49  GRAPH_T>
50 {
51  public:
52  using constraint_t = typename GRAPH_T::constraint_t;
53  using pose_t = typename GRAPH_T::constraint_t::type_value;
54  using global_pose_t = typename GRAPH_T::global_pose_t;
56  using parent_t =
58 
60  virtual ~CIncrementalNodeRegistrationDecider() = default;
61 
62  /**\name Registration Conditions Specifiers
63  */
64  /**\{ */
65  /**\brief If estimated position surpasses the registration max values since
66  * the previous registered node, register a new node in the graph.
67  *
68  * \return True on successful registration.
69  */
70  virtual bool checkRegistrationCondition();
71  virtual bool checkRegistrationConditionPose(
72  const mrpt::poses::CPose2D& p1, const mrpt::poses::CPose2D& p2) const;
73  virtual bool checkRegistrationConditionPose(
74  const mrpt::poses::CPose3D& p1, const mrpt::poses::CPose3D& p2) const;
75  /**\} */
76 
77  virtual void loadParams(const std::string& source_fname);
78  virtual void printParams() const;
79  virtual void getDescriptiveReport(std::string* report_str) const;
80 
81  protected:
82  /**\brief Parameters structure for managing the relevant to the decider
83  * variables in a compact manner
84  */
86  {
87  public:
88  TParams() = default;
89  ~TParams() = default;
90 
91  void loadFromConfigFile(
93  const std::string& section);
94  void dumpToTextStream(std::ostream& out) const;
95  /**\brief Return a string with the configuration parameters
96  */
97  void getAsString(std::string* params_out) const;
98  std::string getAsString() const;
99 
100  // max values for new node registration
103  };
104 
106 
107  private:
108 };
109 } // namespace mrpt::graphslam::deciders
virtual void printParams() const
Print the problem parameters - relevant to the decider/optimizer to the screen in a unified/compact w...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
Interface for implementing node registration classes.
Parameters structure for managing the relevant to the decider variables in a compact manner...
virtual void getDescriptiveReport(std::string *report_str) const
Fill the provided string with a detailed report of the decider/optimizer state.
virtual bool checkRegistrationConditionPose(const mrpt::poses::CPose2D &p1, const mrpt::poses::CPose2D &p2) const
This class allows loading and storing values and vectors of different types from a configuration text...
void dumpToTextStream(std::ostream &out) const
This method should clearly display all the contents of the structure in textual form, sending it to a std::ostream.
GLsizei const GLchar ** string
Definition: glext.h:4116
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
Definition: CPose2D.h:39
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:84
GLsizei GLsizei GLchar * source
Definition: glext.h:4097
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &section)
This method load the options from a ".ini"-like file or memory-stored string list.
virtual bool checkRegistrationCondition()
If estimated position surpasses the registration max values since the previous registered node...
virtual void loadParams(const std::string &source_fname)
Load the necessary for the decider/optimizer configuration parameters.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019