mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 10:00:23 +08:00
minor changes...
git-svn-id: http://rtabmap.googlecode.com/svn/branches/0.3/rtabmap@57 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -290,7 +290,10 @@ void Camera::process()
|
||||
if(image)
|
||||
{
|
||||
SMState * smState = _postThreatement->process(image);
|
||||
this->post(new SMStateEvent(smState));
|
||||
if(smState)
|
||||
{
|
||||
this->post(new SMStateEvent(smState));
|
||||
}
|
||||
double elapsed = timer.ticks();
|
||||
UDEBUG("Post treatment time = %fs", elapsed);
|
||||
if(_imageRate>0)
|
||||
|
||||
@@ -829,7 +829,7 @@ Signature * KeypointMemory::createSignature(int id, const SMState * smState, boo
|
||||
nbCommonWords = _vwd->getTotalActiveReferences() / treeSize;
|
||||
}
|
||||
|
||||
if(!smState->isDescriptorsProvided())
|
||||
if(smState->getSensors().empty())
|
||||
{
|
||||
image = smState->getImage();
|
||||
if(image && _keypointDetector)
|
||||
@@ -847,9 +847,9 @@ Signature * KeypointMemory::createSignature(int id, const SMState * smState, boo
|
||||
}
|
||||
else
|
||||
{
|
||||
if(smState->getSensorStates().size() >= _badSignRatio * nbCommonWords)
|
||||
if(smState->getSensors().size() >= _badSignRatio * nbCommonWords)
|
||||
{
|
||||
descriptors = smState->getSensorStates();
|
||||
descriptors = smState->getSensors();
|
||||
keypoints = smState->getKeypoints();
|
||||
}
|
||||
image = smState->getImage();
|
||||
|
||||
@@ -270,7 +270,7 @@ bool Memory::update(const SMState * smState, std::list<std::pair<std::string, fl
|
||||
|
||||
|
||||
// It will be added to the short-time memory, no need to delete it...
|
||||
this->addSignatureToStm(signature, smState->getActuatorStates());
|
||||
this->addSignatureToStm(signature, smState->getActuators());
|
||||
_lastSignature = signature;
|
||||
|
||||
if(_lastLoopClosureId == 0)
|
||||
|
||||
@@ -521,7 +521,7 @@ void Rtabmap::handleEvent(UEvent* event)
|
||||
if(event->getClassName().compare("SMStateEvent") == 0)
|
||||
{
|
||||
SMStateEvent * e = (SMStateEvent*)event;
|
||||
SMState * data = e->getDataOwnership();
|
||||
SMState * data = e->getSMStateOwnership();
|
||||
this->addSMState(data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user