29 currentSamplePoint.x = currentSpacePosition[0];
30 currentSamplePoint.y = currentSpacePosition[1];
31 pointCloud->push_back(currentSamplePoint);
34 double height =
mMapHelperPtr->getMetricHeight() * contractor;
39 double xRandom = ((double) std::rand() / (RAND_MAX)) * 2 - 1;
40 double yRandom = ((double) std::rand() / (RAND_MAX)) * 2 - 1;
42 SimpleVector3 randomPoint(currentSpacePosition[0] + xRandom * width, currentSpacePosition[1] + yRandom * height, currentSpacePosition[2]);
45 int8_t occupancyValue =
mMapHelperPtr->getRaytracingMapOccupancyValue(randomPoint);
46 if (
mMapHelperPtr->isOccupancyValueAcceptable(occupancyValue))
49 samplePoint.x = randomPoint[0];
50 samplePoint.y = randomPoint[1];
51 pointCloud->push_back(samplePoint);
Eigen::Matrix< Precision, 3, 1 > SimpleVector3
MapHelperPtr mMapHelperPtr
SamplePointCloud::Ptr SamplePointCloudPtr
pcl::PointCloud< SamplePoint > SamplePointCloud
this namespace contains all generally usable classes.
SamplePointCloudPtr getSampledSpacePointCloud(SimpleVector3 currentSpacePosition=SimpleVector3(), float contractor=1.0)