RTAB-Map 0.25.2
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
Rtabmap.h
1/*
2Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of the Universite de Sherbrooke nor the
13 names of its contributors may be used to endorse or promote products
14 derived from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28#ifndef RTABMAP_H_
29#define RTABMAP_H_
30
31#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
32
33#include "rtabmap/core/Parameters.h"
34#include "rtabmap/core/SensorData.h"
35#include "rtabmap/core/Statistics.h"
36#include "rtabmap/core/Link.h"
37#include "rtabmap/core/ProgressState.h"
38#include "rtabmap/core/Graph.h"
39
40#include <opencv2/core/core.hpp>
41#include <list>
42#include <stack>
43#include <set>
44
45namespace rtabmap
46{
47
48class EpipolarGeometry;
49class Memory;
50class BayesFilter;
51class Signature;
52class Optimizer;
53
193class RTABMAP_CORE_EXPORT Rtabmap
194{
195public:
202
203public:
204 Rtabmap();
205 virtual ~Rtabmap();
206
224 const SensorData & data,
225 Transform odomPose,
226 const cv::Mat & odomCovariance = cv::Mat::eye(6,6,CV_64FC1),
227 const std::vector<float> & odomVelocity = std::vector<float>(),
228 const std::map<std::string, float> & externalStats = std::map<std::string, float>());
237 const SensorData & data,
238 Transform odomPose,
239 float odomLinearVariance,
240 float odomAngularVariance,
241 const std::vector<float> & odomVelocity = std::vector<float>(),
242 const std::map<std::string, float> & externalStats = std::map<std::string, float>());
254 const cv::Mat & image,
255 int id=0, const std::map<std::string, float> & externalStats = std::map<std::string, float>());
256
271 void init(const ParametersMap & parameters, const std::string & databasePath = "", bool loadDatabaseParameters = false);
282 void init(const std::string & configFile = "", const std::string & databasePath = "", bool loadDatabaseParameters = false);
283
294 void close(bool databaseSaved = true, const std::string & ouputDatabasePath = "");
295
297 const std::string & getWorkingDir() const {return _wDir;}
299 bool isRGBDMode() const { return _rgbdSlamMode; }
301 int getLoopClosureId() const {return _loopClosureHypothesis.first;}
303 float getLoopClosureValue() const {return _loopClosureHypothesis.second;}
305 int getHighestHypothesisId() const {return _highestHypothesis.first;}
307 float getHighestHypothesisValue() const {return _highestHypothesis.second;}
309 int getLastLocationId() const;
311 std::list<int> getWM() const;
313 std::set<int> getSTM() const;
315 int getWMSize() const;
317 int getSTMSize() const;
319 std::map<int, int> getWeights() const;
321 int getTotalMemSize() const;
323 double getLastProcessTime() const {return _lastProcessTime;};
325 bool isInSTM(int locationId) const;
327 bool isIDsGenerated() const;
329 const Statistics & getStatistics() const;
331 const std::map<int, Transform> & getLocalOptimizedPoses() const {return _optimizedPoses;}
333 const std::multimap<int, Link> & getLocalConstraints() const {return _constraints;}
337 Transform getPose(int locationId) const;
349 Transform getMapCorrection() const {return _mapCorrection;}
351 const Memory * getMemory() const {return _memory;}
353 float getGoalReachedRadius() const {return _goalReachedRadius;}
355 float getLocalRadius() const {return _localRadius;}
363 const Transform & getLastLocalizationPose() const {return _lastLocalizationPose;}
364
369 float getTimeThreshold() const {return _maxTimeAllowed;}
383 void setTimeThreshold(float maxTimeAllowed);
388 int getMemoryThreshold() const {return _maxMemoryAllowed;}
399 void setMemoryThreshold(int maxMemoryAllowed);
400
448 void setInitialPose(const Transform & initialPose);
465 bool labelLocation(int id, const std::string & label);
481 bool setUserData(int id, const cv::Mat & data);
488 void generateDOTGraph(const std::string & path, int id=0, int margin=5);
504 const std::string & path,
505 bool optimized,
506 bool global,
507 int format
508 );
517 void dumpPrediction() const;
519 void dumpData() const;
524 void parseParameters(const ParametersMap & parameters);
526 const ParametersMap & getParameters() const {return _parameters;}
535 void setWorkingDirectory(std::string path);
568 void setOptimizedPoses(const std::map<int, Transform> & poses, const std::multimap<int, Link> & constraints);
576 Signature getSignatureCopy(int id, bool images, bool scan, bool userData, bool occupancyGrid, bool withWords, bool withGlobalDescriptors) const;
581 RTABMAP_DEPRECATED
582 void get3DMap(std::map<int, Signature> & signatures,
583 std::map<int, Transform> & poses,
584 std::multimap<int, Link> & constraints,
585 bool optimized,
586 bool global) const;
603 void getGraph(std::map<int, Transform> & poses,
604 std::multimap<int, Link> & constraints,
605 bool optimized,
606 bool global,
607 std::map<int, Signature> * signatures = 0,
608 bool withImages = false,
609 bool withScan = false,
610 bool withUserData = false,
611 bool withGrid = false,
612 bool withWords = true,
613 bool withGlobalDescriptors = true) const;
624 std::map<int, Transform> getNodesInRadius(const Transform & pose, float radius, int k=0, std::map<int, float> * distsSqr=0);
635 std::map<int, Transform> getNodesInRadius(int nodeId, float radius, int k=0, std::map<int, float> * distsSqr=0);
693 float clusterRadiusMax = 0.5f,
694 float clusterAngle = M_PI/6.0f,
695 int iterations = 1,
696 bool intraSession = true,
697 bool interSession = true,
698 const ProgressState * state = 0,
699 float clusterRadiusMin = 0.0f,
700 int toFromMapId = -1,
701 int fromNodeId = 0,
702 int toNodeId = 0,
703 bool keepLoopClosuresOnCancel = false,
704 int threads = 1,
705 bool dryRun = false,
706 int cacheSizeMB = 0,
707 std::list<Link> * loopClosures = 0);
732 int addLoopClosures(const std::list<Link> & loopClosures);
746 int optimizerType = 1 /*g2o*/,
747 bool rematchFeatures = true,
748 int iterations = 0,
749 float pixelVariance = 0.0f);
759 const std::map<int, Transform> & mapPoses,
760 const cv::Mat & map,
761 float xMin,
762 float yMin,
763 float cellSize,
764 int cropRadius = 1,
765 bool filterScans = false);
790 bool addLink(const Link & link);
796 cv::Mat getInformation(const cv::Mat & covariance) const;
811 void addNodesToRepublish(const std::vector<int> & ids);
834 void setDummyDictionary(bool enabled = true);
835
837 int getPathStatus() const {return _pathStatus;}
842 void clearPath(int status);
855 bool computePath(int targetNode, bool global);
864 bool computePath(const Transform & targetPose, float tolerance = -1.0f);
866 const std::vector<std::pair<int, Transform> > & getPath() const {return _path;}
868 std::vector<std::pair<int, Transform> > getPathNextPoses() const;
870 std::vector<int> getPathNextNodes() const;
874 unsigned int getPathCurrentIndex() const {return _pathCurrentIndex;}
876 unsigned int getPathCurrentGoalIndex() const {return _pathGoalIndex;}
878 const Transform & getPathTransformToGoal() const {return _pathTransformToGoal;}
879
904 std::map<int, Transform> getForwardWMPoses(int fromId, int maxNearestNeighbors, float radius, int maxDiffID) const;
940 std::map<int, std::map<int, Transform> > getPaths(const std::map<int, Transform> & poses, const Transform & target, int maxGraphDepth = 0) const;
971 void adjustLikelihood(std::map<int, float> & likelihood) const;
972
973private:
974 // Add loop closures to memory and update the local optimized graph
975 int addLoopClosuresToMap(const std::list<Link> & loopClosures, const std::map<int, Transform> & guessPoses);
976 void setInitialGuessFromPreviousMaps(
977 int fromId,
978 const std::map<int, Transform> & guessPoses,
979 const std::multimap<int, Link> & links,
980 std::map<int, Transform> & poses) const;
981 void updatePreviousMapsOptimizedPoses(const std::multimap<int, Link> * newLinks = 0);
982 void optimizeCurrentMap(int id,
983 bool lookInDatabase,
984 std::map<int, Transform> & optimizedPoses,
985 cv::Mat & covariance,
986 std::multimap<int, Link> * constraints = 0,
987 double * error = 0,
988 int * iterationsDone = 0) const;
989 std::map<int, Transform> optimizeGraph(
990 int fromId,
991 const std::set<int> & ids,
992 const std::map<int, Transform> & guessPoses,
993 bool lookInDatabase,
994 cv::Mat & covariance,
995 std::multimap<int, Link> * constraints = 0,
996 double * error = 0,
997 int * iterationsDone = 0) const;
998 Link findLoopClosureToRepair(
999 const graph::MaxGraphErrors & maxGraphErrors,
1000 const std::map<int, Transform> & poses,
1001 const std::multimap<int, Link> & constraints,
1002 const std::set<std::pair<int, int> > & newLinks) const;
1003 std::list<std::pair<int, int> > repairGraph(
1004 const Link & linkToRemove,
1005 graph::MaxGraphErrors & maxGraphErrors,
1006 std::map<int, Transform> & poses,
1007 std::multimap<int, Link> & constraints,
1008 double & optimizationError,
1009 int & optimizationIterations,
1010 cv::Mat & optimizationCovariance,
1011 const std::set<std::pair<int, int> > & newLinks);
1012 bool hasLocalizationLinksInOdomCache() const;
1013 bool isLandmarkNormalValid(const Signature * signature, int landmarkId, const Link & landmarkLink, bool localized, float * error = 0) const;
1014 void updateGoalIndex();
1015 bool computePath(int targetNode, std::map<int, Transform> nodes, const std::multimap<int, rtabmap::Link> & constraints);
1016
1017 void createGlobalScanMap();
1018
1019 void setupLogFiles(bool overwrite = false);
1020 void flushStatisticLogs();
1021
1022private:
1023 // Modifiable parameters
1024 bool _publishStats;
1025 bool _publishLastSignatureData;
1026 bool _publishPdf;
1027 bool _publishLikelihood;
1028 bool _publishRAMUsage;
1029 bool _computeRMSE;
1030 bool _saveWMState;
1031 float _maxTimeAllowed;
1032 unsigned int _maxMemoryAllowed;
1033 float _loopThr;
1034 float _loopRatio;
1035 float _aggressiveLoopThr;
1036 int _virtualPlaceLikelihoodRatio;
1037 float _maxLoopClosureDistance;
1038 bool _verifyLoopClosureHypothesis;
1039 unsigned int _maxRetrieved;
1040 unsigned int _maxLocalRetrieved;
1041 unsigned int _maxRepublished;
1042 bool _rawDataKept;
1043 bool _statisticLogsBufferedInRAM;
1044 bool _statisticLogged;
1045 bool _statisticLoggedHeaders;
1046 bool _rgbdSlamMode;
1047 float _rgbdLinearUpdate;
1048 float _rgbdAngularUpdate;
1049 float _rgbdLinearSpeedUpdate;
1050 float _rgbdAngularSpeedUpdate;
1051 float _newMapOdomChangeDistance;
1052 bool _neighborLinkRefining;
1053 bool _proximityByTime;
1054 bool _proximityBySpace;
1055 bool _scanMatchingIdsSavedInLinks;
1056 bool _loopClosureIdentityGuess;
1057 float _localRadius;
1058 float _localImmunizationRatio;
1059 int _proximityMaxGraphDepth;
1060 int _proximityMaxPaths;
1061 int _proximityMaxNeighbors;
1062 float _proximityFilteringRadius;
1063 bool _proximityRawPosesUsed;
1064 float _proximityAngle;
1065 bool _proximityOdomGuess;
1066 double _proximityMergedScanCovFactor;
1067 std::string _databasePath;
1068 bool _optimizeFromGraphEnd;
1069 float _optimizationMaxError;
1070 float _optimizationMaxErrorRepairRadius;
1071 bool _startNewMapOnLoopClosure;
1072 bool _startNewMapOnGoodSignature;
1073 float _goalReachedRadius;
1074 bool _goalsSavedInUserData;
1075 int _pathStuckIterations;
1076 float _pathLinearVelocity;
1077 float _pathAngularVelocity;
1078 bool _forceOdom3doF;
1079 bool _restartAtOrigin;
1080 bool _loopCovLimited;
1081 bool _loopGPS;
1082 int _maxOdomCacheSize;
1083 float _landmarkMaxNormalError;
1084 bool _localizationSmoothing;
1085 double _localizationPriorInf;
1086 bool _localizationSecondTryWithoutProximityLinks;
1087 bool _createGlobalScanMap;
1088 float _markerPriorsLinearVariance;
1089 float _markerPriorsAngularVariance;
1090
1091 std::pair<int, float> _loopClosureHypothesis;
1092 std::pair<int, float> _highestHypothesis;
1093 double _lastProcessTime;
1094 bool _someNodesHaveBeenTransferred;
1095 float _distanceTravelled;
1096 float _distanceTravelledSinceLastLocalization;
1097 bool _optimizeFromGraphEndChanged;
1098
1099 // Abstract classes containing all loop closure
1100 // strategies for a type of signature or configuration.
1101 EpipolarGeometry * _epipolarGeometry;
1102 BayesFilter * _bayesFilter;
1103 Optimizer * _graphOptimizer;
1104 ParametersMap _parameters;
1105
1106 Memory * _memory;
1107
1108 FILE* _foutFloat;
1109 FILE* _foutInt;
1110 std::list<std::string> _bufferedLogsF;
1111 std::list<std::string> _bufferedLogsI;
1112
1113 Statistics statistics_;
1114
1115 std::string _wDir;
1116
1117 std::map<int, Transform> _optimizedPoses;
1118 std::multimap<int, Link> _constraints;
1119 std::list<std::map<int, Transform> > _previousMapsOptimizedPoses;
1120 Transform _mapCorrection;
1121 Transform _mapCorrectionBackup;
1122 Transform _lastLocalizationPose;
1123 int _lastLocalizationNodeId;
1124 bool _localizationApplied;
1125 cv::Mat _localizationCovariance;
1126 std::map<int, std::pair<cv::Point3d, Transform> > _gpsGeocentricCache;
1127 bool _currentSessionHasGPS;
1128 LaserScan _globalScanMap;
1129 std::map<int, Transform> _globalScanMapPoses;
1130 std::map<int, Transform> _odomCachePoses;
1131 std::multimap<int, Link> _odomCacheConstraints;
1132 std::map<int, Transform> _markerPriors;
1133 std::pair<int, int> _lastRejectedLoopClosureIds;
1134
1135 std::set<int> _nodesToRepublish;
1136
1137 // Planning stuff
1138 int _pathStatus;
1139 std::vector<std::pair<int,Transform> > _path;
1140 std::set<unsigned int> _pathUnreachableNodes;
1141 unsigned int _pathCurrentIndex;
1142 unsigned int _pathGoalIndex;
1143 Transform _pathTransformToGoal;
1144 int _pathStuckCount;
1145 float _pathStuckDistance;
1146
1147 bool _dummyDictionary;
1148};
1149
1150} // namespace rtabmap
1151#endif /* RTABMAP_H_ */
Recursive Bayesian filter for loop-closure hypothesis estimation in RTAB-Map.
Definition BayesFilter.h:82
Represents 2D or 3D laser scan data with support for multiple point data formats.
Definition LaserScan.h:46
Three-tiered memory management (STM, WM, LTM) for RTAB-Map.
Definition Memory.h:102
Abstract base for pose-graph and bundle-adjustment optimizers.
Definition Optimizer.h:91
Top-level RTAB-Map SLAM pipeline (mapping, localization and loop closure).
Definition Rtabmap.h:194
bool setUserData(int id, const cv::Mat &data)
Attaches user data to signature id, compressing it on the fly if needed.
const Memory * getMemory() const
Definition Rtabmap.h:351
void addNodesToRepublish(const std::vector< int > &ids)
Marks node ids whose data should be re-emitted on the next process().
bool computePath(const Transform &targetPose, float tolerance=-1.0f)
Plans a path in the current optimized map toward a metric goal pose.
std::map< int, Transform > getNodesInRadius(const Transform &pose, float radius, int k=0, std::map< int, float > *distsSqr=0)
Returns optimized poses within a metric radius of pose.
int getWMSize() const
void setWorkingDirectory(std::string path)
Sets the working directory used for dumps, logs and temporary files.
void init(const std::string &configFile="", const std::string &databasePath="", bool loadDatabaseParameters=false)
Initializes Rtabmap from a configuration file and a database.
int getLoopClosureId() const
Definition Rtabmap.h:301
const Transform & getLastLocalizationPose() const
Definition Rtabmap.h:363
std::map< int, int > getWeights() const
bool process(const cv::Mat &image, int id=0, const std::map< std::string, float > &externalStats=std::map< std::string, float >())
Appearance-only convenience overload (loop-closure detection without odometry).
void dumpData() const
Dumps the Memory state (signatures, words, dictionary) to the working directory.
void generateDOTGraph(const std::string &path, int id=0, int margin=5)
Writes a Graphviz DOT file of the pose graph.
void getGraph(std::map< int, Transform > &poses, std::multimap< int, Link > &constraints, bool optimized, bool global, std::map< int, Signature > *signatures=0, bool withImages=false, bool withScan=false, bool withUserData=false, bool withGrid=false, bool withWords=true, bool withGlobalDescriptors=true) const
Extracts a full snapshot of the current pose graph.
std::vector< int > getPathNextNodes() const
int getSTMSize() const
int triggerNewMap()
Starts a new map session (next process() will create a fresh map id).
const std::multimap< int, Link > & getLocalConstraints() const
Definition Rtabmap.h:333
void setDummyDictionary(bool enabled=true)
Loads the visual word dictionary as ids only, without descriptors.
float getHighestHypothesisValue() const
Definition Rtabmap.h:307
void clearPath(int status)
Clears the current path and sets its terminal status.
bool isInSTM(int locationId) const
void parseParameters(const ParametersMap &parameters)
Re-parses parameters and propagates them to owned sub-objects (Memory, BayesFilter,...
const Statistics & getStatistics() const
void close(bool databaseSaved=true, const std::string &ouputDatabasePath="")
Closes Rtabmap and releases the underlying Memory.
bool isIDsGenerated() const
int getPathCurrentGoalId() const
const std::vector< std::pair< int, Transform > > & getPath() const
Definition Rtabmap.h:866
float getGoalReachedRadius() const
Definition Rtabmap.h:353
const std::string & getWorkingDir() const
Definition Rtabmap.h:297
int refineLinks()
Re-runs registration on every link of the current graph and updates the ones that converge.
void setMemoryThreshold(int maxMemoryAllowed)
Sets the maximum number of signatures kept in WM (0 = unbounded).
bool isRGBDMode() const
Definition Rtabmap.h:299
float getLocalRadius() const
Definition Rtabmap.h:355
void init(const ParametersMap &parameters, const std::string &databasePath="", bool loadDatabaseParameters=false)
Initializes Rtabmap with parameters and a database.
Signature getSignatureCopy(int id, bool images, bool scan, bool userData, bool occupancyGrid, bool withWords, bool withGlobalDescriptors) const
Returns a copy of signature id with optional payloads attached.
unsigned int getPathCurrentGoalIndex() const
Definition Rtabmap.h:876
void setOptimizedPoses(const std::map< int, Transform > &poses, const std::multimap< int, Link > &constraints)
Replaces the current optimized poses and constraints with externally provided ones.
Transform getMapCorrection() const
Definition Rtabmap.h:349
std::set< int > getSTM() const
void setTimeThreshold(float maxTimeAllowed)
Sets the per-iteration time budget (ms).
std::map< int, Transform > getForwardWMPoses(int fromId, int maxNearestNeighbors, float radius, int maxDiffID) const
Returns optimized poses of WM nodes located in front of fromId.
int getMemoryThreshold() const
Definition Rtabmap.h:388
double getLastProcessTime() const
Definition Rtabmap.h:323
bool process(const SensorData &data, Transform odomPose, float odomLinearVariance, float odomAngularVariance, const std::vector< float > &odomVelocity=std::vector< float >(), const std::map< std::string, float > &externalStats=std::map< std::string, float >())
Convenience overload: builds a diagonal covariance from scalar variances.
int getLastLocationId() const
unsigned int getPathCurrentIndex() const
Definition Rtabmap.h:874
void setInitialPose(const Transform &initialPose)
Sets the localization prior pose used to seed the next process() call (localization mode only).
const ParametersMap & getParameters() const
Definition Rtabmap.h:526
std::map< int, Transform > getNodesInRadius(int nodeId, float radius, int k=0, std::map< int, float > *distsSqr=0)
Returns optimized poses within a metric radius of node nodeId.
void adjustLikelihood(std::map< int, float > &likelihood) const
Applies the standard RTAB-Map likelihood adjustment.
void rejectLastLoopClosure()
Removes the loop-closure link added at the last process() iteration.
bool globalBundleAdjustment(int optimizerType=1, bool rematchFeatures=true, int iterations=0, float pixelVariance=0.0f)
Runs a global bundle adjustment over the optimized graph.
int getHighestHypothesisId() const
Definition Rtabmap.h:305
int getTotalMemSize() const
int detectMoreLoopClosures(float clusterRadiusMax=0.5f, float clusterAngle=M_PI/6.0f, int iterations=1, bool intraSession=true, bool interSession=true, const ProgressState *state=0, float clusterRadiusMin=0.0f, int toFromMapId=-1, int fromNodeId=0, int toNodeId=0, bool keepLoopClosuresOnCancel=false, int threads=1, bool dryRun=false, int cacheSizeMB=0, std::list< Link > *loopClosures=0)
Post-processing: searches for additional loop closures over the existing graph.
bool computePath(int targetNode, bool global)
Plans a path from the current location to node targetNode.
Transform getPose(int locationId) const
int cleanupLocalGrids(const std::map< int, Transform > &mapPoses, const cv::Mat &map, float xMin, float yMin, float cellSize, int cropRadius=1, bool filterScans=false)
Filters spurious obstacles from every node's local grid using a reference 2D map.
void dumpPrediction() const
Dumps the Bayes-filter prediction matrix to a file in the working directory.
std::map< int, std::map< int, Transform > > getPaths(const std::map< int, Transform > &poses, const Transform &target, int maxGraphDepth=0) const
Segments a set of optimized poses into paths connected by neighbor links.
bool process(const SensorData &data, Transform odomPose, const cv::Mat &odomCovariance=cv::Mat::eye(6, 6, CV_64FC1), const std::vector< float > &odomVelocity=std::vector< float >(), const std::map< std::string, float > &externalStats=std::map< std::string, float >())
Main RTAB-Map iteration: ingests one sensor frame and updates the map.
int addLoopClosures(const std::list< Link > &loopClosures)
Adds loop closures to the map, e.g., the ones detected by detectMoreLoopClosures() with dryRun=true.
float getLoopClosureValue() const
Definition Rtabmap.h:303
std::list< int > getWM() const
RTABMAP_DEPRECATED void get3DMap(std::map< int, Signature > &signatures, std::map< int, Transform > &poses, std::multimap< int, Link > &constraints, bool optimized, bool global) const
Deprecated: use getGraph() instead with withImages=true, withScan=true, withUserData=true and withGri...
const std::map< int, Transform > & getLocalOptimizedPoses() const
Definition Rtabmap.h:331
const Transform & getPathTransformToGoal() const
Definition Rtabmap.h:878
void deleteLastLocation()
Deletes the most recent (non-intermediate) location from the map.
cv::Mat getInformation(const cv::Mat &covariance) const
Converts an odometry covariance into an information matrix, clipping by Memory::getOdomMaxInf() when ...
bool addLink(const Link &link)
Adds an external link to the map.
void exportPoses(const std::string &path, bool optimized, bool global, int format)
Exports the current pose graph to a text file.
void resetMemory()
Clears all in-memory state and resets the database.
bool labelLocation(int id, const std::string &label)
Assigns or clears a label on signature id.
float getTimeThreshold() const
Definition Rtabmap.h:369
std::vector< std::pair< int, Transform > > getPathNextPoses() const
VhStrategy
Loop-closure verification strategy.
Definition Rtabmap.h:197
@ kVhEpipolar
Epipolar geometry verification (mostly historical, RGB-only mode).
Definition Rtabmap.h:199
@ kVhNone
No verification: the highest hypothesis above threshold is accepted.
Definition Rtabmap.h:198
int getPathStatus() const
Definition Rtabmap.h:837
Container class for all sensor data captured at a specific time.
Definition SensorData.h:97
Represents a node in RTAB-Map's pose graph.
Definition Signature.h:84
Collects and manages runtime statistics for RTAB-Map.
Definition Statistics.h:108
Represents a 3D rigid body transformation (rotation + translation).
Definition Transform.h:53
std::map< std::string, std::string > ParametersMap
Parameter keys mapped to their values, as used by every configurable class (see Parameters).
Definition Parameters.h:44
Largest pose-graph constraint violations after optimization.
Definition Graph.h:232