Function grid_map::getPositionFromIndex

Function Documentation

bool grid_map::getPositionFromIndex(Position &position, const Index &index, const Length &mapLength, const Position &mapPosition, const double &resolution, const Size &bufferSize, const Index &bufferStartIndex = Index::Zero())

Gets the position of a cell specified by its index in the map frame.

Parameters:
  • position[out] the position of the center of the cell in the map frame.

  • index[in] of the cell.

  • 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 index not within range of buffer.