Added Map color overlay on 3D cloud (press key '2' on keyboard)

Fixed loading all node ids from database, ignoring children

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1813 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-10-01 21:44:46 +00:00
parent 317d382a24
commit c441cc1d0f
10 changed files with 101 additions and 27 deletions
+7 -1
View File
@@ -781,7 +781,13 @@ void DatabaseViewer::view3DMap()
cloud = rtabmap::util3d::transformPointCloud(cloud, localTransform);
viewer->addCloud(uFormat("cloud%d", iter->first), cloud, pose);
QColor color = Qt::red;
int mapId = memory_->getMapId(iter->first);
if(mapId >= 0)
{
color = (Qt::GlobalColor)(mapId % 12 + 7 );
}
viewer->addCloud(uFormat("cloud%d", iter->first), cloud, pose, color);
UINFO("Generated %d (%d points)", iter->first, cloud->size());
progressDialog.appendText(QString("Generated %1 (%2 points)").arg(iter->first).arg(cloud->size()));