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



Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 814d80880 Fri Aug 24 01:51:28 2018 +0200 at mar 26 may 2026 12:30:59 CEST