このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
exportOccupancyMap3D
説明
例
3 次元占有マップの作成とエクスポート
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
という名前のマップ ファイルが現在のディレクトリに既に存在するか確認し、このファイルを削除します。
if exist("citymap.ot",'file') delete("citymap.ot") end
マップを八分木ファイルとしてエクスポートします。
filePath = fullfile(pwd,"citymap.ot");
exportOccupancyMap3D(map3D,filePath)
入力引数
map3D
— 3 次元占有マップ
occupancyMap3D
オブジェクト
3 次元占有マップ。occupancyMap3D
オブジェクトとして指定します。
filename
— 八分木ファイルまたは二分木ファイルの絶対パスまたは相対パス
string スカラー | 文字ベクトル
八分木ファイル (.ot
) または二分木ファイル (.bt
) の絶対パスまたは相対パス。string スカラーまたは文字ベクトルとして指定します。
例: "path/to/file/map.ot"
データ型: char
| string
バージョン履歴
R2020a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)