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
+8 -3
View File
@@ -804,11 +804,16 @@ bool DBDriverSqlite3::getLoopClosureIdQuery(int signatureId, int & loopId) const
return false;
}
bool DBDriverSqlite3::addNeighborQuery(int id, int neighbor, const std::list<std::vector<float> > & actuatorStates) const
bool DBDriverSqlite3::addNeighborQuery(int id, int newNeighbor, int oldNeighbor) const
{
ULOGGER_DEBUG("id=%d, neighbor=%d, actuatorStates=%d", id, neighbor, actuatorStates.size());
ULOGGER_DEBUG("id=%d, newNeighbor=%d, oldNeighbor=%d", id, newNeighbor, oldNeighbor);
if(_ppDb)
{
NeighborsMap neighbors;
this->loadNeighborsQuery(id, neighbors);
std::list<std::vector<float> > actuatorStates = uValue(neighbors, oldNeighbor, std::list<std::vector<float> >());
UTimer timer;
timer.start();
int rc = SQLITE_OK;
@@ -840,7 +845,7 @@ bool DBDriverSqlite3::addNeighborQuery(int id, int neighbor, const std::list<std
rc = sqlite3_finalize(ppStmt);
return false;
}
rc = sqlite3_bind_int(ppStmt, 2, neighbor);
rc = sqlite3_bind_int(ppStmt, 2, newNeighbor);
if (rc != SQLITE_OK)
{
ULOGGER_ERROR("DB error 2.2: %s", sqlite3_errmsg(_ppDb));