Main MRPT website > C++ reference for MRPT 1.5.9
CEdgeRegistrationDecider.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #ifndef CEDGEREGISTRATIONDECIDER_H
11 #define CEDGEREGISTRATIONDECIDER_H
12 
14 #include <mrpt/obs/CSensoryFrame.h>
15 #include <mrpt/obs/CObservation.h>
20 #include <mrpt/utils/TParameters.h>
21 
24 
25 #include <map>
26 #include <string>
27 
28 namespace mrpt { namespace graphslam { namespace deciders {
29 
30 /** \brief Interface for implementing edge registration classes.
31  *
32  * CEdgeRegistrationDecider provides the basic methods that have to exist in
33  * every edge registration decider class. For an example of inheriting from
34  * this class see CICPCriteriaERD.
35  *
36  * \note As a naming convention, all the implemented edge registration deciders
37  * are suffixed with the ERD acronym.
38  *
39  * \ingroup mrpt_graphslam_grp
40  */
41 template<class GRAPH_T=typename mrpt::graphs::CNetworkOfPoses2DInf>
44 {
45  public:
46  /**\brief Handy typedefs */
47  /**\{*/
48  /**\brief Parent of current class */
50  /**\brief type of graph constraints */
51  typedef typename GRAPH_T::constraint_t constraint_t;
52  /**\brief type of underlying poses (2D/3D). */
53  typedef typename GRAPH_T::constraint_t::type_value pose_t;
54  /**\}*/
55 
56  /**\brief Default class constructor.*/
58  /**\brief Default class destructor.*/
59  virtual ~CEdgeRegistrationDecider();
60  /**\brief Generic method for fetching the incremental action/observation
61  * readings from the calling function.
62  *
63  * Implementations of this interface should use (part of) the specified
64  * parameters and call the checkRegistrationCondition to check for
65  * potential Edge registration
66  */
67  virtual bool updateState(
68  mrpt::obs::CActionCollectionPtr action,
69  mrpt::obs::CSensoryFramePtr observations,
70  mrpt::obs::CObservationPtr observation ) = 0;
71  /**\brief Fill the given map with the type of registered edges as well as
72  * the corresponding number of registration of each edge.
73  */
74  virtual void getEdgesStats(
75  std::map<std::string, int>* edge_type_to_num) const {};
76  /**\brief Used by the caller to query for possible loop closures in the
77  * last edge registration procedure.
78  */
79  virtual bool justInsertedLoopClosure() const {
80  return m_just_inserted_lc;
81  }
82  virtual void getDescriptiveReport(std::string* report_str) const;
83  protected:
84  /**\name Registration criteria checks
85  *\brief Check whether a new edge should be registered in the
86  * graph.
87  *
88  * If condition(s) for edge registration is satisfied, method should call
89  * the registerNewEdge method.
90  */
91  /**\{*/
94  mrpt::utils::TNodeID to ) {}
96  const std::set<mrpt::utils::TNodeID>&) {}
97  /**\}*/
98  /**\brief Register a new constraint/edge in the current graph.
99  *
100  * Implementations of this class should provide a wrapper around
101  * GRAPH_T::insertEdge method.
102  */
103  virtual void registerNewEdge(
104  const mrpt::utils::TNodeID& from,
105  const mrpt::utils::TNodeID& to,
106  const constraint_t& rel_edge);
107 
109  /**\brief Indicates whether the ERD implementation expects, at most one
110  * single node to be registered, between successive calls to the
111  * updateState method.
112  *
113  * By default set to false.
114  */
116 
117 };
118 
119 } } } // end of namespaces
120 
122 
123 #endif /* end of include guard: CEDGEREGISTRATIONDECIDER_H */
Interface for implementing edge registration classes.
virtual bool justInsertedLoopClosure() const
Used by the caller to query for possible loop closures in the last edge registration procedure...
GRAPH_T::constraint_t::type_value pose_t
type of underlying poses (2D/3D).
GRAPH_T::constraint_t constraint_t
type of graph constraints
uint64_t TNodeID
The type for node IDs in graphs of different types.
virtual void getEdgesStats(std::map< std::string, int > *edge_type_to_num) const
Fill the given map with the type of registered edges as well as the corresponding number of registrat...
bool m_override_registered_nodes_check
Indicates whether the ERD implementation expects, at most one single node to be registered, between successive calls to the updateState method.
virtual bool updateState(mrpt::obs::CActionCollectionPtr action, mrpt::obs::CSensoryFramePtr observations, mrpt::obs::CObservationPtr observation)=0
Generic method for fetching the incremental action/observation readings from the calling function...
Interface for implementing node/edge registration deciders or optimizer classes.
virtual void registerNewEdge(const mrpt::utils::TNodeID &from, const mrpt::utils::TNodeID &to, const constraint_t &rel_edge)
Register a new constraint/edge in the current graph.
GLsizei const GLchar ** string
Definition: glext.h:3919
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
virtual void checkRegistrationCondition(mrpt::utils::TNodeID from, mrpt::utils::TNodeID to)
virtual void getDescriptiveReport(std::string *report_str) const
Fill the provided string with a detailed report of the decider/optimizer state.
virtual void checkRegistrationCondition(const std::set< mrpt::utils::TNodeID > &)
mrpt::graphslam::CRegistrationDeciderOrOptimizer< GRAPH_T > parent
Handy typedefs.



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020