mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Select next actions based on posterior values (highest neighbor's hypothesis is selected)
git-svn-id: http://rtabmap.googlecode.com/svn/branches/0.3/rtabmap@105 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -131,7 +131,7 @@ class RTABMAP_EXP Parameters
|
||||
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, true); // Select next actions based on the more recent neighbor of the current node, otherwise, weight is also used
|
||||
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)
|
||||
|
||||
// Hypotheses selection
|
||||
|
||||
@@ -937,8 +937,7 @@ void Rtabmap::process()
|
||||
// OR
|
||||
// select the newest one (with actions)
|
||||
const NeighborsMap & neighbors = sLoop->getNeighbors();
|
||||
const Signature * s;
|
||||
int currentWeight = -1;
|
||||
float currentHyp = -1;
|
||||
for(NeighborsMap::const_reverse_iterator iter=neighbors.rbegin(); iter!=neighbors.rend(); ++iter)
|
||||
{
|
||||
if(iter->second.size())
|
||||
@@ -948,12 +947,12 @@ void Rtabmap::process()
|
||||
_actions = iter->second;
|
||||
break;
|
||||
}
|
||||
else // use also weight
|
||||
else // use hypothesis value
|
||||
{
|
||||
s = _memory->getSignature(iter->first);
|
||||
if(s && s->getWeight() > currentWeight)
|
||||
float hyp = uValue(posterior, iter->first, 0.0f);
|
||||
if(hyp > currentHyp)
|
||||
{
|
||||
currentWeight = s->getWeight();
|
||||
currentHyp = hyp;
|
||||
_actions = iter->second;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>7</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||
@@ -990,7 +990,7 @@ when using the file type, logs are saved in Logrtabmap.txt (located in the worki
|
||||
<item row="7" column="2">
|
||||
<widget class="QLabel" name="label_39">
|
||||
<property name="text">
|
||||
<string>Select next actions based only on the more recent neighbor of the current node, otherwise, weight is also used.</string>
|
||||
<string>Select next actions using directly the more recent neighbor of the current node, otherwise, highest hypothesis is used</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
||||
Reference in New Issue
Block a user