multiLayerMap
Description
The multiLayerMap
object groups and stores multiple map layers as
mapLayer
, occupancyMap
, or binaryOccupancyMap
objects.
Once added to this object, map layers can be modified by either using the
multiLayerMap
object functions or by performing actions on individual map
layers using their object functions or the layer name as input. Any modification to common
properties on the multiLayerMap
object are reflected across all associated
layers.
Creation
Syntax
Description
creates an empty map
object occupying 10-by-10 meters of space with a resolution of 1 cell per meter.map
= multiLayerMap
creates a multilayer map from a cell array of map
= multiLayerMap(maps
)mapLayer
, occupancyMap
, or binaryOccupancyMap
objects. Objects combined
into a multilayer map must be defined with the same resolution and cover the same region
in space, but can represent different categories of information over the shared
region.
creates a multilayer map from the cell array of layer names and associated cell array of
map matrices. Matrices must have the same first two dimensions to cover the same shared
region. Default resolution is 1 cell per meter.map
= multiLayerMap(names
,mapData
)
creates a multilayer map with the cell array of layer names covering the specified width
and height as scalars in meters.map
= multiLayerMap(names
,width
,height
)
creates a multilayer map where the size of the data stored in each cell of the map is
defined by the array of integers, map
= multiLayerMap(names
,width
,height
,cellDims
)cellDims
. For multiple layers,
cellDims
is a cell array of integer arrays.
specifies the map width and height as a grid size specified in the
map
= multiLayerMap(names
,rows
,cols
,'grid')rows
and cols
inputs.
creates a map with a specified grid size and the size of the data stored in each cell
is defined by the array of integers or cell array of integer arrays
map
= multiLayerMap(names
,rows
,cols
,cellDims
,'grid')cellDims
.
creates a new object using the layers copied from another map
= multiLayerMap(sourceMap
)multiLayerMap
object.
specifies property values using name-value pairs. map
= multiLayerMap(___,Name,Value
)
For example, multiLayerMap(__,'LocalOriginInWorld',[15 20])
sets
the local origin to a specific world location.
Properties
Object Functions
getLayer | Return individual layers from multilayer map |
getMapData | Retrieve data from map layers |
grid2local | Convert grid indices to local coordinates |
grid2world | Convert grid indices to world coordinates |
local2grid | Convert local coordinates to grid indices |
local2world | Convert local coordinates to world coordinates |
move | Move map in world frame |
setMapData | Assign data to map layers |
syncWith | Sync map with overlapping map |
world2grid | Convert world coordinates to grid indices |
world2local | Convert world coordinates to local coordinates |
Examples
Extended Capabilities
Version History
Introduced in R2021a