| 330 | } |
| 331 | |
| 332 | bool GridMapRosConverter::initializeFromImage(const sensor_msgs::Image& image, |
| 333 | const double resolution, grid_map::GridMap& gridMap, |
| 334 | const grid_map::Position& position) |
| 335 | { |
| 336 | const double lengthX = resolution * image.height; |
| 337 | const double lengthY = resolution * image.width; |
| 338 | Length length(lengthX, lengthY); |
| 339 | gridMap.setGeometry(length, resolution, position); |
| 340 | gridMap.setFrameId(image.header.frame_id); |
| 341 | gridMap.setTimestamp(image.header.stamp.toNSec()); |
| 342 | return true; |
| 343 | } |
| 344 | |
| 345 | bool GridMapRosConverter::addLayerFromImage(const sensor_msgs::Image& image, |
| 346 | const std::string& layer, grid_map::GridMap& gridMap, |
nothing calls this directly
no test coverage detected