MATLAB ヘルプ センター
Check if query position is inside selected submap
isInside = isInsideSubmap(ndtMap pos)
[isInside,distToEdge] = isInsideSubmap(ndtMap,pos)
isInside = isInsideSubmap(ndtMap pos) check if the query position pos, is inside the selected submap of the NDT map ndtMap.
isInside
ndtMap
pos
example
[isInside,distToEdge] = isInsideSubmap(ndtMap,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 an NDT map from a MAT file.
data = load('ndtMapParkingLot.mat'); ndtMap = data.ndtMapParkingLot;
Select a submap with a specified center and set size.
center = [40 0 0]; sz = [50 50 20]; ndtMap = selectSubmap(ndtMap,center,sz);
Display the extent of the submap.
disp(ndtMap.SelectedSubmap)
15.0000 65.0000 -25.0000 25.0000 -9.1840 5.4975
Check if a query position is inside the submap.
pos1 = [40 0 0]; % near center [isInside1,distToEdge1] = isInsideSubmap(ndtMap,pos1)
isInside1 = logical 1
distToEdge1 = 1×3 25.0000 25.0000 5.4975
pos2 = [66 0 0]; % completely outside [isInside2,distToEdge2] = isInsideSubmap(ndtMap,pos2)
isInside2 = logical 0
distToEdge2 = 1×3 1.0000 25.0000 5.4975
pos3 = [60 0 0]; % inside, 5 meters from edge in x direction [isInside3,distToEdge3] = isInsideSubmap(ndtMap,pos3)
isInside3 = logical 1
distToEdge3 = 1×3 5.0000 25.0000 5.4975
pcmapndt
NDT map, specified as a pcmapndt 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.
expand all
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.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ