Main Content

ROS 2 ネットワーク接続と調査

ROS 2 ネットワークを設定して操作する

ROS 2 に接続してロボティクス アプリケーションを試作し、ROS ネットワーク経由でロボティクス ハードウェアまたはシミュレーターにアクセスします。MATLAB® を使用すると、独自の ROS ネットワークの作成や既存の ROS 2 ネットワークへの接続を行えます。ROS 2 ネットワークを設定するには、ros2node オブジェクトを使用して ROS 2 ノードを作成します。

ros2param オブジェクトとそのオブジェクト関数を使用して、ROS 2 パラメーターにアクセスできます。

ros2rate オブジェクトは、コード実行のタイミングを制御する上で役立ちます。

関数

すべて展開する

ros2Retrieve information about ROS 2 network
ros2messageROS 2 メッセージ構造体の作成
ros2tfReceive, send, verify and apply ROS 2 transformations
rosApplyTransformTransform message entities into target frame
canTransformVerify if transformation is available
transformTransform message entities into target coordinate frame
getTransformReturn the transformation between two coordinate frames
sendTransformSend a transformation to the ROS 2 network
ros2timeAccess ROS 2 time functionality
ros2rateExecute loop at fixed frequency
ros2durationCreate a ROS 2 duration message
ros2deviceConnect to remote ROS 2 device
runNodeStart ROS or ROS 2 node
stopNodeStop ROS or ROS 2 node
isNodeRunningDetermine if ROS or ROS 2 node is running

オブジェクト

すべて展開する

ros2nodeCreate a ROS 2 node on the specified network
ros2paramCreate object to access parameters from ROS 2 nodes

ブロック

Blank Message指定されたメッセージ タイプを使用した空白の ROS 2 メッセージの作成
Current Time現在の ROS 2 時間またはシステム時間の取得
Get ParameterGet ROS 2 parameter value