mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Added parameter actionsSentRejectedHyp (actions also sent on rejected hypotheses or decreasing hyp), default false
git-svn-id: http://rtabmap.googlecode.com/svn/branches/0.3/rtabmap@85 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -132,6 +132,7 @@ class RTABMAP_EXP Parameters
|
||||
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, true); // Select next actions based on the more recent neighbor of the current node, otherwise, weight is also used
|
||||
RTABMAP_PARAM(Rtabmap, ActionsSentRejectHyp, bool, false); // Actions sent also on rejected hypotheses (on decreasing hypotheses)
|
||||
|
||||
// Hypotheses selection
|
||||
RTABMAP_PARAM(Rtabmap, LoopThr, float, 0.10); // Loop closing threshold
|
||||
|
||||
@@ -134,6 +134,7 @@ private:
|
||||
bool _localGraphCleaned;
|
||||
unsigned int _maxRetrieved;
|
||||
bool _actionsByTime;
|
||||
bool _actionsSentRejectHyp;
|
||||
|
||||
int _lcHypothesisId;
|
||||
int _reactivateId;
|
||||
|
||||
@@ -64,6 +64,7 @@ Rtabmap::Rtabmap() :
|
||||
_localGraphCleaned(Parameters::defaultRtabmapLocalGraphCleaned()),
|
||||
_maxRetrieved(Parameters::defaultRtabmapMaxRetrieved()),
|
||||
_actionsByTime(Parameters::defaultRtabmapActionsByTime()),
|
||||
_actionsSentRejectHyp(Parameters::defaultRtabmapActionsSentRejectHyp()),
|
||||
_lcHypothesisId(0),
|
||||
_reactivateId(0),
|
||||
_highestHypothesisValue(0),
|
||||
@@ -269,7 +270,10 @@ void Rtabmap::parseParameters(const ParametersMap & parameters)
|
||||
{
|
||||
_actionsByTime = uStr2Bool(iter->second.c_str());
|
||||
}
|
||||
|
||||
if((iter=parameters.find(Parameters::kRtabmapActionsSentRejectHyp())) != parameters.end())
|
||||
{
|
||||
_actionsSentRejectHyp = uStr2Bool(iter->second.c_str());
|
||||
}
|
||||
|
||||
// By default, we create our strategies if they are not already created.
|
||||
// If they already exists, we check the parameters if a change is requested
|
||||
@@ -952,7 +956,8 @@ void Rtabmap::process()
|
||||
sLoop = _memory->getSignature(highestHypothesisId);
|
||||
}
|
||||
|
||||
if(sLoop)
|
||||
// only send actions if rejectLoopReason!=3 (decreasing hypotheses)
|
||||
if(sLoop && (_actionsSentRejectHyp || rejectLoopReason != 3))
|
||||
{
|
||||
// select the actions of the neighbor with the highest
|
||||
// weight (select the more recent if some have the same weight)
|
||||
|
||||
Reference in New Issue
Block a user