Main MRPT website > C++ reference for MRPT 1.9.9
CLevMarqGSO.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 CLEVMARQGSO_H
11 #define CLEVMARQGSO_H
12 
13 #include <mrpt/obs/CSensoryFrame.h>
16 #include <mrpt/img/TColor.h>
18 #include <mrpt/poses/CPose2D.h>
19 #include <mrpt/poses/CPose3D.h>
20 
21 #include <mrpt/graphslam/levmarq.h>
23 
24 #include <iostream>
25 #include <string>
26 #include <map>
27 #include <cmath> // fabs function
28 
29 namespace mrpt
30 {
31 namespace graphslam
32 {
33 namespace optimizers
34 {
35 /**\brief Levenberg-Marquardt non-linear graph slam optimization scheme.
36  *
37  * ## Description
38  *
39  * Current decider optimizes the graph according to the
40  * graphslam::optimize_spa_levmarq method. Refer to the latter for more
41  * details on the implementation.
42  *
43  * ### .ini Configuration Parameters
44  *
45  * \htmlinclude graphslam-engine_config_params_preamble.txt
46  *
47  * - \b class_verbosity
48  * + \a Section : OptimizerParameters
49  * + \a Default value : 1 (mrpt::system::LVL_INFO)
50  * + \a Required : FALSE
51  *
52  * - \b optimization_on_second_thread
53  * + \a Section : OptimizerParameters
54  * + \a Default value : FALSE
55  * + \a Required : FALSE
56  * + \a Description : Specify whether to use a second thread to optimize
57  * the graph.
58  *
59  * - \b LC_min_nodeid_diff
60  * + \a Section : GeneralConfiguration
61  * + \a Default value : 30
62  * + \a Required : FALSE
63  * + \a Description : Minimum NodeID difference for an edge to be considered
64  * a loop closure.
65  *
66  * - \b optimization_distance
67  * + \a Section : OptimizerParameters
68  * + \a Default value : 5
69  * + \a Required : FALSE
70  * + \a Description : Positions of the nodes within the specified distance
71  from the current
72  * graph node are optimized according to the corresponding constraints between
73  * them
74  *
75  * - \b verbose
76  * + \a Section : OptimizerParameters
77  * + \a Default value : FALSE
78  * + \a Required : FALSE
79  * + \a Description : Refers to the Levenberg-Marquardt optimization.
80  * procedure
81  *
82  * - \b profiler
83  * + \a Section : OptimizerParameters
84  * + \a Default value : FALSE
85  * + \a Required : FALSE
86  * + \a Description : Refers to the Levenberg-Marquardt optimization.
87  * procedure
88  *
89  * - \b max_iterations
90  * + \a Section : OptimizerParameters
91  * + \a Default value : 100
92  * + \a Required : FALSE
93  * + \a Description : Refers to the Levenberg-Marquardt optimization. Sets
94  * the maximum number of iterations of the optimization scheme.
95  *
96  * - \b scale_hessian
97  * + \a Section : OptimizerParameters
98  * + \a Default value : 0.2
99  * + \a Required : FALSE
100  * + \a Description : Refers to the Levenberg-Marquardt optimization.
101  *
102  * - \b tau
103  * + \a Section : OptimizerParameters
104  * + \a Default value : 1e-3
105  * + \a Required : FALSE
106  * + \a Description : Refers to the Levenberg-Marquardt optimization.
107  *
108  * \note For a detailed description of the optimization parameters of the
109  * Levenberg-Marquardt scheme, refer to
110  *
111  http://reference.mrpt.org/devel/group__mrpt__graphslam__grp.html#ga022f4a70be5ec7c432f46374e4bb9d66
112  *
113  * \note For a detailed description of the graph visualization parameters
114  * refer to
115  *
116  http://reference.mrpt.org/devel/group__mrpt__opengl__grp.html#ga30efc9f6fcb49801e989d174e0f65a61
117 
118  *
119  * \ingroup mrpt_graphslam_grp
120  */
121 template <class GRAPH_T = typename mrpt::graphs::CNetworkOfPoses2DInf>
124 {
125  public:
126  // Public methods
127  //////////////////////////////////////////////////////////////
128  /**\brief Handy typedefs */
129  /**\{*/
130  using constraint_t = typename GRAPH_T::constraint_t;
131  /** type of underlying poses (2D/3D)*/
132  using pose_t = typename GRAPH_T::constraint_t::type_value;
134  double, constraint_t::state_length, constraint_t::state_length>;
137  /**\}*/
138 
139  CLevMarqGSO();
140  ~CLevMarqGSO();
141 
142  bool updateState(
144  mrpt::obs::CSensoryFrame::Ptr observations,
145  mrpt::obs::CObservation::Ptr observation);
146 
147  void initializeVisuals();
148  void updateVisuals();
149  /**\brief Get a list of the window events that happened since the last
150  * call.
151  */
153  const std::map<std::string, bool>& events_occurred);
154  /**\brief Struct for holding the optimization-related variables in a
155  * compact form
156  */
158  {
159  public:
162 
163  void loadFromConfigFile(
165  const std::string& section);
166  void dumpToTextStream(std::ostream& out) const;
167 
169  // True if optimization procedure is to run in a multithreading fashion
171 
172  /**\brief optimize only for the nodes found in a certain distance from
173  * the current position. Optimize for the entire graph if set to1
174  */
179  /**\brief Keystroke to toggle the optimization distance on/off */
181  /**\brief Keystroke to manually trigger a full graph optimization */
183 
184  // nodeID difference for an edge to be considered loop closure
186 
187  // Map of TPairNodesID to their corresponding edge as recorded in the
188  // last update of the optimizer state
189  typename GRAPH_T::edges_map_t last_pair_nodes_to_edge;
190  };
191 
192  /**\brief struct for holding the graph visualization-related variables in a
193  * compact form
194  */
196  {
197  public:
200 
201  void loadFromConfigFile(
203  const std::string& section);
204  void dumpToTextStream(std::ostream& out) const;
205 
208  // textMessage parameters
209  std::string keystroke_graph_toggle; // see Ctor for initialization
210  std::string keystroke_graph_autofit; // see Ctor for initialization
213  };
214 
215  void loadParams(const std::string& source_fname);
216  void printParams() const;
217  void getDescriptiveReport(std::string* report_str) const;
218 
219  bool justFullyOptimizedGraph() const;
220 
221  // Public members
222  // ////////////////////////////
223  /** Parameters relevant to the optimizatio nfo the graph. */
225  /** Parameters relevant to the visualization of the graph. */
227 
228  protected:
229  // protected methods
230  // ////////////////////////////
231 
232  /**\brief Feedback of the Levenberg-Marquardt graph optimization procedure.
233  *
234  */
235  static void levMarqFeedback(
236  const GRAPH_T& graph, const size_t iter, const size_t max_iter,
237  const double cur_sq_error);
238 
239  /**\brief Optimize the given graph.
240  *
241  * Wrapper around the graphslam::optimize_spa_levmarq method
242  * \sa optimize_spa_levmarq, optimizeGraph
243  *
244  * \param[in] full_update Impose that method optimizes the whole graph
245  *
246  */
247  void _optimizeGraph(bool is_full_update = false);
248  /** \brief Wrapper around _optimizeGraph which first locks the section and
249  * then calls the _optimizeGraph method.
250  *
251  * Used in multithreaded optimization
252  * \sa _optimizeGraph()
253  */
254  void optimizeGraph();
255  /**\brief Check if a loop closure edge was added in the graph.
256  *
257  * Match the previously registered edges in the graph with the current. If
258  * there is a node difference *in any new edge* greater than
259  * \b LC_min_nodeid_diff (see .ini parameter) then new constraint is
260  * considered a Loop Closure
261  *
262  * \return True if \b any of the newly added edges is considered a loop
263  * closure
264  */
265  bool checkForLoopClosures();
266  /**\brief Decide whether to issue a full graph optimization
267  *
268  * In case N consecutive full optimizations have been issued, skip some of
269  * the next as they slow down the overall execution and they don't reduce
270  * the overall error
271  *
272  * \return True for issuing a full graph optimization, False otherwise
273  */
275  /**\brief Initialize objects relateed to the Graph Visualization
276  */
277  void initGraphVisualization();
278  /**\brief Called internally for updating the visualization scene for the
279  * graph
280  * building procedure
281  */
282  inline void updateGraphVisualization();
283  /**\brief Toggle the graph visualization on and off.
284  */
286  /**\brief Set the camera parameters of the CDisplayWindow3D so that the
287  * whole
288  * graph is viewed in the window.
289  *
290  * \warning Method assumes that the COpenGLinstance *is not locked* prior to
291  * this
292  * call, so make sure you have issued
293  * CDisplayWindow3D::unlockAccess3DScene() before calling this method.
294  */
295  inline void fitGraphInView();
296 
297  /**\brief Initialize the Disk/Sphere used for visualizing the optimization
298  * distance.
299  */
300  /**\{*/
302  /**\brief Setup the corresponding Disk/Sphere instance.
303  *
304  * Method overloads are used to overcome the C++ specialization
305  * restrictions
306  *
307  * \return Disk/Sphere instance for 2D/3D SLAM respectively
308  */
309  /**\{*/
311  const mrpt::poses::CPose2D& p_unused);
313  const mrpt::poses::CPose3D& p_unused);
314  /**\}*/
315 
316  /**\}*/
317 
318  /**\brief Update the position of the disk indicating the distance in which
319  * Levenberg-Marquardt graph optimization is executed
320  */
321  inline void updateOptDistanceVisualization();
322  /**\brief toggle the optimization distance object on and off
323  */
325  /**\brief Get a list of the nodeIDs whose position is within a certain
326  * distance to the specified nodeID
327  */
328  void getNearbyNodesOf(
329  std::set<mrpt::graphs::TNodeID>* nodes_set,
330  const mrpt::graphs::TNodeID& cur_nodeID, double distance);
331 
332  // protected members
333  //////////////////////////////////////////////////////////////
334 
339 
340  // start optimizing the graph after a certain number of nodes has been
341  // added (when m_graph->nodeCount() > m_last_total_num_of_nodes)
343 
344  // Use second thread for graph optimization
345  std::thread m_thread_optimize;
346 
347  /**\brief Enumeration that defines the behaviors towards using or ignoring a
348  * newly added loop closure to fully optimize the graph
349  */
351  {
355  };
356  /**\brief Should I fully optimize the graph on loop closure?
357  */
359  /**\name Smart Full-Optimization Command
360  *
361  * Instead of issuing a full optimization every time a loop closure is
362  * detected, ignore current loop closure when enough consecutive loop
363  * closures have already been utilised.
364  * This avoids the added computational cost that is needed for optimizing
365  * the graph without reducing the accuracy of the overall operation
366  */
367  /**\{*/
368 
369  /**\brief Number of maximum cosecutive loop closures that are allowed to be
370  * issued.
371  *
372  * \sa m_curr_used_consec_lcs, m_max_ignored_consec_lcs
373  */
375  /**\brief Number of consecutive loop closures that are currently registered
376  *
377  * \sa m_max_used_consec_lcs
378  */
380  /**\brief Number of consecutive loop closures to ignore after \b
381  * m_max_used_consec_lcs have already been issued.
382  *
383  * \sa m_curr_ignored_consec_lcs, m_max_used_consec_lcs
384  */
386  /**\brief Consecutive Loop Closures that have currently been ignored
387  *
388  * \sa m_max_ignored_consec_lcs
389  */
391 
392  /**\}*/
393 
394  /**\brief Indicates whether a full graph optimization was just issued.
395  */
397 
398  /**\brief Minimum number of nodes before we try optimizing the graph */
400 };
401 } // namespace optimizers
402 } // namespace graphslam
403 } // namespace mrpt
404 
405 #include "CLevMarqGSO_impl.h"
406 
407 #endif /* end of include guard: CLEVMARQGSO_H */
mrpt::obs::CObservation::Ptr
std::shared_ptr< CObservation > Ptr
Definition: CObservation.h:45
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::text_index_graph
int text_index_graph
Definition: CLevMarqGSO.h:211
mrpt::graphslam::optimizers::CLevMarqGSO::m_has_read_config
bool m_has_read_config
Definition: CLevMarqGSO.h:336
mrpt::graphslam::optimizers::CLevMarqGSO::m_max_ignored_consec_lcs
size_t m_max_ignored_consec_lcs
Number of consecutive loop closures to ignore after m_max_used_consec_lcs have already been issued.
Definition: CLevMarqGSO.h:385
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::optimization_distance_color
mrpt::img::TColor optimization_distance_color
Definition: CLevMarqGSO.h:178
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::GraphVisualizationParams
GraphVisualizationParams()
Definition: CLevMarqGSO_impl.h:792
mrpt::graphslam::optimizers::CLevMarqGSO::initializeVisuals
void initializeVisuals()
Initialize visual objects in CDisplayWindow (e.g.
Definition: CLevMarqGSO_impl.h:88
mrpt::obs::CSensoryFrame::Ptr
std::shared_ptr< CSensoryFrame > Ptr
Definition: CSensoryFrame.h:56
CLevMarqGSO_impl.h
mrpt::graphslam::optimizers::CLevMarqGSO::m_last_total_num_of_nodes
size_t m_last_total_num_of_nodes
Definition: CLevMarqGSO.h:342
mrpt::graphslam::optimizers::CLevMarqGSO::m_curr_used_consec_lcs
size_t m_curr_used_consec_lcs
Number of consecutive loop closures that are currently registered.
Definition: CLevMarqGSO.h:379
mrpt::graphslam::optimizers::CLevMarqGSO::FOP_USE_LC
@ FOP_USE_LC
Definition: CLevMarqGSO.h:353
mrpt::graphslam::optimizers::CLevMarqGSO::updateState
bool updateState(mrpt::obs::CActionCollection::Ptr action, mrpt::obs::CSensoryFrame::Ptr observations, mrpt::obs::CObservation::Ptr observation)
Generic method for fetching the incremental action/observation readings from the calling function.
Definition: CLevMarqGSO_impl.h:49
mrpt::graphslam::optimizers::CGraphSlamOptimizer
Interface for implementing graphSLAM optimizer classes.
Definition: CGraphSlamOptimizer.h:39
mrpt::graphslam::optimizers::CLevMarqGSO::checkForLoopClosures
bool checkForLoopClosures()
Check if a loop closure edge was added in the graph.
Definition: CLevMarqGSO_impl.h:494
mrpt::graphslam::CRegistrationDeciderOrOptimizer
Interface for implementing node/edge registration deciders or optimizer classes.
Definition: CRegistrationDeciderOrOptimizer.h:44
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::cfg
mrpt::system::TParametersDouble cfg
Definition: CLevMarqGSO.h:168
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::loadFromConfigFile
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &section)
This method load the options from a ".ini"-like file or memory-stored string list.
Definition: CLevMarqGSO_impl.h:760
mrpt::graphslam::optimizers::CLevMarqGSO::m_max_used_consec_lcs
size_t m_max_used_consec_lcs
Number of maximum cosecutive loop closures that are allowed to be issued.
Definition: CLevMarqGSO.h:374
mrpt::graphslam::optimizers::CLevMarqGSO::m_curr_ignored_consec_lcs
size_t m_curr_ignored_consec_lcs
Consecutive Loop Closures that have currently been ignored.
Definition: CLevMarqGSO.h:390
mrpt::graphs::TNodeID
uint64_t TNodeID
A generic numeric type for unique IDs of nodes or entities.
Definition: TNodeID.h:17
mrpt::graphslam::optimizers::CLevMarqGSO::registered_new_node
bool registered_new_node
Definition: CLevMarqGSO.h:337
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::last_pair_nodes_to_edge
GRAPH_T::edges_map_t last_pair_nodes_to_edge
Definition: CLevMarqGSO.h:189
CGraphSlamOptimizer.h
mrpt::graphslam::optimizers::CLevMarqGSO::viz_params
GraphVisualizationParams viz_params
Parameters relevant to the visualization of the graph.
Definition: CLevMarqGSO.h:226
mrpt::opengl::CRenderizable::Ptr
std::shared_ptr< CRenderizable > Ptr
Definition: CRenderizable.h:45
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::~GraphVisualizationParams
~GraphVisualizationParams()
Definition: CLevMarqGSO_impl.h:797
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::math::distance
double distance(const TPoint2D &p1, const TPoint2D &p2)
Gets the distance between two points in a 2D space.
Definition: geometry.cpp:1891
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::~OptimizationParams
~OptimizationParams()
Definition: CLevMarqGSO_impl.h:743
mrpt::graphslam::optimizers::CLevMarqGSO::fitGraphInView
void fitGraphInView()
Set the camera parameters of the CDisplayWindow3D so that the whole graph is viewed in the window.
Definition: CLevMarqGSO_impl.h:253
CPose2D.h
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::text_index_optimization_distance
int text_index_optimization_distance
Definition: CLevMarqGSO.h:177
mrpt::graphslam::optimizers::CLevMarqGSO::updateGraphVisualization
void updateGraphVisualization()
Called internally for updating the visualization scene for the graph building procedure.
Definition: CLevMarqGSO_impl.h:185
mrpt::graphslam::optimizers::CLevMarqGSO::m_autozoom_active
bool m_autozoom_active
Definition: CLevMarqGSO.h:338
source
GLsizei GLsizei GLchar * source
Definition: glext.h:4082
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::LC_min_nodeid_diff
int LC_min_nodeid_diff
Definition: CLevMarqGSO.h:185
mrpt::graphslam::optimizers::CLevMarqGSO::getDescriptiveReport
void getDescriptiveReport(std::string *report_str) const
Fill the provided string with a detailed report of the decider/optimizer state.
Definition: CLevMarqGSO_impl.h:700
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::keystroke_graph_autofit
std::string keystroke_graph_autofit
Definition: CLevMarqGSO.h:210
mrpt::graphslam::optimizers::CLevMarqGSO::FOP_TOTAL_NUM
@ FOP_TOTAL_NUM
Definition: CLevMarqGSO.h:354
mrpt::graphslam::optimizers::CLevMarqGSO::~CLevMarqGSO
~CLevMarqGSO()
Definition: CLevMarqGSO_impl.h:40
mrpt::graphslam::optimizers::CLevMarqGSO::initOptDistanceVisualizationInternal
mrpt::opengl::CRenderizable::Ptr initOptDistanceVisualizationInternal(const mrpt::poses::CPose2D &p_unused)
Setup the corresponding Disk/Sphere instance.
Definition: CLevMarqGSO_impl.h:334
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::keystroke_optimize_graph
std::string keystroke_optimize_graph
Keystroke to manually trigger a full graph optimization.
Definition: CLevMarqGSO.h:182
CConfigFileBase.h
mrpt::graphslam::optimizers::CLevMarqGSO::m_first_time_call
bool m_first_time_call
Definition: CLevMarqGSO.h:335
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::optimization_distance
double optimization_distance
optimize only for the nodes found in a certain distance from the current position.
Definition: CLevMarqGSO.h:175
mrpt::graphslam::optimizers::CLevMarqGSO::FOP_IGNORE_LC
@ FOP_IGNORE_LC
Definition: CLevMarqGSO.h:352
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams
Struct for holding the optimization-related variables in a compact form.
Definition: CLevMarqGSO.h:157
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::visualize_optimized_graph
bool visualize_optimized_graph
Definition: CLevMarqGSO.h:207
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:44
mrpt::system::TParameters< double >
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams
struct for holding the graph visualization-related variables in a compact form
Definition: CLevMarqGSO.h:195
mrpt::poses::CPose2D
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
Definition: CPose2D.h:40
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::keystroke_optimization_distance
std::string keystroke_optimization_distance
Keystroke to toggle the optimization distance on/off.
Definition: CLevMarqGSO.h:180
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::keystroke_graph_toggle
std::string keystroke_graph_toggle
Definition: CLevMarqGSO.h:209
mrpt::img::TColor
A RGB color - 8bit.
Definition: TColor.h:22
mrpt::config::CLoadableOptions
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
Definition: config/CLoadableOptions.h:28
mrpt::graphslam::optimizers::CLevMarqGSO::_optimizeGraph
void _optimizeGraph(bool is_full_update=false)
Optimize the given graph.
Definition: CLevMarqGSO_impl.h:423
mrpt::graphslam::optimizers::CLevMarqGSO::updateVisuals
void updateVisuals()
Update the relevant visual features in CDisplayWindow.
Definition: CLevMarqGSO_impl.h:101
CRenderizable.h
levmarq.h
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::OptimizationParams
OptimizationParams()
Definition: CLevMarqGSO_impl.h:736
mrpt::graphslam::optimizers::CLevMarqGSO::checkForFullOptimization
bool checkForFullOptimization()
Decide whether to issue a full graph optimization.
Definition: CLevMarqGSO_impl.h:539
mrpt::graphslam::optimizers::CLevMarqGSO::optimizeGraph
void optimizeGraph()
Wrapper around _optimizeGraph which first locks the section and then calls the _optimizeGraph method.
Definition: CLevMarqGSO_impl.h:402
mrpt::math::CMatrixFixedNumeric< double, constraint_t::state_length, constraint_t::state_length >
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::optimization_on_second_thread
bool optimization_on_second_thread
Definition: CLevMarqGSO.h:170
mrpt::graphslam::optimizers::CLevMarqGSO::getNearbyNodesOf
void getNearbyNodesOf(std::set< mrpt::graphs::TNodeID > *nodes_set, const mrpt::graphs::TNodeID &cur_nodeID, double distance)
Get a list of the nodeIDs whose position is within a certain distance to the specified nodeID.
Definition: CLevMarqGSO_impl.h:632
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::dumpToTextStream
void dumpToTextStream(std::ostream &out) const
This method should clearly display all the contents of the structure in textual form,...
Definition: CLevMarqGSO_impl.h:747
mrpt::graphslam::optimizers::CLevMarqGSO::toggleOptDistanceVisualization
void toggleOptDistanceVisualization()
toggle the optimization distance object on and off
Definition: CLevMarqGSO_impl.h:385
CPose3D.h
CSensoryFrame.h
mrpt::graphslam::optimizers::CLevMarqGSO::initGraphVisualization
void initGraphVisualization()
Initialize objects relateed to the Graph Visualization.
Definition: CLevMarqGSO_impl.h:165
mrpt::graphslam::optimizers::CLevMarqGSO::opt_params
OptimizationParams opt_params
Parameters relevant to the optimizatio nfo the graph.
Definition: CLevMarqGSO.h:224
CLoadableOptions.h
mrpt::graphslam::optimizers::CLevMarqGSO::levMarqFeedback
static void levMarqFeedback(const GRAPH_T &graph, const size_t iter, const size_t max_iter, const double cur_sq_error)
Feedback of the Levenberg-Marquardt graph optimization procedure.
Definition: CLevMarqGSO_impl.h:625
mrpt::graphslam::optimizers::CLevMarqGSO::justFullyOptimizedGraph
bool justFullyOptimizedGraph() const
Definition: CLevMarqGSO_impl.h:619
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::dumpToTextStream
void dumpToTextStream(std::ostream &out) const
This method should clearly display all the contents of the structure in textual form,...
Definition: CLevMarqGSO_impl.h:801
mrpt::graphslam::optimizers::CLevMarqGSO::pose_t
typename GRAPH_T::constraint_t::type_value pose_t
type of underlying poses (2D/3D)
Definition: CLevMarqGSO.h:132
mrpt::graphslam::optimizers::CLevMarqGSO::CLevMarqGSO
CLevMarqGSO()
Definition: CLevMarqGSO_impl.h:23
mrpt::graphslam::optimizers::CLevMarqGSO::printParams
void printParams() const
Definition: CLevMarqGSO_impl.h:661
mrpt::graphslam::optimizers::CLevMarqGSO::initOptDistanceVisualization
void initOptDistanceVisualization()
Initialize the Disk/Sphere used for visualizing the optimization distance.
Definition: CLevMarqGSO_impl.h:292
mrpt::graphslam::optimizers::CLevMarqGSO::FullOptimizationPolicy
FullOptimizationPolicy
Enumeration that defines the behaviors towards using or ignoring a newly added loop closure to fully ...
Definition: CLevMarqGSO.h:350
mrpt::graphslam::optimizers::CLevMarqGSO::toggleGraphVisualization
void toggleGraphVisualization()
Toggle the graph visualization on and off.
Definition: CLevMarqGSO_impl.h:236
mrpt::graphslam::optimizers::CLevMarqGSO::m_just_fully_optimized_graph
bool m_just_fully_optimized_graph
Indicates whether a full graph optimization was just issued.
Definition: CLevMarqGSO.h:396
mrpt::graphslam::optimizers::CLevMarqGSO::constraint_t
typename GRAPH_T::constraint_t constraint_t
Handy typedefs.
Definition: CLevMarqGSO.h:130
mrpt::graphslam::optimizers::CLevMarqGSO::m_optimization_policy
FullOptimizationPolicy m_optimization_policy
Should I fully optimize the graph on loop closure?
Definition: CLevMarqGSO.h:358
mrpt::graphslam::optimizers::CLevMarqGSO::loadParams
void loadParams(const std::string &source_fname)
Load the necessary for the decider/optimizer configuration parameters.
Definition: CLevMarqGSO_impl.h:669
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::offset_y_graph
double offset_y_graph
Definition: CLevMarqGSO.h:212
mrpt::graphslam::optimizers::CLevMarqGSO::notifyOfWindowEvents
void notifyOfWindowEvents(const std::map< std::string, bool > &events_occurred)
Get a list of the window events that happened since the last call.
Definition: CLevMarqGSO_impl.h:117
mrpt::graphslam::optimizers::CLevMarqGSO
Levenberg-Marquardt non-linear graph slam optimization scheme.
Definition: CLevMarqGSO.h:122
mrpt::graphslam::optimizers::CLevMarqGSO::OptimizationParams::offset_y_optimization_distance
double offset_y_optimization_distance
Definition: CLevMarqGSO.h:176
mrpt::graphslam::optimizers::CLevMarqGSO::m_min_nodes_for_optimization
size_t m_min_nodes_for_optimization
Minimum number of nodes before we try optimizing the graph.
Definition: CLevMarqGSO.h:399
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::cfg
mrpt::system::TParametersDouble cfg
Definition: CLevMarqGSO.h:206
mrpt::graphslam::optimizers::CLevMarqGSO::GraphVisualizationParams::loadFromConfigFile
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &section)
This method load the options from a ".ini"-like file or memory-stored string list.
Definition: CLevMarqGSO_impl.h:819
mrpt::obs::CActionCollection::Ptr
std::shared_ptr< CActionCollection > Ptr
Definition: CActionCollection.h:30
mrpt::graphslam::optimizers::CLevMarqGSO::m_thread_optimize
std::thread m_thread_optimize
Definition: CLevMarqGSO.h:345
TColor.h
mrpt::graphslam::optimizers::CLevMarqGSO::updateOptDistanceVisualization
void updateOptDistanceVisualization()
Update the position of the disk indicating the distance in which Levenberg-Marquardt graph optimizati...
Definition: CLevMarqGSO_impl.h:366



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