MATLAB 도움말 센터
Check if query position is inside selected submap
Since R2021a
isInside = isInsideSubmap(sMap,pos)
[isInside,distToEdge] = isInsideSubmap(sMap,pos)
isInside = isInsideSubmap(sMap,pos) check if the query position pos, is inside the selected submap of the map sMap.
isInside
sMap
pos
example
[isInside,distToEdge] = isInsideSubmap(sMap,pos) also returns the distance from the query position to the closest edge of the submap along the X-,Y-, and Z-axes respectively.
distToEdge
collapse all
Load a map of segments and features from a MAT file.
data = load('segmatchMapFullParkingLot.mat'); sMap = data.segmatchMapFullParkingLot;
Select a submap within the map.
center = [0 30 0]; sz = [40 24 10]; sMap = selectSubmap(sMap,center,sz);
Check three positions to see if they are inside the submap.
pos1 = [0 30 0]; % center [isInside1,distToEdge1] = isInsideSubmap(sMap,pos1)
isInside1 = logical 1
distToEdge1 = 1×3 single row vector 20.0000 12.0000 0.0649
pos2 = [60 0 0]; % completely outside [isInside2,distToEdge2] = isInsideSubmap(sMap,pos2)
isInside2 = logical 0
distToEdge2 = 1×3 single row vector 40.0000 18.0000 0.0649
pos3 = [15 30 0]; % inside, 5 meters from edge in x direction [isInside3,distToEdge3] = isInsideSubmap(sMap,pos3)
isInside3 = logical 1
distToEdge3 = 1×3 single row vector 5.0000 12.0000 0.0649
pcmapsegmatch
Map of segments and features, specified as a pcmapsegmatch object.
Query position, specified as a 3-element vector of the form [x y z].
true
false
Indication of position inside submap, returned as a logical true or false.
Distance from the query position to the closest edge of the submap in the X-, Y-, and Z-axes respectively, returned as a 3-element vector.
Introduced in R2021a
selectSubmap
findPose
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의