ヘルプ センターヘルプ センター
占有グリッドの値を ROS または ROS 2 メッセージ構造体に書き込み
R2021a 以降
msgOut = rosWriteOccupancyGrid(msg,map)
msgOut = rosWriteOccupancyGrid(msg,map) は、占有グリッド map の占有値と ROS または ROS 2 メッセージ構造体 msg のその他の情報を出力メッセージ msgOut に書き込みます。
msgOut
msg
map
すべて折りたたむ
'nav_msgs/OccupancyGrid'
ROS または ROS 2 'nav_msgs/OccupancyGrid' メッセージ。メッセージ構造体として指定します。
occupancyMap
占有マップ。occupancyMap (Navigation Toolbox) オブジェクト ハンドルとして指定します。
入力引数と出力引数に同じ変数を使用して既存のメッセージに直接代入できます。
map = occupancyMap(rand(10)); msg = rosmessage("nav_msgs/OccupancyGrid","DataFormat","struct"); msg = rosWriteOccupancyGrid(msg,map)
使用に関するメモと制限:
MATLAB Function ブロックでの使用はサポートされていません。
R2021a で導入
rosReadBinaryOccupancyGrid
rosReadOccupancyGrid
rosReadOccupancyMap3D
rosWriteBinaryOccupancyGrid
次の 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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office