Main MRPT website > C++ reference for MRPT 1.9.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-2018, 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>
17 
19 
20 #include <map>
21 #include <string>
22 
23 namespace mrpt
24 {
25 namespace graphslam
26 {
27 namespace deciders
28 {
29 /** \brief Interface for implementing edge registration classes.
30  *
31  * CEdgeRegistrationDecider provides the basic methods that have to exist in
32  * every edge registration decider class. For an example of inheriting from
33  * this class see CICPCriteriaERD.
34  *
35  * \note As a naming convention, all the implemented edge registration deciders
36  * are suffixed with the ERD acronym.
37  *
38  * \ingroup mrpt_graphslam_grp
39  */
40 template <class GRAPH_T = typename mrpt::graphs::CNetworkOfPoses2DInf>
42  : public virtual mrpt::graphslam::CRegistrationDeciderOrOptimizer<GRAPH_T>
43 {
44  public:
45  /**\brief Handy typedefs */
46  /**\{*/
47  /**\brief Parent of current class */
49  /**\brief type of graph constraints */
50  using constraint_t = typename GRAPH_T::constraint_t;
51  /**\brief type of underlying poses (2D/3D). */
52  using pose_t = typename GRAPH_T::constraint_t::type_value;
53  /**\}*/
54 
55  /**\brief Default class constructor.*/
57  /**\brief Default class destructor.*/
58  virtual ~CEdgeRegistrationDecider();
59  /**\brief Generic method for fetching the incremental action/observation
60  * readings from the calling function.
61  *
62  * Implementations of this interface should use (part of) the specified
63  * parameters and call the checkRegistrationCondition to check for
64  * potential Edge registration
65  */
66  virtual bool updateState(
68  mrpt::obs::CSensoryFrame::Ptr observations,
69  mrpt::obs::CObservation::Ptr observation) = 0;
70  /**\brief Fill the given map with the type of registered edges as well as
71  * the corresponding number of registration of each edge.
72  */
73  virtual void getEdgesStats(
74  std::map<std::string, int>* edge_type_to_num) const {};
75  /**\brief Used by the caller to query for possible loop closures in the
76  * last edge registration procedure.
77  */
78  virtual bool justInsertedLoopClosure() const { return m_just_inserted_lc; }
79  virtual void getDescriptiveReport(std::string* report_str) const;
80 
81  protected:
82  /**\name Registration criteria checks
83  *\brief Check whether a new edge should be registered in the
84  * graph.
85  *
86  * If condition(s) for edge registration is satisfied, method should
87  *call
88  * the registerNewEdge method.
89  */
90  /**\{*/
93  {
94  }
96  const std::set<mrpt::graphs::TNodeID>&)
97  {
98  }
99  /**\}*/
100  /**\brief Register a new constraint/edge in the current graph.
101  *
102  * Implementations of this class should provide a wrapper around
103  * GRAPH_T::insertEdge method.
104  */
105  virtual void registerNewEdge(
106  const mrpt::graphs::TNodeID& from, const mrpt::graphs::TNodeID& to,
107  const constraint_t& rel_edge);
108 
110  /**\brief Indicates whether the ERD implementation expects, at most one
111  * single node to be registered, between successive calls to the
112  * updateState method.
113  *
114  * By default set to false.
115  */
117 };
118 }
119 }
120 } // end of namespaces
121 
123 
124 #endif /* end of include guard: CEDGEREGISTRATIONDECIDER_H */
mrpt::obs::CObservation::Ptr
std::shared_ptr< CObservation > Ptr
Definition: CObservation.h:45
CNetworkOfPoses.h
mrpt::graphslam::deciders::CEdgeRegistrationDecider< typename mrpt::graphs::CNetworkOfPoses2DInf >::pose_t
typename typename mrpt::graphs::CNetworkOfPoses2DInf ::constraint_t::type_value pose_t
type of underlying poses (2D/3D).
Definition: CEdgeRegistrationDecider.h:52
mrpt::obs::CSensoryFrame::Ptr
std::shared_ptr< CSensoryFrame > Ptr
Definition: CSensoryFrame.h:56
mrpt::graphslam::deciders::CEdgeRegistrationDecider
Interface for implementing edge registration classes.
Definition: CEdgeRegistrationDecider.h:41
mrpt::graphslam::CRegistrationDeciderOrOptimizer
Interface for implementing node/edge registration deciders or optimizer classes.
Definition: CRegistrationDeciderOrOptimizer.h:44
mrpt::graphs::TNodeID
uint64_t TNodeID
A generic numeric type for unique IDs of nodes or entities.
Definition: TNodeID.h:17
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
CActionCollection.h
CRegistrationDeciderOrOptimizer.h
mrpt::graphslam::deciders::CEdgeRegistrationDecider::~CEdgeRegistrationDecider
virtual ~CEdgeRegistrationDecider()
Default class destructor.
Definition: CEdgeRegistrationDecider_impl.h:28
mrpt::graphslam::deciders::CEdgeRegistrationDecider::m_just_inserted_lc
bool m_just_inserted_lc
Definition: CEdgeRegistrationDecider.h:109
mrpt::graphslam::deciders::CEdgeRegistrationDecider< typename mrpt::graphs::CNetworkOfPoses2DInf >::constraint_t
typename typename mrpt::graphs::CNetworkOfPoses2DInf ::constraint_t constraint_t
type of graph constraints
Definition: CEdgeRegistrationDecider.h:50
mrpt::graphslam::deciders::CEdgeRegistrationDecider::CEdgeRegistrationDecider
CEdgeRegistrationDecider()
Default class constructor.
Definition: CEdgeRegistrationDecider_impl.h:22
CSensoryFrame.h
mrpt::graphslam::deciders::CEdgeRegistrationDecider::checkRegistrationCondition
virtual void checkRegistrationCondition(const std::set< mrpt::graphs::TNodeID > &)
Definition: CEdgeRegistrationDecider.h:95
mrpt::graphslam::deciders::CEdgeRegistrationDecider::registerNewEdge
virtual void registerNewEdge(const mrpt::graphs::TNodeID &from, const mrpt::graphs::TNodeID &to, const constraint_t &rel_edge)
Register a new constraint/edge in the current graph.
Definition: CEdgeRegistrationDecider_impl.h:44
CEdgeRegistrationDecider_impl.h
CObservation.h
mrpt::graphslam::deciders::CEdgeRegistrationDecider::getEdgesStats
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...
Definition: CEdgeRegistrationDecider.h:73
mrpt::graphslam::deciders::CEdgeRegistrationDecider::getDescriptiveReport
virtual void getDescriptiveReport(std::string *report_str) const
Fill the provided string with a detailed report of the decider/optimizer state.
Definition: CEdgeRegistrationDecider_impl.h:33
mrpt::graphslam::deciders::CEdgeRegistrationDecider::justInsertedLoopClosure
virtual bool justInsertedLoopClosure() const
Used by the caller to query for possible loop closures in the last edge registration procedure.
Definition: CEdgeRegistrationDecider.h:78
mrpt::graphslam::deciders::CEdgeRegistrationDecider::m_override_registered_nodes_check
bool m_override_registered_nodes_check
Indicates whether the ERD implementation expects, at most one single node to be registered,...
Definition: CEdgeRegistrationDecider.h:116
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::obs::CActionCollection::Ptr
std::shared_ptr< CActionCollection > Ptr
Definition: CActionCollection.h:30
mrpt::graphslam::deciders::CEdgeRegistrationDecider::updateState
virtual bool updateState(mrpt::obs::CActionCollection::Ptr action, mrpt::obs::CSensoryFrame::Ptr observations, mrpt::obs::CObservation::Ptr observation)=0
Generic method for fetching the incremental action/observation readings from the calling function.
mrpt::graphslam::deciders::CEdgeRegistrationDecider::checkRegistrationCondition
virtual void checkRegistrationCondition(mrpt::graphs::TNodeID from, mrpt::graphs::TNodeID to)
Definition: CEdgeRegistrationDecider.h:91



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST