Function grid_map::getSubmapInformation
Defined in File GridMapMath.hpp
Function Documentation
-
bool grid_map::getSubmapInformation(Index &submapTopLeftIndex, Size &submapBufferSize, Position &submapPosition, Length &submapLength, Index &requestedIndexInSubmap, const Position &requestedSubmapPosition, const Length &requestedSubmapLength, const Length &mapLength, const Position &mapPosition, const double &resolution, const Size &bufferSize, const Index &bufferStartIndex = Index::Zero())
Given a map and a desired submap (defined by position and size), this function computes various information about the submap. The returned submap might be smaller than the requested size as it respects the boundaries of the map.
- Parameters:
submapTopLeftIndex – [out] the top left index of the returned submap.
submapBufferSize – [out] the buffer size of the returned submap.
submapPosition – [out] the position of the submap (center) in the map frame.
submapLength – [out] the length of the submap.
requestedIndexInSubmap – [out] the index in the submap that corresponds to the requested position of the submap.
requestedSubmapPosition – [in] the requested submap position (center) in the map frame.
requestedSubmapLength – [in] the requested submap length.
mapLength – [in] the lengths in x and y direction.
mapPosition – [in] the position of the map.
resolution – [in] the resolution of the map.
bufferSize – [in] the buffer size of the map.
bufferStartIndex – [in] the index of the starting point of the circular buffer (optional).
- Returns:
true if successful.