00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://mrpt.sourceforge.net/ | 00005 | | 00006 | Copyright (C) 2005-2009 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 CMetricMapBuilderICP_H 00029 #define CMetricMapBuilderICP_H 00030 00031 #include <mrpt/slam/CMetricMapBuilder.h> 00032 #include <mrpt/slam/CICP.h> 00033 00034 namespace mrpt 00035 { 00036 namespace slam 00037 { 00042 class MRPTDLLIMPEXP CMetricMapBuilderICP : public CMetricMapBuilder 00043 { 00044 public: 00047 CMetricMapBuilderICP( 00048 TSetOfMetricMapInitializers *mapInitializers, 00049 float insertionLinDistance = 1.0f, 00050 float insertionAngDistance = DEG2RAD(30), 00051 CICP::TConfigParams *icpParams = NULL ); 00052 00055 virtual ~CMetricMapBuilderICP(); 00056 00059 struct MRPTDLLIMPEXP TConfigParams 00060 { 00063 TConfigParams () : matchAgainstTheGrid( false ) 00064 { 00065 00066 } 00067 00070 bool matchAgainstTheGrid; 00071 00072 } ICP_options; 00073 00074 CICP::TConfigParams ICP_params; 00075 00078 void initialize( 00079 CSensFrameProbSequence &initialMap, 00080 CPosePDF *x0 = NULL 00081 ); 00082 00085 CPose3DPDFPtr getCurrentPoseEstimation() const; 00086 00089 void setCurrentMapFile( const char *mapFile ); 00090 00096 void processActionObservation( 00097 CActionCollection &action, 00098 CSensoryFrame &in_SF ); 00099 00100 00103 void getCurrentlyBuiltMap(CSensFrameProbSequence &out_map); 00104 00105 00109 void getCurrentMapPoints( vector_float &x, vector_float &y); 00110 00113 CMultiMetricMap* getCurrentlyBuiltMetricMap(); 00114 00117 unsigned int getCurrentlyBuiltMapSize(); 00118 00123 void saveCurrentEstimationToImage(const std::string &file, bool formatEMF_BMP = true); 00124 00125 private: 00128 CSensFrameProbSequence SF_Poses_seq; 00129 00132 CMultiMetricMap metricMap; 00133 00136 //bool mapUpdateEnabled; 00137 00140 bool isTheFirstObservation; 00141 00144 std::string currentMapFile; 00145 00148 CPosePDFGaussian estPose; 00149 00152 //float newInfoUpdateThreshold; 00153 00156 std::deque<CPose2D> estRobotPath; 00157 00160 float insertionLinDistance,insertionAngDistance; 00161 00165 float linDistSinceLast,angDistSinceLast; 00166 00167 }; 00168 00169 } // End of namespace 00170 } // End of namespace 00171 00172 #endif
Page generated by Doxygen 1.5.7.1 for MRPT 0.6.5 SVN: at Mon Feb 23 13:24:51 EST 2009 |