mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user