<trclass="memdesc:a24d451cdf46a9cc04cce995142a101d4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Constructs a <aclass="el"href="classrtabmap_1_1Memory.html"title="Three-tiered memory management (STM, WM, LTM) for RTAB-Map.">Memory</a> instance with the given parameters. <br/></td></tr>
<trclass="memdesc:abbf54d2a34838cc13ce98d41a9991918"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Re-parses parameters and propagates them to owned sub-objects. <br/></td></tr>
<trclass="memdesc:a3c029b2788f3b599480d5150120a6bee"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Adds a sensor observation to the map (overload without odometry pose). <br/></td></tr>
<trclass="memdesc:aae43fd080c6bc9773fa58f1c36e6684f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Adds a sensor observation with odometry pose and velocity to the map. <br/></td></tr>
<trclass="memdesc:aeeabc78648bf7dc14ea1356828cdeddd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Opens or creates a database and loads existing state into WM. <br/></td></tr>
<trclass="memdesc:a44023158524dee3471a8dff43ea132db"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Flushes pending data and closes the database connection. <br/></td></tr>
<trclass="memdesc:a984ca01a87434b11a66dc1d96e2fff17"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes loop-closure likelihood of <code>signature</code> against a set of WM ids. <br/></td></tr>
<trclass="memitem:afce9dbf3e5657d65540e33c59e992d83"id="r_afce9dbf3e5657d65540e33c59e992d83"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classrtabmap_1_1Memory.html#afce9dbf3e5657d65540e33c59e992d83">incrementMapId</a> (std::map< int, int > *reducedIds=0)</td></tr>
<trclass="memdesc:afce9dbf3e5657d65540e33c59e992d83"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Starts a new map id, breaking session continuity (e.g. after localization loss). <br/></td></tr>
<trclass="memdesc:a76fd8c93220c16fac5843ccc2c0bec3c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Refreshes the age of <code>signatureId</code> in working memory, marking it as recent. <br/></td></tr>
<trclass="memitem:a51e89ccab2261912b09a5b7178fdd46c"id="r_a51e89ccab2261912b09a5b7178fdd46c"><tdclass="memItemLeft"align="right"valign="top">std::list< int > </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classrtabmap_1_1Memory.html#a51e89ccab2261912b09a5b7178fdd46c">forget</a> (const std::set< int >&ignoredIds=std::set< int >())</td></tr>
<trclass="memdesc:a51e89ccab2261912b09a5b7178fdd46c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Transfers oldest signatures from WM to LTM to respect memory and/or time limits. <br/></td></tr>
<trclass="memitem:aa244b8581684b85e35d2056cf972e377"id="r_aa244b8581684b85e35d2056cf972e377"><tdclass="memItemLeft"align="right"valign="top">std::set< int > </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classrtabmap_1_1Memory.html#aa244b8581684b85e35d2056cf972e377">reactivateSignatures</a> (const std::list< int >&ids, unsigned int maxLoaded, double &timeDbAccess)</td></tr>
<trclass="memdesc:aa244b8581684b85e35d2056cf972e377"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reloads signatures from LTM into WM. <br/></td></tr>
<trclass="memdesc:af87e4718dd842c59fd8459430c40d78f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Drops the last signature if flagged as bad, or any signature in localization mode. <br/></td></tr>
<trclass="memdesc:afbcfc92dc9bbc344ab106d2f21d93aaf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Persists <code>statistics</code> to the database; <code>saveWMState</code> records the WM id list. <br/></td></tr>
<trclass="memdesc:affdd654e385b61306a2ac2ea91d13b85"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Stores a preview image (typically a thumbnail of the last frame) in the database. <br/></td></tr>
<trclass="memdesc:abd0d7277526f06861df17e03fa13e817"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Loads the preview image previously written by <aclass="el"href="classrtabmap_1_1Memory.html#affdd654e385b61306a2ac2ea91d13b85">savePreviewImage()</a>. <br/></td></tr>
<trclass="memdesc:ab7a2da56bb12845f0370a20a9497dfe0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Persists an optimized pose graph and the last localization pose for next session. <br/></td></tr>
<trclass="memdesc:a9e2972a53619456d75ad923fb5e9bc7e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Loads optimized poses previously written by <aclass="el"href="classrtabmap_1_1Memory.html#ab7a2da56bb12845f0370a20a9497dfe0">saveOptimizedPoses()</a>. <br/></td></tr>
<trclass="memdesc:a9a71f27d0de4f7e6400ca470a82be19d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Loads the 2D occupancy grid previously written by <aclass="el"href="classrtabmap_1_1Memory.html#ac96fffe9fde99f7c74a06bbc5727be6b">save2DMap()</a>. <br/></td></tr>
<trclass="memdesc:a7e16d27512d0daf17b9dbb17aab3b201"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Persists an optimized textured/colored mesh to the database. <br/></td></tr>
<trclass="memdesc:a0827d1d23744b3693f00e518e1b0fda8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Loads the optimized mesh previously written by <aclass="el"href="classrtabmap_1_1Memory.html#a7e16d27512d0daf17b9dbb17aab3b201">saveOptimizedMesh()</a>. <br/></td></tr>
<trclass="memdesc:a072ec41027a03072f1a945540b43a1b8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Forces the database driver to flush any queued signature/word saves. <br/></td></tr>
<trclass="memdesc:a2bba8c0aa57778bb441a97728d45a58e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Blocks until the asynchronous database write thread has finished pending work. <br/></td></tr>
<trclass="memdesc:a4140effa4830fbe679a51e975f0021a1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Adds a graph link between two signatures. <br/></td></tr>
<trclass="memdesc:a7c7f80937a35204cb5b44faec8e99736"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Replaces an existing link with <code>link</code> (same endpoints and type). <br/></td></tr>
<trclass="memdesc:a838b48bb9c2e6ccfe4f916ea2b2d00fd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Removes every virtual link in WM. <br/></td></tr>
<trclass="memitem:a521305f39adcdfbedebbe5bdae9efbc6"id="r_a521305f39adcdfbedebbe5bdae9efbc6"><tdclass="memItemLeft"align="right"valign="top">std::map< int, int > </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classrtabmap_1_1Memory.html#a521305f39adcdfbedebbe5bdae9efbc6">getNeighborsId</a> (int signatureId, int maxGraphDepth, int maxCheckedInDatabase=-1, bool incrementMarginOnLoop=false, bool ignoreLoopIds=false, bool ignoreIntermediateNodes=false, bool ignoreLocalSpaceLoopIds=false, const std::set< int >&nodesSet=std::set< int >(), double *dbAccessTime=0) const</td></tr>
<trclass="memdesc:a521305f39adcdfbedebbe5bdae9efbc6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Breadth-first walk of the pose graph from <code>signatureId</code>. <br/></td></tr>
<trclass="memdesc:a10c44ee8a5d84480b41aa4980665d894"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns neighbor ids within a Euclidean radius using optimized poses. <br/></td></tr>
<trclass="memdesc:ae66a7837edc6e844ee9186e61d139300"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Marks <code>locationId</code> as intermediate (weight = -1); excludes it from loop closure. <br/></td></tr>
<trclass="memitem:a2b91d8b5d651fbaa12a31e364c793a21"id="r_a2b91d8b5d651fbaa12a31e364c793a21"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classrtabmap_1_1Memory.html#a2b91d8b5d651fbaa12a31e364c793a21">deleteLocation</a> (int locationId, std::list< int > *deletedWords=0, bool keepLinkedInDb=false)</td></tr>
<trclass="memdesc:a2b91d8b5d651fbaa12a31e364c793a21"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Removes <code>locationId</code> from WM/STM and the database. <br/></td></tr>
<trclass="memdesc:a93119d10342db4a55c77b180cb249453"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Forces <code>locationId</code> to be flushed to the database. <br/></td></tr>
void </td><tdclass="memItemRight"valign="bottom"><b>removeLink</b> (int idA, int idB)</td></tr>
<trclass="memdesc:a3fcaa79a33d63f7e383d05868b1316e3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Removes any link between <code>idA</code> and <code>idB</code> (both directions). <br/></td></tr>
<trclass="memdesc:acab72b1076370287ac28a1d464d480f0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Strips raw images, scan, user data and/or occupancy grid from <code>id</code> to save memory (RAM). This doesn't clear any compressed data. <br/></td></tr>
<trclass="memitem:ac9e6bfaf161d4bd1a9f99d2352492a1d"id="r_ac9e6bfaf161d4bd1a9f99d2352492a1d"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classrtabmap_1_1Memory.html#ac9e6bfaf161d4bd1a9f99d2352492a1d">reduceNode</a> (int id, float maxDistance=0.0f, bool keepLinkedInDb=false, int direction=0)</td></tr>
<trclass="memdesc:ac9e6bfaf161d4bd1a9f99d2352492a1d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Merges <code>id</code> with a close neighbor (graph reduction). <br/></td></tr>
<trclass="memdesc:a655f123daec9e4e50e322db9f3bbd6db"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Enables a dummy visual word dictionary (no descriptors kept, word ids only). <br/></td></tr>
<trclass="memdesc:a5ca9260a2a63fae6f3d16e1db9cbce53"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the number of signatures in working memory, excluding the virtual place. <br/></td></tr>
<trclass="memdesc:a88fecb24bd16886d6086937277df5f20"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns loop-closure links of <code>signatureId</code>; <code>lookInDatabase</code> also checks LTM. <br/></td></tr>
<trclass="memdesc:acde7a0f34f8896c3c9f002c6cbcc614e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns links of every signature; <code>ignoreNullLinks</code> drops empty placeholders. <br/></td></tr>
<trclass="memdesc:ad14c4346a42a621b7834c60de6bc2e63"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the most recent WM signature. <br/></td></tr>
<trclass="memdesc:afe7a1c036129e7ec94905c3650e91cc8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns all nodes observing landmark <code>landmarkId</code>, mapped to the observation link. <br/></td></tr>
<trclass="memdesc:abba1fbec2be0cfced6e14d723fc45794"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Assigns or removes a label on <code>id</code>. <br/></td></tr>
<trclass="memdesc:aff18f08be0a7951f508276e341759f5c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Attaches user data to signature <code>id</code>, compressing it on the fly if needed. <br/></td></tr>
<trclass="memitem:aca3bdb688c64dd62672f2385ce6de594"id="r_aca3bdb688c64dd62672f2385ce6de594"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classrtabmap_1_1Memory.html#aca3bdb688c64dd62672f2385ce6de594">getGPS</a> (int id, <aclass="el"href="classrtabmap_1_1GPS.html">GPS</a>&gps, <aclass="el"href="classrtabmap_1_1Transform.html">Transform</a>&offsetENU, bool lookInDatabase, int maxGraphDepth=0) const</td></tr>
<trclass="memdesc:aca3bdb688c64dd62672f2385ce6de594"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a <aclass="el"href="classrtabmap_1_1GPS.html"title="WGS84 GPS fix attached to a sensor sample or graph node.">GPS</a> fix for <code>id</code>, falling back to the nearest GPS-tagged neighbor. <br/></td></tr>
<trclass="memdesc:ae6184a6979703045f34d3e2a155eb9f3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reads metadata of <code>signatureId</code> (no images/scan/words). <br/></td></tr>
<trclass="memdesc:a22d6c0b38d8699cdbba73b6bcdb38dd6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Loads sensor data of <code>locationId</code> from WM or LTM. <br/></td></tr>
<trclass="memdesc:a4c555fac41be4b4d44c551c010971dc3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Loads the visual words, 3D points and global descriptors stored with <code>nodeId</code>. <br/></td></tr>
<trclass="memdesc:af48dbd905dda453b6b2c2246a90d0e04"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Loads mono and/or stereo camera calibration stored with <code>nodeId</code>. <br/></td></tr>
<trclass="memitem:a4c7c344a7f3733a8f30a6e82fbb4f20a"id="r_a4c7c344a7f3733a8f30a6e82fbb4f20a"><tdclass="memItemLeft"align="right"valign="top">std::set< int > </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classrtabmap_1_1Memory.html#a4c7c344a7f3733a8f30a6e82fbb4f20a">getAllSignatureIds</a> (bool ignoreChildren=true) const</td></tr>
<trclass="memdesc:a4c7c344a7f3733a8f30a6e82fbb4f20a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns all signature ids in WM, STM and LTM. <br/></td></tr>
<trclass="memdesc:a8720df55fa6f8be933827808d364f20a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reports whether the in-memory map has been modified since the database was last loaded or reset. <aclass="el"href="classrtabmap_1_1Memory.html#a44023158524dee3471a8dff43ea132db">close()</a> uses this flag to decide whether the database needs to be rewritten. <br/></td></tr>
<trclass="memdesc:a4aef39ff933463d9693e8f4f325f74e7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Writes a human-readable dump of WM/STM, links and weights to <code>fileNameTree</code>. <br/></td></tr>
<trclass="memdesc:a634e2fdc0e1c93a2cb01f07c9cbac33f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Dumps every internal map (signatures, words, dictionary) to text files in <code>directory</code>. <br/></td></tr>
<trclass="memdesc:a1b470cb9ff41fd77a35d9a6230750446"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Dumps signatures' word ids (and 3D positions if <code>words3D</code>) to <code>fileNameSign</code>. <br/></td></tr>
<trclass="memdesc:afc3de4b861e23f90bf753794bcb40e68"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Dumps the visual word dictionary: references to <code>fileNameRef</code>, descriptors to <code>fileNameDesc</code>. <br/></td></tr>
<trclass="memitem:aebef354bb315f522b4767337a6bd1ee6"id="r_aebef354bb315f522b4767337a6bd1ee6"><tdclass="memItemLeft"align="right"valign="top">void </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classrtabmap_1_1Memory.html#aebef354bb315f522b4767337a6bd1ee6">generateGraph</a> (const std::string &fileName, const std::set< int >&ids=std::set< int >())</td></tr>
<trclass="memdesc:aebef354bb315f522b4767337a6bd1ee6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Writes a Graphviz DOT file of the pose graph. <br/></td></tr>
<trclass="memdesc:a6e63312ada575016b583a4252dc0a70c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Removes spurious obstacle points from each node's local grid using a reference 2D map. <br/></td></tr>
<trclass="memdesc:ab5329c43c6b185613222d8458c049848"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Extracts a sub-graph (poses + links) for a set of node ids. <br/></td></tr>
<trclass="memdesc:a4ae0287262c04905baab2d6f94448486"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the relative transform from <code>fromS</code> to <code>toS</code> using the registration pipeline. <br/></td></tr>
<trclass="memdesc:a29636c34234e6e2809e3d57329dc40d6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Convenience overload: loads signatures by id and forwards to the <aclass="el"href="classrtabmap_1_1Signature.html">Signature</a> variant. <br/></td></tr>
<trclass="memdesc:aca66c6d1316f9d833b279104a683ee50"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Refines a transform using ICP alignment of laser scans only. <br/></td></tr>
<trclass="memdesc:a34aa7efd5f6ce0fd3136459542ad8ebb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">ICP registration of one node against an assembled cloud from multiple neighbors. <br/></td></tr>
<trclass="memdesc:a12042e10017298c4dcf6e435c5a2290a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">First valid signature id assigned to a new signature (positive integer). <br/></td></tr>
<trclass="memdesc:a539ccf650a81905db46dd6d98112f603"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reserved id for the "virtual place" used by the Bayes filter (negative). <br/></td></tr>
<trclass="memdesc:ac78b3a9a3394eb63c50650a4b8ada68e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sentinel value indicating an invalid signature id (zero). <br/></td></tr>
<trclass="memdesc:a6110b0ea8a7b35bae46083f2ce66e148"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Database driver owning the persistent storage (created by <aclass="el"href="classrtabmap_1_1Memory.html#aeeabc78648bf7dc14ea1356828cdeddd">init()</a>). <br/></td></tr>
<divclass="textblock"><p>Three-tiered memory management (STM, WM, LTM) for RTAB-Map. </p>
<p><aclass="el"href="classrtabmap_1_1Memory.html"title="Three-tiered memory management (STM, WM, LTM) for RTAB-Map.">Memory</a> is the core map data structure used by <aclass="el"href="classrtabmap_1_1Rtabmap.html">Rtabmap</a>. It stores observations as <aclass="el"href="classrtabmap_1_1Signature.html">Signature</a> nodes connected by <aclass="el"href="classrtabmap_1_1Link.html">Link</a> edges and orchestrates their lifecycle across three tiers:</p>
<ul>
<li><b>Short-Term <aclass="el"href="classrtabmap_1_1Memory.html"title="Three-tiered memory management (STM, WM, LTM) for RTAB-Map.">Memory</a> (STM)</b>: most recently added signatures, kept at a fixed size (see <aclass="el"href="classrtabmap_1_1Parameters.html#a46dc1a24b02bb00014262f7f4d818a49">Parameters::kMemSTMSize()</a>). Used to delay recently observed places before they become candidates for loop closure.</li>
<li><b>Working <aclass="el"href="classrtabmap_1_1Memory.html"title="Three-tiered memory management (STM, WM, LTM) for RTAB-Map.">Memory</a> (WM)</b>: signatures available for loop-closure likelihood computation in the current iteration. Older signatures are transferred from WM to LTM by <aclass="el"href="classrtabmap_1_1Memory.html#a51e89ccab2261912b09a5b7178fdd46c">forget()</a> to bound iteration time.</li>
<li><b>Long-Term <aclass="el"href="classrtabmap_1_1Memory.html"title="Three-tiered memory management (STM, WM, LTM) for RTAB-Map.">Memory</a> (LTM)</b>: persisted in the database via <aclass="el"href="classrtabmap_1_1DBDriver.html">DBDriver</a>. Signatures can be brought back to WM with <aclass="el"href="classrtabmap_1_1Memory.html#aa244b8581684b85e35d2056cf972e377">reactivateSignatures()</a> when their neighbors still in WM are good loop-closure candidates.</li>
</ul>
<p>The class also owns a visual word dictionary (<aclass="el"href="classrtabmap_1_1VWDictionary.html">VWDictionary</a>), feature extractor (<aclass="el"href="classrtabmap_1_1Feature2D.html">Feature2D</a>) and registration pipelines (<aclass="el"href="classrtabmap_1_1Registration.html">Registration</a>, <aclass="el"href="classrtabmap_1_1RegistrationVis.html">RegistrationVis</a>, <aclass="el"href="classrtabmap_1_1RegistrationIcp.html">RegistrationIcp</a>) used to compute relative transforms between signatures.</p>
<p>Typical iteration: <aclass="el"href="classrtabmap_1_1Memory.html#a3c029b2788f3b599480d5150120a6bee">update()</a> adds a new <aclass="el"href="classrtabmap_1_1SensorData.html">SensorData</a> as a <aclass="el"href="classrtabmap_1_1Signature.html">Signature</a> in STM; <aclass="el"href="classrtabmap_1_1Memory.html#a984ca01a87434b11a66dc1d96e2fff17">computeLikelihood()</a> scores it against WM; the <aclass="el"href="classrtabmap_1_1Rtabmap.html">Rtabmap</a> caller decides on loop closures with <aclass="el"href="classrtabmap_1_1BayesFilter.html">BayesFilter</a>; <aclass="el"href="classrtabmap_1_1Memory.html#af87e4718dd842c59fd8459430c40d78f">cleanup()</a> drops bad signatures; <aclass="el"href="classrtabmap_1_1Memory.html#a51e89ccab2261912b09a5b7178fdd46c">forget()</a> transfers oldest WM signatures to LTM and <aclass="el"href="classrtabmap_1_1Memory.html#aa244b8581684b85e35d2056cf972e377">reactivateSignatures()</a> pulls relevant ones back.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classrtabmap_1_1Signature.html"title="Represents a node in RTAB-Map's pose graph.">Signature</a></dd>
<dd>
<aclass="el"href="classrtabmap_1_1DBDriver.html"title="Abstract database driver for RTAB-Map maps (signatures, links, words, statistics).">DBDriver</a></dd>
<dd>
<aclass="el"href="classrtabmap_1_1VWDictionary.html"title="Manages a dictionary of visual words for visual place recognition and loop closure detection.">VWDictionary</a></dd>
<dd>
<aclass="el"href="classrtabmap_1_1Rtabmap.html"title="Top-level RTAB-Map SLAM pipeline (mapping, localization and loop closure).">Rtabmap</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00101">101</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
</div><h2class="groupheader">Constructor & Destructor Documentation</h2>
<p>Constructs a <aclass="el"href="classrtabmap_1_1Memory.html"title="Three-tiered memory management (STM, WM, LTM) for RTAB-Map.">Memory</a> instance with the given parameters. </p>
<p>The database is not opened here; call <aclass="el"href="classrtabmap_1_1Memory.html#aeeabc78648bf7dc14ea1356828cdeddd">init()</a> to open or create a database and load persisted state. <code>parameters</code> may include any key from <aclass="el"href="classrtabmap_1_1Parameters.html">Parameters</a> (memory, keypoint, registration, etc.); missing keys fall back to defaults. </p>
</div>
</div>
<h2class="groupheader">Member Function Documentation</h2>
<p>Re-parses parameters and propagates them to owned sub-objects. </p>
<p>Forwards the relevant subset to <aclass="el"href="classrtabmap_1_1VWDictionary.html">VWDictionary</a>, <aclass="el"href="classrtabmap_1_1Feature2D.html">Feature2D</a>, the registration pipelines and the database driver. Safe to call at runtime to change settings. </p>
<dlclass="section return"><dt>Returns</dt><dd>The most recent parameter map applied via the constructor or <aclass="el"href="classrtabmap_1_1Memory.html#abbf54d2a34838cc13ce98d41a9991918">parseParameters()</a>. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00130">130</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<p>Adds a sensor observation to the map (overload without odometry pose). </p>
<p>Equivalent to calling the full <aclass="el"href="classrtabmap_1_1Memory.html#a3c029b2788f3b599480d5150120a6bee">update()</a> with an identity pose and empty covariance. The new signature is added to STM; oldest STM entries are promoted to WM as needed.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">data</td><td>Sensor data (images, scan, user data, odometry features) for this frame. </td></tr>
<tr><tdclass="paramname">stats</td><td>Optional output statistics receiver for timing/diagnostic values. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>True if a signature was successfully created and added, false otherwise. </dd></dl>
<p>Adds a sensor observation with odometry pose and velocity to the map. </p>
<p>Creates a new <aclass="el"href="classrtabmap_1_1Signature.html">Signature</a>, extracts visual words, links it to the previous STM signature with a neighbor link, runs rehearsal against STM and promotes the oldest STM signature to WM if STM is full.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">data</td><td>Sensor data (images, scan, user data, odometry features). </td></tr>
<tr><tdclass="paramname">pose</td><td><aclass="el"href="classrtabmap_1_1Odometry.html"title="Abstract base class for visual, lidar and visual-inertial odometry backends.">Odometry</a> pose at this frame (null if odometry not used). </td></tr>
<tr><tdclass="paramname">covariance</td><td>6x6 odometry covariance (or empty if null odometry is provided). </td></tr>
<p>Flushes pending data and closes the database connection. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">databaseSaved</td><td>If true, persists STM/WM signatures and statistics before closing. If false, in-memory state is discarded. </td></tr>
<tr><tdclass="paramname">postInitClosingEvents</td><td>If true, posts progress events while closing. </td></tr>
<tr><tdclass="paramname">ouputDatabasePath</td><td>If non-empty, the database is copied to this path on close. If a database on disk was initially created/loaded on a different path, it will be updated with latest changes and renamed to the output path. </td></tr>
<tdclass="paramtype">const std::list< int >& </td>
<tdclass="paramname"><em>ids</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><divclass="memdoc">
<p>Computes loop-closure likelihood of <code>signature</code> against a set of WM ids. </p>
<p>Compares visual words (tf-idf if enabled) between <code>signature</code> and each id in <code>ids</code> and returns a normalized likelihood per id.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">signature</td><td>Query signature (typically the last added one). </td></tr>
<tr><tdclass="paramname">ids</td><td>Candidate signature ids in working memory. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Map from id to likelihood score. </dd></dl>
<p>Refreshes the age of <code>signatureId</code> in working memory, marking it as recent. </p>
<p>Used to keep loop-closure hypotheses active so they are not transferred to LTM during the next <aclass="el"href="classrtabmap_1_1Memory.html#a51e89ccab2261912b09a5b7178fdd46c">forget()</a> call. </p>
<p>Transfers oldest signatures from WM to LTM to respect memory and/or time limits. </p>
<p>Two regimes are used depending on the visual word dictionary state:</p><ul>
<li><b>Word-count regime</b>: active only when mapping mode is on, the <aclass="el"href="classrtabmap_1_1VWDictionary.html">VWDictionary</a> is in incremental mode, contains at least one word, and is <em>not</em> using incremental FLANN. In this regime, signatures are transferred until the number of visual words removed from the dictionary catches up with the number of new words indexed since the previous iteration.</li>
<li><b>Signature-count regime</b>: used in every other case (localization mode, dictionary not incremental, dictionary still empty – e.g. lidar-only mapping or no feature extraction – or incremental FLANN, where the word count is no longer the bottleneck). In this regime, at least one more signature than the count added/retrieved in the previous iteration is transferred, regardless of words.</li>
</ul>
<p>In both regimes, candidate selection (see <code>getRemovableSignatures()</code>) honors <code>ignoredIds</code>, skips intermediate nodes, and excludes WM nodes linked to STM (to preserve rehearsal). Intermediate (weight==-1) nodes linked to a transferred signature are dragged out with it.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">ignoredIds</td><td>Signatures that must not be transferred (e.g. STM, retrieved ids, on the planned path). </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Ids of signatures moved to LTM, in transfer order. </dd></dl>
<tr><tdclass="paramname">link</td><td><aclass="el"href="classrtabmap_1_1Link.html"title="Directed constraint between two nodes in RTAB-Map's pose graph.">Link</a> to add (type, transform, covariance). </td></tr>
<tr><tdclass="paramname">addInDatabase</td><td>If true, the link is also added when one of the ids is only in LTM. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>True if the link was added, false on conflict or missing nodes. </dd></dl>
<tr><tdclass="paramname">ignoreLoopIds</td><td>If true, loop-closure neighbors are not traversed. </td></tr>
<tr><tdclass="paramname">ignoreIntermediateNodes</td><td>If true, weight==-1 intermediate nodes are skipped. </td></tr>
<tr><tdclass="paramname">ignoreLocalSpaceLoopIds</td><td>If true, only global loop closures are traversed. </td></tr>
<tr><tdclass="paramname">nodesSet</td><td>If non-empty, traversal is constrained to these ids. </td></tr>
<tr><tdclass="paramname">dbAccessTime</td><td>Output: time spent in database access (seconds). </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Map from visited node id to graph depth, including <code>signatureId</code> (with graph depth of 0) </dd></dl>
<p>Removes <code>locationId</code> from WM/STM and the database. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">locationId</td><td>Id of the signature to delete. </td></tr>
<tr><tdclass="paramname">deletedWords</td><td>Optional output: words whose reference count dropped to zero. </td></tr>
<tr><tdclass="paramname">keepLinkedInDb</td><td>If true, the location keeps its links, weight and label and stays part of the graph in the database. If false (default), it is unlinked first – links removed on both sides, weight invalidated, label cleared – so at best it is kept as history only and no longer appears in <aclass="el"href="classrtabmap_1_1Memory.html#a4c7c344a7f3733a8f30a6e82fbb4f20a">getAllSignatureIds()</a>. An unlinked location is written to the database only if it was already saved there or if <aclass="el"href="classrtabmap_1_1Parameters.html#aa64b9331ee411f41941ca5635da09f81">Parameters::kMemNotLinkedNodesKept()</a> is true (default); otherwise it is discarded outright. </td></tr>
<p>Merges <code>id</code> with a close neighbor (graph reduction). </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">id</td><td>Node to reduce. </td></tr>
<tr><tdclass="paramname">maxDistance</td><td>Maximum distance to a neighbor to allow the merge (meters). </td></tr>
<tr><tdclass="paramname">keepLinkedInDb</td><td>Same meaning as in <aclass="el"href="classrtabmap_1_1Memory.html#a2b91d8b5d651fbaa12a31e364c793a21">deleteLocation()</a>: if true, the merged node keeps its links, weight and label and stays part of the graph in the database. If false (default), it is unlinked first – links removed on both sides, weight invalidated, label cleared – so at best it is kept as history only and no longer appears in <aclass="el"href="classrtabmap_1_1Memory.html#a4c7c344a7f3733a8f30a6e82fbb4f20a">getAllSignatureIds()</a>. An unlinked node is written to the database only if it was already saved there or if <aclass="el"href="classrtabmap_1_1Parameters.html#aa64b9331ee411f41941ca5635da09f81">Parameters::kMemNotLinkedNodesKept()</a> is true (default); otherwise it is discarded outright. </td></tr>
<p>Enables a dummy visual word dictionary (no descriptors kept, word ids only). </p>
<dlclass="section note"><dt>Note</dt><dd>Must be called before <aclass="el"href="classrtabmap_1_1Memory.html#aeeabc78648bf7dc14ea1356828cdeddd">init()</a>; ignored (with an error logged) once the database driver is set. </dd>
<dd>
Silently disabled by <aclass="el"href="classrtabmap_1_1Memory.html#aeeabc78648bf7dc14ea1356828cdeddd">init()</a> when the database holds no dictionary, since there would be nothing to skip loading, and the memory would otherwise be left unable to add new nodes. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>Working memory as { signature id, age } (does not include STM). </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00400">400</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>Number of intermediate nodes (weight = -1) currently in working memory. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00407">407</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>Number of intermediate nodes (weight = -1) currently in short-term memory. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00409">409</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>Set of signature ids currently in short-term memory. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00411">411</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>Configured maximum STM size (<aclass="el"href="classrtabmap_1_1Parameters.html#a46dc1a24b02bb00014262f7f4d818a49">Parameters::kMemSTMSize()</a>). </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00413">413</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if raw binary data (images, scans) is kept in memory after compression. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00432">432</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>Similarity threshold used by rehearsal (<aclass="el"href="classrtabmap_1_1Parameters.html#a634f4790c9c84772935bf406265bc692">Parameters::kMemRehearsalSimilarity()</a>). </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00434">434</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="classrtabmap_1_1Signature.html"title="Represents a node in RTAB-Map's pose graph.">Signature</a> id labeled <code>label</code>, or 0 if not found. </dd></dl>
<p>Assigns or removes a label on <code>id</code>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">id</td><td><aclass="el"href="classrtabmap_1_1Signature.html"title="Represents a node in RTAB-Map's pose graph.">Signature</a> id; pass 0 to remove an existing label by name. </td></tr>
<tr><tdclass="paramname">label</td><td>Label text; empty to remove. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>True if the label was applied. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>Map from signature id to non-empty label (including STM+WM+LTM). </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00456">456</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>Reverse landmark index: { landmark id (negative), nodes observing it }. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00458">458</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if every persisted node (in LTM) is currently loaded in WM/STM. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00460">460</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<p>Attaches user data to signature <code>id</code>, compressing it on the fly if needed. </p>
<p>The format is detected automatically: a single-row <code>CV_8UC1</code> matrix is treated as already-compressed data and stored as-is; anything else is considered raw and compressed before being stored.</p>
<dlclass="section note"><dt>Note</dt><dd>If you pass one-dimensional unsigned 8-bit raw data, transpose it so it has multiple rows (not multiple columns), otherwise it will be misdetected as already compressed.</dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">id</td><td>Target signature id (must be in WM/STM or LTM). </td></tr>
<tr><tdclass="paramname">data</td><td>Raw or pre-compressed user data. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>True if the data was attached, false if <code>id</code> was not found. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>Last <aclass="el"href="classrtabmap_1_1Memory.html#a072ec41027a03072f1a945540b43a1b8">emptyTrash()</a> flush time in seconds. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="classrtabmap_1_1Odometry.html"title="Abstract base class for visual, lidar and visual-inertial odometry backends.">Odometry</a> pose stored with <code>signatureId</code> (null if unknown). </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>Ground-truth poses for nodes currently in WM/STM. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00493">493</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<p>Returns a <aclass="el"href="classrtabmap_1_1GPS.html"title="WGS84 GPS fix attached to a sensor sample or graph node.">GPS</a> fix for <code>id</code>, falling back to the nearest GPS-tagged neighbor. </p>
<p>Two cases:</p><ul>
<li>If <code>id</code> has a <aclass="el"href="classrtabmap_1_1GPS.html"title="WGS84 GPS fix attached to a sensor sample or graph node.">GPS</a> fix attached, <code>gps</code> is set to that fix and <code>offsetENU</code> is left at identity.</li>
<li>Otherwise, the graph is searched (via <aclass="el"href="classrtabmap_1_1Memory.html#a521305f39adcdfbedebbe5bdae9efbc6">getNeighborsId()</a> with depth <code>maxGraphDepth</code>, ignoring loop closures) for the closest neighbor that has a <aclass="el"href="classrtabmap_1_1GPS.html"title="WGS84 GPS fix attached to a sensor sample or graph node.">GPS</a> fix. When one is found, <code>gps</code> is set to that neighbor's fix and <code>offsetENU</code> is the rigid transform from that neighbor's pose to <code>id</code>, expressed in ENU coordinates (derived from the neighbor's heading/bearing). Applying <code>offsetENU</code> on top of the GPS-derived pose of the neighbor yields the ENU pose of <code>id</code>.</li>
</ul>
<p>If no <aclass="el"href="classrtabmap_1_1GPS.html"title="WGS84 GPS fix attached to a sensor sample or graph node.">GPS</a> fix is found on <code>id</code> or any reachable neighbor, <code>gps</code> is returned empty (<code>gps.stamp()==0</code>) and <code>offsetENU</code> is identity.</p>
<tr><tdclass="paramname">gps</td><td>Output <aclass="el"href="classrtabmap_1_1GPS.html"title="WGS84 GPS fix attached to a sensor sample or graph node.">GPS</a> fix (empty if none found). </td></tr>
<tr><tdclass="paramname">offsetENU</td><td>Output ENU-frame offset from the GPS-tagged node to <code>id</code> (identity when <code>id</code> itself carries the <aclass="el"href="classrtabmap_1_1GPS.html"title="WGS84 GPS fix attached to a sensor sample or graph node.">GPS</a> fix or when none is found). </td></tr>
<tr><tdclass="paramname">lookInDatabase</td><td>If true, also fetch missing nodes from LTM during the search. </td></tr>
<tr><tdclass="paramname">maxGraphDepth</td><td>Maximum graph depth used to look for a GPS-tagged neighbor when <code>id</code> has none (0 = no depth limit, i.e. search the whole reachable graph). </td></tr>
<tr><tdclass="paramname">groundTruth</td><td>Output ground-truth pose (null if not set). </td></tr>
<tr><tdclass="paramname">velocity</td><td>Output 6-vector velocity (empty if not set). </td></tr>
<tr><tdclass="paramname">gps</td><td>Output <aclass="el"href="classrtabmap_1_1GPS.html"title="WGS84 GPS fix attached to a sensor sample or graph node.">GPS</a> fix (invalid if not set). </td></tr>
<p>Reports whether the in-memory map has been modified since the database was last loaded or reset. <aclass="el"href="classrtabmap_1_1Memory.html#a44023158524dee3471a8dff43ea132db">close()</a> uses this flag to decide whether the database needs to be rewritten. </p>
<p>The flag is cleared to <code>false</code> on construction, by <aclass="el"href="classrtabmap_1_1Memory.html#a44023158524dee3471a8dff43ea132db">close()</a> and when the memory is cleared, and is raised to <code>true</code> on any of the following events:</p>
<ul>
<li><b><aclass="el"href="classrtabmap_1_1Memory.html#a3c029b2788f3b599480d5150120a6bee">update()</a> in mapping mode</b> (<aclass="el"href="classrtabmap_1_1Parameters.html#acdc74cd2b096ba28d9c1e00040b69d42">Parameters::kMemIncrementalMemory()</a> == <code>true</code>, see <aclass="el"href="classrtabmap_1_1Memory.html#a420ddb38a3ffefafc84d22b0dd3b3814">isIncremental()</a>): every successful call sets the flag, since a new <aclass="el"href="classrtabmap_1_1Signature.html">Signature</a> is added to the graph and the visual word dictionary may grow.</li>
<li><b><aclass="el"href="classrtabmap_1_1Memory.html#a3c029b2788f3b599480d5150120a6bee">update()</a> in localization mode</b> (<aclass="el"href="classrtabmap_1_1Memory.html#a420ddb38a3ffefafc84d22b0dd3b3814">isIncremental()</a> == <code>false</code>): the flag is set only when <aclass="el"href="classrtabmap_1_1Parameters.html#aa5a4f5d2c71072ea2896c7ae2c8dda12">Parameters::kMemLocalizationDataSaved()</a> is enabled (see <aclass="el"href="classrtabmap_1_1Memory.html#a32ed69b783e53be29fca6102ab198a4e">isLocalizationDataSaved()</a>), i.e. when the new node must be persisted back to the database. Pure localization (the default, <aclass="el"href="classrtabmap_1_1Parameters.html#aa5a4f5d2c71072ea2896c7ae2c8dda12">Parameters::kMemLocalizationDataSaved()</a> == <code>false</code>) leaves the flag at <code>false</code> even after many <aclass="el"href="classrtabmap_1_1Memory.html#a3c029b2788f3b599480d5150120a6bee">update()</a> calls, because nothing needs to be saved.</li>
<li><b><aclass="el"href="classrtabmap_1_1Memory.html#ac9e6bfaf161d4bd1a9f99d2352492a1d">reduceNode()</a></b>: merging a node into a neighbor mutates the graph and marks the memory as changed (and also raises the link-changed flag).</li>
<li><b><aclass="el"href="classrtabmap_1_1Memory.html#aeeabc78648bf7dc14ea1356828cdeddd">init()</a> dictionary repair</b>: when <aclass="el"href="classrtabmap_1_1Memory.html#aeeabc78648bf7dc14ea1356828cdeddd">init()</a> rebuilds the visual word dictionary because words are missing from the database, the flag is forced to <code>true</code> so the regenerated dictionary is saved back on <aclass="el"href="classrtabmap_1_1Memory.html#a44023158524dee3471a8dff43ea132db">close()</a>, even if no new data was processed.</li>
</ul>
<p>Note that link-only modifications (e.g. <aclass="el"href="classrtabmap_1_1Memory.html#a4140effa4830fbe679a51e975f0021a1">addLink()</a>, <aclass="el"href="classrtabmap_1_1Memory.html#a7c7f80937a35204cb5b44faec8e99736">updateLink()</a>, <aclass="el"href="classrtabmap_1_1Memory.html#a3fcaa79a33d63f7e383d05868b1316e3">removeLink()</a>) update an independent <code>_linksChanged</code> flag, not this one.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if the memory has changed and would need to be persisted. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00602">602</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if the memory grows on <aclass="el"href="classrtabmap_1_1Memory.html#a3c029b2788f3b599480d5150120a6bee">update()</a> (mapping mode), false in localization mode. </dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classrtabmap_1_1Parameters.html#acdc74cd2b096ba28d9c1e00040b69d42"title="Key of parameter Mem/IncrementalMemory : "SLAM mode, otherwise it is Localization mode....">Parameters::kMemIncrementalMemory()</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00607">607</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True in localization mode when database writes are disabled (i.e. <aclass="el"href="classrtabmap_1_1Memory.html#a420ddb38a3ffefafc84d22b0dd3b3814">isIncremental()</a> is false and <aclass="el"href="classrtabmap_1_1Parameters.html#a326e79acb5a39f7da481f9771501030c">Parameters::kMemLocalizationReadOnly()</a> is enabled). </dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classrtabmap_1_1Parameters.html#acdc74cd2b096ba28d9c1e00040b69d42"title="Key of parameter Mem/IncrementalMemory : "SLAM mode, otherwise it is Localization mode....">Parameters::kMemIncrementalMemory()</a></dd>
<dd>
<aclass="el"href="classrtabmap_1_1Parameters.html#a326e79acb5a39f7da481f9771501030c"title="Key of parameter Mem/LocalizationReadOnly : uFormat("In localization mode, open the database in read-...">Parameters::kMemLocalizationReadOnly()</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00614">614</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if data added during localization is persisted to the database. </dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classrtabmap_1_1Parameters.html#aa5a4f5d2c71072ea2896c7ae2c8dda12"title="Key of parameter Mem/LocalizationDataSaved : uFormat("Save localization data during localization sess...">Parameters::kMemLocalizationDataSaved()</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00619">619</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="classrtabmap_1_1Signature.html"title="Represents a node in RTAB-Map's pose graph.">Signature</a> with <code>id</code> in WM/STM, or null if not loaded. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>True if <code>signatureId</code> is in short-term memory. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00623">623</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if <code>signatureId</code> is in working memory. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00625">625</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if <code>signatureId</code> is not in STM/WM, so when it is in LTM or non-existing. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00627">627</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if signature ids are auto-generated, false if taken from sensor data id. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00629">629</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>Id of the last accepted global loop-closure node, or 0 if none. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00631">631</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>Feature extractor used to compute visual words. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00633">633</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if graph reduction is enabled (<aclass="el"href="classrtabmap_1_1Parameters.html#a5b838d1204f572de9f39904de5e22ed5">Parameters::kMemReduceGraph()</a>). </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00635">635</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>Running per-axis maximum of the diagonal of every neighbor (odometry) link's information matrix observed so far, as a 6-vector (x, y, z, roll, pitch, yaw). Empty until at least one 6x6 neighbor link information matrix has been seen.</dd></dl>
<p>This is a runtime statistic, not a configurable parameter: it is updated on <aclass="el"href="classrtabmap_1_1Memory.html#aeeabc78648bf7dc14ea1356828cdeddd">init()</a> (over all loaded neighbor links) and on every <aclass="el"href="classrtabmap_1_1Memory.html#a3c029b2788f3b599480d5150120a6bee">update()</a> that adds a new neighbor link.</p>
<p>It is consumed by <aclass="el"href="classrtabmap_1_1Rtabmap.html#aeea47830776fe57c456ae6a673069ddc">Rtabmap::getInformation()</a> when <aclass="el"href="classrtabmap_1_1Parameters.html#a2f0e34d58229d94e6368223be2dd4fc6">Parameters::kRGBDLoopCovLimited()</a> is enabled, to clip loop-closure information matrices so a loop never claims higher confidence than odometry itself ever provided.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classrtabmap_1_1Parameters.html#a2f0e34d58229d94e6368223be2dd4fc6"title="Key of parameter RGBD/LoopCovLimited : "Limit covariance of non-neighbor links to minimum covariance ...">Parameters::kRGBDLoopCovLimited()</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00653">653</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>True if the odometry pose orientation is used (instead of the <aclass="el"href="classrtabmap_1_1IMU.html"title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> orientation) as the source of each new node's gravity link.</dd></dl>
<p>When enabled, every new node gets a self-loop <aclass="el"href="classrtabmap_1_1Link.html#a925bb7ca93eb95a3a873b0a9e8d5e91ea37d186f2447908a27d531be74a2f6983">Link::kGravity</a> holding the rotation of the odometry pose passed to <aclass="el"href="classrtabmap_1_1Memory.html#a3c029b2788f3b599480d5150120a6bee">update()</a>. This assumes odometry is already gravity-aligned (e.g. a VIO front-end). When disabled, the gravity link is built from the <aclass="el"href="classrtabmap_1_1IMU.html"title="Inertial measurement sample (ROS sensor_msgs/Imu-like fields).">IMU</a> orientation in <aclass="el"href="classrtabmap_1_1SensorData.html#a056056de80edf1bc20505fd992cdc6e7">SensorData::imu()</a> if available.</p>
<p>Gravity links are consumed by graph optimization only when <aclass="el"href="classrtabmap_1_1Parameters.html#ae30f9e3d2e17c3543801cdd9fa51ffcc">Parameters::kOptimizerGravitySigma()</a> is non-zero.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classrtabmap_1_1Parameters.html#ab53fe6e9b2e23d37c6a7af8f52354848"title="Key of parameter Mem/UseOdomGravity : uFormat("Use odometry instead of IMU orientation to add gravity...">Parameters::kMemUseOdomGravity()</a></dd>
<dd>
<aclass="el"href="classrtabmap_1_1Parameters.html#ae30f9e3d2e17c3543801cdd9fa51ffcc"title="Key of parameter Optimizer/GravitySigma : uFormat("Gravity sigma value (>=0, typically between 0....">Parameters::kOptimizerGravitySigma()</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00669">669</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<p>Removes spurious obstacle points from each node's local grid using a reference 2D map. </p>
<p>For every node in <code>poses</code>, the node's local <b>obstacle</b> grid is loaded, each obstacle point is projected with <code>poses</code> into the reference <code>map</code>, and the point is kept only if either:</p><ul>
<li>the reference <code>map</code> cell at its projection is not free space (i.e. the cell is an obstacle or unknown, value != 0), or</li>
<li>the reference <code>map</code> contains an obstacle cell (value == 100) within <code>cropRadius</code> cells of the projection.</li>
</ul>
<p>Points that fall on a free cell and have no obstacle neighbor within <code>cropRadius</code> are dropped. The filtered obstacle grid replaces the node's grid in WM/STM and (if the node is already persisted) in the database via <aclass="el"href="classrtabmap_1_1DBDriver.html#a2f5e8e0b367e49cfbba7c96b28306a61">DBDriver::updateOccupancyGrid()</a>.</p>
<p><b>Ground and empty cells are not touched</b>: they are read and written back as-is.</p>
<p>When <code>filterScans</code> is true, the same projection/filtering rule is also applied to each node's raw laser scan, and the rewritten scan is saved back to the database. This is useful to remove dynamic objects from the stored scans before re-meshing or re-exporting.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">poses</td><td>Optimized poses used to project the local grids/scans into <code>map</code>. </td></tr>
<tr><tdclass="paramname">xMin</td><td>Reference map origin x in world coordinates (meters). </td></tr>
<tr><tdclass="paramname">yMin</td><td>Reference map origin y in world coordinates (meters). </td></tr>
<tr><tdclass="paramname">cellSize</td><td>Reference map resolution (meters/cell); must match the nodes' grid cell size. </td></tr>
<tr><tdclass="paramname">cropRadius</td><td>Search radius (in cells) around each projected point used to accept points near an obstacle in <code>map</code>. </td></tr>
<tr><tdclass="paramname">filterScans</td><td>If true, also filter and rewrite the raw laser scan attached to each node, using the same rule as for obstacle cells. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Number of (node, grid or scan) modifications performed, or -1 on error (no database loaded, empty <code>poses</code> or empty <code>map</code>). </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>The estimated transform, or a null <aclass="el"href="classrtabmap_1_1Transform.html">Transform</a> on failure. </dd></dl>
<p>Refines a transform using ICP alignment of laser scans only. </p>
<dlclass="section return"><dt>Returns</dt><dd>The refined transform, or a null <aclass="el"href="classrtabmap_1_1Transform.html">Transform</a> on failure. </dd></dl>
<tr><tdclass="paramname">poses</td><td>Neighbor poses used to assemble the reference cloud. </td></tr>
<tr><tdclass="paramname">info</td><td>Optional output with inlier counts and diagnostics. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The estimated transform, or a null <aclass="el"href="classrtabmap_1_1Transform.html">Transform</a> on failure. </dd></dl>
</div>
</div>
<h2class="groupheader">Member Data Documentation</h2>
<p>First valid signature id assigned to a new signature (positive integer). </p>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00105">105</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<p>Reserved id for the "virtual place" used by the Bayes filter (negative). </p>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00107">107</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<p>Sentinel value indicating an invalid signature id (zero). </p>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00109">109</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
<p>Database driver owning the persistent storage (created by <aclass="el"href="classrtabmap_1_1Memory.html#aeeabc78648bf7dc14ea1356828cdeddd">init()</a>). </p>
<pclass="definition">Definition at line <aclass="el"href="Memory_8h_source.html#l00819">819</a> of file <aclass="el"href="Memory_8h_source.html">Memory.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.8 </li>