Main MRPT website > C++ reference
MRPT logo
graphslam/include/mrpt/graphslam/types.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | The Mobile Robot Programming Toolkit (MRPT) C++ library |
3  | |
4  | http://www.mrpt.org/ |
5  | |
6  | Copyright (C) 2005-2012 University of Malaga |
7  | |
8  | This software was written by the Machine Perception and Intelligent |
9  | Robotics Lab, University of Malaga (Spain). |
10  | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11  | |
12  | This file is part of the MRPT project. |
13  | |
14  | MRPT is free software: you can redistribute it and/or modify |
15  | it under the terms of the GNU General Public License as published by |
16  | the Free Software Foundation, either version 3 of the License, or |
17  | (at your option) any later version. |
18  | |
19  | MRPT is distributed in the hope that it will be useful, |
20  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
21  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22  | GNU General Public License for more details. |
23  | |
24  | You should have received a copy of the GNU General Public License |
25  | along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26  | |
27  +---------------------------------------------------------------------------+ */
28 #ifndef GRAPH_SLAM_TYPES_H
29 #define GRAPH_SLAM_TYPES_H
30 
32 #include <mrpt/poses/SE_traits.h>
33 
35 
36 namespace mrpt
37 {
38  /** SLAM methods related to graphs of pose constraints
39  * \sa mrpt::graphs::CNetworkOfPoses \ingroup mrpt_graphslam_grp
40  */
41  namespace graphslam
42  {
43  /** \addtogroup mrpt_graphslam_grp
44  * @{ */
45 
46  /** Auxiliary traits template for use among graph-slam problems to make life easier with these complicated, long data type names
47  * \tparam GRAPH_T This will typically be any mrpt::graphs::CNetworkOfPoses<...>
48  */
49  template <class GRAPH_T>
51  {
52  //typedef mrpt::graphs::CNetworkOfPoses<EDGE_TYPE,MAPS_IMPLEMENTATION> graph_t;
53  typedef GRAPH_T graph_t;
55  typedef typename graph_t::constraint_t edge_t;
56  typedef typename edge_t::type_value edge_poses_type;
57  typedef mrpt::poses::SE_traits<edge_poses_type::rotation_dimensions> SE_TYPE;
58  typedef typename SE_TYPE::matrix_VxV_t matrix_VxV_t;
59  typedef typename SE_TYPE::array_t Array_O; // An array of the correct size for an "observation" (i.e. a relative pose in an edge)
60  typedef std::pair<matrix_VxV_t,matrix_VxV_t> TPairJacobs;
61  typedef typename mrpt::aligned_containers<
65 
66  /** Auxiliary struct used in graph-slam implementation: It holds the relevant information for each of the constraints being taking into account. */
68  {
70  // Data:
72  const typename gst::graph_t::constraint_t::type_value *edge_mean;
73  typename gst::graph_t::constraint_t::type_value *P1,*P2;
74  };
75 
76  typedef void (*TFunctorFeedback)(const GRAPH_T &graph, const size_t iter, const size_t max_iter, const double cur_sq_error );
77  };
78 
79  /** Output information for mrpt::graphslam::optimize_graph_spa_levmarq() */
81  {
82  size_t num_iters; //!< The number of LM iterations executed.
83  double final_total_sq_error; //!< The sum of all the squared errors for every constraint involved in the problem.
84  };
85 
86  /** @} */ // end of grouping
87 
88  } // End of namespace
89 } // End of namespace
90 
91 #endif



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013