MATLAB ヘルプ センター
八分木ファイルまたは二分木ファイルとして 3 次元占有マップをエクスポート
exportOccupancyMap3D(map3D,filename)
exportOccupancyMap3D(map3D,filename) は、3 次元占有マップ map3D を、すべての占有データが含まれた八分木ファイル (.ot)、または指定した場所 filename にある最尤情報のみが含まれた二分木ファイル (.bt) にエクスポートします。
map3D
filename
.ot
.bt
例
すべて折りたたむ
occupancyMap3D オブジェクトを作成します。
occupancyMap3D
map3D = occupancyMap3D;
地面を作成して占有値を 0 に設定します。
[xGround,yGround,zGround] = meshgrid(0:100,0:100,0); xyzGround = [xGround(:) yGround(:) zGround(:)]; occval = 0; setOccupancy(map3D,xyzGround,occval)
マップの特定のワールド位置に障害物を作成します。
[xBuilding1,yBuilding1,zBuilding1] = meshgrid(20:30,50:60,0:30); [xBuilding2,yBuilding2,zBuilding2] = meshgrid(50:60,10:30,0:40); [xBuilding3,yBuilding3,zBuilding3] = meshgrid(40:60,50:60,0:50); [xBuilding4,yBuilding4,zBuilding4] = meshgrid(70:80,35:45,0:60); xyzBuildings = [xBuilding1(:) yBuilding1(:) zBuilding1(:);... xBuilding2(:) yBuilding2(:) zBuilding2(:);... xBuilding3(:) yBuilding3(:) zBuilding3(:);... xBuilding4(:) yBuilding4(:) zBuilding4(:)];
新しい確率値を使用して障害物を更新し、マップを表示します。
obs = 0.65; updateOccupancy(map3D,xyzBuildings,obs) show(map3D)
マップ ファイルを作成する前に、citymap.ot という名前のマップ ファイルが現在のディレクトリに既に存在するか確認し、このファイルを削除します。
citymap.ot
if exist("citymap.ot",'file') delete("citymap.ot") end
マップを八分木ファイルとしてエクスポートします。
filePath = fullfile(pwd,"citymap.ot"); exportOccupancyMap3D(map3D,filePath)
3 次元占有マップ。occupancyMap3D オブジェクトとして指定します。
八分木ファイル (.ot) または二分木ファイル (.bt) の絶対パスまたは相対パス。string スカラーまたは文字ベクトルとして指定します。
例: "path/to/file/map.ot"
"path/to/file/map.ot"
データ型: char | string
char
string
R2020a で導入
lidarSLAM
occupancyMap
insertPointCloud
inflate
setOccupancy
show
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 のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ