最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。

ROS Toolbox 入門

ROS ベースのアプリケーションの設計、シミュレーションおよび展開

ROS Toolbox は、MATLAB® と Simulink® を Robot Operating System (ROS および ROS 2) に接続するインターフェイスを提供します。これにより ROS ノードのネットワークを作成できます。このツールボックスには、rosbag ファイルに記録されている ROS データのインポート、解析および再生を行うための MATLAB 関数および Simulink ブロックが含まれています。また、ライブ ROS ネットワークに接続して ROS メッセージにアクセスすることもできます。

ツールボックスを使用すると、デスクトップ シミュレーション、および Gazebo などの外部ロボット シミュレーターへの接続を使用して、ROS ノードを検証できます。ROS Toolbox は C++ コードの生成 (Simulink Coder™ を使用) をサポートするため、Simulink モデルから ROS ノードを自動的に生成して、シミュレートされたハードウェアまたは実際のハードウェアに展開することができます。Simulink のエクスターナル モードがサポートされるため、モデルをハードウェアで実行している間にメッセージの表示およびパラメーターの変更ができます。

チュートリアル

    ROS

    Get Started with ROS

    Robot Operating System (ROS) is a communication interface that enables different parts of a robot system to discover each other, and send and receive data between them. MATLAB® supports ROS with a library of functions that enables you to exchange data with ROS-enabled physical robots or robot simulators such as Gazebo®.

    Get Started with ROS in Simulink®

    This example shows how to use Simulink blocks for ROS to send and receive messages from a local ROS network.

    Work with Basic ROS Messages

    Messages are the primary container for exchanging data in ROS. Topics and services use messages to carry data between nodes. (See Exchange Data with ROS Publishers and Subscribers and Call and Provide ROS Services for more information on topics and services)

    Exchange Data with ROS Publishers and Subscribers

    The primary mechanism for ROS nodes to exchange data is sending and receiving messages. Messages are transmitted on a topic, and each topic has a unique name in the ROS network. If a node wants to share information, it uses a publisher to send data to a topic. A node that wants to receive that information uses a subscriber to that same topic. Besides its unique name, each topic also has a message type, which determines the types of messages that are capable of being transmitted under that topic.

    Get Started with Gazebo and a Simulated TurtleBot

    This example shows how to set up the Gazebo® simulator engine. This example prepares you for further exploration with Gazebo and also for exploration with a simulated TurtleBot®.

    ROS 2

    Get Started with ROS 2

    Robot Operating System 2 (ROS 2) is the second version of ROS, which is a communication interface that enables different parts of a robot system to discover, send, and receive data. MATLAB® support for ROS 2 is a library of functions that allows you to exchange data with ROS 2 enabled physical robots or robot simulators such as Gazebo®. ROS 2 is built on Data Distribution Standard (DDS) which is an end-to-end middleware that provides features such as discovery, serialization and transportation. These features align with the design principles of ROS 2 such as distributed discovery and control over different "Quality of Service" options for transportation. DDS uses Real Time Publish-Subscribe (RTPS) protocol which provides communication over unreliable network protocols such as UDP. For more information, see RTPS.

    Get Started with ROS 2 in Simulink®

    This example shows how to use Simulink blocks for ROS 2 to send and receive messages from a local ROS 2 network.

    Work with Basic ROS 2 Messages

    ROS messages are the primary container for exchanging data in ROS 2. Publishers and subscribers exchange data using messages on specified topics to carry data between nodes. For more information on sending and receiving messages, see Exchange Data with ROS 2 Publishers and Subscribers.

    Exchange Data with ROS 2 Publishers and Subscribers

    The primary mechanism for ROS 2 nodes to exchange data is to send and receive messages. Messages are transmitted on a topic and each topic has a unique name in the ROS 2 network. If a node wants to share information, it must use a publisher to send data to a topic. A node that wants to receive that information must use a subscriber for that same topic. Besides its unique name, each topic also has a message type, which determines the type of messages that are allowed to be transmitted in the specific topic.

Robot Operating System について