Main Content

ROS ノードの生成と展開

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

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

トピック

MATLAB からの ROS ノードの展開

Simulink からの ROS ノードの展開

  • Generate a Standalone ROS Node from Simulink
    This example shows you how to generate and build a standalone ROS node 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 a Standalone ROS Node from Simulink.

Simulink からの CUDA 用に最適化された ROS ノードの展開

  • Generate CUDA ROS Node from Simulink
    Configure Simulink® Coder™ to generate and build a CUDA® ROS node from a Simulink model. You configure the model to simulate and generate CUDA code for ROS node. You then deploy the CUDA ROS node to local or remote device targets.
  • Lane and Vehicle Detection in ROS Using YOLO v2 Deep Learning Algorithm
    This example shows how to use deep convolutional neural networks inside a ROS enabled Simulink® model to perform lane and vehicle detection. In this example, you first read traffic video as the input and publish the frames as sensor_msgs/Image messages to a topic on the ROS network. Then you detect vehicles, and the left and right lane boundaries corresponding to the ego vehicle in every frame, annotate the input image with the detections, and publish them to a topic in the ROS network. Finally, you generate CUDA® optimized code for the ROS node from the Simulink model for lane and vehicle detection.
  • Sign Following Robot Using YOLOv2 Detection Algorithm with ROS in Simulink
    This example shows how to use Simulink® to control a simulated robot running on a separate ROS-based simulator. It then shows how to generate CUDA-optimized code for the ROS node, from the Simulink model and deploy it to the localhost device.

アプリケーション

  • Automated Parking Valet with ROS in Simulink
    Distribute an automated parking valet application among various nodes in a ROS network in Simulink®. This example extends the Automated Parking Valet (Automated Driving Toolbox) example in the Automated Driving Toolbox™. Using the Simulink model in the Automated Parking Valet in Simulink example, tune the planner, controller and vehicle dynamics parameters before partitioning the model into ROS nodes.
  • Automated Parking Valet with ROS 2 in Simulink
    This example shows how to distribute the Automated Parking Valet application among various nodes in a ROS 2 network in Simulink® and deploy them as standalone ROS 2 nodes. This example extends the Automated Parking Valet (Automated Driving Toolbox) example in the Automated Driving Toolbox™. Using the Simulink model in the Automated Parking Valet in Simulink example, tune the planner, controller and vehicle dynamic parameters before partitioning the model into ROS 2 nodes.
  • Generate ROS Node for UAV Waypoint Follower
    This example shows how to use MATLAB® code generation to create a ROS node to move an unmanned aerial vehicle (UAV) along a predefined circular path and a set of specified custom waypoints.
  • Generate a ROS Control Plugin from Simulink®
    This example shows how to generate and build a ros_control plugin from a Simulink model. In this example, you first configure a model to generate C++ code for a ros_control package. You then deploy the plugin on a virtual machine running Gazebo® to control a Pioneer 3DX 2-wheeled differential drive robot.