mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
fixed weighting while moving
This commit is contained in:
@@ -2907,7 +2907,8 @@ void Memory::rehearsal(Signature * signature, Statistics * stats)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if the robot has moved, increase only weight of the new one
|
// if the robot has moved, increase only weight of the new one
|
||||||
signature->setWeight(signature->getWeight()+1);
|
signature->setWeight(sB->getWeight() + signature->getWeight() + 1);
|
||||||
|
sB->setWeight(0);
|
||||||
UINFO("Only updated weight to %d of %d (old=%d) because the robot has moved. (d=%f a=%f)",
|
UINFO("Only updated weight to %d of %d (old=%d) because the robot has moved. (d=%f a=%f)",
|
||||||
signature->getWeight(), signature->id(), sB->id(), _rehearsalMaxDistance, _rehearsalMaxAngle);
|
signature->getWeight(), signature->id(), sB->id(), _rehearsalMaxDistance, _rehearsalMaxAngle);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user