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