33 pcl::getMinMax3D(*this->
getInputCloud(), minVector, maxVector);
35 SimpleVector3 spanCube = maxVector.block<3,1>(0,0) - minVector.block<3,1>(0,0);
37 double maximumSpan = spanCube.lpNorm<Eigen::Infinity>() * contractor;
42 SamplePoint currentSamplePoint(currentSpacePosition);
43 currentSamplePoint.x = currentSpacePosition[0];
44 currentSamplePoint.y = currentSpacePosition[1];
45 sampledSpacePointCloudPtr->push_back(currentSamplePoint);
49 SimpleVector3 vector = maximumSpan * (orientation.toRotationMatrix() * SimpleVector3::UnitX());
51 vector += currentSpacePosition;
55 if (!
mMapHelperPtr->doRaytracing(currentSpacePosition, vector, ray)) {
57 for (Ray::reverse_iterator iter = ray.rbegin(); iter != ray.rend(); iter++) {
58 if (
mMapHelperPtr->isOccupancyValueAcceptable(iter->occupancy)) {
59 mMapHelperPtr->mapToWorldCoordinates(iter->x, iter->y, obstacle);
64 vector[2] = currentSpacePosition[2];
69 sampledSpacePointCloudPtr->push_back(samplePoint);
72 return sampledSpacePointCloudPtr;
SamplePointCloudPtr getSampledSpacePointCloud(SimpleVector3 currentSpacePosition=SimpleVector3(), float contractor=1.0)
Eigen::Matrix< Precision, 3, 1 > SimpleVector3
virtual ObjectPointCloudPtr & getInputCloud()
SamplePointCloud::Ptr SamplePointCloudPtr
pcl::PointCloud< SamplePoint > SamplePointCloud
Eigen::Matrix< Precision, 4, 1 > SimpleVector4
this namespace contains all generally usable classes.
std::vector< RayTracingIndex > Ray
MapHelperPtr mMapHelperPtr
Raytracing2DBasedSpaceSampler(const MapHelperPtr &mapHelperPtr)
constructor for CostmapBasedSpaceSampler object
virtual ~Raytracing2DBasedSpaceSampler()
destructor for CostmapBasedSpaceSampler object
Eigen::Quaternion< Precision > SimpleQuaternion
static SimpleQuaternionCollectionPtr getOrientationsOnUnitSphere(const int &numberOfPoints)