Ask Your Question

Revision history [back]

The costmap is internally stored as a one-dimensional array. Thus, for looking up data, you use the array index or the cell coordinates mx and my.

If you want to use metric coordinates, you need to first retrieve the respective cell coordinates using one of the worldToMap functions (inverse is mapToWorld). Those functions take care of converting metric to cell (or map) coordinates (and vice versa) observing the respective sizes in x and y as well as the resolution.