RegICP: Updated warning when complexity is too low. LoopClosureViewer: fixed scan transform.

This commit is contained in:
matlabbe
2019-06-02 12:38:09 -04:00
parent 8cb923b332
commit cdbdc36c94
2 changed files with 5 additions and 5 deletions

View File

@@ -604,7 +604,7 @@ Transform RegistrationIcp::computeTransformationImpl(
{ {
tooLowComplexityForPlaneToPlane = true; tooLowComplexityForPlaneToPlane = true;
complexityVectors = fromComplexity<toComplexity?complexityVectorsFrom:complexityVectorsTo; complexityVectors = fromComplexity<toComplexity?complexityVectorsFrom:complexityVectorsTo;
UWARN("ICP PointToPlane ignored as structural complexity is too low (corridor-like environment): %f < %f (%s). PointToPoint is done instead.", complexity, _pointToPlaneMinComplexity, Parameters::kIcpPointToPlaneMinComplexity().c_str()); UWARN("ICP PointToPlane ignored as structural complexity is too low (corridor-like environment): %f < %f (%s). PointToPoint is done instead, orientation is still optimized but translation will be limited to direction of normals.", complexity, _pointToPlaneMinComplexity, Parameters::kIcpPointToPlaneMinComplexity().c_str());
} }
else else
{ {
@@ -777,7 +777,7 @@ Transform RegistrationIcp::computeTransformationImpl(
{ {
tooLowComplexityForPlaneToPlane = true; tooLowComplexityForPlaneToPlane = true;
complexityVectors = fromComplexity<toComplexity?complexityVectorsFrom:complexityVectorsTo; complexityVectors = fromComplexity<toComplexity?complexityVectorsFrom:complexityVectorsTo;
UWARN("ICP PointToPlane ignored as structural complexity is too low (corridor-like environment): %f < %f (%s). PointToPoint is done instead.", complexity, _pointToPlaneMinComplexity, Parameters::kIcpPointToPlaneMinComplexity().c_str()); UWARN("ICP PointToPlane ignored as structural complexity is too low (corridor-like environment): %f < %f (%s). PointToPoint is done instead, orientation is still optimized but translation will be limited to direction of normals.", complexity, _pointToPlaneMinComplexity, Parameters::kIcpPointToPlaneMinComplexity().c_str());
} }
else else
{ {

View File

@@ -111,9 +111,8 @@ void LoopClosureViewer::updateView(const Transform & transform, const Parameters
cloudB = util3d::cloudRGBFromSensorData(sB_.sensorData(), decimation, maxDepth, minDepth, 0, parameters); cloudB = util3d::cloudRGBFromSensorData(sB_.sensorData(), decimation, maxDepth, minDepth, 0, parameters);
//cloud 2d //cloud 2d
pcl::PointCloud<pcl::PointXYZ>::Ptr scanA, scanB; pcl::PointCloud<pcl::PointXYZ>::Ptr scanA, scanB;
scanA = util3d::laserScanToPointCloud(sA_.sensorData().laserScanRaw()); scanA = util3d::laserScanToPointCloud(sA_.sensorData().laserScanRaw(), sA_.sensorData().laserScanRaw().localTransform());
scanB = util3d::laserScanToPointCloud(sB_.sensorData().laserScanRaw());
scanB = util3d::laserScanToPointCloud(sB_.sensorData().laserScanRaw(), sB_.sensorData().laserScanRaw().localTransform()); scanB = util3d::laserScanToPointCloud(sB_.sensorData().laserScanRaw(), sB_.sensorData().laserScanRaw().localTransform());
ui_->label_idA->setText(QString("[%1 (%2) -> %3 (%4)]").arg(sB_.id()).arg(cloudB->size()).arg(sA_.id()).arg(cloudA->size())); ui_->label_idA->setText(QString("[%1 (%2) -> %3 (%4)]").arg(sB_.id()).arg(cloudB->size()).arg(sA_.id()).arg(cloudA->size()));
@@ -132,6 +131,7 @@ void LoopClosureViewer::updateView(const Transform & transform, const Parameters
ui_->cloudViewerTransform->addCloud("scan0", scanA); ui_->cloudViewerTransform->addCloud("scan0", scanA);
} }
if(scanB->size()) if(scanB->size())
{
scanB = util3d::transformPointCloud(scanB, t); scanB = util3d::transformPointCloud(scanB, t);
ui_->cloudViewerTransform->addCloud("scan1", scanB); ui_->cloudViewerTransform->addCloud("scan1", scanB);
} }