Function grid_map::getIndexFromPosition
Defined in File GridMapMath.hpp
Function Documentation
-
bool grid_map::getIndexFromPosition(Index &index, const Position &position, const Length &mapLength, const Position &mapPosition, const double &resolution, const Size &bufferSize, const Index &bufferStartIndex = Index::Zero())
Gets the index of the cell which contains a position in the map frame.
- Parameters:
index – [out] of the cell.
position – [in] the position in the map frame.
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 size of the buffer (optional).
bufferStartIndex – [in] the index of the starting point of the circular buffer (optional).
- Returns:
true if successful, false if position outside of map.