MATLAB 内の ROS 2
MATLAB® を使用して ROS 2 のネットワークおよびメッセージにアクセスする
ROS 2 では、"メッセージ" を使用して情報を共有します。メッセージは、データを共有するための単純なデータ構造体です。メッセージを受信 (すなわちサブスクライブ) するには、ros2subscriber
を使用します。メッセージを送信 (すなわちパブリッシュ) するには、ros2publisher
を使用します。メッセージ送信の詳細については、ROS 2 のパブリッシャーとサブスクライバーとのデータ交換を参照してください。
ROS 2 のサービスとアクションにより、ユーザーはタスクを実行できます。サービスでは、要求と応答の通信を使用して情報を収集し、ROS 2 ネットワークでコールバック関数をトリガーします。アクションを使用すると、タスクやゴールをトリガーし、これらのタスクの操作中にフィードバックを受信できます。
関数
ブロック
トピック
ROS 2 のパブリッシャーとサブスクライバー
- Work with Basic ROS 2 Messages
Examine various ways to create, inspect, and populate ROS 2 messages in MATLAB that are commonly encountered in robotics applications. - ROS 2 のパブリッシャーとサブスクライバーとのデータ交換
ROS ネットワーク内でトピックにパブリッシュおよびサブスクライブします。 - Manage Quality of Service Policies in ROS 2
Description of Quality of Service (QoS) policy options that allow changing the behavior of communication within a ROS 2 network. - Manage Quality of Service Policies in ROS 2 Application with TurtleBot
Demonstrates the best practices in managing Quality of Service (QoS) policies for an application using ROS 2. - Using ROS Bridge to Establish Communication Between ROS and ROS 2
Control the TurtleBot3 in Gazebo using keyboard commands from MATLAB.
ROS 2 サービス
- Call and Provide ROS 2 Services
Set up service servers to advertise a service to the ROS network. In addition, you will learn how to use service clients to call the server and receive a response.