Added Memory::getAllLabels(), added labels to statistics and added DBDriver::getNodeInfo()

This commit is contained in:
Mathieu Labbe
2015-03-06 16:14:09 -05:00
parent 64fc7a05ae
commit 0c55d30f76
13 changed files with 235 additions and 55 deletions

View File

@@ -955,8 +955,11 @@ void DatabaseViewer::view3DMap()
cloud = rtabmap::util3d::transformPointCloud<pcl::PointXYZRGB>(cloud, data.getLocalTransform());
QColor color = Qt::red;
int mapId = memory_->getMapId(iter->first);
if(mapId >= 0)
int mapId, weight;
Transform odomPose;
std::string label;
double stamp;
if(memory_->getNodeInfo(iter->first, odomPose, mapId, weight, label, stamp, true))
{
color = (Qt::GlobalColor)(mapId % 12 + 7 );
}
@@ -1300,7 +1303,11 @@ void DatabaseViewer::update(int value,
view->setFeatures(data.getWords());
}
mapId = memory_->getMapId(id);
Transform odomPose;
int w;
std::string l;
double s;
memory_->getNodeInfo(id, odomPose, mapId, w, l, s, true);
weight->setNum(data.getWeight());
label->setText(data.getLabel().c_str());