Gui: fixed default color for scans from odom in MainWindow and constraint view in dbviewer. Recovery/reprocess: fixed triggering new map on covariance >=9999. Reg: repeatOnce not done if it has a child. Statistics: added time proximity by space visual info.

This commit is contained in:
matlabbe
2018-02-20 17:33:48 -05:00
parent 5c04ce257b
commit db1139e89e
8 changed files with 56 additions and 27 deletions

View File

@@ -4312,6 +4312,7 @@ void DatabaseViewer::updateConstraintView(
if(assembledNormalScans->size())
{
constraintsViewer_->addCloud("scan2normals", assembledNormalScans, pose, Qt::cyan);
constraintsViewer_->setCloudColorIndex("scan2normals", 2);
}
if(assembledScans->size())
{
@@ -4320,6 +4321,7 @@ void DatabaseViewer::updateConstraintView(
assembledScans = util3d::voxelize(assembledScans, ui_->doubleSpinBox_voxelSize->value());
}
constraintsViewer_->addCloud("scan2", assembledScans, pose, Qt::cyan);
constraintsViewer_->setCloudColorIndex("scan2", 2);
}
if(graph->size())
{
@@ -4343,6 +4345,7 @@ void DatabaseViewer::updateConstraintView(
scan = util3d::voxelize(scan, ui_->doubleSpinBox_voxelSize->value());
}
constraintsViewer_->addCloud("scan0", scan, pose, Qt::yellow);
constraintsViewer_->setCloudColorIndex("scan0", 2);
}
else
{
@@ -4353,6 +4356,7 @@ void DatabaseViewer::updateConstraintView(
scan = util3d::voxelize(scan, ui_->doubleSpinBox_voxelSize->value());
}
constraintsViewer_->addCloud("scan0", scan, pose, Qt::yellow);
constraintsViewer_->setCloudColorIndex("scan0", 2);
}
}
if(!dataTo.laserScanRaw().isEmpty())
@@ -4366,6 +4370,7 @@ void DatabaseViewer::updateConstraintView(
scan = util3d::voxelize(scan, ui_->doubleSpinBox_voxelSize->value());
}
constraintsViewer_->addCloud("scan1", scan, pose, Qt::magenta);
constraintsViewer_->setCloudColorIndex("scan1", 2);
}
else
{
@@ -4376,6 +4381,7 @@ void DatabaseViewer::updateConstraintView(
scan = util3d::voxelize(scan, ui_->doubleSpinBox_voxelSize->value());
}
constraintsViewer_->addCloud("scan1", scan, pose, Qt::magenta);
constraintsViewer_->setCloudColorIndex("scan1", 2);
}
}
}

View File

@@ -1116,6 +1116,7 @@ void MainWindow::processOdometry(const rtabmap::OdometryEvent & odom, bool dataI
{
pcl::PointCloud<pcl::PointNormal>::Ptr cloud;
cloud = util3d::laserScanToPointCloudNormal(odom.info().localScanMap, odom.info().localScanMap.localTransform());
bool scanUpdated = _cloudViewer->getAddedClouds().contains("scanMapOdom");
if(!_cloudViewer->addCloud("scanMapOdom", cloud, _odometryCorrection, Qt::blue))
{
UERROR("Adding scanMapOdom to viewer failed!");
@@ -1123,7 +1124,7 @@ void MainWindow::processOdometry(const rtabmap::OdometryEvent & odom, bool dataI
else
{
_cloudViewer->setCloudVisibility("scanMapOdom", true);
_cloudViewer->setCloudColorIndex("scanMapOdom", _preferencesDialog->getScanColorScheme(1));
_cloudViewer->setCloudColorIndex("scanMapOdom", !scanUpdated && _preferencesDialog->getScanColorScheme(1)==0?2:_preferencesDialog->getScanColorScheme(1));
_cloudViewer->setCloudOpacity("scanMapOdom", _preferencesDialog->getScanOpacity(1));
_cloudViewer->setCloudPointSize("scanMapOdom", _preferencesDialog->getScanPointSize(1));
}
@@ -1152,6 +1153,7 @@ void MainWindow::processOdometry(const rtabmap::OdometryEvent & odom, bool dataI
cloud = util3d::voxelize(cloud, _preferencesDialog->getCloudVoxelSizeScan(1));
}
bool scanUpdated = _cloudViewer->getAddedClouds().contains("scanOdom");
if(!_cloudViewer->addCloud("scanOdom", cloud, _odometryCorrection, Qt::magenta))
{
UERROR("Adding scanOdom to viewer failed!");
@@ -1159,7 +1161,7 @@ void MainWindow::processOdometry(const rtabmap::OdometryEvent & odom, bool dataI
else
{
_cloudViewer->setCloudVisibility("scanOdom", true);
_cloudViewer->setCloudColorIndex("scanOdom", _preferencesDialog->getScanColorScheme(1));
_cloudViewer->setCloudColorIndex("scanOdom", !scanUpdated && _preferencesDialog->getScanColorScheme(1)==0?2:_preferencesDialog->getScanColorScheme(1));
_cloudViewer->setCloudOpacity("scanOdom", _preferencesDialog->getScanOpacity(1));
_cloudViewer->setCloudPointSize("scanOdom", _preferencesDialog->getScanPointSize(1));
scanUpdated = true;