Main Content

occupancyMatrix

Convert occupancy grid to matrix

Description

mat = occupancyMatrix(map) returns occupancy values stored in the occupancy grid object as a matrix.

Input Arguments

collapse all

Map representation, specified as a binaryOccupancyMap object. This object represents the environment of the robot. The object contains a matrix grid with binary values indicating obstacles as true (1) and free locations as false (0).

Output Arguments

collapse all

Occupancy values, returned as an h-by-w matrix, where h and w are defined by the two elements of the GridSize property of the occupancy grid object.

Data Types: double

See Also

| (Navigation Toolbox)

Introduced in R2016b