mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-11 20:39:52 +08:00
252 lines
30 KiB
HTML
252 lines
30 KiB
HTML
<!-- HTML header for doxygen 1.9.8-->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>RTAB-Map: corelib/include/rtabmap/core/ImuMotionPredictor.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
|
<link href="custom.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript">window.RTABMAP_DOC_ROOT="";</script>
|
|
<script type="text/javascript" src="../versions.js"></script>
|
|
<script type="text/javascript" src="version-switcher.js"></script>
|
|
<script type="text/javascript" src="doxygen-awesome-darkmode-toggle.js"></script>
|
|
<script type="text/javascript">DoxygenAwesomeDarkModeToggle.init();</script>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">RTAB-Map<span id="projectnumber"> 0.24.1</span>
|
|
</div>
|
|
<div id="projectbrief">Real-Time Appearance-Based Mapping</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.8 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function() { init_codefold(0); });
|
|
/* @license-end */
|
|
</script>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function(){initNavTree('ImuMotionPredictor_8h_source.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle"><div class="title">ImuMotionPredictor.h</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*</span></div>
|
|
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">Copyright (c) 2010-2026, Mathieu Labbe - IntRoLab - Universite de Sherbrooke</span></div>
|
|
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">All rights reserved.</span></div>
|
|
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"></span> </div>
|
|
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">Redistribution and use in source and binary forms, with or without</span></div>
|
|
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">modification, are permitted provided that the following conditions are met:</span></div>
|
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> * Redistributions of source code must retain the above copyright</span></div>
|
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> notice, this list of conditions and the following disclaimer.</span></div>
|
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> * Redistributions in binary form must reproduce the above copyright</span></div>
|
|
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> notice, this list of conditions and the following disclaimer in the</span></div>
|
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> documentation and/or other materials provided with the distribution.</span></div>
|
|
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> * Neither the name of the Universite de Sherbrooke nor the</span></div>
|
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> names of its contributors may be used to endorse or promote products</span></div>
|
|
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> derived from this software without specific prior written permission.</span></div>
|
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"></span> </div>
|
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND</span></div>
|
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div>
|
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div>
|
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY</span></div>
|
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div>
|
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div>
|
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span></div>
|
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
|
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div>
|
|
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
|
|
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">*/</span></div>
|
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#ifndef RTABMAP_CORE_IMUMOTIONPREDICTOR_H_</span></div>
|
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#define RTABMAP_CORE_IMUMOTIONPREDICTOR_H_</span></div>
|
|
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include <rtabmap/core/rtabmap_core_export.h></span></div>
|
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include <rtabmap/core/Transform.h></span></div>
|
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include <rtabmap/core/IMU.h></span></div>
|
|
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
|
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include <Eigen/Geometry></span></div>
|
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
|
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#include <map></span></div>
|
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
|
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacertabmap.html">rtabmap</a> {</div>
|
|
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
|
<div class="foldopen" id="foldopen00065" data-start="{" data-end="};">
|
|
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html"> 65</a></span><span class="keyword">class </span>RTABMAP_CORE_EXPORT <a class="code hl_class" href="classrtabmap_1_1ImuMotionPredictor.html">ImuMotionPredictor</a></div>
|
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span>{</div>
|
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="keyword">public</span>:</div>
|
|
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html#a765b9d6ae74d6fdcfbcc55e9d28b3feb"> 89</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classrtabmap_1_1ImuMotionPredictor.html#a765b9d6ae74d6fdcfbcc55e9d28b3feb">ImuMotionPredictor</a>(</div>
|
|
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">double</span> maxPoseInterval = 1.0,</div>
|
|
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">double</span> velocityWindow = 0.5,</div>
|
|
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">double</span> gravity = 9.80665);</div>
|
|
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
|
|
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordtype">double</span> maxPoseInterval()<span class="keyword"> const </span>{<span class="keywordflow">return</span> maxPoseInterval_;}</div>
|
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">double</span> velocityWindow()<span class="keyword"> const </span>{<span class="keywordflow">return</span> velocityWindow_;}</div>
|
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordtype">double</span> gravity()<span class="keyword"> const </span>{<span class="keywordflow">return</span> gravity_;}</div>
|
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
|
|
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html#a3359e2caff4d42fbcd4137b39aa2ae04"> 108</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classrtabmap_1_1ImuMotionPredictor.html#a3359e2caff4d42fbcd4137b39aa2ae04">addImu</a>(<span class="keywordtype">double</span> stamp, <span class="keyword">const</span> <a class="code hl_class" href="classrtabmap_1_1IMU.html">IMU</a> & imu);</div>
|
|
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
|
|
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html#abb4349e5902040e5440f425e0bc39c47"> 116</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classrtabmap_1_1ImuMotionPredictor.html#abb4349e5902040e5440f425e0bc39c47">addPose</a>(<span class="keywordtype">double</span> stamp, <span class="keyword">const</span> <a class="code hl_class" href="classrtabmap_1_1Transform.html">rtabmap::Transform</a> & pose);</div>
|
|
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
|
|
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html#a2b8b4cd814ae31ef46899f41992bb1a4"> 119</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classrtabmap_1_1ImuMotionPredictor.html#a2b8b4cd814ae31ef46899f41992bb1a4">reset</a>();</div>
|
|
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
|
|
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html#ac9bd37d201be18aaecfbfdbdbaec6ff0"> 129</a></span> <a class="code hl_class" href="classrtabmap_1_1Transform.html">rtabmap::Transform</a> <a class="code hl_function" href="classrtabmap_1_1ImuMotionPredictor.html#ac9bd37d201be18aaecfbfdbdbaec6ff0">predict</a>(<span class="keywordtype">double</span> stamp) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
|
|
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html#a2c30a766cc8f251b78ed490cb2a275eb"> 132</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classrtabmap_1_1ImuMotionPredictor.html#a2c30a766cc8f251b78ed490cb2a275eb">hasPose</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html#a4ddd3b124501b8446869a38b1ab1ff95"> 134</a></span> <span class="keywordtype">double</span> <a class="code hl_function" href="classrtabmap_1_1ImuMotionPredictor.html#a4ddd3b124501b8446869a38b1ab1ff95">lastPoseStamp</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html#a18e326faaa67a3602eaf3b4df7a906ff"> 136</a></span> Eigen::Vector3d <a class="code hl_function" href="classrtabmap_1_1ImuMotionPredictor.html#a18e326faaa67a3602eaf3b4df7a906ff">velocity</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="classrtabmap_1_1ImuMotionPredictor.html#a39dc460db30550b24646b312b3329245"> 138</a></span> <span class="keywordtype">size_t</span> <a class="code hl_function" href="classrtabmap_1_1ImuMotionPredictor.html#a39dc460db30550b24646b312b3329245">samples</a>() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
|
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="comment">// orientation: of the base frame in the IMU's world frame; acceleration: of the base in</span></div>
|
|
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="comment">// that frame, gravity removed</span></div>
|
|
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordtype">void</span> addSample(<span class="keywordtype">double</span> stamp, <span class="keyword">const</span> Eigen::Quaterniond & orientation, <span class="keyword">const</span> Eigen::Vector3d & acceleration);</div>
|
|
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> </div>
|
|
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keyword">struct </span>Sample</div>
|
|
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> {</div>
|
|
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> Eigen::Quaterniond orientation;</div>
|
|
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> Eigen::Vector3d acceleration;</div>
|
|
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> };</div>
|
|
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> Eigen::Quaterniond orientationAt(<span class="keywordtype">double</span> stamp) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> Eigen::Vector3d accelerationAt(<span class="keywordtype">double</span> stamp) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordtype">void</span> integrate(<span class="keywordtype">double</span> from, <span class="keywordtype">double</span> to, <span class="keyword">const</span> Eigen::Quaterniond & rotation,</div>
|
|
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> Eigen::Vector3d & velocity, Eigen::Vector3d & position) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordtype">void</span> updateIntegration() <span class="keyword">const</span>;</div>
|
|
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
|
|
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="comment">// The acceleration integrated from the last pose up to a sample's stamp, in the</span></div>
|
|
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="comment">// odometry frame: predicting a stamp then only integrates from the sample before it.</span></div>
|
|
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keyword">struct </span>Integrated</div>
|
|
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> {</div>
|
|
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> Eigen::Vector3d acceleration; <span class="comment">// at that stamp</span></div>
|
|
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> Eigen::Vector3d velocity; <span class="comment">// change since the last pose</span></div>
|
|
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> Eigen::Vector3d position; <span class="comment">// change since the last pose (without its velocity)</span></div>
|
|
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> };</div>
|
|
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
|
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordtype">double</span> maxPoseInterval_;</div>
|
|
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordtype">double</span> velocityWindow_;</div>
|
|
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <span class="keywordtype">double</span> gravity_;</div>
|
|
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> std::map<double, Sample> samples_;</div>
|
|
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="comment">// Recent odometry poses, to estimate the velocity from (see velocityWindow)</span></div>
|
|
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> std::map<double, rtabmap::Transform> poses_;</div>
|
|
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> </div>
|
|
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="comment">// The last odometry pose and the state predictions start from.</span></div>
|
|
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordtype">double</span> poseStamp_;</div>
|
|
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <a class="code hl_class" href="classrtabmap_1_1Transform.html">rtabmap::Transform</a> pose_;</div>
|
|
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> Eigen::Vector3d velocity_;</div>
|
|
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="comment">// Rotation from the IMU's world frame to the odometry frame, at the last pose: the two</span></div>
|
|
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="comment">// are both gravity aligned, but their yaw differ.</span></div>
|
|
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> Eigen::Quaterniond worldToOdom_;</div>
|
|
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> </div>
|
|
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <span class="comment">// Built lazily by predict(), from the last pose to the newest sample; cleared when the</span></div>
|
|
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="comment">// pose or the samples it was built from change.</span></div>
|
|
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <span class="keyword">mutable</span> std::map<double, Integrated> integrated_;</div>
|
|
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="comment">// Whether the acceleration at the last pose's stamp (the first entry) is final: it is</span></div>
|
|
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="comment">// held constant from the newest sample until a sample after that stamp is received.</span></div>
|
|
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keyword">mutable</span> <span class="keywordtype">bool</span> integratedStartIsFinal_;</div>
|
|
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span>};</div>
|
|
</div>
|
|
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> </div>
|
|
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span>}</div>
|
|
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> </div>
|
|
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span><span class="preprocessor">#endif </span><span class="comment">/* RTABMAP_CORE_IMUMOTIONPREDICTOR_H_ */</span><span class="preprocessor"></span></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1IMU_html"><div class="ttname"><a href="classrtabmap_1_1IMU.html">rtabmap::IMU</a></div><div class="ttdoc">Inertial measurement sample (ROS sensor_msgs/Imu-like fields).</div><div class="ttdef"><b>Definition</b> <a href="IMU_8h_source.html#l00056">IMU.h:57</a></div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html">rtabmap::ImuMotionPredictor</a></div><div class="ttdoc">Predicts the pose of the base frame from the last odometry pose and the IMU.</div><div class="ttdef"><b>Definition</b> <a href="ImuMotionPredictor_8h_source.html#l00065">ImuMotionPredictor.h:66</a></div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html_a18e326faaa67a3602eaf3b4df7a906ff"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html#a18e326faaa67a3602eaf3b4df7a906ff">rtabmap::ImuMotionPredictor::velocity</a></div><div class="ttdeci">Eigen::Vector3d velocity() const</div><div class="ttdoc">Velocity (m/s) of the base in the odometry frame at the last pose.</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html_a2b8b4cd814ae31ef46899f41992bb1a4"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html#a2b8b4cd814ae31ef46899f41992bb1a4">rtabmap::ImuMotionPredictor::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">Forgets the poses and the IMU samples.</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html_a2c30a766cc8f251b78ed490cb2a275eb"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html#a2c30a766cc8f251b78ed490cb2a275eb">rtabmap::ImuMotionPredictor::hasPose</a></div><div class="ttdeci">bool hasPose() const</div><div class="ttdoc">Whether there is a pose to predict from (none yet, or the last one was null).</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html_a3359e2caff4d42fbcd4137b39aa2ae04"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html#a3359e2caff4d42fbcd4137b39aa2ae04">rtabmap::ImuMotionPredictor::addImu</a></div><div class="ttdeci">void addImu(double stamp, const IMU &imu)</div><div class="ttdoc">Adds an IMU measurement.</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html_a39dc460db30550b24646b312b3329245"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html#a39dc460db30550b24646b312b3329245">rtabmap::ImuMotionPredictor::samples</a></div><div class="ttdeci">size_t samples() const</div><div class="ttdoc">Number of IMU samples kept.</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html_a4ddd3b124501b8446869a38b1ab1ff95"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html#a4ddd3b124501b8446869a38b1ab1ff95">rtabmap::ImuMotionPredictor::lastPoseStamp</a></div><div class="ttdeci">double lastPoseStamp() const</div><div class="ttdoc">Stamp of the last pose added, 0 if there is none.</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html_a765b9d6ae74d6fdcfbcc55e9d28b3feb"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html#a765b9d6ae74d6fdcfbcc55e9d28b3feb">rtabmap::ImuMotionPredictor::ImuMotionPredictor</a></div><div class="ttdeci">ImuMotionPredictor(double maxPoseInterval=1.0, double velocityWindow=0.5, double gravity=9.80665)</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html_abb4349e5902040e5440f425e0bc39c47"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html#abb4349e5902040e5440f425e0bc39c47">rtabmap::ImuMotionPredictor::addPose</a></div><div class="ttdeci">void addPose(double stamp, const rtabmap::Transform &pose)</div><div class="ttdoc">Adds an odometry pose, from which the next poses are predicted.</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1ImuMotionPredictor_html_ac9bd37d201be18aaecfbfdbdbaec6ff0"><div class="ttname"><a href="classrtabmap_1_1ImuMotionPredictor.html#ac9bd37d201be18aaecfbfdbdbaec6ff0">rtabmap::ImuMotionPredictor::predict</a></div><div class="ttdeci">rtabmap::Transform predict(double stamp) const</div><div class="ttdoc">Predicts the pose of the base frame in the odometry frame.</div></div>
|
|
<div class="ttc" id="aclassrtabmap_1_1Transform_html"><div class="ttname"><a href="classrtabmap_1_1Transform.html">rtabmap::Transform</a></div><div class="ttdoc">Represents a 3D rigid body transformation (rotation + translation).</div><div class="ttdef"><b>Definition</b> <a href="Transform_8h_source.html#l00052">Transform.h:53</a></div></div>
|
|
<div class="ttc" id="anamespacertabmap_html"><div class="ttname"><a href="namespacertabmap.html">rtabmap</a></div><div class="ttdef"><b>Definition</b> <a href="BayesFilter_8h_source.html#l00042">BayesFilter.h:42</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_04d49acea3c42cab2afcd35cb2f2a48f.html">corelib</a></li><li class="navelem"><a class="el" href="dir_e996b11fd4b3a747423759b16a8ba4a6.html">include</a></li><li class="navelem"><a class="el" href="dir_ff01f7bc5399ccf9ff1cc91d1f45726a.html">rtabmap</a></li><li class="navelem"><a class="el" href="dir_884419f21456e80aa47bc1d0c2ab0140.html">core</a></li><li class="navelem"><b>ImuMotionPredictor.h</b></li>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|