00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://www.mrpt.org/ | 00005 | | 00006 | Copyright (C) 2005-2011 University of Malaga | 00007 | | 00008 | This software was written by the Machine Perception and Intelligent | 00009 | Robotics Lab, University of Malaga (Spain). | 00010 | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> | 00011 | | 00012 | This file is part of the MRPT project. | 00013 | | 00014 | MRPT is free software: you can redistribute it and/or modify | 00015 | it under the terms of the GNU General Public License as published by | 00016 | the Free Software Foundation, either version 3 of the License, or | 00017 | (at your option) any later version. | 00018 | | 00019 | MRPT is distributed in the hope that it will be useful, | 00020 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00021 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00022 | GNU General Public License for more details. | 00023 | | 00024 | You should have received a copy of the GNU General Public License | 00025 | along with MRPT. If not, see <http://www.gnu.org/licenses/>. | 00026 | | 00027 +---------------------------------------------------------------------------+ */ 00028 #ifndef GRAPH_SLAM_TYPES_H 00029 #define GRAPH_SLAM_TYPES_H 00030 00031 #include <mrpt/graphs/CNetworkOfPoses.h> 00032 #include <mrpt/poses/SE_traits.h> 00033 00034 #include <mrpt/graphslam/link_pragmas.h> 00035 00036 namespace mrpt 00037 { 00038 /** SLAM methods related to graphs of pose constraints 00039 * \sa mrpt::graphs::CNetworkOfPoses \ingroup mrpt_graphslam_grp 00040 */ 00041 namespace graphslam 00042 { 00043 /** \addtogroup mrpt_graphslam_grp 00044 * @{ */ 00045 00046 /** Auxiliary traits template for use among graph-slam problems to make life easier with these complicated, long data type names 00047 * \tparam GRAPH_T This will typically be any mrpt::graphs::CNetworkOfPoses<...> 00048 */ 00049 template <class GRAPH_T> 00050 struct graphslam_traits 00051 { 00052 //typedef mrpt::graphs::CNetworkOfPoses<EDGE_TYPE,MAPS_IMPLEMENTATION> graph_t; 00053 typedef GRAPH_T graph_t; 00054 typedef typename graph_t::edges_map_t::const_iterator edge_const_iterator; 00055 typedef typename graph_t::constraint_t edge_t; 00056 typedef typename edge_t::type_value edge_poses_type; 00057 typedef mrpt::poses::SE_traits<edge_poses_type::rotation_dimensions> SE_TYPE; 00058 typedef typename SE_TYPE::matrix_VxV_t matrix_VxV_t; 00059 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) 00060 typedef std::pair<matrix_VxV_t,matrix_VxV_t> TPairJacobs; 00061 typedef typename mrpt::aligned_containers< 00062 mrpt::utils::TPairNodeIDs, 00063 TPairJacobs 00064 >::map_t map_pairIDs_pairJacobs_t; 00065 00066 /** Auxiliary struct used in graph-slam implementation: It holds the relevant information for each of the constraints being taking into account. */ 00067 struct observation_info_t 00068 { 00069 typedef graphslam_traits<GRAPH_T> gst; 00070 // Data: 00071 typename gst::edge_const_iterator edge; 00072 const typename gst::graph_t::constraint_t::type_value *edge_mean; 00073 typename gst::graph_t::constraint_t::type_value *P1,*P2; 00074 }; 00075 00076 typedef void (*TFunctorFeedback)(const GRAPH_T &graph, const size_t iter, const size_t max_iter, const double cur_sq_error ); 00077 }; 00078 00079 /** Output information for mrpt::graphslam::optimize_graph_spa_levmarq() */ 00080 struct GRAPHSLAM_IMPEXP TResultInfoSpaLevMarq 00081 { 00082 size_t num_iters; //!< The number of LM iterations executed. 00083 double final_total_sq_error; //!< The sum of all the squared errors for every constraint involved in the problem. 00084 }; 00085 00086 /** @} */ // end of grouping 00087 00088 } // End of namespace 00089 } // End of namespace 00090 00091 #endif
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |