Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 4bc66056a634db26a1f4d0845dc41ca6 > files > 654

mrpt-doc-0.9.5-0.1.20110925svn2670.fc16.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CHMTSLAM.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <div class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </div><div class="right"></div>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">CHMTSLAM.h</div>  </div>
</div>
<div class="contents">
<a href="_c_h_m_t_s_l_a_m_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* +---------------------------------------------------------------------------+</span>
<a name="l00002"></a>00002 <span class="comment">   |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |</span>
<a name="l00003"></a>00003 <span class="comment">   |                                                                           |</span>
<a name="l00004"></a>00004 <span class="comment">   |                       http://www.mrpt.org/                                |</span>
<a name="l00005"></a>00005 <span class="comment">   |                                                                           |</span>
<a name="l00006"></a>00006 <span class="comment">   |   Copyright (C) 2005-2011  University of Malaga                           |</span>
<a name="l00007"></a>00007 <span class="comment">   |                                                                           |</span>
<a name="l00008"></a>00008 <span class="comment">   |    This software was written by the Machine Perception and Intelligent    |</span>
<a name="l00009"></a>00009 <span class="comment">   |      Robotics Lab, University of Malaga (Spain).                          |</span>
<a name="l00010"></a>00010 <span class="comment">   |    Contact: Jose-Luis Blanco  &lt;jlblanco@ctima.uma.es&gt;                     |</span>
<a name="l00011"></a>00011 <span class="comment">   |                                                                           |</span>
<a name="l00012"></a>00012 <span class="comment">   |  This file is part of the MRPT project.                                   |</span>
<a name="l00013"></a>00013 <span class="comment">   |                                                                           |</span>
<a name="l00014"></a>00014 <span class="comment">   |     MRPT is free software: you can redistribute it and/or modify          |</span>
<a name="l00015"></a>00015 <span class="comment">   |     it under the terms of the GNU General Public License as published by  |</span>
<a name="l00016"></a>00016 <span class="comment">   |     the Free Software Foundation, either version 3 of the License, or     |</span>
<a name="l00017"></a>00017 <span class="comment">   |     (at your option) any later version.                                   |</span>
<a name="l00018"></a>00018 <span class="comment">   |                                                                           |</span>
<a name="l00019"></a>00019 <span class="comment">   |   MRPT is distributed in the hope that it will be useful,                 |</span>
<a name="l00020"></a>00020 <span class="comment">   |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |</span>
<a name="l00021"></a>00021 <span class="comment">   |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |</span>
<a name="l00022"></a>00022 <span class="comment">   |     GNU General Public License for more details.                          |</span>
<a name="l00023"></a>00023 <span class="comment">   |                                                                           |</span>
<a name="l00024"></a>00024 <span class="comment">   |     You should have received a copy of the GNU General Public License     |</span>
<a name="l00025"></a>00025 <span class="comment">   |     along with MRPT.  If not, see &lt;http://www.gnu.org/licenses/&gt;.         |</span>
<a name="l00026"></a>00026 <span class="comment">   |                                                                           |</span>
<a name="l00027"></a>00027 <span class="comment">   +---------------------------------------------------------------------------+ */</span>
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef CHMTSLAM_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define CHMTSLAM_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;<a class="code" href="synch_8h.html">mrpt/synch.h</a>&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="system_8h.html">mrpt/system.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="_c_debug_output_capable_8h.html">mrpt/utils/CDebugOutputCapable.h</a>&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;<a class="code" href="_c_message_queue_8h.html">mrpt/utils/CMessageQueue.h</a>&gt;</span>
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;<a class="code" href="_h_m_t___s_l_a_m__common_8h.html">mrpt/hmtslam/HMT_SLAM_common.h</a>&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;<a class="code" href="_c_local_metric_hypothesis_8h.html">mrpt/hmtslam/CLocalMetricHypothesis.h</a>&gt;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;<a class="code" href="_c_hierarchical_m_h_map_8h.html">mrpt/hmtslam/CHierarchicalMHMap.h</a>&gt;</span>
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="preprocessor">#include &lt;<a class="code" href="_c_top_l_c_detector___grid_matching_8h.html">mrpt/hmtslam/CTopLCDetector_GridMatching.h</a>&gt;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &lt;<a class="code" href="_c_top_l_c_detector___fab_map_8h.html">mrpt/hmtslam/CTopLCDetector_FabMap.h</a>&gt;</span>
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;<a class="code" href="hmtslam_2include_2mrpt_2hmtslam_2link__pragmas_8h.html">mrpt/hmtslam/link_pragmas.h</a>&gt;</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="preprocessor">#include &lt;<a class="code" href="_c_i_c_p_8h.html">mrpt/slam/CICP.h</a>&gt;</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;<a class="code" href="_c_points_map_8h.html">mrpt/slam/CPointsMap.h</a>&gt;</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;<a class="code" href="_t_k_l_d_params_8h.html">mrpt/slam/TKLDParams.h</a>&gt;</span>
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 <span class="preprocessor">#include &lt;<a class="code" href="_c_action_collection_8h.html">mrpt/slam/CActionCollection.h</a>&gt;</span>
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <span class="preprocessor">#include &lt;<a class="code" href="_c_open_g_l_scene_8h.html">mrpt/opengl/COpenGLScene.h</a>&gt;</span>
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;queue&gt;</span>
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="keyword">namespace </span>mrpt
<a name="l00057"></a>00057 {<span class="comment"></span>
<a name="l00058"></a>00058 <span class="comment">        /** Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM. \ingroup mrpt_hmtslam_grp */</span>
<a name="l00059"></a>00059         <span class="keyword">namespace </span>hmtslam
<a name="l00060"></a>00060         {
<a name="l00061"></a>00061                 <span class="keyword">using namespace </span>mrpt::utils;
<a name="l00062"></a>00062                 <span class="keyword">using namespace </span>mrpt::system;
<a name="l00063"></a>00063                 <span class="keyword">using namespace </span>mrpt::math;
<a name="l00064"></a>00064                 <span class="keyword">using namespace </span>mrpt::bayes;
<a name="l00065"></a>00065                 <span class="keyword">using namespace </span>mrpt::slam;
<a name="l00066"></a>00066 
<a name="l00067"></a>00067 
<a name="l00068"></a>00068                 <span class="keyword">class </span><a class="code" href="namespacemrpt_1_1hmtslam.html#a3cbc1dce012698b238004879011b8cee">CHMTSLAM</a>;
<a name="l00069"></a>00069                 <span class="keyword">class </span>CLSLAMAlgorithmBase;
<a name="l00070"></a>00070                 <span class="keyword">class </span><a class="code" href="namespacemrpt_1_1hmtslam.html#af179dabf4c97d4b2e3a4c1b711e6a943">CLSLAM_RBPF_2DLASER</a>;
<a name="l00071"></a>00071 
<a name="l00072"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_ptr.html#a948aaf54d7eaa857eaecd359857fbd3f">00072</a>                 <a class="code" href="_c_serializable_8h.html#a9ef523d787f6cb837a0585b790882588" title="This declaration must be inserted in all CSerializable classes definition, before the class declarati...">DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE</a>( <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a>, <a class="code" href="classmrpt_1_1utils_1_1_c_serializable.html" title="The virtual base class which provides a unified interface for all persistent objects in MRPT...">mrpt::utils::CSerializable</a>, <a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> )
<a name="l00073"></a>00073 
<a name="l00074"></a>00074                 <span class="comment">/** An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).</span>
<a name="l00075"></a>00075 <span class="comment">                 *</span>
<a name="l00076"></a>00076 <span class="comment">                 *   The main entry points for a user are pushAction() and pushObservations(). Several parameters can be modified</span>
<a name="l00077"></a>00077 <span class="comment">                 *   through m_options.</span>
<a name="l00078"></a>00078 <span class="comment">                 *</span>
<a name="l00079"></a>00079 <span class="comment">                 *  The mathematical models of this approach have been reported in:</span>
<a name="l00080"></a>00080 <span class="comment">                 *              - Blanco J.L., Fernandez-Madrigal J.A., and Gonzalez J., &quot;Towards a Unified Bayesian Approach to Hybrid Metric-Topological SLAM&quot;, in  IEEE Transactions on Robotics (TRO), Vol. 24, No. 2, April 2008.</span>
<a name="l00081"></a>00081 <span class="comment">                 *              - ...</span>
<a name="l00082"></a>00082 <span class="comment">                 *</span>
<a name="l00083"></a>00083 <span class="comment">                 *  More information in the wiki page: http://www.mrpt.org/HMT-SLAM . A complete working application can be found in &quot;MRPT/apps/hmt-slam&quot;.</span>
<a name="l00084"></a>00084 <span class="comment">                 *</span>
<a name="l00085"></a>00085 <span class="comment">                 *  The complete state of the SLAM framework is serializable, so it can be saved and restore to/from a binary dump. This class implements mrpt::utils::CSerializable, so</span>
<a name="l00086"></a>00086 <span class="comment">                 *    it can be saved with &quot;stream &lt;&lt; slam_object;&quot; and restored with &quot;stream &gt;&gt; slam_object;&quot;. Alternatively, the methods CHMTSLAM::saveState and CHMTSLAM::loadState</span>
<a name="l00087"></a>00087 <span class="comment">                 *    can be invoked, which in turn call internally to the CSerializable interface.</span>
<a name="l00088"></a>00088 <span class="comment">                 *</span>
<a name="l00089"></a>00089 <span class="comment">                 * \sa CHierarchicalMHMap</span>
<a name="l00090"></a>00090 <span class="comment">                  * \ingroup mrpt_hmtslam_grp</span>
<a name="l00091"></a>00091 <span class="comment">                 */</span>
<a name="l00092"></a>00092                 class <a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a> : public mrpt::utils::<a class="code" href="classmrpt_1_1utils_1_1_c_debug_output_capable.html" title="This base class provides a common printf-like method to send debug information to std::cout...">CDebugOutputCapable</a>, public mrpt::utils::<a class="code" href="classmrpt_1_1utils_1_1_c_serializable.html" title="The virtual base class which provides a unified interface for all persistent objects in MRPT...">CSerializable</a>
<a name="l00093"></a>00093                 {
<a name="l00094"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a8be947851baa9c04c2c4d71eae9b76cf">00094</a>                         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>;
<a name="l00095"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ac34a721ee598515baa4048b339f41013">00095</a>                         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r.html" title="Implements a 2D local SLAM method based on a RBPF over an occupancy grid map.">CLSLAM_RBPF_2DLASER</a>;
<a name="l00096"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#aa647b0a9918cd02818f22bd36612525c">00096</a>                         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_top_l_c_detector___grid_matching.html">CTopLCDetector_GridMatching</a>;
<a name="l00097"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a6e91da2aba7ae0b86e5175f02a6bd63e">00097</a>                         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_top_l_c_detector___fab_map.html">CTopLCDetector_FabMap</a>;
<a name="l00098"></a>00098 
<a name="l00099"></a>00099                         <span class="comment">// This must be added to any CSerializable derived class:</span>
<a name="l00100"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ac8c606527dadd61eb16c219fcc54a30c">00100</a>                         <a class="code" href="_c_serializable_8h.html#a72ab55bf7ae009c89b75715cfa21e84d" title="This declaration must be inserted in all CSerializable classes definition, within the class declarati...">DEFINE_SERIALIZABLE</a>( <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a> )
<a name="l00101"></a>00101 
<a name="l00102"></a>00102                 protected:
<a name="l00103"></a>00103 
<a name="l00104"></a>00104 <span class="comment"></span>
<a name="l00105"></a>00105 <span class="comment">                        /** @name Inter-thread communication queues:</span>
<a name="l00106"></a>00106 <span class="comment">                                @{ */</span><span class="comment"></span>
<a name="l00107"></a>00107 <span class="comment">                        /** Message definition:</span>
<a name="l00108"></a>00108 <span class="comment">                                - From: LSLAM</span>
<a name="l00109"></a>00109 <span class="comment">                                - To: AA</span>
<a name="l00110"></a>00110 <span class="comment">                                - Meaning: Reconsider the graph partition for the given LMH. Compute SSO for the new node(s) &quot;newPoseIDs&quot;.</span>
<a name="l00111"></a>00111 <span class="comment">                                */</span>
<a name="l00112"></a>00112                         <span class="comment">/*struct TMessageAA</span>
<a name="l00113"></a>00113 <span class="comment">                        {</span>
<a name="l00114"></a>00114 <span class="comment">                                CLocalMetricHypothesis  *LMH;</span>
<a name="l00115"></a>00115 <span class="comment">                                TPoseIDList                             newPoseIDs;</span>
<a name="l00116"></a>00116 <span class="comment">                        };*/</span>
<a name="l00117"></a>00117 <span class="comment"></span>
<a name="l00118"></a>00118 <span class="comment">                        /** Message definition:</span>
<a name="l00119"></a>00119 <span class="comment">                                - From: AA</span>
<a name="l00120"></a>00120 <span class="comment">                                - To: LSLAM</span>
<a name="l00121"></a>00121 <span class="comment">                                - Meaning: The partitioning of robot poses.</span>
<a name="l00122"></a>00122 <span class="comment">                                */</span>
<a name="l00123"></a>00123                         struct <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_a_a.html" title="Message definition:">TMessageLSLAMfromAA</a>
<a name="l00124"></a>00124                         {
<a name="l00125"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_a_a.html#aac167eaf731286b9a207a0eb1e79affe">00125</a>                                 <a class="code" href="namespacemrpt_1_1hmtslam.html#a6a8c7a5cb874400f4df9d1fd6b6ff9ee" title="An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...">THypothesisID</a>                           <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_a_a.html#aac167eaf731286b9a207a0eb1e79affe" title="The hypothesis ID (LMH) for these results.">hypothesisID</a>; <span class="comment">//!&lt; The hypothesis ID (LMH) for these results.</span>
<a name="l00126"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_a_a.html#a4b797fda103e82f4f5fd6aff2a89ba00">00126</a> <span class="comment"></span>                                std<a class="code" href="classstd_1_1vector.html">::vector&lt; TPoseIDList &gt;</a>      <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_a_a.html#a4b797fda103e82f4f5fd6aff2a89ba00">partitions</a>;
<a name="l00127"></a>00127 
<a name="l00128"></a>00128                                 <span class="keywordtype">void</span> dumpToConsole( ) <span class="keyword">const</span>;  <span class="comment">//!&lt; for debugging only</span>
<a name="l00129"></a>00129 <span class="comment"></span>                        };
<a name="l00130"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ac8344118485e6fef7e018bb0b763daa5">00130</a>                         <span class="keyword">typedef</span> stlplus::smart_ptr&lt;TMessageLSLAMfromAA&gt; <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ac8344118485e6fef7e018bb0b763daa5">TMessageLSLAMfromAAPtr</a>;
<a name="l00131"></a>00131 <span class="comment"></span>
<a name="l00132"></a>00132 <span class="comment">                        /** Message definition:</span>
<a name="l00133"></a>00133 <span class="comment">                                - From: LSLAM</span>
<a name="l00134"></a>00134 <span class="comment">                                - To: TBI</span>
<a name="l00135"></a>00135 <span class="comment">                                - Meaning: One or more areas are to be considered by the TBI engines.</span>
<a name="l00136"></a>00136 <span class="comment">                                */</span>
<a name="l00137"></a>00137                         <span class="keyword">struct </span><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mto_t_b_i.html" title="Message definition:">TMessageLSLAMtoTBI</a>
<a name="l00138"></a>00138                         {
<a name="l00139"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mto_t_b_i.html#acf4d0d48aceb5c1d5fd2b647b414474a">00139</a>                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>  *<a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mto_t_b_i.html#acf4d0d48aceb5c1d5fd2b647b414474a" title="The LMH.">LMH</a>;           <span class="comment">//!&lt; The LMH</span>
<a name="l00140"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mto_t_b_i.html#ac015c213ad921a1f4b0d302ef43e832b">00140</a> <span class="comment"></span>                                <a class="code" href="classmrpt_1_1utils_1_1list__searchable.html">TNodeIDList</a>                              <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mto_t_b_i.html#ac015c213ad921a1f4b0d302ef43e832b" title="The areas to consider.">areaIDs</a>;       <span class="comment">//!&lt; The areas to consider.</span>
<a name="l00141"></a>00141 <span class="comment"></span>                        };
<a name="l00142"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a974f9abe66a702c460e8b68a1938b067">00142</a>                         <span class="keyword">typedef</span> stlplus::smart_ptr&lt;TMessageLSLAMtoTBI&gt; <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a974f9abe66a702c460e8b68a1938b067">TMessageLSLAMtoTBIPtr</a>;
<a name="l00143"></a>00143 <span class="comment"></span>
<a name="l00144"></a>00144 <span class="comment">                        /** Message definition:</span>
<a name="l00145"></a>00145 <span class="comment">                                - From: TBI</span>
<a name="l00146"></a>00146 <span class="comment">                                - To: LSLAM</span>
<a name="l00147"></a>00147 <span class="comment">                                - Meaning:</span>
<a name="l00148"></a>00148 <span class="comment">                                */</span>
<a name="l00149"></a>00149                         <span class="keyword">struct </span><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i.html" title="Message definition:">TMessageLSLAMfromTBI</a>
<a name="l00150"></a>00150                         {
<a name="l00151"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i.html#aa23c57effef849e44b568801cee21290">00151</a>                                 <a class="code" href="namespacemrpt_1_1hmtslam.html#a6a8c7a5cb874400f4df9d1fd6b6ff9ee" title="An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...">THypothesisID</a>                           <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i.html#aa23c57effef849e44b568801cee21290" title="The hypothesis ID (LMH) for these results.">hypothesisID</a>; <span class="comment">//!&lt; The hypothesis ID (LMH) for these results.</span>
<a name="l00152"></a>00152 <span class="comment"></span>
<a name="l00153"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i.html#af99f95b40c40e484cf5347ddb2d49b96">00153</a>                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_h_map_node.html" title="A class for representing a node in a hierarchical, multi-hypothesis map.">CHMHMapNode</a><a class="code" href="namespacemrpt_1_1utils.html#a718b4f99645b7e9f6501c9b7bb2a2fe7" title="The type for node IDs in graphs of different types.">::TNodeID</a>            <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i.html#af99f95b40c40e484cf5347ddb2d49b96" title="The area for who the loop-closure has been computed.">cur_area</a>; <span class="comment">//!&lt; The area for who the loop-closure has been computed.</span>
<a name="l00154"></a>00154 <span class="comment"></span>
<a name="l00155"></a>00155                                 <span class="keyword">struct </span><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i_1_1_t_b_i__info.html">TBI_info</a>
<a name="l00156"></a>00156                                 {
<a name="l00157"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i_1_1_t_b_i__info.html#a74cee9bb89d80d2c7db84c71d756c1c2">00157</a>                                         <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i_1_1_t_b_i__info.html">TBI_info</a>() : log_lik(0),delta_new_cur(0)
<a name="l00158"></a>00158                                         {}
<a name="l00159"></a>00159 
<a name="l00160"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i_1_1_t_b_i__info.html#aef04a5d335cef24691e264464e16cc96">00160</a>                                         <span class="keywordtype">double</span>          <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i_1_1_t_b_i__info.html#aef04a5d335cef24691e264464e16cc96" title="Log likelihood for this loop-closure.">log_lik</a>;  <span class="comment">//!&lt; Log likelihood for this loop-closure.</span>
<a name="l00161"></a>00161 <span class="comment"></span><span class="comment"></span>
<a name="l00162"></a>00162 <span class="comment">                                        /** Depending on the loop-closure engine, an guess of the relative pose of &quot;area_new&quot; relative to &quot;cur_area&quot; is given here.</span>
<a name="l00163"></a>00163 <span class="comment">                                          *  If the SOG contains 0 modes, then the engine does not provide this information.</span>
<a name="l00164"></a>00164 <span class="comment">                                          */</span>
<a name="l00165"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i_1_1_t_b_i__info.html#a7c7de58302320c357ec26f061f8dad78">00165</a>                                         <a class="code" href="classmrpt_1_1poses_1_1_c_pose3_d_p_d_f_s_o_g.html" title="Declares a class that represents a Probability Density function (PDF) of a 3D(6D) pose ...">CPose3DPDFSOG</a>   <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i_1_1_t_b_i__info.html#a7c7de58302320c357ec26f061f8dad78" title="Depending on the loop-closure engine, an guess of the relative pose of &quot;area_new&quot; relative to &quot;cur_ar...">delta_new_cur</a>;
<a name="l00166"></a>00166                                 };
<a name="l00167"></a>00167 <span class="comment"></span>
<a name="l00168"></a>00168 <span class="comment">                                /** The meat is here: only feasible loop closures from &quot;cur_area&quot; are included here, with associated data.</span>
<a name="l00169"></a>00169 <span class="comment">                                  */</span>
<a name="l00170"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i.html#af0315bd62d8d0564c509b228717ac79e">00170</a>                                 std<a class="code" href="classstd_1_1map.html">::map&lt; CHMHMapNode::TNodeID, TBI_info &gt;</a>      <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i.html#af0315bd62d8d0564c509b228717ac79e" title="The meat is here: only feasible loop closures from &quot;cur_area&quot; are included here, with associated data...">loopClosureData</a>;
<a name="l00171"></a>00171 
<a name="l00172"></a>00172                                 <span class="comment">//EIGEN_MAKE_ALIGNED_OPERATOR_NEW</span>
<a name="l00173"></a>00173                         };
<a name="l00174"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a97eaa1271ebb09ff6c677a2d723c5d96">00174</a>                         <span class="keyword">typedef</span> stlplus::smart_ptr&lt;TMessageLSLAMfromTBI&gt;        <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a97eaa1271ebb09ff6c677a2d723c5d96">TMessageLSLAMfromTBIPtr</a>;
<a name="l00175"></a>00175 
<a name="l00176"></a>00176 
<a name="l00177"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a056fc216e56be906f96d1c24359e091b">00177</a>                         utils<a class="code" href="classmrpt_1_1utils_1_1_c_thread_safe_queue.html">::CMessageQueue</a>    <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a056fc216e56be906f96d1c24359e091b" title="LSLAM thread input queue, messages of type CHMTSLAM::TMessageLSLAMfromAA.">m_LSLAM_queue</a>;  <span class="comment">//!&lt; LSLAM thread input queue, messages of type CHMTSLAM::TMessageLSLAMfromAA</span>
<a name="l00178"></a>00178 <span class="comment"></span><span class="comment"></span>
<a name="l00179"></a>00179 <span class="comment">                        /** @} */</span>
<a name="l00180"></a>00180 <span class="comment"></span>
<a name="l00181"></a>00181 <span class="comment">                        /** The Area Abstraction (AA) method, invoked from LSLAM.</span>
<a name="l00182"></a>00182 <span class="comment">                          * \param LMH (IN) The LMH which to this query applies.</span>
<a name="l00183"></a>00183 <span class="comment">                          * \param newPoseIDs (IN) The new poseIDs to be added to the graph partitioner.</span>
<a name="l00184"></a>00184 <span class="comment">                          * \return A structure with all return data. Memory to be freed by user.</span>
<a name="l00185"></a>00185 <span class="comment">                          * \note The critical section for LMH must be locked BEFORE calling this method (it does NOT lock any critical section).</span>
<a name="l00186"></a>00186 <span class="comment">                          */</span>
<a name="l00187"></a>00187                         <span class="keyword">static</span> TMessageLSLAMfromAAPtr areaAbstraction(
<a name="l00188"></a>00188                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>  *LMH,
<a name="l00189"></a>00189                                 <span class="keyword">const</span> <a class="code" href="classstd_1_1vector.html">TPoseIDList</a>               &amp;newPoseIDs );
<a name="l00190"></a>00190 
<a name="l00191"></a>00191 <span class="comment"></span>
<a name="l00192"></a>00192 <span class="comment">                        /** The entry point for Topological Bayesian Inference (TBI) engines, invoked from LSLAM.</span>
<a name="l00193"></a>00193 <span class="comment">                          * \param LMH (IN) The LMH which to this query applies.</span>
<a name="l00194"></a>00194 <span class="comment">                          * \param areaID (IN) The area ID to consider for potential loop-closures.</span>
<a name="l00195"></a>00195 <span class="comment">                          * \note The critical section for LMH must be locked BEFORE calling this method (it does NOT lock any critical section).</span>
<a name="l00196"></a>00196 <span class="comment">                          */</span>
<a name="l00197"></a>00197                         <span class="keyword">static</span> TMessageLSLAMfromTBIPtr TBI_main_method(
<a name="l00198"></a>00198                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>  *LMH,
<a name="l00199"></a>00199                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_h_map_node.html#a4320fd5748b07f6fdb6dd1bdc5b3920e" title="The type of the IDs of nodes.">CHMHMapNode::TNodeID</a> &amp;areaID
<a name="l00200"></a>00200                                 );
<a name="l00201"></a>00201 <span class="comment"></span>
<a name="l00202"></a>00202 <span class="comment">                        /** @name Related to the input queue:</span>
<a name="l00203"></a>00203 <span class="comment">                                @{ */</span>
<a name="l00204"></a>00204                 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00205"></a>00205 <span class="comment">                        /** Empty the input queue. */</span>
<a name="l00206"></a>00206                         <span class="keywordtype">void</span>  clearInputQueue();
<a name="l00207"></a>00207 <span class="comment"></span>
<a name="l00208"></a>00208 <span class="comment">                        /** Returns true if the input queue is empty (Note that the queue must not be empty to the user to enqueue more actions/observaitions)</span>
<a name="l00209"></a>00209 <span class="comment">                          * \sa pushAction,pushObservations, inputQueueSize</span>
<a name="l00210"></a>00210 <span class="comment">                          */</span>
<a name="l00211"></a>00211                         <span class="keywordtype">bool</span>  isInputQueueEmpty();
<a name="l00212"></a>00212 <span class="comment"></span>
<a name="l00213"></a>00213 <span class="comment">                        /** Returns the number of objects waiting for processing in the input queue.</span>
<a name="l00214"></a>00214 <span class="comment">                          * \sa pushAction,pushObservations, isInputQueueEmpty</span>
<a name="l00215"></a>00215 <span class="comment">                          */</span>
<a name="l00216"></a>00216                         <span class="keywordtype">size_t</span> inputQueueSize();
<a name="l00217"></a>00217 <span class="comment"></span>
<a name="l00218"></a>00218 <span class="comment">                        /** Here the user can enter an action into the system (will go to the SLAM process).</span>
<a name="l00219"></a>00219 <span class="comment">                          *  This class will delete the passed object when required, so DO NOT DELETE the passed object after calling this.</span>
<a name="l00220"></a>00220 <span class="comment">                          * \sa pushObservations,pushObservation</span>
<a name="l00221"></a>00221 <span class="comment">                          */</span>
<a name="l00222"></a>00222                         <span class="keywordtype">void</span>  pushAction( <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_action_collection_ptr.html">CActionCollectionPtr</a> &amp;acts );
<a name="l00223"></a>00223 <span class="comment"></span>
<a name="l00224"></a>00224 <span class="comment">                        /** Here the user can enter observations into the system (will go to the SLAM process).</span>
<a name="l00225"></a>00225 <span class="comment">                          *  This class will delete the passed object when required, so DO NOT DELETE the passed object after calling this.</span>
<a name="l00226"></a>00226 <span class="comment">                          * \sa pushAction,pushObservation</span>
<a name="l00227"></a>00227 <span class="comment">                          */</span>
<a name="l00228"></a>00228                         <span class="keywordtype">void</span>  pushObservations( <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_sensory_frame_ptr.html">CSensoryFramePtr</a> &amp;sf );
<a name="l00229"></a>00229 <span class="comment"></span>
<a name="l00230"></a>00230 <span class="comment">                        /** Here the user can enter an observation into the system (will go to the SLAM process).</span>
<a name="l00231"></a>00231 <span class="comment">                          *  This class will delete the passed object when required, so DO NOT DELETE the passed object after calling this.</span>
<a name="l00232"></a>00232 <span class="comment">                          * \sa pushAction,pushObservation</span>
<a name="l00233"></a>00233 <span class="comment">                          */</span>
<a name="l00234"></a>00234                         <span class="keywordtype">void</span>  pushObservation( <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_observation_ptr.html">CObservationPtr</a> &amp;obs );
<a name="l00235"></a>00235 
<a name="l00236"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ae37ec467ad380c1a1cf84fea9fb246eb">00236</a>                         <span class="keyword">enum</span> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ae37ec467ad380c1a1cf84fea9fb246eb">TLSlamMethod</a>
<a name="l00237"></a>00237                         {
<a name="l00238"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ae37ec467ad380c1a1cf84fea9fb246eba5f8cdb91f23d959f87e94c4ef2294716">00238</a>                                 lsmRBPF_2DLASER = 1
<a name="l00239"></a>00239                         };
<a name="l00240"></a>00240 
<a name="l00241"></a>00241                 <span class="keyword">protected</span>:<span class="comment"></span>
<a name="l00242"></a>00242 <span class="comment">                        /** Used from the LSLAM thread to retrieve the next object from the queue.</span>
<a name="l00243"></a>00243 <span class="comment">                          * \return The object, or NULL if empty.</span>
<a name="l00244"></a>00244 <span class="comment">                          */</span>
<a name="l00245"></a>00245                         <a class="code" href="structmrpt_1_1utils_1_1_c_serializable_ptr.html">CSerializablePtr</a> getNextObjectFromInputQueue();
<a name="l00246"></a>00246 <span class="comment"></span>
<a name="l00247"></a>00247 <span class="comment">                        /** The queue of pending actions/observations supplied by the user waiting for being processed. */</span>
<a name="l00248"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ae7564a6ff2b7b799ec76e336c4f9d423">00248</a>                         std<a class="code" href="classstd_1_1queue.html">::queue&lt;CSerializablePtr&gt;</a>            <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ae7564a6ff2b7b799ec76e336c4f9d423" title="The queue of pending actions/observations supplied by the user waiting for being processed.">m_inputQueue</a>;
<a name="l00249"></a>00249 <span class="comment"></span>
<a name="l00250"></a>00250 <span class="comment">                        /** Critical section for accessing  m_inputQueue */</span>
<a name="l00251"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a6c5a096f713893fa2de3ac1feeef643e">00251</a>                         synch::CCriticalSection <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a6c5a096f713893fa2de3ac1feeef643e" title="Critical section for accessing m_inputQueue.">m_inputQueue_cs</a>;
<a name="l00252"></a>00252 <span class="comment"></span>
<a name="l00253"></a>00253 <span class="comment">                        /** Critical section for accessing m_map */</span>
<a name="l00254"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a5eb6a0c528cdce1f7c44c825a1d5fd4d">00254</a>                         synch::CCriticalSection <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a5eb6a0c528cdce1f7c44c825a1d5fd4d" title="Critical section for accessing m_map.">m_map_cs</a>;
<a name="l00255"></a>00255 
<a name="l00256"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a8331094fe703797867b9b425f12088d9">00256</a>                         synch::CCriticalSection <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a8331094fe703797867b9b425f12088d9" title="Critical section for accessing m_LMHs.">m_LMHs_cs</a>; <span class="comment">//!&lt; Critical section for accessing m_LMHs</span>
<a name="l00257"></a>00257 <span class="comment"></span><span class="comment"></span>
<a name="l00258"></a>00258 <span class="comment">                        /** @} */</span>
<a name="l00259"></a>00259 
<a name="l00260"></a>00260 <span class="comment"></span>
<a name="l00261"></a>00261 <span class="comment">                        /** @name Threads stuff</span>
<a name="l00262"></a>00262 <span class="comment">                                @{ */</span>
<a name="l00263"></a>00263 <span class="comment"></span>
<a name="l00264"></a>00264 <span class="comment">                        /** The function for the &quot;Local SLAM&quot; thread. */</span>
<a name="l00265"></a>00265                         <span class="keywordtype">void</span> thread_LSLAM( );
<a name="l00266"></a>00266 <span class="comment"></span>
<a name="l00267"></a>00267 <span class="comment">                        /** The function for the &quot;TBI&quot; thread. */</span>
<a name="l00268"></a>00268                         <span class="keywordtype">void</span> thread_TBI( );
<a name="l00269"></a>00269 <span class="comment"></span>
<a name="l00270"></a>00270 <span class="comment">                        /** The function for the &quot;3D viewer&quot; thread. */</span>
<a name="l00271"></a>00271                         <span class="keywordtype">void</span> thread_3D_viewer( );<span class="comment"></span>
<a name="l00272"></a>00272 <span class="comment">                        /** Threads handles */</span>
<a name="l00273"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a9905e2b2527921ff1ffd14549796691b">00273</a>                         <a class="code" href="structmrpt_1_1system_1_1_t_thread_handle.html" title="This structure contains the information needed to interface the threads API on each platform:...">TThreadHandle</a>                   m_hThread_LSLAM,
<a name="l00274"></a>00274                                                                         <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a9905e2b2527921ff1ffd14549796691b">m_hThread_TBI</a>,
<a name="l00275"></a>00275                                                                         m_hThread_3D_viewer;<span class="comment"></span>
<a name="l00276"></a>00276 <span class="comment">                        /** @} */</span>
<a name="l00277"></a>00277 
<a name="l00278"></a>00278 <span class="comment"></span>
<a name="l00279"></a>00279 <span class="comment">                        /** @name HMT-SLAM sub-processes.</span>
<a name="l00280"></a>00280 <span class="comment">                                @{ */</span>
<a name="l00281"></a>00281                         <span class="keywordtype">void</span> LSLAM_process_message( <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_message.html" title="A class that contain generic messages, that can be sent and received from a &quot;CClientTCPSocket&quot; object...">CMessage</a> &amp;msg ); <span class="comment">//!&lt; Auxiliary method within thread_LSLAM</span>
<a name="l00282"></a>00282 <span class="comment"></span><span class="comment"></span>
<a name="l00283"></a>00283 <span class="comment">                        /** No critical section locks are assumed at the entrance of this method.</span>
<a name="l00284"></a>00284 <span class="comment">                          */</span>
<a name="l00285"></a>00285                         <span class="keywordtype">void</span> LSLAM_process_message_from_AA( <span class="keyword">const</span> <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_a_a.html" title="Message definition:">TMessageLSLAMfromAA</a> &amp;myMsg );
<a name="l00286"></a>00286 <span class="comment"></span>
<a name="l00287"></a>00287 <span class="comment">                        /** No critical section locks are assumed at the entrance of this method.</span>
<a name="l00288"></a>00288 <span class="comment">                          */</span>
<a name="l00289"></a>00289                         <span class="keywordtype">void</span> LSLAM_process_message_from_TBI( <span class="keyword">const</span> <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_message_l_s_l_a_mfrom_t_b_i.html" title="Message definition:">TMessageLSLAMfromTBI</a> &amp;myMsg );
<a name="l00290"></a>00290 <span class="comment"></span>
<a name="l00291"></a>00291 <span class="comment">                        /** Topological Loop Closure: Performs all the required operations</span>
<a name="l00292"></a>00292 <span class="comment">                                to close a loop between two areas which have been determined</span>
<a name="l00293"></a>00293 <span class="comment">                                to be the same.</span>
<a name="l00294"></a>00294 <span class="comment">                         */</span>
<a name="l00295"></a>00295                         <span class="keywordtype">void</span> perform_TLC(
<a name="l00296"></a>00296                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>                                  &amp;LMH,
<a name="l00297"></a>00297                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_h_map_node.html#a4320fd5748b07f6fdb6dd1bdc5b3920e" title="The type of the IDs of nodes.">CHMHMapNode::TNodeID</a>                              areaInLMH,
<a name="l00298"></a>00298                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_h_map_node.html#a4320fd5748b07f6fdb6dd1bdc5b3920e" title="The type of the IDs of nodes.">CHMHMapNode::TNodeID</a>                              areaLoopClosure,
<a name="l00299"></a>00299                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_pose3_d_p_d_f_gaussian.html" title="Declares a class that represents a Probability Density function (PDF) of a 3D pose ...">mrpt::poses::CPose3DPDFGaussian</a>   &amp;pose1wrt2
<a name="l00300"></a>00300                                 );
<a name="l00301"></a>00301 
<a name="l00302"></a>00302 <span class="comment"></span>
<a name="l00303"></a>00303 <span class="comment">                        /** @} */</span>
<a name="l00304"></a>00304 <span class="comment"></span>
<a name="l00305"></a>00305 <span class="comment">                        /** @name The different SLAM algorithms that can be invoked from the LSLAM thread.</span>
<a name="l00306"></a>00306 <span class="comment">                                @{ */</span>
<a name="l00307"></a>00307 <span class="comment"></span>
<a name="l00308"></a>00308 <span class="comment">                        /** An instance of a local SLAM method, to be applied to each LMH - initialized by &quot;initializeEmptyMap&quot; or &quot;loadState&quot;.</span>
<a name="l00309"></a>00309 <span class="comment">                          */</span>
<a name="l00310"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#aaa1d9d8fb3aed15b172266748b77daaa">00310</a>                         <a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m_algorithm_base.html" title="Virtual base for local SLAM methods, used in mrpt::slam::CHMTSLAM.">CLSLAMAlgorithmBase</a>             *<a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#aaa1d9d8fb3aed15b172266748b77daaa" title="An instance of a local SLAM method, to be applied to each LMH - initialized by &quot;initializeEmptyMap&quot; o...">m_LSLAM_method</a>;
<a name="l00311"></a>00311 <span class="comment"></span>
<a name="l00312"></a>00312 <span class="comment">                        /** @} */</span>
<a name="l00313"></a>00313 <span class="comment"></span>
<a name="l00314"></a>00314 <span class="comment">                        /** @name The different Loop-Closure modules that are to be executed in the TBI thread.</span>
<a name="l00315"></a>00315 <span class="comment">                                @{ */</span>
<a name="l00316"></a>00316                 <span class="keyword">protected</span>:
<a name="l00317"></a>00317 
<a name="l00318"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a945fdcf6479d807ef8f62ffe93952193">00318</a>                         <span class="keyword">typedef</span> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_top_l_c_detector_base.html" title="The virtual base class for Topological Loop-closure Detectors; used in HMT-SLAM.">CTopLCDetectorBase</a>*             (*TLopLCDetectorFactory)(<a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a>*);
<a name="l00319"></a>00319 
<a name="l00320"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a94399c637a1a7e6652fe80c3d0677a70">00320</a>                         std<a class="code" href="classstd_1_1map.html">::map&lt;std::string,TLopLCDetectorFactory&gt;</a>   <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a94399c637a1a7e6652fe80c3d0677a70">m_registeredLCDetectors</a>;
<a name="l00321"></a>00321 <span class="comment"></span>
<a name="l00322"></a>00322 <span class="comment">                        /** The list of LC modules in operation - initialized by &quot;initializeEmptyMap&quot; or &quot;loadState&quot;.  */</span>
<a name="l00323"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#aff9c8cc362037756cae63204f763f5bf">00323</a>                         std<a class="code" href="classstd_1_1deque.html">::deque&lt;CTopLCDetectorBase*&gt;</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#aff9c8cc362037756cae63204f763f5bf" title="The list of LC modules in operation - initialized by &quot;initializeEmptyMap&quot; or &quot;loadState&quot;.">m_topLCdets</a>;
<a name="l00324"></a>00324 <span class="comment"></span>
<a name="l00325"></a>00325 <span class="comment">                        /** The critical section for accessing m_topLCdets */</span>
<a name="l00326"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#adc298facbafa529c20803cf33eb5f3e8">00326</a>                         synch::CCriticalSection <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#adc298facbafa529c20803cf33eb5f3e8" title="The critical section for accessing m_topLCdets.">m_topLCdets_cs</a>;
<a name="l00327"></a>00327                 <span class="keyword">public</span>:
<a name="l00328"></a>00328 <span class="comment"></span>
<a name="l00329"></a>00329 <span class="comment">                        /** Must be invoked before calling  initializeEmptyMap, so LC objects can be created. */</span>
<a name="l00330"></a>00330                         <span class="keywordtype">void</span> registerLoopClosureDetector(
<a name="l00331"></a>00331                                 <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a>       &amp;name,
<a name="l00332"></a>00332                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_top_l_c_detector_base.html" title="The virtual base class for Topological Loop-closure Detectors; used in HMT-SLAM.">CTopLCDetectorBase</a>*             (*ptrCreateObject)(<a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a>*)
<a name="l00333"></a>00333                                 );
<a name="l00334"></a>00334 <span class="comment"></span>
<a name="l00335"></a>00335 <span class="comment">                        /** The class factory for topological loop closure detectors.</span>
<a name="l00336"></a>00336 <span class="comment">                          *  Possible values are enumerated in TOptions::TLC_detectors</span>
<a name="l00337"></a>00337 <span class="comment">                          *</span>
<a name="l00338"></a>00338 <span class="comment">                          * \exception std::exception On unknown name.</span>
<a name="l00339"></a>00339 <span class="comment">                          */</span>
<a name="l00340"></a>00340                         <a class="code" href="classmrpt_1_1hmtslam_1_1_c_top_l_c_detector_base.html" title="The virtual base class for Topological Loop-closure Detectors; used in HMT-SLAM.">CTopLCDetectorBase</a>* loopClosureDetector_factory(<span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a>  &amp;name);
<a name="l00341"></a>00341 
<a name="l00342"></a>00342 <span class="comment"></span>
<a name="l00343"></a>00343 <span class="comment">                        /** @} */</span>
<a name="l00344"></a>00344                 <span class="keyword">protected</span>:
<a name="l00345"></a>00345 
<a name="l00346"></a>00346 <span class="comment"></span>
<a name="l00347"></a>00347 <span class="comment">                        /** Termination flag for signaling all threads to terminate */</span>
<a name="l00348"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a54a36658fe03241c62878116b9df8882">00348</a>                         <span class="keywordtype">bool</span>                                    <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a54a36658fe03241c62878116b9df8882" title="Termination flag for signaling all threads to terminate.">m_terminateThreads</a>;
<a name="l00349"></a>00349 <span class="comment"></span>
<a name="l00350"></a>00350 <span class="comment">                        /** Threads termination flags:</span>
<a name="l00351"></a>00351 <span class="comment">                          */</span>
<a name="l00352"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#aa71659b791b366e56e036e18757ed2f9">00352</a>                         <span class="keywordtype">bool</span>                                    m_terminationFlag_LSLAM,
<a name="l00353"></a>00353                                                                         <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#aa71659b791b366e56e036e18757ed2f9">m_terminationFlag_TBI</a>,
<a name="l00354"></a>00354                                                                         m_terminationFlag_3D_viewer;
<a name="l00355"></a>00355 <span class="comment"></span>
<a name="l00356"></a>00356 <span class="comment">                        /** Generates a new and unique area textual label (currently this generates &quot;0&quot;,&quot;1&quot;,...) */</span>
<a name="l00357"></a>00357                         <span class="keyword">static</span> std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a>              generateUniqueAreaLabel();
<a name="l00358"></a>00358 <span class="comment"></span>
<a name="l00359"></a>00359 <span class="comment">                        /** Generates a new and unique pose ID */</span>
<a name="l00360"></a>00360                         <span class="keyword">static</span> <a class="code" href="namespacemrpt_1_1hmtslam.html#afc45e3c745da87655acd25af131343bf" title="An integer number uniquely identifying each robot pose stored in HMT-SLAM.">TPoseID</a>                  generatePoseID();
<a name="l00361"></a>00361 <span class="comment"></span>
<a name="l00362"></a>00362 <span class="comment">                        /** Generates a new and unique hypothesis ID */</span>
<a name="l00363"></a>00363                         <span class="keyword">static</span> <a class="code" href="namespacemrpt_1_1hmtslam.html#a6a8c7a5cb874400f4df9d1fd6b6ff9ee" title="An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...">THypothesisID</a>    generateHypothesisID();
<a name="l00364"></a>00364 
<a name="l00365"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a9d96799cd6393660b8b81e499cbe33a1">00365</a>                         <span class="keyword">static</span> int64_t                  <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a9d96799cd6393660b8b81e499cbe33a1">m_nextAreaLabel</a>;
<a name="l00366"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#aa37861d1d56396b7237fdb0bc4b71623">00366</a>                         <span class="keyword">static</span> <a class="code" href="namespacemrpt_1_1hmtslam.html#afc45e3c745da87655acd25af131343bf" title="An integer number uniquely identifying each robot pose stored in HMT-SLAM.">TPoseID</a>                  <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#aa37861d1d56396b7237fdb0bc4b71623">m_nextPoseID</a>;
<a name="l00367"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a09465c59c8a8d4dea1d63c68407ec805">00367</a>                         <span class="keyword">static</span> <a class="code" href="namespacemrpt_1_1hmtslam.html#a6a8c7a5cb874400f4df9d1fd6b6ff9ee" title="An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...">THypothesisID</a>    <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a09465c59c8a8d4dea1d63c68407ec805">m_nextHypID</a>;
<a name="l00368"></a>00368 
<a name="l00369"></a>00369 
<a name="l00370"></a>00370                 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00371"></a>00371 <span class="comment">                        /** Default constructor</span>
<a name="l00372"></a>00372 <span class="comment">                          *  \param debug_out_stream If debug output messages should be redirected to any other stream apart from std::cout</span>
<a name="l00373"></a>00373 <span class="comment">                          */</span>
<a name="l00374"></a>00374                         <a class="code" href="namespacemrpt_1_1hmtslam.html#a3cbc1dce012698b238004879011b8cee">CHMTSLAM</a>( );
<a name="l00375"></a>00375 
<a name="l00376"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ac12b228b43d9e78e0f8dfca140bd578a">00376</a>                         <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ac12b228b43d9e78e0f8dfca140bd578a">CHMTSLAM</a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a> &amp;o) { <a class="code" href="mrpt__macros_8h.html#aaa3f404ea85a6575a7139f8d101370ba">THROW_EXCEPTION</a>(<span class="stringliteral">&quot;This object cannot be copied.&quot;</span>); }
<a name="l00377"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a0f70d93371407fc1f09e05c701f47842">00377</a>                         <span class="keyword">const</span> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a>&amp; operator =(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a> &amp;o) { <a class="code" href="mrpt__macros_8h.html#aaa3f404ea85a6575a7139f8d101370ba">THROW_EXCEPTION</a>(<span class="stringliteral">&quot;This object cannot be copied.&quot;</span>); }
<a name="l00378"></a>00378 <span class="comment"></span>
<a name="l00379"></a>00379 <span class="comment">                        /** Destructor</span>
<a name="l00380"></a>00380 <span class="comment">                          */</span>
<a name="l00381"></a>00381                         <span class="keyword">virtual</span> ~<a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a>();
<a name="l00382"></a>00382 <span class="comment"></span>
<a name="l00383"></a>00383 <span class="comment">                        /** Return true if an exception has been caught in any thread leading to the end of the mapping application: no more actions/observations will be processed from now on.</span>
<a name="l00384"></a>00384 <span class="comment">                          */</span>
<a name="l00385"></a>00385                         <span class="keywordtype">bool</span> abortedDueToErrors();
<a name="l00386"></a>00386 
<a name="l00387"></a>00387 <span class="comment"></span>
<a name="l00388"></a>00388 <span class="comment">                        /** @name High-level map management</span>
<a name="l00389"></a>00389 <span class="comment">                                @{ */</span>
<a name="l00390"></a>00390 <span class="comment"></span>
<a name="l00391"></a>00391 <span class="comment">                        /** Loads the options from a config file. */</span>
<a name="l00392"></a>00392                         <span class="keywordtype">void</span> loadOptions( <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;configFile );<span class="comment"></span>
<a name="l00393"></a>00393 <span class="comment">                        /** Loads the options from a config source */</span>
<a name="l00394"></a>00394                         <span class="keywordtype">void</span> loadOptions( <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_config_file_base.html" title="This class allows loading and storing values and vectors of different types from a configuration text...">mrpt::utils::CConfigFileBase</a> &amp;cfgSource );
<a name="l00395"></a>00395 <span class="comment"></span>
<a name="l00396"></a>00396 <span class="comment">                        /** Initializes the whole HMT-SLAM framework, reseting to an empty map (It also clears the logs directory) - this must be called AFTER loading the options with CHMTSLAM::loadOptions. */</span>
<a name="l00397"></a>00397                         <span class="keywordtype">void</span>  initializeEmptyMap();
<a name="l00398"></a>00398 <span class="comment"></span>
<a name="l00399"></a>00399 <span class="comment">                        /** Save the state of the whole HMT-SLAM framework to some binary stream (e.g. a file).</span>
<a name="l00400"></a>00400 <span class="comment">                          * \return true if everything goes OK.</span>
<a name="l00401"></a>00401 <span class="comment">                          * \sa loadState</span>
<a name="l00402"></a>00402 <span class="comment">                          */</span>
<a name="l00403"></a>00403                         <span class="keywordtype">bool</span> saveState( <a class="code" href="classmrpt_1_1utils_1_1_c_stream.html" title="This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...">CStream</a> &amp;out ) <span class="keyword">const</span>;
<a name="l00404"></a>00404 <span class="comment"></span>
<a name="l00405"></a>00405 <span class="comment">                        /** Load the state of the whole HMT-SLAM framework from some binary stream (e.g. a file).</span>
<a name="l00406"></a>00406 <span class="comment">                          * \return true if everything goes OK.</span>
<a name="l00407"></a>00407 <span class="comment">                          * \sa saveState</span>
<a name="l00408"></a>00408 <span class="comment">                          */</span>
<a name="l00409"></a>00409                         <span class="keywordtype">bool</span> loadState( <a class="code" href="classmrpt_1_1utils_1_1_c_stream.html" title="This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...">CStream</a> &amp;in );<span class="comment"></span>
<a name="l00410"></a>00410 <span class="comment">                        /** @} */</span>
<a name="l00411"></a>00411 <span class="comment"></span>
<a name="l00412"></a>00412 <span class="comment">                        /** @name The important data.</span>
<a name="l00413"></a>00413 <span class="comment">                                @{ */</span>
<a name="l00414"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a4860a0aa51cf1cd638f6a1357b0b718e">00414</a>                         <a class="code" href="classmrpt_1_1hmtslam_1_1_c_hierarchical_m_h_map.html" title="The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model...">CHierarchicalMHMap</a>                                                                      <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a4860a0aa51cf1cd638f6a1357b0b718e" title="The hiearchical, multi-hypothesis graph-based map.">m_map</a>;  <span class="comment">//!&lt; The hiearchical, multi-hypothesis graph-based map.</span>
<a name="l00415"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a5b1d7b688f8e7a326a32fd38494cc670">00415</a> <span class="comment"></span>                        <a class="code" href="structmrpt_1_1aligned__containers.html" title="Helper types for STL containers with Eigen memory allocators.">aligned_containers&lt;THypothesisID, CLocalMetricHypothesis&gt;::map_t</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#a5b1d7b688f8e7a326a32fd38494cc670" title="The list of LMHs at each instant.">m_LMHs</a>;        <span class="comment">//!&lt; The list of LMHs at each instant.</span>
<a name="l00416"></a>00416 <span class="comment"></span><span class="comment">                        /** @} */</span>
<a name="l00417"></a>00417 <span class="comment"></span>
<a name="l00418"></a>00418 <span class="comment">                        /** Called from LSLAM thread when log files must be created.</span>
<a name="l00419"></a>00419 <span class="comment">                          */</span>
<a name="l00420"></a>00420                         <span class="keywordtype">void</span> generateLogFiles(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nIteration);
<a name="l00421"></a>00421 
<a name="l00422"></a>00422 <span class="comment"></span>
<a name="l00423"></a>00423 <span class="comment">                        /** Gets a 3D representation of the current state of the whole mapping framework.</span>
<a name="l00424"></a>00424 <span class="comment">                          */</span>
<a name="l00425"></a>00425                         <span class="keywordtype">void</span>  getAs3DScene( <a class="code" href="classmrpt_1_1opengl_1_1_c_open_g_l_scene.html" title="This class allows the user to create, load, save, and render 3D scenes using OpenGL primitives...">COpenGLScene</a>        &amp;outScene );
<a name="l00426"></a>00426 
<a name="l00427"></a>00427                 <span class="keyword">protected</span>:<span class="comment"></span>
<a name="l00428"></a>00428 <span class="comment">                        /** A variety of options and configuration params (private, use loadOptions).</span>
<a name="l00429"></a>00429 <span class="comment">                          */</span>
<a name="l00430"></a>00430                         <span class="keyword">struct </span><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html" title="A variety of options and configuration params (private, use loadOptions).">TOptions</a> : <span class="keyword">public</span> utils::<a class="code" href="classmrpt_1_1utils_1_1_c_loadable_options.html" title="This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...">CLoadableOptions</a>
<a name="l00431"></a>00431                         {<span class="comment"></span>
<a name="l00432"></a>00432 <span class="comment">                                /** Initialization of default params</span>
<a name="l00433"></a>00433 <span class="comment">                                  */</span>
<a name="l00434"></a>00434                                 <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html" title="A variety of options and configuration params (private, use loadOptions).">TOptions</a>();
<a name="l00435"></a>00435 <span class="comment"></span>
<a name="l00436"></a>00436 <span class="comment">                                /** Load parameters from configuration source</span>
<a name="l00437"></a>00437 <span class="comment">                                  */</span>
<a name="l00438"></a>00438                                 <span class="keywordtype">void</span>  loadFromConfigFile(
<a name="l00439"></a>00439                                         <span class="keyword">const</span> <a class="code" href="classmrpt_1_1utils_1_1_c_config_file_base.html" title="This class allows loading and storing values and vectors of different types from a configuration text...">mrpt::utils::CConfigFileBase</a>      &amp;source,
<a name="l00440"></a>00440                                         <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a>               &amp;section);
<a name="l00441"></a>00441 <span class="comment"></span>
<a name="l00442"></a>00442 <span class="comment">                                /** This method must display clearly all the contents of the structure in textual form, sending it to a CStream.</span>
<a name="l00443"></a>00443 <span class="comment">                                  */</span>
<a name="l00444"></a>00444                                 <span class="keywordtype">void</span>  dumpToTextStream(<a class="code" href="classmrpt_1_1utils_1_1_c_stream.html" title="This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...">CStream</a>  &amp;out) <span class="keyword">const</span>;
<a name="l00445"></a>00445 
<a name="l00446"></a>00446 
<a name="l00447"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#af27802443bfdca84d8cfcb9369f4b07f">00447</a>                                 std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a>     <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#af27802443bfdca84d8cfcb9369f4b07f" title="[LOGGING] If it is not an empty string (&quot;&quot;), a directory with that name will be created and log files...">LOG_OUTPUT_DIR</a>;         <span class="comment">//!&lt; [LOGGING] If it is not an empty string (&quot;&quot;), a directory with that name will be created and log files save there.</span>
<a name="l00448"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a3bbef55e7aca22d20d04f78db0912e2e">00448</a> <span class="comment"></span>                                <span class="keywordtype">int</span>                     <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a3bbef55e7aca22d20d04f78db0912e2e" title="[LOGGING] One SLAM iteration out of &quot;LOGGING_logFrequency&quot;, a log file will be generated.">LOG_FREQUENCY</a>;          <span class="comment">//!&lt; [LOGGING] One SLAM iteration out of &quot;LOGGING_logFrequency&quot;, a log file will be generated.</span>
<a name="l00449"></a>00449 <span class="comment"></span><span class="comment"></span>
<a name="l00450"></a>00450 <span class="comment">                                /** [LSLAM] The method to use for local SLAM</span>
<a name="l00451"></a>00451 <span class="comment">                                  */</span>
<a name="l00452"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a66c2182a267a09e5bb1b6186b3c27db5">00452</a>                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html#ae37ec467ad380c1a1cf84fea9fb246eb">TLSlamMethod</a>   <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a66c2182a267a09e5bb1b6186b3c27db5" title="[LSLAM] The method to use for local SLAM">SLAM_METHOD</a>;
<a name="l00453"></a>00453 <span class="comment"></span>
<a name="l00454"></a>00454 <span class="comment">                                /** [LSLAM] Minimum distance (and heading) difference between observations inserted in the map.</span>
<a name="l00455"></a>00455 <span class="comment">                                */</span>
<a name="l00456"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#af9731918c58f78de0e509f5686ae3077">00456</a>                                 <span class="keywordtype">float</span>           SLAM_MIN_DIST_BETWEEN_OBS, <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#af9731918c58f78de0e509f5686ae3077">SLAM_MIN_HEADING_BETWEEN_OBS</a>;
<a name="l00457"></a>00457 <span class="comment"></span>
<a name="l00458"></a>00458 <span class="comment">                                /** [LSLAM] Minimum uncertainty (1 sigma, meters) in x and y for odometry increments (Default=0) */</span>
<a name="l00459"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#ad1c1d75c844a0b99dc5ef9f2587943c5">00459</a>                                 <span class="keywordtype">float</span>           <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#ad1c1d75c844a0b99dc5ef9f2587943c5" title="[LSLAM] Minimum uncertainty (1 sigma, meters) in x and y for odometry increments (Default=0)">MIN_ODOMETRY_STD_XY</a>;
<a name="l00460"></a>00460 <span class="comment"></span>
<a name="l00461"></a>00461 <span class="comment">                                /** [LSLAM] Minimum uncertainty (1 sigma, rads) in phi for odometry increments (Default=0) */</span>
<a name="l00462"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#ad335a3d3fc6a2dd6392be060426defa1">00462</a>                                 <span class="keywordtype">float</span>           <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#ad335a3d3fc6a2dd6392be060426defa1" title="[LSLAM] Minimum uncertainty (1 sigma, rads) in phi for odometry increments (Default=0)">MIN_ODOMETRY_STD_PHI</a>;
<a name="l00463"></a>00463 <span class="comment"></span>
<a name="l00464"></a>00464 <span class="comment">                                /** [VIEW3D] The height of the areas&#39; spheres.</span>
<a name="l00465"></a>00465 <span class="comment">                                  */</span>
<a name="l00466"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a22f644f38ae654bec3136e445a0b8835">00466</a>                                 <span class="keywordtype">float</span>           <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a22f644f38ae654bec3136e445a0b8835" title="[VIEW3D] The height of the areas&#39; spheres.">VIEW3D_AREA_SPHERES_HEIGHT</a>;
<a name="l00467"></a>00467 <span class="comment"></span>
<a name="l00468"></a>00468 <span class="comment">                                /** [VIEW3D] The radius of the areas&#39; spheres.</span>
<a name="l00469"></a>00469 <span class="comment">                                  */</span>
<a name="l00470"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#aa534b29a034118484f95ab4791b170d7">00470</a>                                 <span class="keywordtype">float</span>           <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#aa534b29a034118484f95ab4791b170d7" title="[VIEW3D] The radius of the areas&#39; spheres.">VIEW3D_AREA_SPHERES_RADIUS</a>;
<a name="l00471"></a>00471 <span class="comment"></span>
<a name="l00472"></a>00472 <span class="comment">                                /** A 3-length vector with the std. deviation of the transition model in (x,y,phi) used only when there is no odometry (if there is odo, its uncertainty values will be used instead); x y: In meters, phi: radians (but in degrees when loading from a configuration ini-file!)</span>
<a name="l00473"></a>00473 <span class="comment">                                  */</span>
<a name="l00474"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a8ed85205ccca0eb6ca52973da537355f">00474</a>                                 <a class="code" href="structmrpt_1_1dynamicsize__vector.html" title="The base class of MRPT vectors, actually, Eigen column matrices of dynamic size with specialized cons...">vector_float</a>  <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a8ed85205ccca0eb6ca52973da537355f" title="A 3-length vector with the std.">stds_Q_no_odo</a>;
<a name="l00475"></a>00475 <span class="comment"></span>
<a name="l00476"></a>00476 <span class="comment">                                /** [AA] The options for the partitioning algorithm</span>
<a name="l00477"></a>00477 <span class="comment">                                */</span>
<a name="l00478"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a3edf44a47ad442391804fb04acc563ad">00478</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_incremental_map_partitioner.html" title="This class can be used to make partitions on a map/graph build from observations taken at some poses/...">CIncrementalMapPartitioner</a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html" title="A variety of options and configuration params (private, use loadOptions).">::TOptions</a>    <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a3edf44a47ad442391804fb04acc563ad" title="[AA] The options for the partitioning algorithm">AA_options</a>;
<a name="l00479"></a>00479 
<a name="l00480"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a14fff204bd3b5ec91c2ecff67f9f7a42">00480</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_t_set_of_metric_map_initializers.html" title="A set of TMetricMapInitializer structures, passed to the constructor CMultiMetricMap::CMultiMetricMap...">TSetOfMetricMapInitializers</a>             <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a14fff204bd3b5ec91c2ecff67f9f7a42" title="The default set of maps to be created in each particle.">defaultMapsInitializers</a>;  <span class="comment">//!&lt; The default set of maps to be created in each particle</span>
<a name="l00481"></a>00481 <span class="comment"></span>
<a name="l00482"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a845f08553477e8959cdde272ea99ab68">00482</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_multi_metric_map.html" title="This class stores any customizable set of metric maps.">CMultiMetricMap</a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html" title="A variety of options and configuration params (private, use loadOptions).">::TOptions</a>               <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a845f08553477e8959cdde272ea99ab68" title="The default options for the CMultiMetricMap in each particle.">defaultMapsOptions</a>;             <span class="comment">//!&lt; The default options for the CMultiMetricMap in each particle.</span>
<a name="l00483"></a>00483 <span class="comment"></span>
<a name="l00484"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a951f8b5f603f505076ff12917717132c">00484</a>                                 bayes<a class="code" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html" title="The configuration of a particle filter.">::CParticleFilter::TParticleFilterOptions</a> <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a951f8b5f603f505076ff12917717132c" title="These params are used from every LMH object.">pf_options</a>;      <span class="comment">//!&lt; These params are used from every LMH object.</span>
<a name="l00485"></a>00485 <span class="comment"></span>
<a name="l00486"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#aac3c3a25d600cd099256bb565b46158f">00486</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_t_k_l_d_params.html" title="Option set for KLD algorithm.">TKLDParams</a>                                              <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#aac3c3a25d600cd099256bb565b46158f">KLD_params</a>;
<a name="l00487"></a>00487 
<a name="l00488"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a2d36c18b249b629af24d63781b7a1936">00488</a>                                 <span class="keywordtype">int</span>  <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a2d36c18b249b629af24d63781b7a1936" title="0 means randomize, use any other value to have repetitive experiments.">random_seed</a>;       <span class="comment">//!&lt; 0 means randomize, use any other value to have repetitive experiments.</span>
<a name="l00489"></a>00489 <span class="comment"></span><span class="comment"></span>
<a name="l00490"></a>00490 <span class="comment">                                /** A list of topological loop-closure detectors to use: can be one or more from this list:</span>
<a name="l00491"></a>00491 <span class="comment">                                  *  &#39;gridmaps&#39;: Occupancy Grid matching.</span>
<a name="l00492"></a>00492 <span class="comment">                                  *  &#39;fabmap&#39;: Mark Cummins&#39; image matching framework.</span>
<a name="l00493"></a>00493 <span class="comment">                                  */</span>
<a name="l00494"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#ab5b31cc789677887c8a244c3e0c9f948">00494</a>                                 <a class="code" href="classstd_1_1vector.html">vector_string</a>                           <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#ab5b31cc789677887c8a244c3e0c9f948" title="A list of topological loop-closure detectors to use: can be one or more from this list: &#39;gridmaps&#39;: O...">TLC_detectors</a>;
<a name="l00495"></a>00495 
<a name="l00496"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a1cf126443f2df5ce9ba962879b18d3d5">00496</a>                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_top_l_c_detector___grid_matching.html">CTopLCDetector_GridMatching</a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html" title="A variety of options and configuration params (private, use loadOptions).">::TOptions</a>   <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a1cf126443f2df5ce9ba962879b18d3d5" title="Options passed to this TLC constructor.">TLC_grid_options</a>;       <span class="comment">//!&lt; Options passed to this TLC constructor</span>
<a name="l00497"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a1323fb2a953b15e0fc13439c52b8d3ab">00497</a> <span class="comment"></span>                                <a class="code" href="classmrpt_1_1hmtslam_1_1_c_top_l_c_detector___fab_map.html">CTopLCDetector_FabMap</a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html" title="A variety of options and configuration params (private, use loadOptions).">::TOptions</a> <a class="code" href="structmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m_1_1_t_options.html#a1323fb2a953b15e0fc13439c52b8d3ab" title="Options passed to this TLC constructor.">TLC_fabmap_options</a>;     <span class="comment">//!&lt; Options passed to this TLC constructor</span>
<a name="l00498"></a>00498 <span class="comment"></span>
<a name="l00499"></a>00499                         } m_options;
<a name="l00500"></a>00500 
<a name="l00501"></a>00501                 }; <span class="comment">// End of class CHMTSLAM.</span>
<a name="l00502"></a>00502 
<a name="l00503"></a>00503 <span class="comment"></span>
<a name="l00504"></a>00504 <span class="comment">                /** Virtual base for local SLAM methods, used in mrpt::slam::CHMTSLAM.</span>
<a name="l00505"></a>00505 <span class="comment">                  */</span>
<a name="l00506"></a>00506                 <span class="keyword">class </span><a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m_algorithm_base.html" title="Virtual base for local SLAM methods, used in mrpt::slam::CHMTSLAM.">CLSLAMAlgorithmBase</a>
<a name="l00507"></a>00507                 {
<a name="l00508"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m_algorithm_base.html#a8be947851baa9c04c2c4d71eae9b76cf">00508</a>                         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>;
<a name="l00509"></a>00509                 <span class="keyword">protected</span>:
<a name="l00510"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m_algorithm_base.html#a7fbb8903f004411c76e55d45df946efe">00510</a>                         <a class="code" href="structmrpt_1_1utils_1_1safe__ptr.html">safe_ptr&lt;CHMTSLAM&gt;</a>      <a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m_algorithm_base.html#a7fbb8903f004411c76e55d45df946efe">m_parent</a>;
<a name="l00511"></a>00511 
<a name="l00512"></a>00512                 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00513"></a>00513 <span class="comment">                        /** Constructor</span>
<a name="l00514"></a>00514 <span class="comment">                          */</span>
<a name="l00515"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m_algorithm_base.html#ac1de06d65dfc1b051c1c21bd77c6cd16">00515</a>                         <a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m_algorithm_base.html#ac1de06d65dfc1b051c1c21bd77c6cd16" title="Constructor.">CLSLAMAlgorithmBase</a>( <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a> *parent ) : m_parent(parent) { }
<a name="l00516"></a>00516 <span class="comment"></span>
<a name="l00517"></a>00517 <span class="comment">                        /** Destructor</span>
<a name="l00518"></a>00518 <span class="comment">                          */</span>
<a name="l00519"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m_algorithm_base.html#a71e840844a7041637a107b885ef5bd5f">00519</a>                         <span class="keyword">virtual</span> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m_algorithm_base.html#a71e840844a7041637a107b885ef5bd5f" title="Destructor.">~CLSLAMAlgorithmBase</a>() {}
<a name="l00520"></a>00520 <span class="comment"></span>
<a name="l00521"></a>00521 <span class="comment">                        /** Main entry point from HMT-SLAM: process some actions &amp; observations.</span>
<a name="l00522"></a>00522 <span class="comment">                          *  The passed action/observation will be deleted, so a copy must be made if necessary.</span>
<a name="l00523"></a>00523 <span class="comment">                          *  This method must be in charge of updating the robot pose estimates and also to update the</span>
<a name="l00524"></a>00524 <span class="comment">                          *   map when required.</span>
<a name="l00525"></a>00525 <span class="comment">                          *</span>
<a name="l00526"></a>00526 <span class="comment">                          * \param LMH   The local metric hypothesis which must be updated by this SLAM algorithm.</span>
<a name="l00527"></a>00527 <span class="comment">                          * \param act   The action to process (or NULL).</span>
<a name="l00528"></a>00528 <span class="comment">                          * \param sf    The observations to process (or NULL).</span>
<a name="l00529"></a>00529 <span class="comment">                          */</span>
<a name="l00530"></a>00530                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> processOneLMH(
<a name="l00531"></a>00531                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>  *LMH,
<a name="l00532"></a>00532                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_action_collection_ptr.html">CActionCollectionPtr</a>      &amp;act,
<a name="l00533"></a>00533                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_sensory_frame_ptr.html">CSensoryFramePtr</a>          &amp;sf ) = 0;
<a name="l00534"></a>00534 
<a name="l00535"></a>00535 <span class="comment"></span>
<a name="l00536"></a>00536 <span class="comment">                        /** The PF algorithm implementation.</span>
<a name="l00537"></a>00537 <span class="comment">                          */</span>
<a name="l00538"></a>00538                         <span class="keyword">virtual</span> <span class="keywordtype">void</span>  prediction_and_update_pfAuxiliaryPFOptimal(
<a name="l00539"></a>00539                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>                  * LMH,
<a name="l00540"></a>00540                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_action_collection.html" title="Declares a class for storing a collection of robot actions.">mrpt::slam::CActionCollection</a>     * action,
<a name="l00541"></a>00541                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_sensory_frame.html" title="Declares a class for storing a &quot;sensory frame&quot;, a set of &quot;observations&quot; taken by the robot approximat...">mrpt::slam::CSensoryFrame</a>         * observation,
<a name="l00542"></a>00542                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html" title="The configuration of a particle filter.">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options ) = 0;
<a name="l00543"></a>00543 <span class="comment"></span>
<a name="l00544"></a>00544 <span class="comment">                        /** The PF algorithm implementation.  */</span>
<a name="l00545"></a>00545                         <span class="keyword">virtual</span> <span class="keywordtype">void</span>  prediction_and_update_pfOptimalProposal(
<a name="l00546"></a>00546                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>                  *LMH,
<a name="l00547"></a>00547                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_action_collection.html" title="Declares a class for storing a collection of robot actions.">mrpt::slam::CActionCollection</a>     * action,
<a name="l00548"></a>00548                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_sensory_frame.html" title="Declares a class for storing a &quot;sensory frame&quot;, a set of &quot;observations&quot; taken by the robot approximat...">mrpt::slam::CSensoryFrame</a>         * observation,
<a name="l00549"></a>00549                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html" title="The configuration of a particle filter.">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options ) = 0;
<a name="l00550"></a>00550 
<a name="l00551"></a>00551                 }; <span class="comment">// end of class CLSLAMAlgorithmBase</span>
<a name="l00552"></a>00552 
<a name="l00553"></a>00553 <span class="comment"></span>
<a name="l00554"></a>00554 <span class="comment">                /** Implements a 2D local SLAM method based on a RBPF over an occupancy grid map.</span>
<a name="l00555"></a>00555 <span class="comment">                  *  This class is used internally in mrpt::slam::CHMTSLAM</span>
<a name="l00556"></a>00556 <span class="comment">                  */</span>
<a name="l00557"></a>00557                 <span class="keyword">class </span><a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> <a class="code" href="namespacemrpt_1_1hmtslam.html#af179dabf4c97d4b2e3a4c1b711e6a943">CLSLAM_RBPF_2DLASER</a> : <span class="keyword">public</span> CLSLAMAlgorithmBase
<a name="l00558"></a>00558                 {
<a name="l00559"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r.html#a8be947851baa9c04c2c4d71eae9b76cf">00559</a>                         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="hmtslam__impexp_8h.html#a4f5ef02557cd461c7f3eb0eb04684aca">HMTSLAM_IMPEXP</a> <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>;
<a name="l00560"></a>00560 
<a name="l00561"></a>00561                 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00562"></a>00562 <span class="comment">                        /** Constructor</span>
<a name="l00563"></a>00563 <span class="comment">                          */</span>
<a name="l00564"></a>00564                         <a class="code" href="namespacemrpt_1_1hmtslam.html#af179dabf4c97d4b2e3a4c1b711e6a943">CLSLAM_RBPF_2DLASER</a>( <a class="code" href="classmrpt_1_1hmtslam_1_1_c_h_m_t_s_l_a_m.html" title="An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).">CHMTSLAM</a> *parent );
<a name="l00565"></a>00565 <span class="comment"></span>
<a name="l00566"></a>00566 <span class="comment">                        /** Destructor</span>
<a name="l00567"></a>00567 <span class="comment">                          */</span>
<a name="l00568"></a>00568                         <span class="keyword">virtual</span> ~<a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r.html" title="Implements a 2D local SLAM method based on a RBPF over an occupancy grid map.">CLSLAM_RBPF_2DLASER</a>();
<a name="l00569"></a>00569 <span class="comment"></span>
<a name="l00570"></a>00570 <span class="comment">                        /** Main entry point from HMT-SLAM: process some actions &amp; observations.</span>
<a name="l00571"></a>00571 <span class="comment">                          *  The passed action/observation will be deleted, so a copy must be made if necessary.</span>
<a name="l00572"></a>00572 <span class="comment">                          *  This method must be in charge of updating the robot pose estimates and also to update the</span>
<a name="l00573"></a>00573 <span class="comment">                          *   map when required.</span>
<a name="l00574"></a>00574 <span class="comment">                          *</span>
<a name="l00575"></a>00575 <span class="comment">                          * \param LMH   The local metric hypothesis which must be updated by this SLAM algorithm.</span>
<a name="l00576"></a>00576 <span class="comment">                          * \param act   The action to process (or NULL).</span>
<a name="l00577"></a>00577 <span class="comment">                          * \param sf    The observations to process (or NULL).</span>
<a name="l00578"></a>00578 <span class="comment">                          */</span>
<a name="l00579"></a>00579                         <span class="keywordtype">void</span> processOneLMH(
<a name="l00580"></a>00580                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>  *LMH,
<a name="l00581"></a>00581                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_action_collection_ptr.html">CActionCollectionPtr</a>      &amp;act,
<a name="l00582"></a>00582                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_sensory_frame_ptr.html">CSensoryFramePtr</a>          &amp;sf );
<a name="l00583"></a>00583 <span class="comment"></span>
<a name="l00584"></a>00584 <span class="comment">                        /** The PF algorithm implementation.  */</span>
<a name="l00585"></a>00585                         <span class="keywordtype">void</span>  prediction_and_update_pfAuxiliaryPFOptimal(
<a name="l00586"></a>00586                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>                  *LMH,
<a name="l00587"></a>00587                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_action_collection.html" title="Declares a class for storing a collection of robot actions.">mrpt::slam::CActionCollection</a>     * action,
<a name="l00588"></a>00588                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_sensory_frame.html" title="Declares a class for storing a &quot;sensory frame&quot;, a set of &quot;observations&quot; taken by the robot approximat...">mrpt::slam::CSensoryFrame</a>         * observation,
<a name="l00589"></a>00589                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html" title="The configuration of a particle filter.">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options );
<a name="l00590"></a>00590 <span class="comment"></span>
<a name="l00591"></a>00591 <span class="comment">                        /** The PF algorithm implementation.  */</span>
<a name="l00592"></a>00592                         <span class="keywordtype">void</span>  prediction_and_update_pfOptimalProposal(
<a name="l00593"></a>00593                                 <a class="code" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).">CLocalMetricHypothesis</a>                  *LMH,
<a name="l00594"></a>00594                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_action_collection.html" title="Declares a class for storing a collection of robot actions.">mrpt::slam::CActionCollection</a>     * action,
<a name="l00595"></a>00595                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_sensory_frame.html" title="Declares a class for storing a &quot;sensory frame&quot;, a set of &quot;observations&quot; taken by the robot approximat...">mrpt::slam::CSensoryFrame</a>         * observation,
<a name="l00596"></a>00596                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html" title="The configuration of a particle filter.">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options );
<a name="l00597"></a>00597 
<a name="l00598"></a>00598                 <span class="keyword">protected</span>:
<a name="l00599"></a><a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r.html#a0344ca6eae237faf3b11dfbcd0366f34">00599</a>                         <span class="keywordtype">bool</span>                                    <a class="code" href="classmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r.html#a0344ca6eae237faf3b11dfbcd0366f34" title="For use within PF callback methods.">m_insertNewRobotPose</a>; <span class="comment">//!&lt;  For use within PF callback methods</span>
<a name="l00600"></a>00600 <span class="comment"></span><span class="comment"></span>
<a name="l00601"></a>00601 <span class="comment">                        /** Auxiliary structure</span>
<a name="l00602"></a>00602 <span class="comment">                          */</span>
<a name="l00603"></a>00603                         <span class="keyword">struct </span><a class="code" href="structmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r_1_1_t_path_bin.html" title="Auxiliary structure.">TPathBin</a>
<a name="l00604"></a>00604                         {
<a name="l00605"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r_1_1_t_path_bin.html#a5d23b2e038d773add5d1ace7865cb579">00605</a>                                 <a class="code" href="structmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r_1_1_t_path_bin.html" title="Auxiliary structure.">TPathBin</a>() : x(),<a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>(),phi()
<a name="l00606"></a>00606                                 {}
<a name="l00607"></a>00607 
<a name="l00608"></a><a class="code" href="structmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r_1_1_t_path_bin.html#aea539c9e841e6f56d3d14bac3bca2ebf">00608</a>                                 <a class="code" href="classstd_1_1vector.html" title="STL class.">vector_int</a>              x,<a class="code" href="structmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r_1_1_t_path_bin.html#aea539c9e841e6f56d3d14bac3bca2ebf">y</a>,phi;
<a name="l00609"></a>00609 <span class="comment"></span>
<a name="l00610"></a>00610 <span class="comment">                                /** For debugging purposes!</span>
<a name="l00611"></a>00611 <span class="comment">                                  */</span>
<a name="l00612"></a>00612                                 <span class="keywordtype">void</span>  dumpToStdOut() <span class="keyword">const</span>;
<a name="l00613"></a>00613                         };
<a name="l00614"></a>00614 
<a name="l00615"></a>00615 <span class="comment"></span>
<a name="l00616"></a>00616 <span class="comment">                        /** Fills out a &quot;TPathBin&quot; variable, given a path hypotesis and (if not set to NULL) a new pose appended at the end, using the KLD params in &quot;options&quot;.</span>
<a name="l00617"></a>00617 <span class="comment">                                */</span>
<a name="l00618"></a>00618                         <span class="keywordtype">void</span>  loadTPathBinFromPath(
<a name="l00619"></a>00619                                 <a class="code" href="structmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r_1_1_t_path_bin.html" title="Auxiliary structure.">TPathBin</a>        &amp;outBin,
<a name="l00620"></a>00620                                 <a class="code" href="classstd_1_1map.html">std::map&lt;TPoseID,CPose3D&gt;</a>               *path = NULL,
<a name="l00621"></a>00621                                 <a class="code" href="classmrpt_1_1poses_1_1_c_pose2_d.html" title="A class used to store a 2D pose.">CPose2D</a>                                                 *newPose = NULL );
<a name="l00622"></a>00622 <span class="comment"></span>
<a name="l00623"></a>00623 <span class="comment">                        /** Checks if a given &quot;TPathBin&quot; element is already into a set of them, and return its index (first one is 0), or -1 if not found.</span>
<a name="l00624"></a>00624 <span class="comment">                                */</span>
<a name="l00625"></a>00625                         <span class="keywordtype">int</span>  findTPathBinIntoSet(
<a name="l00626"></a>00626                                 <a class="code" href="structmrpt_1_1hmtslam_1_1_c_l_s_l_a_m___r_b_p_f__2_d_l_a_s_e_r_1_1_t_path_bin.html" title="Auxiliary structure.">TPathBin</a>                                                &amp;desiredBin,
<a name="l00627"></a>00627                                 <a class="code" href="classstd_1_1deque.html" title="STL class.">std::deque&lt;TPathBin&gt;</a>                    &amp;theSet
<a name="l00628"></a>00628                                 );
<a name="l00629"></a>00629 <span class="comment"></span>
<a name="l00630"></a>00630 <span class="comment">                        /** Auxiliary function used in &quot;prediction_and_update_pfAuxiliaryPFOptimal&quot;</span>
<a name="l00631"></a>00631 <span class="comment">                                */</span>
<a name="l00632"></a>00632                         <span class="keyword">static</span> <span class="keywordtype">double</span>  particlesEvaluator_AuxPFOptimal(
<a name="l00633"></a>00633                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html" title="The configuration of a particle filter.">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options,
<a name="l00634"></a>00634                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html" title="This virtual class defines the interface that any particles based PDF class must implement in order t...">CParticleFilterCapable</a>    *obj,
<a name="l00635"></a>00635                                 <span class="keywordtype">size_t</span>                                  index,
<a name="l00636"></a>00636                                 <span class="keyword">const</span> <span class="keywordtype">void</span>                              *action,
<a name="l00637"></a>00637                                 <span class="keyword">const</span> <span class="keywordtype">void</span>                              *observation );
<a name="l00638"></a>00638 <span class="comment"></span>
<a name="l00639"></a>00639 <span class="comment">                        /** Auxiliary function that evaluates the likelihood of an observation, given a robot pose, and according to the options in &quot;CPosePDFParticles::options&quot;.</span>
<a name="l00640"></a>00640 <span class="comment">                          */</span>
<a name="l00641"></a>00641                         <span class="keyword">static</span> <span class="keywordtype">double</span>  auxiliarComputeObservationLikelihood(
<a name="l00642"></a>00642                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html" title="The configuration of a particle filter.">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options,
<a name="l00643"></a>00643                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html" title="This virtual class defines the interface that any particles based PDF class must implement in order t...">CParticleFilterCapable</a>            *obj,
<a name="l00644"></a>00644                                 <span class="keywordtype">size_t</span>                                          particleIndexForMap,
<a name="l00645"></a>00645                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_sensory_frame.html" title="Declares a class for storing a &quot;sensory frame&quot;, a set of &quot;observations&quot; taken by the robot approximat...">CSensoryFrame</a>                     *observation,
<a name="l00646"></a>00646                                 <span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_pose2_d.html" title="A class used to store a 2D pose.">CPose2D</a>                           *x );
<a name="l00647"></a>00647 
<a name="l00648"></a>00648                 }; <span class="comment">// end class CLSLAM_RBPF_2DLASER</span>
<a name="l00649"></a>00649 
<a name="l00650"></a>00650         } <span class="comment">// End of namespace</span>
<a name="l00651"></a>00651 } <span class="comment">// End of namespace</span>
<a name="l00652"></a>00652 
<a name="l00653"></a>00653 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table>  </body></html>