Convert local coordinates to grid indices
ij = local2grid(map,xy)
ij = local2grid(map,xy) converts an array of local coordinates, xy, to an array of grid indices, ij in [row col] format.
ij
map
xy
[row col]
collapse all
binaryOccupancyMap
Map representation, specified as a binaryOccupancyMap object. This object represents the environment of the vehicle.
Local coordinates, specified as an n-by-2 matrix of [x y] pairs, where n is the number of local coordinates.
[x y]
Data Types: double
double
Grid positions, returned as an n-by-2 matrix of [i j] pairs in [row col] format, where n is the number of grid positions. The grid cell locations are counted from the top left corner of the grid.
[i j]
binaryOccupancyMap | grid2world | grid2world | occupancyMap
grid2world
occupancyMap