MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / createWorld

Function createWorld

grid_map_demos/src/InterpolationDemo.cpp:17–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace grid_map_demos {
16
17AnalyticalFunctions 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
57AnalyticalFunctions createPolyWorld(grid_map::GridMap *map)
58{

Callers 2

runDemoMethod · 0.85

Calls 5

createPolyWorldFunction · 0.85
createMapFunction · 0.70
createSineWorldFunction · 0.70
createTanhWorldFunction · 0.70
createGaussianWorldFunction · 0.70

Tested by

no test coverage detected