Main MRPT website > C++ reference for MRPT 1.9.9
CGraphSlamOptimizer.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 CGRAPHSLAMOPTIMIZER_H
11 #define CGRAPHSLAMOPTIMIZER_H
12 
14 #include <mrpt/obs/CSensoryFrame.h>
15 #include <mrpt/obs/CObservation.h>
18 #include <mrpt/utils/TParameters.h>
19 #include <mrpt/utils/CTimeLogger.h>
20 
23 
24 namespace mrpt
25 {
26 namespace graphslam
27 {
28 namespace optimizers
29 {
30 /**\brief Interface for implementing graphSLAM optimizer classes.
31  *
32  * Class should provide a generic interface from which real optimizers should
33  * inherit so that they abide to the necessary method calls used in the
34  * CGraphSlamEngine class. For an example of inheriting from this class see
35  * CLevMarqGSO.
36  *
37  * \note As a naming convention, all the implemented graphslam optimizer classes
38  * are suffixed with the GSO acronym.
39  *
40  * \ingroup mrpt_graphslam_grp
41  */
42 template <class GRAPH_t = typename mrpt::graphs::CNetworkOfPoses2DInf>
44  : public virtual mrpt::graphslam::CRegistrationDeciderOrOptimizer<GRAPH_t>
45 {
46  public:
47  /**\brief Handy typedefs */
48  /**\{*/
49  typedef typename GRAPH_t::constraint_t
50  constraint_t; // type of underlying constraints
51  typedef typename GRAPH_t::constraint_t::type_value
52  pose_t; // type of underlying poses (2D/3D)
53  /**\}*/
54 
57  /**\brief Generic method for fetching the incremental action/observation
58  * readings from the calling function.
59  *
60  * Implementations of this interface should use (part of) the specified
61  * parameters and call the optimizeGraph function if the decision is to
62  * optimize the provided graph
63  *
64  * \return True if the optimization procedure was executed.
65  */
66  virtual bool updateState(
68  mrpt::obs::CSensoryFrame::Ptr observations,
69  mrpt::obs::CObservation::Ptr observation) = 0;
70 
71  /**\brief Used by the caller to query for possible full graph optimization
72  * on the latest optimizer run
73  */
74  virtual bool justFullyOptimizedGraph() const { return false; }
75  protected:
76  /**\brief method called for optimizing the underlying graph.
77  */
78  virtual void optimizeGraph() = 0;
79 };
80 }
81 }
82 } // end of namespaces
83 
84 #endif /* end of include guard: CGRAPHSLAMOPTIMIZER_H */
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...
GRAPH_t::constraint_t constraint_t
Handy typedefs.
Interface for implementing node/edge registration deciders or optimizer classes.
virtual void optimizeGraph()=0
method called for optimizing the underlying graph.
std::shared_ptr< CSensoryFrame > Ptr
Definition: CSensoryFrame.h:56
std::shared_ptr< CObservation > Ptr
Definition: CObservation.h:43
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Interface for implementing graphSLAM optimizer classes.
std::shared_ptr< CActionCollection > Ptr
virtual bool justFullyOptimizedGraph() const
Used by the caller to query for possible full graph optimization on the latest optimizer run...



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019