| 93 | } |
| 94 | |
| 95 | Pointcloud::Ptr createPerfectPlane(unsigned int nPoints, double minXY, double maxXY, double desiredHeight, std::mt19937* generator) { |
| 96 | const double upperBound = maxXY; |
| 97 | const double lowerBound = minXY; |
| 98 | std::uniform_real_distribution<double> uniformDist(lowerBound, upperBound); |
| 99 | |
| 100 | Pointcloud::Ptr cloud(new Pointcloud()); |
| 101 | cloud->points.reserve(nPoints); |
| 102 | for (unsigned int i = 0; i < nPoints; ++i) { |
| 103 | Point point; |
| 104 | point.x = uniformDist(*generator); |
| 105 | point.y = uniformDist(*generator); |
| 106 | point.z = desiredHeight; |
| 107 | cloud->push_back(point); |
| 108 | } |
| 109 | |
| 110 | return cloud; |
| 111 | } |
| 112 | |
| 113 | Pointcloud::Ptr concatenate(Pointcloud::Ptr cloud1, Pointcloud::Ptr cloud2) { |
| 114 | // ghetto concatenate |
no outgoing calls
no test coverage detected