mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Removed DisableReactivation parameter (indirectly included by the RetrievalThr when = to 1)
Some default parameters' values modified for robot learning git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@316 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -123,16 +123,15 @@ class RTABMAP_EXP Parameters
|
||||
// Rtabmap parameters
|
||||
RTABMAP_PARAM(Rtabmap, VhStrategy, int, 0); // None 0, Similarity 1, Epipolar 2
|
||||
RTABMAP_PARAM(Rtabmap, PublishStats, bool, true); // Publishing statistics
|
||||
RTABMAP_PARAM(Rtabmap, ReactivationThr, float, 0.0); // Reactivation threshold
|
||||
RTABMAP_PARAM(Rtabmap, RetrievalThr, float, 0.0); // Reactivation threshold
|
||||
RTABMAP_PARAM(Rtabmap, TimeThr, float, 0.7); // Maximum time allowed for the detector (s) (0 means infinity)
|
||||
RTABMAP_PARAM(Rtabmap, DisableReactivation, bool, false); // Memory reactivation when a loop closure occurs : 0=enable, 1=disable
|
||||
RTABMAP_PARAM(Rtabmap, SMStateBufferSize, int, 1); // Data buffer size (0 min inf)
|
||||
RTABMAP_PARAM(Rtabmap, MinMemorySizeForLoopDetection, unsigned int, 15); //Minimum size of the memory to create loop closure hypotheses
|
||||
RTABMAP_PARAM(Rtabmap, MinMemorySizeForLoopDetection, unsigned int, 25); //Minimum size of the memory to create loop closure hypotheses
|
||||
RTABMAP_PARAM_STR(Rtabmap, WorkingDirectory, Parameters::getDefaultWorkingDirectory()); // Working directory
|
||||
RTABMAP_PARAM(Rtabmap, LocalGraphCleaned, bool, false); // Clean the neighborhood of the retrieved id
|
||||
RTABMAP_PARAM(Rtabmap, MaxRetrieved, unsigned int, 2); // Maximum locations retrieved at the same time from LTM
|
||||
RTABMAP_PARAM(Rtabmap, ActionsByTime, bool, false); // Select next actions using directly the more recent neighbor of the current node, otherwise, highest hypothesis is used
|
||||
RTABMAP_PARAM(Rtabmap, ActionsSentRejectHyp, bool, false); // Actions sent also on rejected hypotheses (on decreasing hypotheses)
|
||||
RTABMAP_PARAM(Rtabmap, ActionsByTime, bool, true); // Select next actions using directly the more recent neighbor of the current node, otherwise, highest hypothesis is used
|
||||
RTABMAP_PARAM(Rtabmap, ActionsSentRejectHyp, bool, true); // Actions sent also on rejected hypotheses (on decreasing hypotheses)
|
||||
RTABMAP_PARAM(Rtabmap, ConfidenceThr, float, 0.0); // Actions are not sent when the loop closure hypothesis is under the confidence threshold
|
||||
|
||||
// Hypotheses selection
|
||||
@@ -154,7 +153,7 @@ class RTABMAP_EXP Parameters
|
||||
RTABMAP_PARAM(Kp, NNStrategy, int, 2); // Naive 0, kdTree 1, kdForest 2
|
||||
RTABMAP_PARAM(Kp, IncrementalDictionary, bool, true);
|
||||
RTABMAP_PARAM(Kp, WordsPerImage, int, 400);
|
||||
RTABMAP_PARAM(Kp, BadSignRatio, float, 0.05); //Bad signature ratio (less than Ratio x AverageWordsPerImage = bad)
|
||||
RTABMAP_PARAM(Kp, BadSignRatio, float, 0.2); //Bad signature ratio (less than Ratio x AverageWordsPerImage = bad)
|
||||
RTABMAP_PARAM(Kp, MinDistUsed, bool, false); // The nearest neighbor must have a distance < minDist
|
||||
RTABMAP_PARAM(Kp, MinDist, float, 0.05); // Matching a descriptor with a word (euclidean distance ^ 2)
|
||||
RTABMAP_PARAM(Kp, NndrUsed, bool, true); // If NNDR ratio is used
|
||||
@@ -179,7 +178,7 @@ class RTABMAP_EXP Parameters
|
||||
RTABMAP_PARAM(DbSqlite3, JournalMode, int, 0); // 0=DELETE, 1=TRUNCATE, 2=PERSIST, 3=MEMORY, 4=OFF (see sqlite3 doc : "PRAGMA journal_mode")
|
||||
|
||||
RTABMAP_PARAM(SURF, Extended, bool, false); // true=128, false=64
|
||||
RTABMAP_PARAM(SURF, HessianThreshold, float, 100.0);
|
||||
RTABMAP_PARAM(SURF, HessianThreshold, float, 150.0);
|
||||
RTABMAP_PARAM(SURF, Octaves, int, 4);
|
||||
RTABMAP_PARAM(SURF, OctaveLayers, int, 2);
|
||||
RTABMAP_PARAM(SURF, GpuVersion, bool, false);
|
||||
|
||||
@@ -92,7 +92,6 @@ public:
|
||||
int getTotalMemSize() const;
|
||||
const std::string & getGraphFileName() const {return _graphFileName;}
|
||||
|
||||
void setReactivationDisabled(bool reactivationDisabled);
|
||||
void setMaxTimeAllowed(float maxTimeAllowed); // in sec
|
||||
void setDataBufferSize(int size);
|
||||
void setWorkingDirectory(std::string path);
|
||||
@@ -124,13 +123,12 @@ private:
|
||||
private:
|
||||
// Modifiable parameters
|
||||
bool _publishStats;
|
||||
bool _reactivationDisabled;
|
||||
float _maxTimeAllowed; // in sec
|
||||
int _smStateBufferMaxSize;
|
||||
unsigned int _minMemorySizeForLoopDetection;
|
||||
float _loopThr;
|
||||
float _loopRatio;
|
||||
float _remThr;
|
||||
float _retrievalThr;
|
||||
bool _localGraphCleaned;
|
||||
unsigned int _maxRetrieved;
|
||||
bool _actionsByTime;
|
||||
|
||||
@@ -54,13 +54,12 @@ const char * Rtabmap::kDefaultIniFileName = "rtabmap.ini";
|
||||
|
||||
Rtabmap::Rtabmap() :
|
||||
_publishStats(Parameters::defaultRtabmapPublishStats()),
|
||||
_reactivationDisabled(Parameters::defaultRtabmapDisableReactivation()),
|
||||
_maxTimeAllowed(Parameters::defaultRtabmapTimeThr()), // 1 sec
|
||||
_smStateBufferMaxSize(Parameters::defaultRtabmapSMStateBufferSize()),
|
||||
_minMemorySizeForLoopDetection(Parameters::defaultRtabmapMinMemorySizeForLoopDetection()),
|
||||
_loopThr(Parameters::defaultRtabmapLoopThr()),
|
||||
_loopRatio(Parameters::defaultRtabmapLoopRatio()),
|
||||
_remThr(Parameters::defaultRtabmapReactivationThr()),
|
||||
_retrievalThr(Parameters::defaultRtabmapRetrievalThr()),
|
||||
_localGraphCleaned(Parameters::defaultRtabmapLocalGraphCleaned()),
|
||||
_maxRetrieved(Parameters::defaultRtabmapMaxRetrieved()),
|
||||
_actionsByTime(Parameters::defaultRtabmapActionsByTime()),
|
||||
@@ -236,10 +235,6 @@ void Rtabmap::parseParameters(const ParametersMap & parameters)
|
||||
{
|
||||
_publishStats = uStr2Bool(iter->second.c_str());
|
||||
}
|
||||
if((iter=parameters.find(Parameters::kRtabmapDisableReactivation())) != parameters.end())
|
||||
{
|
||||
_reactivationDisabled = uStr2Bool(iter->second.c_str());
|
||||
}
|
||||
if((iter=parameters.find(Parameters::kRtabmapTimeThr())) != parameters.end())
|
||||
{
|
||||
_maxTimeAllowed = std::atof(iter->second.c_str());
|
||||
@@ -252,9 +247,9 @@ void Rtabmap::parseParameters(const ParametersMap & parameters)
|
||||
{
|
||||
_loopRatio = std::atof(iter->second.c_str());
|
||||
}
|
||||
if((iter=parameters.find(Parameters::kRtabmapReactivationThr())) != parameters.end())
|
||||
if((iter=parameters.find(Parameters::kRtabmapRetrievalThr())) != parameters.end())
|
||||
{
|
||||
_remThr = std::atof(iter->second.c_str());
|
||||
_retrievalThr = std::atof(iter->second.c_str());
|
||||
}
|
||||
if((iter=parameters.find(Parameters::kRtabmapSMStateBufferSize())) != parameters.end())
|
||||
{
|
||||
@@ -698,7 +693,7 @@ void Rtabmap::process()
|
||||
// If a loop closure occurred the last frame, activate neighbors
|
||||
// for the likelihood
|
||||
//============================================================
|
||||
if(!_reactivationDisabled && _reactivateId > 0 )
|
||||
if(_reactivateId > 0 )
|
||||
{
|
||||
//Load neighbors
|
||||
ULOGGER_INFO("Reactivating signatures... around id=%d", _reactivateId);
|
||||
@@ -880,7 +875,7 @@ void Rtabmap::process()
|
||||
{
|
||||
//using highest hypothesis
|
||||
this->selectHypotheses(posterior, hyp, false);
|
||||
if(likelihood.at(hyp.front().first) > _remThr)
|
||||
if(likelihood.at(hyp.front().first) > _retrievalThr)
|
||||
{
|
||||
_reactivateId = hyp.front().first;
|
||||
}
|
||||
@@ -1319,11 +1314,6 @@ SMState * Rtabmap::getSMState()
|
||||
}
|
||||
|
||||
// SETTERS
|
||||
void Rtabmap::setReactivationDisabled(bool reactivationDisabled)
|
||||
{
|
||||
_reactivationDisabled = reactivationDisabled;
|
||||
}
|
||||
|
||||
void Rtabmap::setMaxTimeAllowed(float maxTimeAllowed)
|
||||
{
|
||||
//must be positive, 0 mean inf time allowed (no time limit)
|
||||
|
||||
Reference in New Issue
Block a user