Function grid_map::getIndexShiftFromPositionShift

Function Documentation

bool grid_map::getIndexShiftFromPositionShift(Index &indexShift, const Vector &positionShift, const double &resolution)

Computes how many cells/indeces the map is moved based on a position shift in the grid map frame. Use this function if you are moving the grid map and want to ensure that the cells match before and after.

Parameters:
  • indexShift[out] the corresponding shift of the indices.

  • positionShift[in] the desired position shift.

  • resolution[in] the resolution of the map.

Returns:

true if successful.