| 156 | } |
| 157 | |
| 158 | void fillGridMap(grid_map::GridMap *map, const AnalyticalFunctions &functions) |
| 159 | { |
| 160 | grid_map::Matrix& data = (*map)[demoLayer]; |
| 161 | for (grid_map::GridMapIterator iterator(*map); !iterator.isPastEnd(); ++iterator) { |
| 162 | const grid_map::Index index(*iterator); |
| 163 | grid_map::Position pos; |
| 164 | map->getPosition(index, pos); |
| 165 | data(index(0), index(1)) = functions.f_(pos.x(), pos.y()); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | grid_map::GridMap createMap(const grid_map::Length &length, double resolution, |
| 170 | const grid_map::Position &pos) |
no test coverage detected