Fixed the adding of neighbor's actions when adding a loop closure link

Fixed loading config file with the ros gui_node (switch between rosparam and a config file )

git-svn-id: http://rtabmap.googlecode.com/svn/branches/0.3/rtabmap@97 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2011-06-10 19:56:07 +00:00
parent b01f3191fa
commit 196dc01a57
5 changed files with 18 additions and 12 deletions

View File

@@ -571,7 +571,7 @@ bool DBDriver::deleteUnreferencedWords() const
return false;
}
bool DBDriver::addNeighbor(int id, int neighbor, const std::list<std::vector<float> > & actuatorStates)
bool DBDriver::addNeighbor(int id, int newNeighbor, int oldNeighbor)
{
bool r = false;
Signature * s = 0;
@@ -579,7 +579,9 @@ bool DBDriver::addNeighbor(int id, int neighbor, const std::list<std::vector<flo
s = uValue(_trashSignatures, id, s);
if(s)
{
s->addNeighbor(neighbor, actuatorStates);
const NeighborsMap & neighbors = s->getNeighbors();
std::list<std::vector<float> > actions = uValue(s->getNeighbors(), oldNeighbor, std::list<std::vector<float> >());
s->addNeighbor(newNeighbor, actions);
r = true;
}
_trashesMutex.unlock();
@@ -587,7 +589,7 @@ bool DBDriver::addNeighbor(int id, int neighbor, const std::list<std::vector<flo
if(!r)
{
_dbSafeAccessMutex.lock();
r = this->addNeighborQuery(id, neighbor, actuatorStates);
r = this->addNeighborQuery(id, newNeighbor, oldNeighbor);
_dbSafeAccessMutex.unlock();
}