MRPT  2.0.0
graphslam/include/mrpt/graphslam/types.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
12 #include <mrpt/poses/Lie/SE.h>
13 #include <functional>
14 #include <map>
15 
16 namespace mrpt
17 {
18 /** SLAM methods related to graphs of pose constraints
19  * \sa mrpt::graphs::CNetworkOfPoses \ingroup mrpt_graphslam_grp
20  */
21 namespace graphslam
22 {
23 /** \addtogroup mrpt_graphslam_grp
24  * @{ */
25 
26 /** Auxiliary traits template for use among graph-slam problems to make life
27  * easier with these complicated, long data type names
28  * \tparam GRAPH_T This will typically be any
29  * mrpt::graphs::CNetworkOfPoses<...>
30  */
31 template <class GRAPH_T>
33 {
34  /** Typ: mrpt::graphs::CNetworkOfPoses<...> */
35  using graph_t = GRAPH_T;
36  using edge_const_iterator = typename graph_t::edges_map_t::const_iterator;
37  using edge_map_entry_t = typename graph_t::edges_map_t::value_type;
38  using edge_t = typename graph_t::constraint_t;
39  using edge_poses_type = typename edge_t::type_value;
41  using matrix_TxT = typename SE_TYPE::matrix_TxT;
42  using Array_O =
43  typename SE_TYPE::tangent_vector; // An array of the correct size
44  // for an "observation" (i.e. a
45  // relative pose in an edge)
46  using TPairJacobs = std::pair<matrix_TxT, matrix_TxT>;
48  std::multimap<mrpt::graphs::TPairNodeIDs, TPairJacobs>;
49 
50  /** Auxiliary struct used in graph-slam implementation: It holds the
51  * relevant information for each of the constraints being taking into
52  * account. */
54  {
56  // Data:
57  const typename gst::edge_map_entry_t* edge{nullptr};
58  const typename gst::graph_t::constraint_t::type_value* edge_mean;
59  typename gst::graph_t::constraint_t::type_value *P1, *P2;
60  };
61 
62  using TFunctorFeedback = std::function<void(
63  const GRAPH_T& graph, const size_t iter, const size_t max_iter,
64  const double cur_sq_error)>;
65 };
66 
67 /** Output information for mrpt::graphslam::optimize_graph_spa_levmarq() */
69 {
70  /** The number of LM iterations executed. */
71  size_t num_iters;
72  /** The sum of all the squared errors for every constraint involved in the
73  * problem. */
75 };
76 
77 /** @} */ // end of grouping
78 
79 } // namespace graphslam
80 } // namespace mrpt
size_t num_iters
The number of LM iterations executed.
typename graph_t::edges_map_t::value_type edge_map_entry_t
typename graph_t::edges_map_t::const_iterator edge_const_iterator
std::multimap< mrpt::graphs::TPairNodeIDs, TPairJacobs > map_pairIDs_pairJacobs_t
Auxiliary struct used in graph-slam implementation: It holds the relevant information for each of the...
Auxiliary traits template for use among graph-slam problems to make life easier with these complicate...
Traits for SE(n), rigid-body transformations in R^n space.
Definition: SE.h:30
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
std::function< void(const GRAPH_T &graph, const size_t iter, const size_t max_iter, const double cur_sq_error)> TFunctorFeedback
Output information for mrpt::graphslam::optimize_graph_spa_levmarq()
double final_total_sq_error
The sum of all the squared errors for every constraint involved in the problem.
GRAPH_T graph_t
Typ: mrpt::graphs::CNetworkOfPoses<...>



Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020