メインコンテンツ

ROS ノードの生成と展開

ROS ノード用の C/C++ および CUDA コードを生成し、ローカルおよびリモート ハードウェアに展開する

ROS Toolbox では、ROS ノード用の C++ および CUDA® コードを生成し、ローカルまたはリモート デバイス ターゲットに展開できます。ROS インターフェイスが含まれる MATLAB® コードの場合、MATLAB Coder™ (Generate a Standalone ROS Nodeを参照) を使用して C++ コードを生成し ROS ノードとして展開できます。Simulink® モデルの場合、Simulink Coder (Generate Standalone ROS Node from Simulinkを参照) を使用して C++ コードを生成するか、GPU Coder™ を使用して最適化された CUDA コードを生成し、ROS ノードとして展開できます。

メモ

ROS ノードを展開するには、SSH 接続を介してターゲット ROS デバイスにファイルを転送する必要があります。展開する前に OpenSSH がターゲット ROS デバイスにインストールされていることを確認してください。

トピック

MATLAB からの ROS ノードの生成および展開

Simulink からの ROS ノードの生成および展開

  • Generate Standalone ROS Node from Simulink
    Generate and build a standalone ROS node from a Simulink model.
  • Generate CUDA ROS Node from Simulink
    Configure Simulink Coder to generate and build a CUDA ROS node from a Simulink model.
  • Generate ROS or ROS 2 Packages for Model Reference Hierarchy in Simulink
    Model references in Simulink enable modular development and code reuse in large components. In robotics and autonomous systems applications, using a model reference hierarchy facilitates seamless integration during parallel development efforts for perception, motion-planning, and control algorithms. During code generation and deployment of Simulink model reference hierarchies as ROS or ROS 2 packages, you can package the code in one of these ways:
  • Generate a ROS Control Plugin from Simulink
    Generate and build a ros_control plugin from a Simulink model.
  • Enable External Mode for ROS Toolbox Models
    External mode enables Simulink on your host computer to communicate with a deployed model on your robotics hardware during runtime. External mode allows you to tune block mask parameters and to visualize signals on your model while your model is running. For ROS Toolbox, deployed models are ROS nodes running on the target hardware that communicates with Simulink over TCP/IP.
  • Generate Code to Manually Deploy a ROS Node from Simulink
    This example shows you how to generate C++ code from a Simulink model to deploy as a standalone ROS node. The code is generated on your computer and must be manually transferred to the target ROS device. No connection to the hardware is necessary for generated the code. For an automated deployment of a ROS node, see Generate Standalone ROS Node from Simulink.

注目の例