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 */
mrpt::obs::CObservation::Ptr
std::shared_ptr< CObservation > Ptr
Definition: CObservation.h:45
CNetworkOfPoses.h
mrpt::graphslam::optimizers::CGraphSlamOptimizer< typename mrpt::graphs::CNetworkOfPoses2DInf >::pose_t
typename typename mrpt::graphs::CNetworkOfPoses2DInf ::constraint_t::type_value pose_t
type of underlying poses (2D/3D)
Definition: CGraphSlamOptimizer.h:48
mrpt::obs::CSensoryFrame::Ptr
std::shared_ptr< CSensoryFrame > Ptr
Definition: CSensoryFrame.h:56
mrpt::graphslam::optimizers::CGraphSlamOptimizer
Interface for implementing graphSLAM optimizer classes.
Definition: CGraphSlamOptimizer.h:39
mrpt::graphslam::CRegistrationDeciderOrOptimizer
Interface for implementing node/edge registration deciders or optimizer classes.
Definition: CRegistrationDeciderOrOptimizer.h:44
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
CActionCollection.h
CRegistrationDeciderOrOptimizer.h
mrpt::graphslam::optimizers::CGraphSlamOptimizer::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::optimizers::CGraphSlamOptimizer::optimizeGraph
virtual void optimizeGraph()=0
method called for optimizing the underlying graph.
mrpt::graphslam::optimizers::CGraphSlamOptimizer::justFullyOptimizedGraph
virtual bool justFullyOptimizedGraph() const
Used by the caller to query for possible full graph optimization on the latest optimizer run.
Definition: CGraphSlamOptimizer.h:70
CSensoryFrame.h
mrpt::graphslam::optimizers::CGraphSlamOptimizer::CGraphSlamOptimizer
CGraphSlamOptimizer()
Definition: CGraphSlamOptimizer.h:51
CObservation.h
mrpt::graphslam::optimizers::CGraphSlamOptimizer::~CGraphSlamOptimizer
~CGraphSlamOptimizer()
Definition: CGraphSlamOptimizer.h:52
mrpt::graphslam::optimizers::CGraphSlamOptimizer< typename mrpt::graphs::CNetworkOfPoses2DInf >::constraint_t
typename typename mrpt::graphs::CNetworkOfPoses2DInf ::constraint_t constraint_t
Handy typedefs.
Definition: CGraphSlamOptimizer.h:46
mrpt::obs::CActionCollection::Ptr
std::shared_ptr< CActionCollection > Ptr
Definition: CActionCollection.h:30



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