mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-12 21:09:50 +08:00
Preview for PR #1791 b8b218f764
This commit is contained in:
@@ -113,23 +113,28 @@ $(document).ready(function(){initNavTree('classrtabmap_1_1ImuMotionPredictor.htm
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a765b9d6ae74d6fdcfbcc55e9d28b3feb" id="r_a765b9d6ae74d6fdcfbcc55e9d28b3feb"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a765b9d6ae74d6fdcfbcc55e9d28b3feb">ImuMotionPredictor</a> (double maxPoseInterval=1.0, double velocityWindow=0.5, double gravity=9.80665)</td></tr>
|
||||
<tr class="memitem:a765b9d6ae74d6fdcfbcc55e9d28b3feb" id="r_a765b9d6ae74d6fdcfbcc55e9d28b3feb"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a765b9d6ae74d6fdcfbcc55e9d28b3feb">ImuMotionPredictor</a> (double maxPoseInterval=1.0, double velocityWindow=0.5, double <a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a53a73e2ebf60ff671828732594adc7c4">gravity</a>=9.80665)</td></tr>
|
||||
<tr class="separator:a765b9d6ae74d6fdcfbcc55e9d28b3feb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7fd44e11cecf9e3b4fb16dff1bca0166" id="r_a7fd44e11cecf9e3b4fb16dff1bca0166"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a7fd44e11cecf9e3b4fb16dff1bca0166">maxPoseInterval</a> () const</td></tr>
|
||||
<tr class="separator:a7fd44e11cecf9e3b4fb16dff1bca0166"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a49a29f75350d008a54668837561a98bf" id="r_a49a29f75350d008a54668837561a98bf"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a49a29f75350d008a54668837561a98bf">velocityWindow</a> () const</td></tr>
|
||||
<tr class="separator:a49a29f75350d008a54668837561a98bf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a53a73e2ebf60ff671828732594adc7c4" id="r_a53a73e2ebf60ff671828732594adc7c4"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a53a73e2ebf60ff671828732594adc7c4">gravity</a> () const</td></tr>
|
||||
<tr class="memdesc:a53a73e2ebf60ff671828732594adc7c4"><td class="mdescLeft"> </td><td class="mdescRight">Gravity (m/s^2) removed from the specific force: the one given, or the estimate. <br /></td></tr>
|
||||
<tr class="separator:a53a73e2ebf60ff671828732594adc7c4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa84008cbd4087273e8db74d91d89ec10" id="r_aa84008cbd4087273e8db74d91d89ec10"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#aa84008cbd4087273e8db74d91d89ec10">isGravityEstimated</a> () const</td></tr>
|
||||
<tr class="memdesc:aa84008cbd4087273e8db74d91d89ec10"><td class="mdescLeft"> </td><td class="mdescRight">Whether the gravity is estimated from the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> (see the constructor) <br /></td></tr>
|
||||
<tr class="separator:aa84008cbd4087273e8db74d91d89ec10"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a91c329f153da4c479509e406f6eb5112" id="r_a91c329f153da4c479509e406f6eb5112"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a91c329f153da4c479509e406f6eb5112">gravityWindows</a> () const</td></tr>
|
||||
<tr class="memdesc:a91c329f153da4c479509e406f6eb5112"><td class="mdescLeft"> </td><td class="mdescRight">Number of quiet <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> windows the gravity estimate is from (0: not estimated yet) <br /></td></tr>
|
||||
<tr class="separator:a91c329f153da4c479509e406f6eb5112"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3359e2caff4d42fbcd4137b39aa2ae04" id="r_a3359e2caff4d42fbcd4137b39aa2ae04"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a3359e2caff4d42fbcd4137b39aa2ae04">addImu</a> (double stamp, const <a class="el" href="classrtabmap_1_1IMU.html">IMU</a> &imu)</td></tr>
|
||||
<tr class="memdesc:a3359e2caff4d42fbcd4137b39aa2ae04"><td class="mdescLeft"> </td><td class="mdescRight">Adds an <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> measurement. <br /></td></tr>
|
||||
<tr class="separator:a3359e2caff4d42fbcd4137b39aa2ae04"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:abb4349e5902040e5440f425e0bc39c47" id="r_abb4349e5902040e5440f425e0bc39c47"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#abb4349e5902040e5440f425e0bc39c47">addPose</a> (double stamp, const <a class="el" href="classrtabmap_1_1Transform.html">rtabmap::Transform</a> &pose)</td></tr>
|
||||
<tr class="memdesc:abb4349e5902040e5440f425e0bc39c47"><td class="mdescLeft"> </td><td class="mdescRight">Adds an odometry pose, from which the next poses are predicted. <br /></td></tr>
|
||||
<tr class="separator:abb4349e5902040e5440f425e0bc39c47"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2b8b4cd814ae31ef46899f41992bb1a4" id="r_a2b8b4cd814ae31ef46899f41992bb1a4"><td class="memItemLeft" align="right" valign="top"><a id="a2b8b4cd814ae31ef46899f41992bb1a4" name="a2b8b4cd814ae31ef46899f41992bb1a4"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>reset</b> ()</td></tr>
|
||||
<tr class="memdesc:a2b8b4cd814ae31ef46899f41992bb1a4"><td class="mdescLeft"> </td><td class="mdescRight">Forgets the poses and the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> samples. <br /></td></tr>
|
||||
<tr class="memitem:a2b8b4cd814ae31ef46899f41992bb1a4" id="r_a2b8b4cd814ae31ef46899f41992bb1a4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a2b8b4cd814ae31ef46899f41992bb1a4">reset</a> ()</td></tr>
|
||||
<tr class="separator:a2b8b4cd814ae31ef46899f41992bb1a4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac9bd37d201be18aaecfbfdbdbaec6ff0" id="r_ac9bd37d201be18aaecfbfdbdbaec6ff0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classrtabmap_1_1Transform.html">rtabmap::Transform</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#ac9bd37d201be18aaecfbfdbdbaec6ff0">predict</a> (double stamp) const</td></tr>
|
||||
<tr class="memdesc:ac9bd37d201be18aaecfbfdbdbaec6ff0"><td class="mdescLeft"> </td><td class="mdescRight">Predicts the pose of the base frame in the odometry frame. <br /></td></tr>
|
||||
@@ -156,9 +161,10 @@ size_t </td><td class="memItemRight" valign="bottom"><b>samples</b> () cons
|
||||
<p>Between two odometry updates, the pose is propagated with the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a>: the orientation is the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a>'s own, re-expressed in the odometry frame, and the position is integrated from the velocity at the last odometry update and the gravity-compensated acceleration. That velocity is re-estimated at every odometry update, from the displacement since an odometry pose a short window back (see velocityWindow) corrected by the acceleration measured in between, so the position never drifts for long: only the motion since the last update is predicted.</p>
|
||||
<p>This is what lidar deskewing needs: the pose at every point's time, during a sweep that started after the last pose odometry estimated.</p>
|
||||
<p>The <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> samples are given as they are measured (see <a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a3359e2caff4d42fbcd4137b39aa2ae04" title="Adds an IMU measurement.">addImu()</a>): the orientation of the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> in its world frame and its specific force, from which gravity is removed here. That world frame must be gravity aligned with +z up, as in ROS (REP-103, e.g. ENU); its yaw doesn't matter. An orientation given in a frame with z down (NED) must be converted first, otherwise gravity is added instead of removed. The lever arm between the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> and the base origin is ignored: its centripetal and tangential accelerations are small over the fraction of a second this predicts.</p>
|
||||
<p>The gravity removed can be estimated from the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> itself (see the constructor): an accelerometer can read a few percent off at rest (scale or bias), and that error, integrated as an acceleration, would bias the predicted velocity along gravity. The accelerometer is averaged over the windows where it is quiet: with a gyro and an accelerometer that barely change, the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> is not accelerating (at rest or at constant velocity), so it only measures gravity. The <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> must then be held still (or at constant velocity) for a moment, e.g., before moving: until then, standard gravity is used, and a steady acceleration without rotation would be taken for gravity. Only the error along gravity is corrected, which is all of it for an <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> that stays about level; one changing attitude would need its axes calibrated.</p>
|
||||
<p>Not thread-safe: a caller sharing it between threads must lock around every call. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00065">65</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00077">77</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a765b9d6ae74d6fdcfbcc55e9d28b3feb" name="a765b9d6ae74d6fdcfbcc55e9d28b3feb"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a765b9d6ae74d6fdcfbcc55e9d28b3feb">◆ </a></span>ImuMotionPredictor()</h2>
|
||||
@@ -204,7 +210,7 @@ size_t </td><td class="memItemRight" valign="bottom"><b>samples</b> () cons
|
||||
<table class="params">
|
||||
<tr><td class="paramname">maxPoseInterval</td><td>odometry poses older (s) than this are not used to estimate the velocity, which is null without one </td></tr>
|
||||
<tr><td class="paramname">velocityWindow</td><td>the velocity is estimated from the displacement since the newest pose at least this old (s), corrected by the acceleration measured since, so that it is the velocity at the last pose, not an average. Over a single frame interval, the noise of the odometry poses would be of the order of the velocity itself. 0: the displacement since the previous pose, without acceleration. </td></tr>
|
||||
<tr><td class="paramname">gravity</td><td>magnitude (m/s^2) of the gravity removed from the specific force given to <a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a3359e2caff4d42fbcd4137b39aa2ae04" title="Adds an IMU measurement.">addImu()</a>, standard gravity by default</td></tr>
|
||||
<tr><td class="paramname">gravity</td><td>magnitude (m/s^2) of the gravity removed from the specific force given to <a class="el" href="classrtabmap_1_1ImuMotionPredictor.html#a3359e2caff4d42fbcd4137b39aa2ae04" title="Adds an IMU measurement.">addImu()</a>, standard gravity by default. <= 0: estimated from the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> when it is still (see the class description), with standard gravity until then.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -236,7 +242,7 @@ size_t </td><td class="memItemRight" valign="bottom"><b>samples</b> () cons
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00094">94</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00108">108</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -263,7 +269,7 @@ size_t </td><td class="memItemRight" valign="bottom"><b>samples</b> () cons
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00095">95</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00109">109</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -290,7 +296,67 @@ size_t </td><td class="memItemRight" valign="bottom"><b>samples</b> () cons
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00096">96</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
<p>Gravity (m/s^2) removed from the specific force: the one given, or the estimate. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00111">111</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa84008cbd4087273e8db74d91d89ec10" name="aa84008cbd4087273e8db74d91d89ec10"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa84008cbd4087273e8db74d91d89ec10">◆ </a></span>isGravityEstimated()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool rtabmap::ImuMotionPredictor::isGravityEstimated </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Whether the gravity is estimated from the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> (see the constructor) </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00113">113</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a91c329f153da4c479509e406f6eb5112" name="a91c329f153da4c479509e406f6eb5112"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a91c329f153da4c479509e406f6eb5112">◆ </a></span>gravityWindows()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">size_t rtabmap::ImuMotionPredictor::gravityWindows </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Number of quiet <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> windows the gravity estimate is from (0: not estimated yet) </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="ImuMotionPredictor_8h_source.html#l00115">115</a> of file <a class="el" href="ImuMotionPredictor_8h_source.html">ImuMotionPredictor.h</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -366,6 +432,24 @@ size_t </td><td class="memItemRight" valign="bottom"><b>samples</b> () cons
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a2b8b4cd814ae31ef46899f41992bb1a4" name="a2b8b4cd814ae31ef46899f41992bb1a4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a2b8b4cd814ae31ef46899f41992bb1a4">◆ </a></span>reset()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void rtabmap::ImuMotionPredictor::reset </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Forgets the poses and the <a class="el" href="classrtabmap_1_1IMU.html" title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> samples. The gravity estimate is kept: it is the sensor's. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac9bd37d201be18aaecfbfdbdbaec6ff0" name="ac9bd37d201be18aaecfbfdbdbaec6ff0"></a>
|
||||
|
||||
Reference in New Issue
Block a user