Main Content

selectSubmap

Select submap within map

Since R2021a

Description

example

sMapOut = selectSubmap(sMapIn,roi) selects a submap within the sMapIn using the specified region of interest roi.

Use this function to confine the search space for localization using coarse position estimates.

sMapOut = selectSubmap(sMapIn,center,sz) selects the submap specified by the center and size sz of the submap.

Examples

collapse all

Load a segment map from a MAT file into the workspace.

data = load('segmatchMapFullParkingLot.mat');
sMap = data.segmatchMapFullParkingLot;

Visualize the currently selected submap.

figure
show(sMap,'submap')
title('Initial Selected Submap')

Select a new submap within the map.

center = [0 30 0];
sz = [40 25 10];
sMap = selectSubmap(sMap,center,sz);

Visualize the selected submap.

figure
show(sMap,'submap')
title('New Selected Submap')

Input Arguments

collapse all

Original map of segments and features, specified as a pcmapsegmatch object.

Region of interest, specified as a 6-element vector of the form [xmin xmax ymin ymax zmin zmax].

Center of the submap, specified as 3-element vector of the form [xc yc zc].

Size of the submap along each axis, specified as 3-element vector of the form [xsz ysz zsz].

Output Arguments

collapse all

Updated map of segments and features, returned as a pcmapsegmatch object with the updated SelectedSubmap property.

Tips

  • Use a submap size large enough to include the uncertainty of the position estimates and the range of the sensor used with findPose.A larger submap can increase computation time during each call to the findPose function, but it can reduce the frequency of submap updates.

Version History

Introduced in R2021a

See Also

Objects

Functions