| 141 | } |
| 142 | |
| 143 | Pointcloud::Ptr createStepTerrain(unsigned int nPoints, double minXY, double maxXY, double zHigh, double zLow, double stdDevZ, |
| 144 | std::mt19937* generator, double* center) { |
| 145 | *center = (maxXY + minXY) / 2.0; |
| 146 | std::uniform_real_distribution<double> uniformDist(minXY, maxXY); |
| 147 | std::normal_distribution<double> zLowDist(zLow, stdDevZ); |
| 148 | std::normal_distribution<double> zHighDist(zHigh, stdDevZ); |
| 149 | |
| 150 | Pointcloud::Ptr cloud(new Pointcloud()); |
| 151 | cloud->points.reserve(nPoints); |
| 152 | for (unsigned int i = 0; i < nPoints; ++i) { |
| 153 | Point point; |
| 154 | point.x = uniformDist(*generator); |
| 155 | point.y = uniformDist(*generator); |
| 156 | |
| 157 | if (point.x > *center) { |
| 158 | point.z = zHighDist(*generator); |
| 159 | } else { |
| 160 | point.z = zLowDist(*generator); |
| 161 | } |
| 162 | |
| 163 | cloud->push_back(point); |
| 164 | } |
| 165 | |
| 166 | return cloud; |
| 167 | } |
| 168 | void setVerbosityLevel(ros::console::levels::Level level) { |
| 169 | if (ros::console::set_logger_level(ROSCONSOLE_DEFAULT_NAME, level)) { |
| 170 | ros::console::notifyLoggerLevelsChanged(); |
no outgoing calls
no test coverage detected