CameraThread: fixed scan from depth max points with multi-camera

This commit is contained in:
matlabbe
2016-06-21 11:36:50 -04:00
parent 0ec39e3c77
commit 530919c531
2 changed files with 48 additions and 32 deletions
+10
View File
@@ -682,6 +682,16 @@ pcl::PointCloud<pcl::PointXYZ>::Ptr RTABMAP_EXP cloudFromSensorData(
UERROR("Camera model %d is invalid", i);
}
}
if(cloud->is_dense && validIndices)
{
//generate indices for all points (they are all valid)
validIndices->resize(cloud->size());
for(unsigned int i=0; i<cloud->size(); ++i)
{
validIndices->at(i) = i;
}
}
}
else if(!sensorData.imageRaw().empty() && !sensorData.rightRaw().empty() && sensorData.stereoCameraModel().isValidForProjection())
{