getOccupancy
説明
は、occval
= getOccupancy(map3D
,xyz
)occupancyMap3D
オブジェクトで指定した xyz の位置における確率占有値の配列を返します。1 に近い値は、セルに障害物が含まれる確かさが高いことを表します。0 に近い値は、セルが占有されておらず障害物がない確かさを表します。
例
3 次元占有マップでの占有ステータスの確認と占有値の取得
3 次元占有マップをインポートします。
map3D = importOccupancyMap3D("citymap.ot")
map3D = occupancyMap3D with properties: ProbabilitySaturation: [1.0000e-03 0.9990] Resolution: 1 OccupiedThreshold: 0.6500 FreeThreshold: 0.2000
マップを表示します。
show(map3D)
さまざまな場所の占有ステータスを確認し、その占有値を取得します。
iOccVal1 = checkOccupancy(map3D,[50 15 0])
iOccVal1 = 0
OccVal1 = getOccupancy(map3D,[50 15 0])
OccVal1 = 0.0019
iOccVal2 = checkOccupancy(map3D,[50 15 15])
iOccVal2 = 1
OccVal2 = getOccupancy(map3D,[50 15 15])
OccVal2 = 0.6500
iOccVal3 = checkOccupancy(map3D,[50 15 45])
iOccVal3 = -1
OccVal3 = getOccupancy(map3D,[50 15 45])
OccVal3 = 0.5000
入力引数
map3D
— 3 次元占有マップ
occupancyMap3D
オブジェクト
3 次元占有マップ。occupancyMap3D
オブジェクトとして指定します。
xyz
— ワールド座標
n 行 3 列の行列
ワールド座標。点 [x y z]
の n 行 3 列の行列として指定します。ここで、n はワールド座標の数です。
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
getOccupancy
は、packType
引数を "flat"
に設定した場合、関数 packNGo
(MATLAB Coder) を使用したコード生成をサポートしません。
バージョン履歴
R2019b で導入
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)