grid2world

Convert grid indices to world coordinates

Description

xy = grid2world(map,ij) converts a [row col] array of grid indices, ij, to an array of world coordinates, xy.

Input Arguments

collapse all

Map representation, specified as a occupancyMap object. This object represents the environment of the vehicle. The object contains a matrix grid with values representing the probability of the occupancy of that cell. Values close to 1 represent a high probability that the cell contains an obstacle. Values close to 0 represent a high probability that the cell is not occupied and obstacle free.

Grid positions, specified as an n-by-2 matrix of [i j] pairs in [rows cols] format, where n is the number of grid positions. The grid cell locations are counted from the top left corner of the grid.

Data Types: double

Output Arguments

collapse all

World coordinates, returned as an n-by-2 matrix of [x y] pairs, where n is the number of world coordinates.

Data Types: double

Introduced in R2019b