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:
matlabbe
2011-06-05 21:10:49 +00:00
parent 6adde9b286
commit 6fccc56e7a
7 changed files with 101 additions and 36 deletions

View File

@@ -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)

View File

@@ -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();

View File

@@ -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)

View File

@@ -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);
}
}