| 15 | namespace grid_map_demos { |
| 16 | |
| 17 | AnalyticalFunctions createWorld(Worlds world, double highResolution, double lowResolution, |
| 18 | double length, double width, grid_map::GridMap *groundTruthHighRes, |
| 19 | grid_map::GridMap *groundTruthLowRes) |
| 20 | { |
| 21 | |
| 22 | const grid_map::Length mapLength(length, width); |
| 23 | const grid_map::Position mapPosition(0.0, 0.0); |
| 24 | *groundTruthHighRes = createMap(mapLength, highResolution, mapPosition); |
| 25 | *groundTruthLowRes = createMap(mapLength, lowResolution, mapPosition); |
| 26 | AnalyticalFunctions groundTruth; |
| 27 | switch (world) { |
| 28 | |
| 29 | case Worlds::Sine: { |
| 30 | groundTruth = createSineWorld(groundTruthHighRes); |
| 31 | createSineWorld(groundTruthLowRes); |
| 32 | break; |
| 33 | } |
| 34 | case Worlds::Tanh: { |
| 35 | groundTruth = createTanhWorld(groundTruthHighRes); |
| 36 | createTanhWorld(groundTruthLowRes); |
| 37 | break; |
| 38 | } |
| 39 | case Worlds::GaussMixture: { |
| 40 | groundTruth = createGaussianWorld(groundTruthHighRes); |
| 41 | createGaussianWorld(groundTruthLowRes); |
| 42 | break; |
| 43 | } |
| 44 | case Worlds::Poly: { |
| 45 | groundTruth = createPolyWorld(groundTruthHighRes); |
| 46 | createPolyWorld(groundTruthLowRes); |
| 47 | break; |
| 48 | } |
| 49 | |
| 50 | default: |
| 51 | throw std::runtime_error("Interpolation demo: Unknown world requested."); |
| 52 | } |
| 53 | |
| 54 | return groundTruth; |
| 55 | } |
| 56 | |
| 57 | AnalyticalFunctions createPolyWorld(grid_map::GridMap *map) |
| 58 | { |
no test coverage detected