From ad276108836af36f2cb33c338899ffc93f61b8fe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Aug 2026 07:13:20 +0000 Subject: [PATCH] Update documentation (latest) 338e142e58711a5c9abda5fdc663e54e98681345 --- api/latest/DBDriver_8h_source.html | 490 +++++++++--------- api/latest/classrtabmap_1_1DBDriver.html | 30 +- .../classrtabmap_1_1DBDriverSqlite3.html | 5 +- index.html | 2 +- 4 files changed, 273 insertions(+), 254 deletions(-) diff --git a/api/latest/DBDriver_8h_source.html b/api/latest/DBDriver_8h_source.html index 41ab2151..f11ee502 100644 --- a/api/latest/DBDriver_8h_source.html +++ b/api/latest/DBDriver_8h_source.html @@ -172,253 +172,253 @@ $(document).ready(function(){initNavTree('DBDriver_8h_source.html',''); initResi
92 const std::string & getUrl() const {return _url;}
94 const std::string & getTargetVersion() const {return _targetVersion;}
95
-
97 void asyncSave(Signature * s);
-
99 void asyncSave(VisualWord * vw);
-
104 void emptyTrashes(bool async = false);
-
105 double getEmptyTrashesTime() const {return _emptyTrashesTime;}
-
106 void setTimestampUpdateEnabled(bool enabled) {_timestampUpdate = enabled;} // used on Update Signature and Word queries
-
107
-
115 void generateGraph(
-
116 const std::string & fileName,
-
117 const std::set<int> & ids = std::set<int>(),
-
118 const std::map<int, Signature *> & otherSignatures = std::map<int, Signature *>());
-
119
-
126 void addLink(const Link & link);
-
128 void removeLink(int from, int to);
-
130 void updateLink(const Link & link);
-
138 void updateOccupancyGrid(
-
139 int nodeId,
-
140 const cv::Mat & ground,
-
141 const cv::Mat & obstacles,
-
142 const cv::Mat & empty,
-
143 float cellSize,
-
144 const cv::Point3f & viewpoint);
-
146 void updateCalibration(
-
147 int nodeId,
-
148 const std::vector<CameraModel> & models,
-
149 const std::vector<StereoCameraModel> & stereoModels);
-
156 void updateDepthImage(int nodeId, const cv::Mat & image, const std::string & format);
-
162 void updateLaserScan(int nodeId, const LaserScan & scan);
-
165public:
-
170 void addInfoAfterRun(int stMemSize, int lastSignAdded, int processMemUsed, int databaseMemUsed, int dictionarySize, const ParametersMap & parameters) const;
-
176 void addStatistics(const Statistics & statistics, bool saveWmState) const;
-
182 void savePreviewImage(const cv::Mat & image) const;
-
184 cv::Mat loadPreviewImage() const;
-
186 void saveOptimizedPoses(const std::map<int, Transform> & optimizedPoses, const Transform & lastlocalizationPose) const;
-
188 std::map<int, Transform> loadOptimizedPoses(Transform * lastlocalizationPose = 0) const;
-
190 void save2DMap(const cv::Mat & map, float xMin, float yMin, float cellSize) const;
-
192 cv::Mat load2DMap(float & xMin, float & yMin, float & cellSize) const;
-
200 void saveOptimizedMesh(
-
201 const cv::Mat & cloud,
-
202 const std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > > & polygons = std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > >(), // Textures -> polygons -> vertices
-
203#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
-
204 const std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > > & texCoords = std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > >(), // Textures -> uv coords for each vertex of the polygons
-
205#else
-
206 const std::vector<std::vector<Eigen::Vector2f> > & texCoords = std::vector<std::vector<Eigen::Vector2f> >(), // Textures -> uv coords for each vertex of the polygons
-
207#endif
-
208 const cv::Mat & textures = cv::Mat()) const; // concatenated textures (assuming square textures with all same size);
-
209 cv::Mat loadOptimizedMesh(
-
210 std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > > * polygons = 0,
-
211#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
-
212 std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > > * texCoords = 0,
-
213#else
-
214 std::vector<std::vector<Eigen::Vector2f> > * texCoords = 0,
-
215#endif
-
216 cv::Mat * textures = 0) const;
-
222 void saveFlannIndex(const std::vector<unsigned char> & indexData) const;
-
225public:
-
231 bool openConnection(const std::string & url, bool overwritten = false, bool readOnly = false);
-
233 void closeConnection(bool save = true, const std::string & outputUrl = "");
-
235 bool isConnected() const;
-
236 unsigned long getMemoryUsed() const; // In bytes
-
238 std::string getDatabaseVersion() const;
-
239 long getNodesMemoryUsed() const;
-
240 long getLinksMemoryUsed() const;
-
241 long getImagesMemoryUsed() const;
-
242 long getDepthImagesMemoryUsed() const;
-
243 long getCalibrationsMemoryUsed() const;
-
244 long getGridsMemoryUsed() const;
-
245 long getLaserScansMemoryUsed() const;
-
246 long getUserDataMemoryUsed() const;
-
247 long getWordsMemoryUsed() const;
-
248 long getFeaturesMemoryUsed() const;
-
249 long getStatisticsMemoryUsed() const;
-
250 int getLastNodesSize() const; // working memory
-
251 int getLastDictionarySize() const; // working memory
-
252 int getTotalNodesSize() const;
-
253 int getTotalDictionarySize() const;
-
254 ParametersMap getLastParameters() const;
-
255 std::map<std::string, float> getStatistics(int nodeId, double & stamp, std::vector<int> * wmState=0) const;
-
256 std::map<int, std::pair<std::map<std::string, float>, double> > getAllStatistics() const;
-
257 std::map<int, std::vector<int> > getAllStatisticsWmStates() const;
-
258
-
275 void executeNoResult(const std::string & sql) const;
-
276
-
282 // Load objects
-
283 void load(VWDictionary & dictionary, bool lastStateOnly = true, bool idsOnly = false) const;
-
284 void loadLastNodes(std::list<Signature *> & signatures, bool loadWordIdsOnly = false) const; // returned signatures must be freed after usage
-
286 Signature * loadSignature(int id, bool * loadedFromTrash = 0); // returned signature must be freed after usage, call loadSignatures() instead if more than one signature should be loaded
-
287 void loadSignatures(const std::list<int> & ids, std::list<Signature *> & signatures, std::set<int> * loadedFromTrash = 0, bool loadWordIdsOnly = false); // returned signatures must be freed after usage
-
288 void loadWords(const std::set<int> & wordIds, std::list<VisualWord *> & vws); // returned words must be freed after usage
-
289
-
290 // Specific queries...
-
291 void loadNodeData(Signature & signature, bool images = true, bool scan = true, bool userData = true, bool occupancyGrid = true) const;
-
292 void loadNodeData(std::list<Signature *> & signatures, bool images = true, bool scan = true, bool userData = true, bool occupancyGrid = true) const;
-
293 void getNodeData(int signatureId, SensorData & data, bool images = true, bool scan = true, bool userData = true, bool occupancyGrid = true) const;
-
294 bool getCalibration(int signatureId, std::vector<CameraModel> & models, std::vector<StereoCameraModel> & stereoModels) const;
-
295 bool getLaserScanInfo(int signatureId, LaserScan & info) const;
-
296 bool getNodeInfo(int signatureId, Transform & pose, int & mapId, int & weight, std::string & label, double & stamp, Transform & groundTruthPose, std::vector<float> & velocity, GPS & gps, EnvSensors & sensors) const;
-
297 void getLocalFeatures(int signatureId, std::multimap<int, int> & words, std::vector<cv::KeyPoint> & keypoints, std::vector<cv::Point3f> & points, cv::Mat & descriptors) const;
-
299 void loadLinks(int signatureId, std::multimap<int, Link> & links, Link::Type type = Link::kUndef) const;
-
300 void getWeight(int signatureId, int & weight) const;
-
301 void getLastNodeIds(std::set<int> & ids) const;
-
302 void getAllNodeIds(std::set<int> & ids, bool ignoreChildren = false, bool ignoreBadSignatures = false, bool ignoreIntermediateNodes = false) const;
-
303 void getAllOdomPoses(std::map<int, Transform> & poses, bool ignoreChildren = false, bool ignoreIntermediateNodes = false) const;
-
304 void getAllLinks(std::multimap<int, Link> & links, bool ignoreNullLinks = true, bool withLandmarks = false) const;
-
305 void getLastNodeId(int & id) const;
-
306 void getLastMapId(int & mapId) const;
-
307 void getLastWordId(int & id) const;
-
308 void getInvertedIndexNi(int signatureId, int & ni) const;
-
309 void getNodesObservingLandmark(int landmarkId, std::map<int, Link> & nodes) const;
-
310 void getNodeIdByLabel(const std::string & label, int & id) const;
-
311 void getAllLabels(std::map<int, std::string> & labels) const;
-
314protected:
-
318 DBDriver(const ParametersMap & parameters = ParametersMap());
-
319
-
324 virtual bool connectDatabaseQuery(const std::string & url, bool overwritten = false, bool readOnly = false) = 0;
-
325 virtual void disconnectDatabaseQuery(bool save = true, const std::string & outputUrl = "") = 0;
-
326 virtual bool isConnectedQuery() const = 0;
-
327 virtual unsigned long getMemoryUsedQuery() const = 0; // In bytes
-
328 virtual bool getDatabaseVersionQuery(std::string & version) const = 0;
-
329 virtual long getNodesMemoryUsedQuery() const = 0;
-
330 virtual long getLinksMemoryUsedQuery() const = 0;
-
331 virtual long getImagesMemoryUsedQuery() const = 0;
-
332 virtual long getDepthImagesMemoryUsedQuery() const = 0;
-
333 virtual long getCalibrationsMemoryUsedQuery() const = 0;
-
334 virtual long getGridsMemoryUsedQuery() const = 0;
-
335 virtual long getLaserScansMemoryUsedQuery() const = 0;
-
336 virtual long getUserDataMemoryUsedQuery() const = 0;
-
337 virtual long getWordsMemoryUsedQuery() const = 0;
-
338 virtual long getFeaturesMemoryUsedQuery() const = 0;
-
339 virtual long getStatisticsMemoryUsedQuery() const = 0;
-
340 virtual int getLastNodesSizeQuery() const = 0;
-
341 virtual int getLastDictionarySizeQuery() const = 0;
-
342 virtual int getTotalNodesSizeQuery() const = 0;
-
343 virtual int getTotalDictionarySizeQuery() const = 0;
-
344 virtual ParametersMap getLastParametersQuery() const = 0;
-
345 virtual std::map<std::string, float> getStatisticsQuery(int nodeId, double & stamp, std::vector<int> * wmState) const = 0;
-
346 virtual std::map<int, std::pair<std::map<std::string, float>, double> > getAllStatisticsQuery() const = 0;
-
347 virtual std::map<int, std::vector<int> > getAllStatisticsWmStatesQuery() const = 0;
-
348
-
349 virtual void executeNoResultQuery(const std::string & sql) const = 0;
-
350
-
351 virtual void getWeightQuery(int signatureId, int & weight) const = 0;
-
352
-
353 virtual void saveQuery(const std::list<Signature *> & signatures) = 0;
-
354 virtual void saveQuery(const std::list<VisualWord *> & words) const = 0;
-
355 virtual void updateQuery(const std::list<Signature *> & signatures, bool updateTimestamp) const = 0;
-
356 virtual void updateQuery(const std::list<VisualWord *> & words, bool updateTimestamp) const = 0;
-
357
-
358 virtual void addLinkQuery(const Link & link) const = 0;
-
359 virtual void updateLinkQuery(const Link & link) const = 0;
-
360
-
361 virtual void updateOccupancyGridQuery(
-
362 int nodeId,
-
363 const cv::Mat & ground,
-
364 const cv::Mat & obstacles,
-
365 const cv::Mat & empty,
-
366 float cellSize,
-
367 const cv::Point3f & viewpoint) const = 0;
+
108 void asyncSave(Signature * s);
+
110 void asyncSave(VisualWord * vw);
+
115 void emptyTrashes(bool async = false);
+
116 double getEmptyTrashesTime() const {return _emptyTrashesTime;}
+
117 void setTimestampUpdateEnabled(bool enabled) {_timestampUpdate = enabled;} // used on Update Signature and Word queries
+
118
+
126 void generateGraph(
+
127 const std::string & fileName,
+
128 const std::set<int> & ids = std::set<int>(),
+
129 const std::map<int, Signature *> & otherSignatures = std::map<int, Signature *>());
+
130
+
137 void addLink(const Link & link);
+
139 void removeLink(int from, int to);
+
141 void updateLink(const Link & link);
+
149 void updateOccupancyGrid(
+
150 int nodeId,
+
151 const cv::Mat & ground,
+
152 const cv::Mat & obstacles,
+
153 const cv::Mat & empty,
+
154 float cellSize,
+
155 const cv::Point3f & viewpoint);
+
157 void updateCalibration(
+
158 int nodeId,
+
159 const std::vector<CameraModel> & models,
+
160 const std::vector<StereoCameraModel> & stereoModels);
+
167 void updateDepthImage(int nodeId, const cv::Mat & image, const std::string & format);
+
173 void updateLaserScan(int nodeId, const LaserScan & scan);
+
176public:
+
181 void addInfoAfterRun(int stMemSize, int lastSignAdded, int processMemUsed, int databaseMemUsed, int dictionarySize, const ParametersMap & parameters) const;
+
187 void addStatistics(const Statistics & statistics, bool saveWmState) const;
+
193 void savePreviewImage(const cv::Mat & image) const;
+
195 cv::Mat loadPreviewImage() const;
+
197 void saveOptimizedPoses(const std::map<int, Transform> & optimizedPoses, const Transform & lastlocalizationPose) const;
+
199 std::map<int, Transform> loadOptimizedPoses(Transform * lastlocalizationPose = 0) const;
+
201 void save2DMap(const cv::Mat & map, float xMin, float yMin, float cellSize) const;
+
203 cv::Mat load2DMap(float & xMin, float & yMin, float & cellSize) const;
+
211 void saveOptimizedMesh(
+
212 const cv::Mat & cloud,
+
213 const std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > > & polygons = std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > >(), // Textures -> polygons -> vertices
+
214#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
+
215 const std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > > & texCoords = std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > >(), // Textures -> uv coords for each vertex of the polygons
+
216#else
+
217 const std::vector<std::vector<Eigen::Vector2f> > & texCoords = std::vector<std::vector<Eigen::Vector2f> >(), // Textures -> uv coords for each vertex of the polygons
+
218#endif
+
219 const cv::Mat & textures = cv::Mat()) const; // concatenated textures (assuming square textures with all same size);
+
220 cv::Mat loadOptimizedMesh(
+
221 std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > > * polygons = 0,
+
222#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
+
223 std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > > * texCoords = 0,
+
224#else
+
225 std::vector<std::vector<Eigen::Vector2f> > * texCoords = 0,
+
226#endif
+
227 cv::Mat * textures = 0) const;
+
233 void saveFlannIndex(const std::vector<unsigned char> & indexData) const;
+
236public:
+
242 bool openConnection(const std::string & url, bool overwritten = false, bool readOnly = false);
+
244 void closeConnection(bool save = true, const std::string & outputUrl = "");
+
246 bool isConnected() const;
+
247 unsigned long getMemoryUsed() const; // In bytes
+
249 std::string getDatabaseVersion() const;
+
250 long getNodesMemoryUsed() const;
+
251 long getLinksMemoryUsed() const;
+
252 long getImagesMemoryUsed() const;
+
253 long getDepthImagesMemoryUsed() const;
+
254 long getCalibrationsMemoryUsed() const;
+
255 long getGridsMemoryUsed() const;
+
256 long getLaserScansMemoryUsed() const;
+
257 long getUserDataMemoryUsed() const;
+
258 long getWordsMemoryUsed() const;
+
259 long getFeaturesMemoryUsed() const;
+
260 long getStatisticsMemoryUsed() const;
+
261 int getLastNodesSize() const; // working memory
+
262 int getLastDictionarySize() const; // working memory
+
263 int getTotalNodesSize() const;
+
264 int getTotalDictionarySize() const;
+
265 ParametersMap getLastParameters() const;
+
266 std::map<std::string, float> getStatistics(int nodeId, double & stamp, std::vector<int> * wmState=0) const;
+
267 std::map<int, std::pair<std::map<std::string, float>, double> > getAllStatistics() const;
+
268 std::map<int, std::vector<int> > getAllStatisticsWmStates() const;
+
269
+
286 void executeNoResult(const std::string & sql) const;
+
287
+
293 // Load objects
+
294 void load(VWDictionary & dictionary, bool lastStateOnly = true, bool idsOnly = false) const;
+
295 void loadLastNodes(std::list<Signature *> & signatures, bool loadWordIdsOnly = false) const; // returned signatures must be freed after usage
+
297 Signature * loadSignature(int id, bool * loadedFromTrash = 0); // returned signature must be freed after usage, call loadSignatures() instead if more than one signature should be loaded
+
298 void loadSignatures(const std::list<int> & ids, std::list<Signature *> & signatures, std::set<int> * loadedFromTrash = 0, bool loadWordIdsOnly = false); // returned signatures must be freed after usage
+
299 void loadWords(const std::set<int> & wordIds, std::list<VisualWord *> & vws); // returned words must be freed after usage
+
300
+
301 // Specific queries...
+
302 void loadNodeData(Signature & signature, bool images = true, bool scan = true, bool userData = true, bool occupancyGrid = true) const;
+
303 void loadNodeData(std::list<Signature *> & signatures, bool images = true, bool scan = true, bool userData = true, bool occupancyGrid = true) const;
+
304 void getNodeData(int signatureId, SensorData & data, bool images = true, bool scan = true, bool userData = true, bool occupancyGrid = true) const;
+
305 bool getCalibration(int signatureId, std::vector<CameraModel> & models, std::vector<StereoCameraModel> & stereoModels) const;
+
306 bool getLaserScanInfo(int signatureId, LaserScan & info) const;
+
307 bool getNodeInfo(int signatureId, Transform & pose, int & mapId, int & weight, std::string & label, double & stamp, Transform & groundTruthPose, std::vector<float> & velocity, GPS & gps, EnvSensors & sensors) const;
+
308 void getLocalFeatures(int signatureId, std::multimap<int, int> & words, std::vector<cv::KeyPoint> & keypoints, std::vector<cv::Point3f> & points, cv::Mat & descriptors) const;
+
310 void loadLinks(int signatureId, std::multimap<int, Link> & links, Link::Type type = Link::kUndef) const;
+
311 void getWeight(int signatureId, int & weight) const;
+
312 void getLastNodeIds(std::set<int> & ids) const;
+
313 void getAllNodeIds(std::set<int> & ids, bool ignoreChildren = false, bool ignoreBadSignatures = false, bool ignoreIntermediateNodes = false) const;
+
314 void getAllOdomPoses(std::map<int, Transform> & poses, bool ignoreChildren = false, bool ignoreIntermediateNodes = false) const;
+
315 void getAllLinks(std::multimap<int, Link> & links, bool ignoreNullLinks = true, bool withLandmarks = false) const;
+
316 void getLastNodeId(int & id) const;
+
317 void getLastMapId(int & mapId) const;
+
318 void getLastWordId(int & id) const;
+
319 void getInvertedIndexNi(int signatureId, int & ni) const;
+
320 void getNodesObservingLandmark(int landmarkId, std::map<int, Link> & nodes) const;
+
321 void getNodeIdByLabel(const std::string & label, int & id) const;
+
322 void getAllLabels(std::map<int, std::string> & labels) const;
+
325protected:
+
329 DBDriver(const ParametersMap & parameters = ParametersMap());
+
330
+
335 virtual bool connectDatabaseQuery(const std::string & url, bool overwritten = false, bool readOnly = false) = 0;
+
336 virtual void disconnectDatabaseQuery(bool save = true, const std::string & outputUrl = "") = 0;
+
337 virtual bool isConnectedQuery() const = 0;
+
338 virtual unsigned long getMemoryUsedQuery() const = 0; // In bytes
+
339 virtual bool getDatabaseVersionQuery(std::string & version) const = 0;
+
340 virtual long getNodesMemoryUsedQuery() const = 0;
+
341 virtual long getLinksMemoryUsedQuery() const = 0;
+
342 virtual long getImagesMemoryUsedQuery() const = 0;
+
343 virtual long getDepthImagesMemoryUsedQuery() const = 0;
+
344 virtual long getCalibrationsMemoryUsedQuery() const = 0;
+
345 virtual long getGridsMemoryUsedQuery() const = 0;
+
346 virtual long getLaserScansMemoryUsedQuery() const = 0;
+
347 virtual long getUserDataMemoryUsedQuery() const = 0;
+
348 virtual long getWordsMemoryUsedQuery() const = 0;
+
349 virtual long getFeaturesMemoryUsedQuery() const = 0;
+
350 virtual long getStatisticsMemoryUsedQuery() const = 0;
+
351 virtual int getLastNodesSizeQuery() const = 0;
+
352 virtual int getLastDictionarySizeQuery() const = 0;
+
353 virtual int getTotalNodesSizeQuery() const = 0;
+
354 virtual int getTotalDictionarySizeQuery() const = 0;
+
355 virtual ParametersMap getLastParametersQuery() const = 0;
+
356 virtual std::map<std::string, float> getStatisticsQuery(int nodeId, double & stamp, std::vector<int> * wmState) const = 0;
+
357 virtual std::map<int, std::pair<std::map<std::string, float>, double> > getAllStatisticsQuery() const = 0;
+
358 virtual std::map<int, std::vector<int> > getAllStatisticsWmStatesQuery() const = 0;
+
359
+
360 virtual void executeNoResultQuery(const std::string & sql) const = 0;
+
361
+
362 virtual void getWeightQuery(int signatureId, int & weight) const = 0;
+
363
+
364 virtual void saveQuery(const std::list<Signature *> & signatures) = 0;
+
365 virtual void saveQuery(const std::list<VisualWord *> & words) const = 0;
+
366 virtual void updateQuery(const std::list<Signature *> & signatures, bool updateTimestamp) const = 0;
+
367 virtual void updateQuery(const std::list<VisualWord *> & words, bool updateTimestamp) const = 0;
368
-
369 virtual void updateCalibrationQuery(
-
370 int nodeId,
-
371 const std::vector<CameraModel> & models,
-
372 const std::vector<StereoCameraModel> & stereoModels) const = 0;
-
373
-
374 virtual void updateDepthImageQuery(
-
375 int nodeId,
-
376 const cv::Mat & image,
-
377 const std::string & format) const = 0;
-
378
-
379 virtual void updateLaserScanQuery(
-
380 int nodeId,
-
381 const LaserScan & scan) const = 0;
-
382
-
383 virtual void addStatisticsQuery(const Statistics & statistics, bool saveWmState) const = 0;
-
384 virtual void savePreviewImageQuery(const cv::Mat & image) const = 0;
-
385 virtual cv::Mat loadPreviewImageQuery() const = 0;
-
386 virtual void saveOptimizedPosesQuery(const std::map<int, Transform> & optimizedPoses, const Transform & lastlocalizationPose) const = 0;
-
387 virtual std::map<int, Transform> loadOptimizedPosesQuery(Transform * lastlocalizationPose = 0) const = 0;
-
388 virtual void save2DMapQuery(const cv::Mat & map, float xMin, float yMin, float cellSize) const = 0;
-
389 virtual cv::Mat load2DMapQuery(float & xMin, float & yMin, float & cellSize) const = 0;
-
390 virtual void saveOptimizedMeshQuery(
-
391 const cv::Mat & cloud,
-
392 const std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > > & polygons,
-
393#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
-
394 const std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > > & texCoords,
-
395#else
-
396 const std::vector<std::vector<Eigen::Vector2f> > & texCoords,
-
397#endif
-
398 const cv::Mat & textures) const = 0;
-
399 virtual cv::Mat loadOptimizedMeshQuery(
-
400 std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > > * polygons,
-
401#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
-
402 std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > > * texCoords,
-
403#else
-
404 std::vector<std::vector<Eigen::Vector2f> > * texCoords,
-
405#endif
-
406 cv::Mat * textures) const = 0;
-
407 virtual void saveFlannIndexQuery(const std::vector<unsigned char> & indexData) const = 0;
-
408
-
409 // Load objects
-
410 virtual void loadQuery(VWDictionary & dictionary, bool lastStateOnly = true, bool idsOnly = false) const = 0;
-
411 virtual void loadLastNodesQuery(std::list<Signature *> & signatures, bool loadWordIdsOnly) const = 0;
-
412 virtual void loadSignaturesQuery(const std::list<int> & ids, std::list<Signature *> & signatures, bool loadWordIdsOnly) const = 0;
-
413 virtual void loadWordsQuery(const std::set<int> & wordIds, std::list<VisualWord *> & vws) const = 0;
-
414 virtual void loadLinksQuery(int signatureId, std::multimap<int, Link> & links, Link::Type type = Link::kUndef) const = 0;
-
415
-
416 virtual void loadNodeDataQuery(std::list<Signature *> & signatures, bool images=true, bool scan=true, bool userData=true, bool occupancyGrid=true) const = 0;
-
417 virtual bool getCalibrationQuery(int signatureId, std::vector<CameraModel> & models, std::vector<StereoCameraModel> & stereoModels) const = 0;
-
418 virtual bool getLaserScanInfoQuery(int signatureId, LaserScan & info) const = 0;
-
419 virtual bool getNodeInfoQuery(int signatureId, Transform & pose, int & mapId, int & weight, std::string & label, double & stamp, Transform & groundTruthPose, std::vector<float> & velocity, GPS & gps, EnvSensors & sensors) const = 0;
-
420 virtual void getLocalFeaturesQuery(int signatureId, std::multimap<int, int> & words, std::vector<cv::KeyPoint> & keypoints, std::vector<cv::Point3f> & points, cv::Mat & descriptors) const = 0;
-
421 virtual void getLastNodeIdsQuery(std::set<int> & ids) const = 0;
-
422 virtual void getAllNodeIdsQuery(std::set<int> & ids, bool ignoreChildren, bool ignoreBadSignatures, bool ignoreIntermediateNodes) const = 0;
-
423 virtual void getAllOdomPosesQuery(std::map<int, Transform> & poses, bool ignoreChildren, bool ignoreIntermediateNodes) const = 0;
-
424 virtual void getAllLinksQuery(std::multimap<int, Link> & links, bool ignoreNullLinks, bool withLandmarks) const = 0;
-
425 virtual void getLastIdQuery(const std::string & tableName, int & id, const std::string & fieldName="id") const = 0;
-
426 virtual void getInvertedIndexNiQuery(int signatureId, int & ni) const = 0;
-
427 virtual void getNodesObservingLandmarkQuery(int landmarkId, std::map<int, Link> & nodes) const = 0;
-
428 virtual void getNodeIdByLabelQuery(const std::string & label, int & id) const = 0;
-
429 virtual void getAllLabelsQuery(std::map<int, std::string> & labels) const = 0;
-
432private:
-
434 void beginTransaction() const;
-
436 void commit() const;
-
437
-
438 //non-abstract methods
-
439 void saveOrUpdate(const std::vector<Signature *> & signatures);
-
440 void saveOrUpdate(const std::vector<VisualWord *> & words) const;
-
441
-
442 //thread stuff
-
443 virtual void mainLoop();
-
444
-
445private:
-
446 UMutex _transactionMutex;
-
447 std::map<int, Signature *> _trashSignatures;//<id, Signature*>
-
448 std::map<int, VisualWord *> _trashVisualWords; //<id, VisualWord*>
-
449 UMutex _trashesMutex;
-
450 UMutex _dbSafeAccessMutex;
-
451 USemaphore _addSem;
-
452 double _emptyTrashesTime;
-
453 std::string _url;
-
454 std::string _targetVersion;
-
455 bool _timestampUpdate;
-
456};
+
369 virtual void addLinkQuery(const Link & link) const = 0;
+
370 virtual void updateLinkQuery(const Link & link) const = 0;
+
371
+
372 virtual void updateOccupancyGridQuery(
+
373 int nodeId,
+
374 const cv::Mat & ground,
+
375 const cv::Mat & obstacles,
+
376 const cv::Mat & empty,
+
377 float cellSize,
+
378 const cv::Point3f & viewpoint) const = 0;
+
379
+
380 virtual void updateCalibrationQuery(
+
381 int nodeId,
+
382 const std::vector<CameraModel> & models,
+
383 const std::vector<StereoCameraModel> & stereoModels) const = 0;
+
384
+
385 virtual void updateDepthImageQuery(
+
386 int nodeId,
+
387 const cv::Mat & image,
+
388 const std::string & format) const = 0;
+
389
+
390 virtual void updateLaserScanQuery(
+
391 int nodeId,
+
392 const LaserScan & scan) const = 0;
+
393
+
394 virtual void addStatisticsQuery(const Statistics & statistics, bool saveWmState) const = 0;
+
395 virtual void savePreviewImageQuery(const cv::Mat & image) const = 0;
+
396 virtual cv::Mat loadPreviewImageQuery() const = 0;
+
397 virtual void saveOptimizedPosesQuery(const std::map<int, Transform> & optimizedPoses, const Transform & lastlocalizationPose) const = 0;
+
398 virtual std::map<int, Transform> loadOptimizedPosesQuery(Transform * lastlocalizationPose = 0) const = 0;
+
399 virtual void save2DMapQuery(const cv::Mat & map, float xMin, float yMin, float cellSize) const = 0;
+
400 virtual cv::Mat load2DMapQuery(float & xMin, float & yMin, float & cellSize) const = 0;
+
401 virtual void saveOptimizedMeshQuery(
+
402 const cv::Mat & cloud,
+
403 const std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > > & polygons,
+
404#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
+
405 const std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > > & texCoords,
+
406#else
+
407 const std::vector<std::vector<Eigen::Vector2f> > & texCoords,
+
408#endif
+
409 const cv::Mat & textures) const = 0;
+
410 virtual cv::Mat loadOptimizedMeshQuery(
+
411 std::vector<std::vector<std::vector<RTABMAP_PCL_INDEX> > > * polygons,
+
412#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
+
413 std::vector<std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > > * texCoords,
+
414#else
+
415 std::vector<std::vector<Eigen::Vector2f> > * texCoords,
+
416#endif
+
417 cv::Mat * textures) const = 0;
+
418 virtual void saveFlannIndexQuery(const std::vector<unsigned char> & indexData) const = 0;
+
419
+
420 // Load objects
+
421 virtual void loadQuery(VWDictionary & dictionary, bool lastStateOnly = true, bool idsOnly = false) const = 0;
+
422 virtual void loadLastNodesQuery(std::list<Signature *> & signatures, bool loadWordIdsOnly) const = 0;
+
423 virtual void loadSignaturesQuery(const std::list<int> & ids, std::list<Signature *> & signatures, bool loadWordIdsOnly) const = 0;
+
424 virtual void loadWordsQuery(const std::set<int> & wordIds, std::list<VisualWord *> & vws) const = 0;
+
425 virtual void loadLinksQuery(int signatureId, std::multimap<int, Link> & links, Link::Type type = Link::kUndef) const = 0;
+
426
+
427 virtual void loadNodeDataQuery(std::list<Signature *> & signatures, bool images=true, bool scan=true, bool userData=true, bool occupancyGrid=true) const = 0;
+
428 virtual bool getCalibrationQuery(int signatureId, std::vector<CameraModel> & models, std::vector<StereoCameraModel> & stereoModels) const = 0;
+
429 virtual bool getLaserScanInfoQuery(int signatureId, LaserScan & info) const = 0;
+
430 virtual bool getNodeInfoQuery(int signatureId, Transform & pose, int & mapId, int & weight, std::string & label, double & stamp, Transform & groundTruthPose, std::vector<float> & velocity, GPS & gps, EnvSensors & sensors) const = 0;
+
431 virtual void getLocalFeaturesQuery(int signatureId, std::multimap<int, int> & words, std::vector<cv::KeyPoint> & keypoints, std::vector<cv::Point3f> & points, cv::Mat & descriptors) const = 0;
+
432 virtual void getLastNodeIdsQuery(std::set<int> & ids) const = 0;
+
433 virtual void getAllNodeIdsQuery(std::set<int> & ids, bool ignoreChildren, bool ignoreBadSignatures, bool ignoreIntermediateNodes) const = 0;
+
434 virtual void getAllOdomPosesQuery(std::map<int, Transform> & poses, bool ignoreChildren, bool ignoreIntermediateNodes) const = 0;
+
435 virtual void getAllLinksQuery(std::multimap<int, Link> & links, bool ignoreNullLinks, bool withLandmarks) const = 0;
+
436 virtual void getLastIdQuery(const std::string & tableName, int & id, const std::string & fieldName="id") const = 0;
+
437 virtual void getInvertedIndexNiQuery(int signatureId, int & ni) const = 0;
+
438 virtual void getNodesObservingLandmarkQuery(int landmarkId, std::map<int, Link> & nodes) const = 0;
+
439 virtual void getNodeIdByLabelQuery(const std::string & label, int & id) const = 0;
+
440 virtual void getAllLabelsQuery(std::map<int, std::string> & labels) const = 0;
+
443private:
+
445 void beginTransaction() const;
+
447 void commit() const;
+
448
+
449 //non-abstract methods
+
450 void saveOrUpdate(const std::vector<Signature *> & signatures);
+
451 void saveOrUpdate(const std::vector<VisualWord *> & words) const;
+
452
+
453 //thread stuff
+
454 virtual void mainLoop();
+
455
+
456private:
+
457 UMutex _transactionMutex;
+
458 std::map<int, Signature *> _trashSignatures;//<id, Signature*>
+
459 std::map<int, VisualWord *> _trashVisualWords; //<id, VisualWord*>
+
460 UMutex _trashesMutex;
+
461 UMutex _dbSafeAccessMutex;
+
462 USemaphore _addSem;
+
463 double _emptyTrashesTime;
+
464 std::string _url;
+
465 std::string _targetVersion;
+
466 bool _timestampUpdate;
+
467};
-
457
-
458}
-
459
-
460#endif /* DBDRIVER_H_ */
+
468
+
469}
+
470
+
471#endif /* DBDRIVER_H_ */
Backward-compatible alias header for UThread.
Definition UMutex.h:55
Definition USemaphore.h:56
diff --git a/api/latest/classrtabmap_1_1DBDriver.html b/api/latest/classrtabmap_1_1DBDriver.html index b730d443..9d1d3f93 100644 --- a/api/latest/classrtabmap_1_1DBDriver.html +++ b/api/latest/classrtabmap_1_1DBDriver.html @@ -150,9 +150,8 @@ Public Member Functions   const std::string & getTargetVersion () const   - -void asyncSave (Signature *s) - Queue a signature for deferred save; ownership is transferred.
+void asyncSave (Signature *s) + Queue a signature for deferred save; ownership is transferred.
  void asyncSave (VisualWord *vw) @@ -861,6 +860,27 @@ Additional Inherited Members

Definition at line 94 of file DBDriver.h.

+ + + +

◆ asyncSave()

+ +
+
+ + + + + + + + +
void rtabmap::DBDriver::asyncSave (Signature * s)
+
+ +

Queue a signature for deferred save; ownership is transferred.

+
Note
Only the compressed sensor buffers are written (SensorData::imageCompressed(), depthOrRightCompressed(), laserScanCompressed(), ...). Raw matrices are ignored, so a signature carrying only raw data is stored with empty payloads. Memory compresses before saving; a caller driving the driver directly should compress first with compressImage2() / compressData2(), or pass the compressed buffers to SensorData::setRGBDImage() / setLaserScan(), which treat a 1-row CV_8UC1 matrix as already compressed.
+
@@ -912,7 +932,7 @@ Additional Inherited Members
-

Definition at line 105 of file DBDriver.h.

+

Definition at line 116 of file DBDriver.h.

@@ -940,7 +960,7 @@ Additional Inherited Members
-

Definition at line 106 of file DBDriver.h.

+

Definition at line 117 of file DBDriver.h.

diff --git a/api/latest/classrtabmap_1_1DBDriverSqlite3.html b/api/latest/classrtabmap_1_1DBDriverSqlite3.html index 2a102f6b..e5fd0deb 100644 --- a/api/latest/classrtabmap_1_1DBDriverSqlite3.html +++ b/api/latest/classrtabmap_1_1DBDriverSqlite3.html @@ -172,9 +172,8 @@ void setDbInMemory (bo   const std::string & getTargetVersion () const   - -void asyncSave (Signature *s) - Queue a signature for deferred save; ownership is transferred.
+void asyncSave (Signature *s) + Queue a signature for deferred save; ownership is transferred.
  void asyncSave (VisualWord *vw) diff --git a/index.html b/index.html index f8b3cec3..6f2da922 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ - + RTAB-Map | Real-Time Appearance-Based Mapping