Main Content

このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。

コード生成

アルゴリズムを高速化する C/C++ コードと MEX 関数の生成

MATLAB® Coder™ は、コード生成のサポートが有効になっている Robotics System Toolbox™ の関数およびクラスから、スタンドアロンの C/C++ コードを生成します。ツールボックスと MATLAB Coder を使用すると、ANSI 準拠 C コードまたは MEX 関数を生成できます。

コード生成サポートの完全なリストを表示するには、Functions Supporting Code Generation を参照してください。任意のリファレンス ページの [Extended Capabilities] セクションを表示することもできます。

トピック

  • Accelerate Robotics Algorithms with Code Generation

    You can generate code for select Robotics System Toolbox algorithms to speed up their execution. Set up the algorithm that supports code generation as a separate function that you can insert into your workflow. To use code generation, you must have a MATLAB Coder license. For a list of code generation support in Robotics System Toolbox, see Functions Supporting Code Generation.

  • Generate Code for Inverse Kinematics Computation Using Robot from Robot Library

    This example shows how to perform code generation to compute Inverse Kinematics (IK) using robots from the robot library. For this example, you can use an inverseKinematics object with an included rigidBodyTree robot model using loadrobot to solve for robot configurations that achieve a desired end-effector position.

  • Generate Code for Manipulator Motion Planning in Perceived Environment

    This example shows how to generate code for planning manipulator motion in a perceived environment. Perceived environments can have a variable number of collision objects that can be a combination of heterogeneous types (spheres, cylinders, meshes, and boxes). This example uses the convertToCollisionMesh function to homogenize the cell array of collision objects by converting the primitive type objects to their mesh equivalents.

  • Generate Code for Motion Planning Using Robot Model Imported from URDF

    This example shows how to perform code generation to plan motion using robot model imported from URDF file. For this example, you use a manipulatorRRT object with a imported rigidBodyTree robot model to find a obstacle-free path between two configurations of the robot. After you verify the algorithm in MATLAB®, use the generated MEX file in the algorithm to visualize the robot movement.

  • Code Generation from MATLAB Code

    Several Robotics System Toolbox functions are enabled to generate C/C++ code. Code generation from MATLAB code requires the MATLAB Coder product. To generate code from robotics functions, follow these steps:Using the app, the basic workflow is:For a tutorial, see MATLAB Coder アプリを使用した C コードの生成 (MATLAB Coder).

  • コード生成のサポート

    Robotics System Toolbox の関数、クラス、または System object が含まれる MATLAB コードからコードを生成するには、MATLAB Coder ソフトウェアがなければなりません。