Go to the documentation of this file.
31 #include "rtabmap/core/rtabmap_core_export.h"
39 #include <opencv2/core/core.hpp>
47 class EpipolarGeometry;
52 class PythonInterface;
74 const cv::Mat & odomCovariance = cv::Mat::eye(6,6,CV_64FC1),
75 const std::vector<float> & odomVelocity = std::vector<float>(),
76 const std::map<std::string, float> & externalStats = std::map<std::string, float>());
81 float odomLinearVariance,
82 float odomAngularVariance,
83 const std::vector<float> & odomVelocity = std::vector<float>(),
84 const std::map<std::string, float> & externalStats = std::map<std::string, float>());
87 const cv::Mat & image,
88 int id=0,
const std::map<std::string, float> & externalStats = std::map<std::string, float>());
102 void init(
const ParametersMap & parameters,
const std::string & databasePath =
"",
bool loadDatabaseParameters =
false);
115 void init(
const std::string & configFile =
"",
const std::string & databasePath =
"",
bool loadDatabaseParameters =
false);
124 void close(
bool databaseSaved =
true,
const std::string & ouputDatabasePath =
"");
132 int getLastLocationId()
const;
133 std::list<int> getWM()
const;
134 std::set<int> getSTM()
const;
135 int getWMSize()
const;
136 int getSTMSize()
const;
137 std::map<int, int> getWeights()
const;
138 int getTotalMemSize()
const;
140 bool isInSTM(
int locationId)
const;
141 bool isIDsGenerated()
const;
153 void setTimeThreshold(
float maxTimeAllowed);
155 void setMemoryThreshold(
int maxMemoryAllowed);
157 void setInitialPose(
const Transform & initialPose);
159 bool labelLocation(
int id,
const std::string & label);
167 bool setUserData(
int id,
const cv::Mat & data);
168 void generateDOTGraph(
const std::string & path,
int id=0,
int margin=5);
170 const std::string & path,
176 void dumpPrediction()
const;
177 void dumpData()
const;
180 void setWorkingDirectory(std::string path);
181 void rejectLastLoopClosure();
182 void deleteLastLocation();
183 void setOptimizedPoses(
const std::map<int, Transform> & poses,
const std::multimap<int, Link> & constraints);
184 Signature getSignatureCopy(
int id,
bool images,
bool scan,
bool userData,
bool occupancyGrid,
bool withWords,
bool withGlobalDescriptors)
const;
187 void get3DMap(std::map<int, Signature> & signatures,
188 std::map<int, Transform> & poses,
189 std::multimap<int, Link> & constraints,
192 void getGraph(std::map<int, Transform> & poses,
193 std::multimap<int, Link> & constraints,
196 std::map<int, Signature> * signatures = 0,
197 bool withImages =
false,
198 bool withScan =
false,
199 bool withUserData =
false,
200 bool withGrid =
false,
201 bool withWords =
true,
202 bool withGlobalDescriptors =
true)
const;
203 std::map<int, Transform>
getNodesInRadius(
const Transform & pose,
float radius,
int k=0, std::map<int, float> * distsSqr=0);
204 std::map<int, Transform>
getNodesInRadius(
int nodeId,
float radius,
int k=0, std::map<int, float> * distsSqr=0);
205 int detectMoreLoopClosures(
206 float clusterRadiusMax = 0.5f,
207 float clusterAngle =
M_PI/6.0f,
209 bool intraSession =
true,
210 bool interSession =
true,
212 float clusterRadiusMin = 0.0f);
213 bool globalBundleAdjustment(
214 int optimizerType = 1 ,
215 bool rematchFeatures =
true,
217 float pixelVariance = 0.0f);
218 int cleanupLocalGrids(
219 const std::map<int, Transform> & mapPoses,
225 bool filterScans =
false);
227 bool addLink(
const Link & link);
228 cv::Mat getInformation(
const cv::Mat & covariance)
const;
229 void addNodesToRepublish(
const std::vector<int> & ids);
232 void clearPath(
int status);
235 const std::vector<std::pair<int, Transform> > &
getPath()
const {
return _path;}
236 std::vector<std::pair<int, Transform> > getPathNextPoses()
const;
237 std::vector<int> getPathNextNodes()
const;
238 int getPathCurrentGoalId()
const;
243 std::map<int, Transform> getForwardWMPoses(
int fromId,
int maxNearestNeighbors,
float radius,
int maxDiffID)
const;
244 std::map<int, std::map<int, Transform> >
getPaths(
const std::map<int, Transform> & poses,
const Transform & target,
int maxGraphDepth = 0)
const;
245 void adjustLikelihood(std::map<int, float> & likelihood)
const;
246 std::pair<int, float> selectHypothesis(
const std::map<int, float> & posterior,
247 const std::map<int, float> & likelihood)
const;
250 void optimizeCurrentMap(
int id,
252 std::map<int, Transform> & optimizedPoses,
253 cv::Mat & covariance,
254 std::multimap<int, Link> * constraints = 0,
256 int * iterationsDone = 0)
const;
257 std::map<int, Transform> optimizeGraph(
259 const std::set<int> & ids,
260 const std::map<int, Transform> & guessPoses,
262 cv::Mat & covariance,
263 std::multimap<int, Link> * constraints = 0,
265 int * iterationsDone = 0)
const;
266 void updateGoalIndex();
267 bool computePath(
int targetNode, std::map<int, Transform> nodes,
const std::multimap<int, rtabmap::Link> & constraints);
269 void createGlobalScanMap();
271 void setupLogFiles(
bool overwrite =
false);
272 void flushStatisticLogs();
385 std::vector<std::pair<int,Transform> >
_path;
393 #ifdef RTABMAP_PYTHON
bool _someNodesHaveBeenTransferred
ParametersMap _parameters
Transform _mapCorrectionBackup
BayesFilter * _bayesFilter
float _distanceTravelledSinceLastLocalization
const Memory * getMemory() const
float getHighestHypothesisValue() const
std::map< int, std::pair< cv::Point3d, Transform > > _gpsGeocentricCache
unsigned int _pathCurrentIndex
bool _startNewMapOnLoopClosure
const std::map< int, Transform > & getLocalOptimizedPoses() const
bool _statisticLogsBufferedInRAM
RTABMAP_DEPRECATED(typedef SensorData Image, "rtabmap::Image class is renamed to rtabmap::SensorData, use the last one instead.")
std::map< int, Transform > _odomCachePoses
std::pair< int, float > _loopClosureHypothesis
bool _verifyLoopClosureHypothesis
float getGoalReachedRadius() const
std::list< std::string > _bufferedLogsI
float _proximityFilteringRadius
double _localizationPriorInf
unsigned int getPathCurrentIndex() const
std::multimap< int, Link > _odomCacheConstraints
RecoveryProgressState state
float _optimizationMaxError
unsigned int _maxRepublished
const Transform & getLastLocalizationPose() const
int getLoopClosureId() const
bool _proximityRawPosesUsed
double _proximityMergedScanCovFactor
float getLoopClosureValue() const
std::map< std::string, std::string > ParametersMap
std::map< int, Transform > _globalScanMapPoses
const Transform & getPathTransformToGoal() const
bool _neighborLinkRefining
double getLastProcessTime() const
std::set< unsigned int > _pathUnreachableNodes
std::multimap< int, Link > _constraints
std::pair< int, float > _highestHypothesis
float _localImmunizationRatio
int _lastLocalizationNodeId
EpipolarGeometry * _epipolarGeometry
bool _goalsSavedInUserData
float getLocalRadius() const
bool _startNewMapOnGoodSignature
const std::string & getWorkingDir() const
const ParametersMap & getParameters() const
bool _loopClosureIdentityGuess
cv::Mat _localizationCovariance
unsigned int _maxMemoryAllowed
bool _publishLastSignatureData
float getTimeThreshold() const
std::map< int, Transform > _optimizedPoses
float _maxLoopClosureDistance
unsigned int _maxRetrieved
float _pathLinearVelocity
Optimizer * _graphOptimizer
bool _createGlobalScanMap
Transform _lastLocalizationPose
int _virtualPlaceLikelihoodRatio
std::list< std::map< int, Transform > > RTABMAP_CORE_EXPORT getPaths(std::map< int, Transform > poses, const std::multimap< int, Link > &links)
unsigned int _pathGoalIndex
std::set< int > _nodesToRepublish
float _rgbdAngularSpeedUpdate
bool _currentSessionHasGPS
bool _localizationSmoothing
unsigned int getPathCurrentGoalIndex() const
std::map< int, Transform > _markerPriors
std::list< std::string > _bufferedLogsF
int getPathStatus() const
Pose3_ getPose(const Expression< PinholeCamera< CALIBRATION > > &cam)
float _pathAngularVelocity
unsigned int _maxLocalRetrieved
const std::vector< std::pair< int, Transform > > & getPath() const
bool _optimizeFromGraphEnd
Transform _pathTransformToGoal
float _rgbdLinearSpeedUpdate
bool _statisticLoggedHeaders
std::vector< std::pair< int, Transform > > _path
float _markerPriorsAngularVariance
int _proximityMaxNeighbors
int getHighestHypothesisId() const
float _newMapOdomChangeDistance
bool _optimizeFromGraphEndChanged
std::string _databasePath
Transform getMapCorrection() const
int _proximityMaxGraphDepth
const std::multimap< int, Link > & getLocalConstraints() const
float _markerPriorsLinearVariance
bool _scanMatchingIdsSavedInLinks
std::list< std::pair< int, Transform > > RTABMAP_CORE_EXPORT computePath(const std::map< int, rtabmap::Transform > &poses, const std::multimap< int, int > &links, int from, int to, bool updateNewCosts=false)
int getMemoryThreshold() const
RTABMAP_DEPRECATED std::map< int, float > RTABMAP_CORE_EXPORT getNodesInRadius(int nodeId, const std::map< int, Transform > &nodes, float radius)
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:15