setOccupancy
位置の占有値を設定
構文
説明
setOccupancy 関数は、バイナリ占有マップの指定された位置の占有値を割り当てます。
は、入力座標がマップの範囲に収まるかどうかを示す logical 値の validPts = setOccupancy(___)n 要素ベクトルを出力します。
setOccupancy( は、ワールド座標の左下隅の位置を指定して占有値の行列を割り当てます。map,bottomLeft,inputMatrix)
setOccupancy( は、ローカル座標の左下隅の位置を指定して占有値の行列を割り当てます。map,bottomLeft,inputMatrix,"local")
setOccupancy( は、グリッド インデックスの左上のセルのインデックスと行列のサイズを指定して占有値の行列を割り当てます。map,topLeft,inputMatrix,"grid")
例
入力引数
出力引数
拡張機能
バージョン履歴
R2015a で導入
![Figure contains an axes object. The axes object with title Binary Occupancy Grid, xlabel X [meters], ylabel Y [meters] contains an object of type image.](../../examples/nav_robotics/win64/CreateAndModifyBinaryOccupancyGridExample_01.png)
![Figure contains an axes object. The axes object with title Binary Occupancy Grid, xlabel X [meters], ylabel Y [meters] contains an object of type image.](../../examples/nav_robotics/win64/CreateAndModifyBinaryOccupancyGridExample_02.png)
![Figure contains an axes object. The axes object with title Binary Occupancy Grid, xlabel X [meters], ylabel Y [meters] contains an object of type image.](../../examples/nav_robotics/win64/CreateAndModifyBinaryOccupancyGridExample_03.png)