[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

JP2011086182A - Method and program for generating rt component for data relay - Google Patents

Method and program for generating rt component for data relay Download PDF

Info

Publication number
JP2011086182A
JP2011086182A JP2009239548A JP2009239548A JP2011086182A JP 2011086182 A JP2011086182 A JP 2011086182A JP 2009239548 A JP2009239548 A JP 2009239548A JP 2009239548 A JP2009239548 A JP 2009239548A JP 2011086182 A JP2011086182 A JP 2011086182A
Authority
JP
Japan
Prior art keywords
data
component
information
relay
primary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009239548A
Other languages
Japanese (ja)
Inventor
Go Suenaga
剛 末永
Kentaro Takemura
憲太郎 竹村
Jun Takamatsu
淳 高松
Tsukasa Ogasawara
司 小笠原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nara Institute of Science and Technology NUC
Original Assignee
Nara Institute of Science and Technology NUC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nara Institute of Science and Technology NUC filed Critical Nara Institute of Science and Technology NUC
Priority to JP2009239548A priority Critical patent/JP2011086182A/en
Priority to PCT/JP2009/069465 priority patent/WO2011045870A1/en
Publication of JP2011086182A publication Critical patent/JP2011086182A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

【課題】一次側及び二次側の2つのRTコンポーネントの間の通信ポートのミスマッチ及びデータの仕様の違いを吸収するデータ中継用RTコンポーネントを簡易に作成できること。
【解決手段】一次側における第1データの出力ポートの仕様と二次側における第2データの入力ポートの仕様と第1データ及び第2データのデータ型と乗算係数及びオフセット値の情報とを入力する情報入力手順(S1)と、第1データの入力処理と、第1データに対して乗算係数及びオフセット値による数値変換処理及び第2データのデータ型へのデータ型変換処理を施すことにより第2データを導出するデータ変換処理と、第2データの出力処理とを、ロボットが備えるコンピュータに実行させるためのデータ中継用RTコンポーネントのソースコードを自動生成して記憶装置に記憶させるソースコード生成手順(S2〜S7)とが、コンピュータにより実行される。
【選択図】図2
An object of the present invention is to easily create a data relay RT component that absorbs a communication port mismatch and data specification difference between two RT components on a primary side and a secondary side.
The specification of the output port of the first data on the primary side, the specification of the input port of the second data on the secondary side, the data type of the first data and the second data, the information of the multiplication coefficient and the offset value are input. Information input procedure (S1) to be performed, first data input processing, numerical conversion processing with a multiplication coefficient and an offset value, and data type conversion processing to the data type of the second data are performed on the first data. Source code generation procedure for automatically generating the source code of the RT component for data relay for causing the computer included in the robot to execute the data conversion process for deriving the two data and the output process of the second data, and storing it in the storage device (S2 to S7) are executed by the computer.
[Selection] Figure 2

Description

本発明は、RT(Robot Technology)ミドルウェアにおいて動作するデータ中継用RTコンポーネントを生成するデータ中継用RTコンポーネント生成方法及びそのプログラムに関するものである。   The present invention relates to a data relay RT component generation method for generating a data relay RT component that operates in RT (Robot Technology) middleware, and a program thereof.

昨今、ロボット開発の効率化のため、ロボット用の総合プラットフォームソフトウェアであるRTミドルウェアが提供されている。RTミドルウェアは、ロボットの要素となる様々な機能を実現するRTコンポーネントを通信ネットワークを介して組み合わせることを可能にする。そのため、RTミドルウェアを用いれば、既存のRTコンポーネントを利用して、多様なロボットシステムを容易に構築することが可能となる。このRTミドルウェアの代表例は、日本の独立行政法人産業技術総合研究所が提供するOpenRTM-aistである。   Recently, RT middleware, which is comprehensive platform software for robots, has been provided to improve the efficiency of robot development. RT middleware makes it possible to combine RT components that realize various functions as elements of a robot through a communication network. Therefore, if RT middleware is used, various robot systems can be easily constructed using existing RT components. A typical example of this RT middleware is OpenRTM-aist provided by Japan National Institute of Advanced Industrial Science and Technology.

なお、本明細書における用語「ロボット」は、移動ロボットやヒューマノイドロボット等のような一体となった知的装置を意味するだけの用語ではない。本明細書における用語「ロボット」は、ロボット技術を利用して実世界に働きかける機能を持つネットワーク化された知能化システムを総称する用語である。例えば、人間の生活空間の中に分散配置されたセンサやアクチュエータが、ネットワークを介して協調することによって生活支援や介護を実現するようなシステムも、本明細書におけるロボットに含まれる。   Note that the term “robot” in this specification is not just a term that means an integrated intelligent device such as a mobile robot or a humanoid robot. The term “robot” in this specification is a generic term for networked intelligent systems having a function of working in the real world using robot technology. For example, a system in which sensors and actuators distributed in a human living space cooperate with each other via a network to realize life support and nursing care is also included in the robot in this specification.

図9は、ロボットにおけるRTミドルウェアとRTコンポーネントとの関係を表す模式図である。RTコンポーネント20は、RTミドルウェア120の上で動作し、RTミドルウェア120は、所定のオペレーティングシステム110の上で動作する。前記RTコンポーネント20、前記RTミドルウェア120及び前記オペレーティングシステム110は、ロボットが備えるプロセッサによって実行されるプログラムである。RTコンポーネント20は、例えば、カメラによる撮像を行う機能、撮像画像の画像処理によって物体を認識する機能又はロボットアーム等のアクチュエータ又はセンサを制御する機能等のロボットの要素となる各機能を実現する。RTミドルウェア120においては、通信ネットワークを介して接続された複数のRTコンポーネント20が、相互にデータ通信を行いながら動作する。   FIG. 9 is a schematic diagram showing the relationship between RT middleware and RT components in the robot. The RT component 20 operates on the RT middleware 120, and the RT middleware 120 operates on a predetermined operating system 110. The RT component 20, the RT middleware 120, and the operating system 110 are programs executed by a processor included in the robot. The RT component 20 realizes various functions that are elements of the robot, such as a function of performing imaging by a camera, a function of recognizing an object by image processing of a captured image, or a function of controlling an actuator or sensor such as a robot arm. In the RT middleware 120, a plurality of RT components 20 connected via a communication network operate while performing data communication with each other.

また、非特許文献1に示されるように、RTミドルウェアにおけるRTコンポーネントの仕様は、OMG(Object Management Group)により標準化が進められている。OMGは、分散オブジェクト指向システムの標準化を目的として設立されたコンソーシアムである。このOMGにより規定される仕様に準拠したRTコンポーネントは、様々な企業や機関から提供される。また、RTコンポーネントは、予め定め標準化された仕様に準拠して自作することも可能である。例えば、非特許文献2には、入力データに対し、型変換又は加算/減算等の単純な処理を施すRTコンポーネントを作成した旨が示されている。   As shown in Non-Patent Document 1, the specification of RT components in RT middleware is being standardized by OMG (Object Management Group). OMG is a consortium established for the purpose of standardizing distributed object-oriented systems. RT components compliant with the specifications defined by the OMG are provided from various companies and institutions. In addition, the RT component can be made by itself according to a standard specification that has been determined in advance. For example, Non-Patent Document 2 indicates that an RT component has been created that performs simple processing such as type conversion or addition / subtraction on input data.

そして、複数の既存のRTコンポーネントを利用してロボットを作ることにより、多様な機能を実現するロボットを効率的に作ることができる。特に、複数の既存のRTコンポーネントのみを通信ネットワークを介して組み合わせることにより、所望の処理を行うロボットを実現できれば好適である。   Then, by creating a robot using a plurality of existing RT components, it is possible to efficiently create a robot that realizes various functions. In particular, it is preferable that a robot that performs a desired process can be realized by combining only a plurality of existing RT components via a communication network.

例えば、以下に示される4つのRTコンポーネントが予め提供されている場合を考える。即ち、第1のRTコンポーネントは、カメラによる撮像を行う機能を実現する。第2のRTコンポーネントは、カメラによる撮像画像に基づく画像処理によって物体を認識する機能を実現する。第3のRTコンポーネントは、ロボットアーム及びその基本的な動きを制御する機能を実現する。第4のRTコンポーネントは、画像処理により認識された物体を把持するようにロボットアームを制御する機能を実現する。   For example, consider the case where the following four RT components are provided in advance. That is, the first RT component realizes a function of performing imaging with a camera. The second RT component realizes a function of recognizing an object by image processing based on an image captured by a camera. The third RT component realizes the function of controlling the robot arm and its basic movement. The fourth RT component realizes a function of controlling the robot arm so as to hold an object recognized by image processing.

上記の場合、4つのRTコンポーネントを組み合わせるだけで、カメラにより得られた画像に基づいて物体を認識し、認識した物体をロボットアームによって把持するロボットを作ることができれば好適である。また、前記第4のRTコンポーネントを、他の自作のRTコンポーネントに置き換えるだけで、認識した物体に対し、ロボットアームによって所望の操作を行うロボットを作ることができれば好適である。   In the above case, it is preferable that a robot that recognizes an object on the basis of an image obtained by a camera and holds the recognized object by a robot arm can be formed by simply combining four RT components. In addition, it is preferable that a robot that performs a desired operation with respect to a recognized object by a robot arm can be created simply by replacing the fourth RT component with another self-made RT component.

しかしながら、実際には、複数の既存のRTコンポーネントを単に接続するだけでは、想定通りの機能を果たすロボットを実現できないことが多い。既存のRTコンポーネントの接続を阻害する第1の理由は、データを提供する側のRTポーネントの出力ポートの仕様と、データを受け取る側のRTコンポーネントの入力ポートの仕様とのミスマッチである。以下、データを提供する側のRTポーネントのことを一次側RTコンポーネントと称し、データを受け取る側のRTコンポーネントのことを二次側RTコンポーネントと称する。   However, in practice, it is often impossible to realize a robot that performs a function as expected simply by connecting a plurality of existing RT components. The first reason for obstructing the connection of the existing RT component is a mismatch between the specification of the output port of the RT component that provides data and the specification of the input port of the RT component that receives data. Hereinafter, the RT component that provides data is referred to as a primary RT component, and the RT component that receives data is referred to as a secondary RT component.

図10は、OMGにより標準化された通信ポートの種類を表す模式図である。OMGの規格では、"OutPort"と称される第1の通信ポート201と、"InPort"と称される第2の通信ポート202と、"Provider"と称される第3の通信ポート203と、"Consumer"と称される第4の通信ポート204とが用意されている。前記第1の通信ポート201及び前記第3の通信ポート203は、前記一次側RTコンポーネント21の通信ポートである。また、前記第2の通信ポート202及び前記第4の通信ポート204は、前記二次側RTコンポーネント22の通信ポートである。前記第1の通信ポート201と前記第2の通信ポート202との組合せは、"Data Port"と称され、前記第3の通信ポート203と前記第4の通信ポート204との組合せは、"Service Port"と称される。   FIG. 10 is a schematic diagram showing the types of communication ports standardized by OMG. In the OMG standard, a first communication port 201 called “OutPort”, a second communication port 202 called “InPort”, a third communication port 203 called “Provider”, A fourth communication port 204 called “Consumer” is prepared. The first communication port 201 and the third communication port 203 are communication ports of the primary RT component 21. The second communication port 202 and the fourth communication port 204 are communication ports of the secondary RT component 22. The combination of the first communication port 201 and the second communication port 202 is called “Data Port”, and the combination of the third communication port 203 and the fourth communication port 204 is “Service”. Port ".

図10(a)に示されるように、前記第2の通信ポート202は、前記第1の通信ポート201により出力されるデータを受け取ることができる。また、図10(b)に示されるように、前記第4の通信ポート204は、前記第3の通信ポート203により出力されるデータを受け取ることができる。また、前記第4の通信ポート204は、前記第3の通信ポート203に対してデータを引き渡すこともできる。   As shown in FIG. 10A, the second communication port 202 can receive data output by the first communication port 201. Further, as shown in FIG. 10B, the fourth communication port 204 can receive data output from the third communication port 203. The fourth communication port 204 can also deliver data to the third communication port 203.

より具体的には、"Data Port"の組合せにおいては、RTミドルウェアにより、前記第1の通信ポート201のデータバッファから前記第2の通信ポート202のデータバッファへデータが一定周期で転送される。一方、"Service Port"の組合せにおいては、RTミドルウェアにより、前記第4の通信ポート204側からのデータ取得要求に応じて、前記第3の通信ポート203のデータバッファから前記第4の通信ポート204のデータバッファへデータが転送される。また、"Service Port"の組合せにおいては、RTミドルウェアにより、前記第4の通信ポート204側からのデータ提供要求に応じて、前記第4の通信ポート204のデータバッファから前記第3の通信ポート203のデータバッファへデータが転送される場合もある。   More specifically, in the combination of “Data Port”, data is transferred at regular intervals from the data buffer of the first communication port 201 to the data buffer of the second communication port 202 by RT middleware. On the other hand, in the combination of “Service Port”, in response to a data acquisition request from the fourth communication port 204 side by RT middleware, from the data buffer of the third communication port 203 to the fourth communication port 204. The data is transferred to the data buffer. Further, in the combination of “Service Port”, the RT middleware makes the third communication port 203 from the data buffer of the fourth communication port 204 in response to a data provision request from the fourth communication port 204 side. Data may be transferred to the other data buffer.

しかしながら、図10(c)に示されるように、前記第1の通信ポート201と前記第4の通信ポート204との組合せは、ミスマッチの組合せである。また、図10(d)に示されるように、前記第3の通信ポート203と前記第2の通信ポート202との組合せも、ミスマッチの組合せである。これらミスマッチの組合せの下では、データの受け渡しを行うことができない。   However, as shown in FIG. 10C, the combination of the first communication port 201 and the fourth communication port 204 is a mismatch combination. Also, as shown in FIG. 10D, the combination of the third communication port 203 and the second communication port 202 is also a mismatch combination. Under these mismatch combinations, data cannot be transferred.

また、既存のRTコンポーネントの接続を阻害する第2の理由は、前記一次側RTポーネントの出力データの仕様と、前記二次側RTコンポーネントの入力データの仕様とのミスマッチである。ここで、データの仕様とは、データ型及び物理量としてのデータのレンジ等である。このデータの仕様のミスマッチが存在する場合、たとえデータの受け渡しが行われたとしても、想定通りの機能を果たすロボットは実現されない。   The second reason for hindering the connection of the existing RT component is a mismatch between the output data specification of the primary RT component and the input data specification of the secondary RT component. Here, the data specification includes a data type and a data range as a physical quantity. If there is a mismatch in the specification of this data, even if data is exchanged, a robot that performs the expected function is not realized.

そこで、従来のロボット開発者は、一次側RTコンポーネントと二次側RTコンポーネントとの組合せ毎に、データ中継用RTコンポーネントを自作(プログラミング)していた。ここで、データ中継用RTコンポーネントは、一次側RTコンポーネントの出力データを取得し、そのデータを二次側RTコンポーネントの入力データの仕様に合うように変換して二次側RTコンポーネントに提供するRTコンポーネントである。そして、従来のロボット開発者は、自作のデータ中継用RTコンポーネントを、一次側RTコンポーネントと二次側RTコンポーネントとの間に介在させることにより、所望の機能を果たすロボットを実現していた。   Therefore, a conventional robot developer has created (programmed) a data relay RT component for each combination of the primary RT component and the secondary RT component. Here, the RT component for data relay acquires the output data of the primary RT component, converts the data so as to meet the specifications of the input data of the secondary RT component, and provides the RT to the secondary RT component It is a component. Then, a conventional robot developer has realized a robot that performs a desired function by interposing a self-made data relay RT component between the primary RT component and the secondary RT component.

神徳徹雄, 水川真「RT ミドルウエア標準化活動への誘い-OMG ワシントン技術会議2008 の報告-」 ROBOMEC2008, 1P1-E23, 2008年6月Tetsuo Shintoku, Makoto Mizukawa “Invitation to RT Middleware Standardization Activity-Report of OMG Washington Technology Conference 2008” ROBOMEC2008, 1P1-E23, June 2008 渡部努, 相山康道「SimuLike: コンポーネントのデータ接続性向上のためのアダプタツール群の開発」 計測自動制御学会 SI2008, 1L4-2, 2008年12月Tsutomu Watanabe, Yasumichi Aiyama “SimuLike: Development of adapter tools for improving data connectivity of components” Society of Instrument and Control Engineers SI2008, 1L4-2, December 2008

しかしながら、一次側RTコンポーネントと二次側RTコンポーネントとの組合せ毎にデータ中継用RTコンポーネントを自作することは、非常に手間であるという問題点があった。そのため、従来は、既存のRTコンポーネントを利用することが、ロボット開発の十分な効率化につながらないことが多かった。   However, there is a problem that it is very troublesome to create a data relay RT component for each combination of the primary side RT component and the secondary side RT component. Therefore, conventionally, the use of existing RT components has often not led to sufficient efficiency in robot development.

一方、主要な一次側RTコンポーネント及び二次側RTコンポーネントの間に、非特許文献2に示されるような、型変換又は加算/減算等の単純な処理を施す複数の既存のRTコンポーネントを直列的に接続することが考えられる。この場合、直列的に接続された複数の既存のRTコンポーネントが、データ変換を行う。しかしながら、その場合、データが、発信元から最終的な送信先へ到達する間に、多くのRTコンポーネントの通信を経るため、データ伝送の遅延が生じやすいという問題点があった。   On the other hand, a plurality of existing RT components that perform simple processing such as type conversion or addition / subtraction as shown in Non-Patent Document 2 are serially arranged between the main primary RT component and the secondary RT component. It is possible to connect to. In this case, a plurality of existing RT components connected in series perform data conversion. However, in this case, there is a problem that data transmission is likely to be delayed because many RT components communicate while the data reaches the final transmission destination from the transmission source.

以上に示した問題点を解決するためには、一次側RTコンポーネントと二次側RTコンポーネントとの間の通信ポートのミスマッチ及びデータの仕様の違いを吸収するデータ中継用RTコンポーネントを簡易に生成できるツールが有効である。   In order to solve the above-mentioned problems, it is possible to easily generate a data relay RT component that absorbs the communication port mismatch and the data specification difference between the primary RT component and the secondary RT component. The tool is effective.

本発明は、一次側RTコンポーネントと二次側RTコンポーネントとの間の通信ポートのミスマッチ及びデータの仕様の違いを吸収するデータ中継用RTコンポーネントを簡易に作成できるデータ中継用RTコンポーネント生成方法及びそのプログラムを提供することを目的とする。   The present invention relates to a data relay RT component generation method capable of easily creating a data relay RT component that absorbs a communication port mismatch and a data specification difference between a primary RT component and a secondary RT component, and a method thereof The purpose is to provide a program.

上記目的を達成するために、本発明に係るデータ中継用RTコンポーネント生成方法は、データ中継用RTコンポーネントを生成する方法であり、次の(1)及び(2)に示される各手順をコンピュータにより実行することを特徴とする。ここで、前記データ中継用RTコンポーネントは、第1のRTコンポーネントから提供される第1データを第2データへ変換し、該第2データを第2のRTコンポーネントに提供する処理をRTミドルウェア上でプロセッサに実行させるプログラムモジュールである。   In order to achieve the above object, a data relay RT component generation method according to the present invention is a method of generating a data relay RT component. Each procedure shown in the following (1) and (2) is performed by a computer. It is characterized by performing. Here, the data relay RT component converts the first data provided from the first RT component into the second data, and performs processing for providing the second data to the second RT component on the RT middleware. A program module to be executed by a processor.

(1)第1の手順は、所定のデータ入力手段を通じて、前記第1のRTコンポーネントにおける前記第1データの出力ポートの仕様と前記第2のRTコンポーネントにおける前記第2データの入力ポートの仕様と前記第1データのデータ型と前記第2データのデータ型と数値変換用情報とを含むデータ中継条件情報を入力する情報入力手順である。(2)第2の手順は、前記出力ポートの仕様に対応して前記第1データを入力する第1データ入力処理と、該第1データに対して前記数値変換用情報を用いた数値変換処理及び前記第1データのデータ型から前記第2データのデータ型へのデータ型変換処理の各々を施すことにより前記第2データを導出するデータ変換処理と、該第2データを前記入力ポートの仕様に対応して出力する第2データ出力処理と、をロボットが備えるプロセッサに実行させるためのデータ中継用RTコンポーネントのソースコードを自動生成して記憶手段に記憶させるソースコード生成手順である。   (1) In the first procedure, the specification of the output port of the first data in the first RT component and the specification of the input port of the second data in the second RT component through predetermined data input means It is an information input procedure for inputting data relay condition information including the data type of the first data, the data type of the second data, and information for numerical conversion. (2) The second procedure includes a first data input process for inputting the first data corresponding to the specification of the output port, and a numerical value conversion process using the numerical value conversion information for the first data. And a data conversion process for deriving the second data by performing a data type conversion process from the data type of the first data to the data type of the second data, and the specification of the input port. 2 is a source code generation procedure for automatically generating the source code of the RT component for data relay for causing the processor included in the robot to execute the second data output processing to be output corresponding to the above and storing it in the storage means.

より具体的には、前記数値変換用情報が、乗算係数の情報及びオフセット値の情報を含むことが考えられる。この場合、前記数値変換処理は、前記乗算係数の情報を用いた乗算処理と前記オフセット値の情報を用いた加算処理とを含む。なお、本発明は、上記(1)及び上記(2)の各手順を実行する手段を備えたデータ中継用RTコンポーネント生成装置として捉えることもできる。また、本発明は、上記(1)及び上記(2)の各手順をコンピュータに実行させるためのデータ中継用RTコンポーネント生成プログラムとして捉えることもできる。   More specifically, it is conceivable that the numerical value conversion information includes information on multiplication coefficients and information on offset values. In this case, the numerical value conversion process includes a multiplication process using the multiplication coefficient information and an addition process using the offset value information. Note that the present invention can also be understood as a data relay RT component generation apparatus provided with means for executing the procedures (1) and (2). The present invention can also be understood as a data relay RT component generation program for causing a computer to execute the procedures (1) and (2).

本発明によれば、一次側RTコンポーネントである前記第1のコンポーネントと二次側RTコンポーネントである前記第2のコンポーネントとの間のデータの仕様の違いを吸収するデータ中継用RTコンポーネントを簡易に作成することができる。その結果、RTミドルウェア及び既存のRTコンポーネントを利用してロボットを作ることが容易となる。   According to the present invention, the RT component for data relay that absorbs the difference in data specifications between the first component that is the primary RT component and the second component that is the secondary RT component can be simplified. Can be created. As a result, it becomes easy to make a robot using RT middleware and existing RT components.

本発明の一実施形態に係るデータ中継用RTコンポーネント生成プログラムを実行する計算機100の概略ブロック図。1 is a schematic block diagram of a computer 100 that executes a data relay RT component generation program according to an embodiment of the present invention. 計算機100が実行するデータ中継用RTコンポーネント生成処理の手順の一例を表す第1のフローチャート。The 1st flowchart showing an example of the procedure of the RT component production | generation process for data relays which the computer 100 performs. 計算機100が実行するデータ中継用RTコンポーネント生成処理の手順の一例を表す第2のフローチャート。FIG. 10 is a second flowchart illustrating an example of a procedure of data relay RT component generation processing executed by the computer 100. FIG. 計算機100が実行するデータ中継用RTコンポーネント生成処理の手順の一例を表す第3のフローチャート。The 3rd flowchart showing an example of the procedure of RT component production | generation process for data relays which the computer 100 performs. 第1のグループに属するデータ中継用RTコンポーネントのデータ中継タイプを表す模式図。The schematic diagram showing the data relay type of the RT component for data relay which belongs to a 1st group. 第2のグループに属するデータ中継用RTコンポーネントのデータ中継タイプを表す模式図。The schematic diagram showing the data relay type of RT component for data relay which belongs to a 2nd group. 第3のグループに属するデータ中継用RTコンポーネントのデータ中継タイプを表す模式図。The schematic diagram showing the data relay type of the RT component for data relay which belongs to the 3rd group. 通信ポートの組合せのパターンごとの起動イベントの候補が一覧表示された図。The figure by which the candidate of the starting event for every pattern of the combination of communication ports was displayed as a list. ロボットにおけるRTミドルウェアとRTコンポーネントとの関係を表す模式図。The schematic diagram showing the relationship between RT middleware and RT component in a robot. OMGにより標準化された通信ポートの種類を表す模式図。The schematic diagram showing the kind of communication port standardized by OMG.

以下添付図面を参照しながら、本発明の実施の形態について説明し、本発明の理解に供する。なお、以下の実施の形態は、本発明を具体化した一例であり、本発明の技術的範囲は、以下の実施の形態の内容に限定されない。   Embodiments of the present invention will be described below with reference to the accompanying drawings for understanding of the present invention. The following embodiments are examples embodying the present invention, and the technical scope of the present invention is not limited to the contents of the following embodiments.

まず、図1に示されるブロック図を参照しつつ、本発明の一実施形態に係るデータ中継用RTコンポーネント生成プログラムを実行する計算機100の概略構成について説明する。即ち、計算機100は、本発明の一実施形態に係るデータ中継用RTコンポーネント生成装置である。データ中継用RTコンポーネント生成装置Xは、パーソナルコンピュータ又はワークステーション等の計算機である。図1に示されるように、計算機100は、CPU1、データ入力装置2、表示装置3及び記憶装置4を備えている。   First, a schematic configuration of a computer 100 that executes a data relay RT component generation program according to an embodiment of the present invention will be described with reference to a block diagram shown in FIG. That is, the computer 100 is a data relay RT component generation apparatus according to an embodiment of the present invention. The data relay RT component generation apparatus X is a computer such as a personal computer or a workstation. As shown in FIG. 1, the computer 100 includes a CPU 1, a data input device 2, a display device 3, and a storage device 4.

前記CPU1は、前記記憶装置4に記憶されたプログラムを実行する演算手段である。前記データ入力装置2は、当該計算機100にデータを入力するデータ入力手段の一例である。前記データ入力装置2は、例えば、当該計算機100のオペレータによる操作に従って当該計算機100にデータを入力するキーボード又はマウス等である。また、外部装置からネットワークを介してデータを入力するネットワークインターフェースカード等の通信手段が、前記データ入力装置2の一部又は全部として採用されてもよい。前記表示装置3は、液晶ディスプレイ又はCRT等であり、前記CPU1により実行されるプログラムの内容に応じて各種の情報を表示する装置である。前記記憶装置4は、ハードディスク又はRAMディスク等の記憶手段である。前記記憶装置4は、例えば、オペレーティングシステム10、データ中継用RTコンポーネント生成プログラム11及びコンパイラ12等が、予め記憶される。また、前記CPU1の処理によって生成されるデータ中継用RTコンポーネント23が、前記記憶装置4に記録される。   The CPU 1 is a calculation unit that executes a program stored in the storage device 4. The data input device 2 is an example of a data input unit that inputs data to the computer 100. The data input device 2 is, for example, a keyboard or a mouse that inputs data to the computer 100 according to an operation by an operator of the computer 100. Further, a communication means such as a network interface card for inputting data from an external device via a network may be adopted as part or all of the data input device 2. The display device 3 is a liquid crystal display, a CRT, or the like, and is a device that displays various types of information according to the contents of a program executed by the CPU 1. The storage device 4 is a storage means such as a hard disk or a RAM disk. In the storage device 4, for example, an operating system 10, a data relay RT component generation program 11, a compiler 12, and the like are stored in advance. Further, the data relay RT component 23 generated by the processing of the CPU 1 is recorded in the storage device 4.

前記データ中継用RTコンポーネント23は、データを提供する側の前記一次側RTコンポーネント21から、データを受け取る側の前記二次側RTコンポーネント22へのデータの伝送を中継するRTコンポーネントである。前記一次側RTコンポーネント21、前記二次側RTコンポーネント22及び前記データ中継用RTコンポーネント23は、いずれもRTミドルウェア120上で動作するソフトウェアである。   The data relay RT component 23 is an RT component that relays data transmission from the primary RT component 21 on the data providing side to the secondary RT component 22 on the data receiving side. The primary RT component 21, the secondary RT component 22, and the data relay RT component 23 are all software that operates on the RT middleware 120.

前記データ中継用RTコンポーネント23は、次の3つの処理を、ロボットが備えるマイクロプロセッサに実行させるためのプログラムモジュールである。その第1の処理は、前記一次側RTコンポーネント21から提供される一次側データを取得する処理である。第2の処理は、前記一次側データを前記二次側RTコンポーネント22に提供される二次側データへ変換する処理である。第3の処理は、前記二次側データを前記二次側RTコンポーネント22に提供する処理である。そして、前記データ中継用RTコンポーネント生成プログラム11は、前記データ入力装置2を通じて入力される所定の情報に基づいて、前記データ中継用RTコンポーネント23を自動生成する処理を前記CPU1に実行させるためのプログラムである。   The data relay RT component 23 is a program module for causing the microprocessor included in the robot to execute the following three processes. The first process is a process of acquiring primary data provided from the primary RT component 21. The second process is a process of converting the primary data into secondary data provided to the secondary RT component 22. The third process is a process for providing the secondary data to the secondary RT component 22. The data relay RT component generation program 11 is a program for causing the CPU 1 to execute processing for automatically generating the data relay RT component 23 based on predetermined information input through the data input device 2. It is.

次に、図2、図3及び図4に示されるフローチャートを参照しつつ、前記CPU1が、前記データ中継用RTコンポーネント生成プログラム11を実行することによって実現されるデータ中継用RTコンポーネント生成処理の手順の一例について説明する。以下の説明において、S1、S2、…は、処理の手順の識別符号を表す。また、前記データ中継用RTコンポーネント生成処理は、前記データ入力装置2に対し前記データ中継用RTコンポーネント生成プログラム11を起動するための操作がなされることによって開始される。   Next, referring to the flowcharts shown in FIG. 2, FIG. 3, and FIG. 4, the procedure of the data relay RT component generation processing realized by the CPU 1 executing the data relay RT component generation program 11 will be described. An example will be described. In the following description, S1, S2,... Represent process procedure identification codes. The data relay RT component generation process is started when an operation for starting the data relay RT component generation program 11 is performed on the data input device 2.

まず、前記CPU1は、前記データ入力装置2を通じて、データ中継条件情報を入力して前記記憶装置4に記録する処理を実行する(S1)。前記データ中継条件情報には、前記一次側RTコンポーネント21及び前記二次側RTコンポーネント各々の仕様に関する情報と、前記一次側データから前記二次側データへの数値変換に関する情報とが含まれている。以下、前者をコンポーネント仕様情報と称し、後者を数値変換用情報と称する。さらに、前記データ中継条件情報には、後述するイベント指定情報も含まれる。   First, the CPU 1 executes a process of inputting data relay condition information through the data input device 2 and recording it in the storage device 4 (S1). The data relay condition information includes information related to the specifications of the primary RT component 21 and the secondary RT component, and information related to numerical conversion from the primary data to the secondary data. . Hereinafter, the former is referred to as component specification information, and the latter is referred to as numerical value conversion information. Further, the data relay condition information includes event designation information described later.

また、前記コンポーネント仕様情報には、前記一次側RTコンポーネント21における前記一次側データの出力ポートの仕様及び前記一次側データのデータ型の情報が含まれている。また、前記コンポーネント仕様情報には、前記二次側RTコンポーネント22における前記二次側データの出力ポートの仕様及び前記二次側データのデータ型の情報も含まれている。さらに、前記コンポーネント仕様情報には、前記一次側RTコンポーネント21及び前記二次側RTコンポーネント22が、他のRTコンポーネントに対して提供するサービス名と、そのサービスを実現する関数群の名称と、その関数群の引数及び戻り値の情報とが含まれる。   The component specification information includes the output port specification of the primary data and the data type information of the primary data in the primary RT component 21. The component specification information also includes the output port specification of the secondary data and the data type of the secondary data in the secondary RT component 22. Further, the component specification information includes a service name that the primary RT component 21 and the secondary RT component 22 provide to other RT components, a name of a function group that realizes the service, It contains information on arguments and return values of functions.

前記OMGにより定められた分散オブジェクト技術の仕様であるCORBAに準拠したソフトウェアの環境においては、前記コンポーネント仕様情報は、前記一次側RTコンポーネント21及び前記二次側RTコンポーネント22各々のインターフェースファイルに含まれる。従って、前記CPU1は、前記記憶装置4に記憶された前記インターフェースファイルを読み込むバッチ処理により、前記コンポーネント仕様情報を入力することも考えられる。   In a software environment compliant with CORBA, which is a specification of the distributed object technology defined by the OMG, the component specification information is included in the interface files of the primary RT component 21 and the secondary RT component 22 respectively. . Therefore, the CPU 1 may input the component specification information by batch processing that reads the interface file stored in the storage device 4.

例えば、各RTコンポーネントがOMGの規格に準拠している場合、前記一次側データの出力ポート及び前記二次側データの入力ポート各々が図10に示した4種類の通信ポートのいずれに該当するか、を表す情報が、前記コンポーネント仕様情報の一部として入力される。さらに、各RTコンポーネントがOMGの規格に準拠している場合、前記一次側データ及び前記二次側データが、13種類のデータ型のいずれに該当するか、を表す情報も、前記コンポーネント仕様情報の一部として入力される。前記13種類のデータ型は、"Character"、"Double"、"Float"、"Long"、"LongDouble"、"LongLong"、"Octet"、"Short"、"UnsignedLong"、"UnsignedLongLong"、UnsignedShort"、"WideCharacter"及び"WideString"である。   For example, when each RT component conforms to the OMG standard, which of the four types of communication ports shown in FIG. 10 corresponds to each of the primary data output port and the secondary data input port? Are input as part of the component specification information. Furthermore, when each RT component conforms to the OMG standard, information indicating which of the 13 types of data types the primary side data and the secondary side data corresponds to is also included in the component specification information. Entered as part. The 13 types of data types are “Character”, “Double”, “Float”, “Long”, “LongDouble”, “LongLong”, “Octet”, “Short”, “UnsignedLong”, “UnsignedLongLong”, UnsignedShort ” , "WideCharacter" and "WideString".

一方、前記数値変換用情報には、前記一次側データの値に対する乗算処理に用いられる乗算係数の情報と、前記一次側データの値に対する加算処理に用いられるオフセット値の情報とが含まれる。前記乗算係数及び前記オフセット値は、前記一次側データを、前記二次側RTコンポーネント22におけるデータの入力レンジに合うデータへ変換するための数値である。   On the other hand, the information for numerical conversion includes information on a multiplication coefficient used for a multiplication process on the value of the primary side data and information on an offset value used for an addition process on the value of the primary side data. The multiplication coefficient and the offset value are numerical values for converting the primary side data into data suitable for the data input range in the secondary side RT component 22.

例えば、前記一次側RTコンポーネント21の出力レンジの仕様が、0(mm)から1000(mm)の範囲の物理量を0から255の範囲の値で出力する仕様であり、前記二次側RTコンポーネント22の入力レンジの仕様が−1000(mm)から+1000(mm)の範囲の物理量を0から255の範囲の値で入力する仕様である場合を考える。この場合、前記一次側データを、前記二次側RTコンポーネント22におけるデータの入力レンジに合うデータへ変換するために、前記乗算係数として0.5が入力され、前記オフセット値として127.5が入力される。   For example, the specification of the output range of the primary RT component 21 is a specification for outputting a physical quantity in the range of 0 (mm) to 1000 (mm) as a value in the range of 0 to 255, and the secondary RT component 22 Suppose that the input range specification is a specification for inputting a physical quantity in the range of −1000 (mm) to +1000 (mm) with a value in the range of 0 to 255. In this case, in order to convert the primary side data into data suitable for the data input range in the secondary side RT component 22, 0.5 is input as the multiplication coefficient and 127.5 is input as the offset value. Is done.

また、前記数値変換用情報は、前記乗算係数及び前記オフセット値を一意に特定できる間接的な情報であることも考えられる。例えば、前記一次側データの2つのサンプル値(x1,x2)と、その各々に対応する前記二次側データの2つのサンプル値(y1,y2)との組合せ(x1,y1)及び(x2,y2)が、前記数値変換用情報として入力されてもよい。この場合、前記CPU1は、前記乗算係数k及び前記オフセット値hを、"k=(y1-y2)/(x1-x2)"及び"h=(x2*y1-x1*y2)/(x2-x1)"の各式により算出する。なお、"*"は乗算を表す符号である。   The numerical value conversion information may be indirect information that can uniquely identify the multiplication coefficient and the offset value. For example, combinations (x1, y1) and (x2, x2) of the two sample values (x1, x2) of the primary data and the two sample values (y1, y2) of the secondary data corresponding to each y2) may be input as the numerical value conversion information. In this case, the CPU 1 sets the multiplication coefficient k and the offset value h to “k = (y1−y2) / (x1−x2)” and “h = (x2 * y1−x1 * y2) / (x2−). x1) "is calculated by each formula. Note that “*” is a sign representing multiplication.

なお、前記コンポーネント仕様情報、前記数値変換用情報及び前記イベント指定情報が、それぞれ異なるルートで入力されることも考えられる。例えば、前記コンポーネント仕様情報が、ネットワーク経由により、又は、前記記憶装置4からのデータ読み出しにより入力され、前記数値変換用情報及び前記イベント指定情報が、キーボード等の操作に応じて入力されることが考えられる。   The component specification information, the numerical value conversion information, and the event designation information may be input through different routes. For example, the component specification information may be input via a network or by reading data from the storage device 4, and the numerical value conversion information and the event designation information may be input in response to an operation of a keyboard or the like. Conceivable.

次に、前記CPU1は、前記コンポーネント仕様情報に基づいて、前記データ中継用RTコンポーネント23のフレームワークを生成し、そのフレームワークを前記記憶装置4に記録する(S2)。以下、このステップS2で生成される前記データ中継用RTコンポーネント23のフレームワークのことを、単にフレームワークと称する。RTコンポーネントのフレームワークを生成するためのプログラムは、例えば、独立行政法人産業技術総合研究所から"RtcTemplate"として提供されており、そのプログラムは、ステップS2の処理を行うプログラムとして採用できる。"RtcTemplate"は、"OpenRTM-aist"として提供されるプログラム群の一部である。   Next, the CPU 1 generates a framework of the data relay RT component 23 based on the component specification information, and records the framework in the storage device 4 (S2). Hereinafter, the framework of the data relay RT component 23 generated in step S2 is simply referred to as a framework. A program for generating the framework of the RT component is provided as, for example, “RtcTemplate” from the National Institute of Advanced Industrial Science and Technology, and the program can be adopted as a program for performing the process of step S2. “RtcTemplate” is a part of a program group provided as “OpenRTM-aist”.

前記フレームワークには、前記一次側RTコンポーネント21の通信ポートに対応してデータを受信する一次側の通信インターフェースのソースコードと、前記二次側RTコンポーネント22の通信ポートに対応してデータを送信する二次側の通信インターフェースのソースコードとが含められる。   The framework transmits source code corresponding to the communication port of the primary RT component 21 and data corresponding to the communication port of the secondary RT component 22 and the source code of the primary communication interface that receives the data. Secondary source communication interface source code.

例えば、前記一次側の通信インターフェースのソースコードには、入力側のデータバッファを定義するソースコードが含められる。また、前記二次側の通信インターフェースのソースコードには、出力側のデータバッファを定義するソースコードが含められる。前記入力側のデータバッファは、前記RTミドルウェア120によって前記一次側RTコンポーネント21から転送される前記一次側データが格納されるデータバッファである。また、前記出力側のデータバッファは、前記二次側データを格納すべきデータバッファである。前記二次側のデータバッファに格納された前記二次側データは、前記RTミドルウェア120によって前記二次側RTコンポーネント22へ転送される。   For example, the source code of the primary-side communication interface includes source code defining an input-side data buffer. The source code of the secondary communication interface includes source code that defines an output data buffer. The data buffer on the input side is a data buffer in which the primary data transferred from the primary RT component 21 by the RT middleware 120 is stored. The output data buffer is a data buffer in which the secondary data is to be stored. The secondary data stored in the secondary data buffer is transferred to the secondary RT component 22 by the RT middleware 120.

なお、前記一次側の通信インターフェースのソースコードは、前記一次側RTコンポーネント21の出力ポートの仕様に対応して前記一次側データを入力する処理を、ロボットが備えるプロセッサに実行させるためのプログラムのソースコードの一例である。また、前記二次側の通信インターフェースのソースコードは、前記二次側RTコンポーネント22の入力ポートの仕様に対応して前記二次側データを出力する処理を、ロボットが備えるプロセッサに実行させるためのプログラムのソースコードの一例である。   The source code of the primary side communication interface is a source of a program for causing a processor included in the robot to execute a process of inputting the primary side data corresponding to the specification of the output port of the primary side RT component 21 It is an example of code. The source code of the secondary side communication interface is for causing a processor included in the robot to execute a process of outputting the secondary side data corresponding to the specification of the input port of the secondary side RT component 22. It is an example of the source code of a program.

以下、図5、図6及び図7を参照しつつ、前記一次側データの出力ポート及び前記二次側データの入力ポートの組合せについて説明する。以下に示す例は、前記一次側RTコンポーネント21及び前記二次側RTコンポーネント22が、OMGにより標準化された通信ポートを有するRTコンポーネントである場合の例である。この場合、前記データ中継用RTコンポーネント23を介してのデータの受け渡しが成立し得る前記一次側データの出力ポート及び前記二次側データの入力ポートの組合せは、図5〜図7に示される9通りのパターンが考えられる。なお、前記一次側データの出力ポートと、前記一次側RTコンポーネント21が前記一次側データを送信する通信ポートとは同じ意味である。また、前記二次側データの入力ポートと、前記二次側RTコンポーネント22が前記二次側データを受信する通信ポートとは同じ意味である。   Hereinafter, the combination of the primary data output port and the secondary data input port will be described with reference to FIGS. 5, 6, and 7. In the example shown below, the primary RT component 21 and the secondary RT component 22 are RT components having communication ports standardized by OMG. In this case, combinations of the output port of the primary data and the input port of the secondary data that can be passed data through the data relay RT component 23 are shown in FIGS. Street patterns are possible. The primary data output port and the communication port through which the primary RT component 21 transmits the primary data have the same meaning. The secondary data input port and the communication port through which the secondary RT component 22 receives the secondary data have the same meaning.

図5には、前記一次側データの出力ポートが、OMGの規格において"OutPort"と称される前記第1の通信ポート201である場合の3つのパターン<P1>〜<P3>が示されている。図6には、前記一次側データの出力ポートが、OMGの規格において"Provider"と称される前記第3の通信ポート203である場合の3つのパターン<P4>〜<P6>)が示されている。図7には、前記一次側データの出力ポートが、OMGの規格において"Consumer"と称される前記第4の通信ポート204である場合の3つのパターン<P7>〜<P9>が示されている。なお、前記第1の通信ポート201は、その性質上、前記二次側データの入力ポートにはなり得ない。同様に、前記第2の通信ポート202は、その性質上、前記一次側データの出力ポートにはなり得ない。   FIG. 5 shows three patterns <P1> to <P3> when the primary data output port is the first communication port 201 called "OutPort" in the OMG standard. Yes. FIG. 6 shows three patterns <P4> to <P6> when the primary data output port is the third communication port 203 called "Provider" in the OMG standard. ing. FIG. 7 shows three patterns <P7> to <P9> when the primary data output port is the fourth communication port 204 referred to as “Consumer” in the OMG standard. Yes. The first communication port 201 cannot be an input port for the secondary data due to its nature. Similarly, the second communication port 202 cannot be the primary data output port due to its nature.

また、パターン<P1>、パターン<P2>及びパターン<P3>は、それぞれ前記二次側データが、前記第2の通信ポート202、前記第4の通信ポート204及び前記第3の通信ポート203により受信されるパターンである。また、パターン<P4>、パターン<P5>及びパターン<P6>は、それぞれ前記二次側データが、前記第2の通信ポート202、前記第4の通信ポート204及び前記第3の通信ポート203により受信されるパターンである。同様に、パターン<P7>、パターン<P8>及びパターン<P9>は、それぞれ前記二次側データが、前記第2の通信ポート202、前記第4の通信ポート204及び前記第3の通信ポート203により受信されるパターンである。   In the pattern <P1>, the pattern <P2>, and the pattern <P3>, the secondary data is transmitted by the second communication port 202, the fourth communication port 204, and the third communication port 203, respectively. It is a received pattern. In the pattern <P4>, the pattern <P5>, and the pattern <P6>, the secondary data is transmitted from the second communication port 202, the fourth communication port 204, and the third communication port 203, respectively. It is a received pattern. Similarly, in the pattern <P7>, the pattern <P8>, and the pattern <P9>, the secondary data includes the second communication port 202, the fourth communication port 204, and the third communication port 203, respectively. Is a pattern received by

前記CPU1は、ステップS2において、パターン<P1>〜パターン<P9>のいずれかに対応した前記一次側の通信インターフェース及び前記二次側の通信インターフェース各々のソースコードを含む前記フレームワークを生成する。即ち、ポートの組合せが、パターン<P1>〜パターン<P3>のいずれかである場合、前記第2の通信ポート202として動作するためのインターフェースが、前記一次側の通信インターフェースとして設定される。また、ポートの組合せが、パターン<P4>〜パターン<P6>のいずれかである場合、前記第4の通信ポート204として動作するためのインターフェースが、前記一次側の通信インターフェースとして設定される。また、ポートの組合せが、パターン<P7>〜パターン<P9>のいずれかである場合、前記第3の通信ポート203として動作するためのインターフェースが、前記一次側の通信インターフェースとして設定される。   In step S2, the CPU 1 generates the framework including source codes of the primary side communication interface and the secondary side communication interface corresponding to any of the patterns <P1> to <P9>. That is, when the combination of ports is any one of the patterns <P1> to <P3>, an interface for operating as the second communication port 202 is set as the primary-side communication interface. When the combination of the ports is any one of the patterns <P4> to <P6>, an interface for operating as the fourth communication port 204 is set as the primary-side communication interface. When the combination of the ports is any one of the patterns <P7> to <P9>, an interface for operating as the third communication port 203 is set as the primary-side communication interface.

また、通信ポートの組合せが、パターン<P1>、パターン<P4>及びパターン<P7>のうちのいずれかである場合、前記第1の通信ポート201として動作するためのインターフェースが、前記二次側の通信インターフェースとして設定される。また、パターン<P2>、パターン<P5>及びパターン<P8>のいずれかである場合、前記第3の通信ポート203として動作するためのインターフェースが、前記二次側の通信インターフェースとして設定される。また、パターン<P3>、パターン<P6>及びパターン<P9>のいずれかである場合、前記第4の通信ポート204として動作するためのインターフェースが、前記二次側の通信インターフェースとして設定される。   When the combination of communication ports is any one of the pattern <P1>, the pattern <P4>, and the pattern <P7>, an interface for operating as the first communication port 201 is the secondary side Is set as the communication interface. When the pattern <P2>, pattern <P5>, or pattern <P8> is set, an interface for operating as the third communication port 203 is set as the secondary-side communication interface. When the pattern <P3>, pattern <P6>, or pattern <P9> is set, an interface for operating as the fourth communication port 204 is set as the secondary-side communication interface.

次に、前記CPU1は、前記一次側データから前記二次側データへのデータ変換処理を実行する前提条件となるイベントを判別する処理を行う(S3)。以下、そのイベントのことを起動イベントと称する。前記起動イベントの判別は、前記一次側データの出力ポート及び前記二次側データの入力ポート各々の種類(仕様)と、前記イベント指定情報とに基づいて行われる。前記イベント指定情報は、少なくとも前記一次側RTコンポーネント21の動作に起因して生じるイベント及び前記二次側RTコンポーネント21の動作に起因して生じるイベントのいずれかを指定する情報である。   Next, the CPU 1 performs a process of determining an event as a precondition for executing a data conversion process from the primary data to the secondary data (S3). Hereinafter, this event is referred to as an activation event. The activation event is determined based on the types (specifications) of the primary data output port and the secondary data input port, and the event designation information. The event designation information is information for designating at least one of an event caused by the operation of the primary side RT component 21 and an event caused by the operation of the secondary side RT component 21.

前記起動イベントの判別は、以下の5つの候補のうちから1つを選択することによって行われる。第1の候補は、前記一次側RTコンポーネント21が前記第1の通信ポート201を通じて前記一次側データをデータバッファへ書き込んだ直後に生じるイベントである。以下、このイベントのことを"Write"イベントと称する。第2の候補は、前記一次側RTコンポーネント21が前記第4の通信ポート204を通じて前記一次側データを送信した直後に生じるイベントである。以下、このイベントのことを"Set"イベントと称する。第3の候補は、前記二次側RTコンポーネント22が前記第2の通信ポート202を通じて前記二次側データをデータバッファから読み出す直前に生じるイベントである。以下、このイベントのことを"Read"イベントと称する。第4の候補は、前記二次側RTコンポーネント22が前記第4の通信ポート204を通じて前記二次側データを受信する直前に生じるイベントである。以下、このイベントのことを"Get"イベントと称する。第5の候補は、前記データ中継用RTコンポーネント23自らが一定周期で発生させるイベントである。以下、このイベントのことを"Execute"イベントと称する。   The activation event is determined by selecting one of the following five candidates. The first candidate is an event that occurs immediately after the primary RT component 21 writes the primary data to the data buffer through the first communication port 201. Hereinafter, this event is referred to as a “Write” event. The second candidate is an event that occurs immediately after the primary RT component 21 transmits the primary data through the fourth communication port 204. Hereinafter, this event is referred to as a “Set” event. The third candidate is an event that occurs immediately before the secondary RT component 22 reads the secondary data from the data buffer through the second communication port 202. Hereinafter, this event is referred to as a “Read” event. The fourth candidate is an event that occurs immediately before the secondary RT component 22 receives the secondary data through the fourth communication port 204. Hereinafter, this event is referred to as a “Get” event. The fifth candidate is an event generated by the data relay RT component 23 itself at a constant cycle. Hereinafter, this event is referred to as an “Execute” event.

ここで、"Write"イベント及び"Set"イベントは、前記一次側RTコンポーネント21の動作に起因して生じる一次側イベントである。また、"Read"イベント及び"Get"イベントは、前記二次側RTコンポーネント22の動作に起因して生じる二次側イベントである。また、"Execute"イベントは、前記データ中継用RTコンポーネント23自らが一定周期で発生させる自分のイベントである。図8は、通信ポートの組合せのパターンごとの前記起動イベントの候補が一覧表示された図である。   Here, the “Write” event and the “Set” event are primary events caused by the operation of the primary RT component 21. The “Read” event and the “Get” event are secondary events that occur due to the operation of the secondary RT component 22. The “Execute” event is an event generated by the data relay RT component 23 itself at a constant cycle. FIG. 8 is a diagram in which the activation event candidates are listed for each communication port combination pattern.

前記CPU1は、ステップS3において、通信ポートの組合せのパターンに応じた前記起動イベントの候補の中から、前記イベント指定情報により指定される候補を、前記起動イベントとして選択する。前記イベント指定情報は、通信ポートの組合せのパターンに応じた前記起動イベントの候補が複数存在する場合に、前記一次側イベント、前記二次側イベント及び前記自分のイベントのうちのいずれを前記起動イベントとして選択するかを指定する情報である。なお、前記イベント指定情報により指定される候補が存在しない場合の例外処理は、各種考えられる。前記例外処理としては、例えば、エラーメッセージを出力することによる中断処理、又は、前記自分のイベントを選択する処理等が考えられる。   In step S <b> 3, the CPU 1 selects a candidate designated by the event designation information as the activation event from the activation event candidates according to the combination pattern of communication ports. The event designation information includes any one of the primary side event, the secondary side event, and the own event as the start event when there are a plurality of start event candidates corresponding to a combination pattern of communication ports. It is information that specifies whether to select as. Various exception processing can be considered when there is no candidate designated by the event designation information. As the exception processing, for example, interruption processing by outputting an error message, processing for selecting the own event, or the like can be considered.

次に、前記CPU1は、ステップS3での判別結果である前記起動イベントに対応したイベントドリブン型の関数を前記フレームワークに設定する(S4)。以下、このイベントドリブン型の関数を関数"Fi"と称する。このステップS4では、具体的な処理を実行するためのソースコードが未だ含まれていない状態の関数"Fi"が、前記フレームワーク内に定義される。さらに、ステップS4では、関数"Fi"が、前記起動イベントの発生に応じて前記RTミドルウェア120によって起動されるための所定の登録処理が行われる。   Next, the CPU 1 sets an event-driven function corresponding to the activation event, which is the determination result in step S3, in the framework (S4). Hereinafter, this event-driven function is referred to as a function “Fi”. In this step S4, a function “Fi” in a state in which a source code for executing a specific process is not yet included is defined in the framework. Further, in step S4, a predetermined registration process is performed for the function “Fi” to be activated by the RT middleware 120 in response to the occurrence of the activation event.

例えば、前記起動イベントが"Write"イベントである場合、関数"Fi"として、コールバック関数"OnWrite"が設定される。コールバック関数"OnWrite"は、前記一次側RTコンポーネント21が前記第1の通信ポート201を通じて前記一次側データをデータバッファへ書き込んだ直後に、前記RTミドルウェア120によって起動される関数である。また、前記起動イベントが"Read"イベントである場合、関数"Fi"として、コールバック関数"OnRead"が設定される。コールバック関数"OnRead"は、前記二次側RTコンポーネント22が前記第2の通信ポート202を通じて前記二次側データをデータバッファから読み出す直前に、前記RTミドルウェア120によって起動される関数である。また、前記起動イベントが"Execute"イベントである場合、関数"Fi"として、コールバック関数"OnExecute"が設定される。コールバック関数"OnExecute"は、前記RTミドルウェア120によって一定周期で起動される関数である。なお、その周期は、別途設定される。   For example, when the activation event is a “Write” event, the callback function “OnWrite” is set as the function “Fi”. The callback function “OnWrite” is a function activated by the RT middleware 120 immediately after the primary RT component 21 writes the primary data to the data buffer via the first communication port 201. When the activation event is a “Read” event, the callback function “OnRead” is set as the function “Fi”. The callback function “OnRead” is a function that is activated by the RT middleware 120 immediately before the secondary RT component 22 reads the secondary data from the data buffer through the second communication port 202. When the activation event is an “Execute” event, the callback function “OnExecute” is set as the function “Fi”. The callback function “OnExecute” is a function that is activated by the RT middleware 120 at a constant cycle. The period is set separately.

次に、前記CPU1は、関数"Fi"内に、当該関数"Fi"が実行する具体的な処理の内容を規定するソースコードを追加する(S5)。以下、図3に示されるフローチャートを参照しつつ、ステップS5における処理の詳細について説明する。   Next, the CPU 1 adds a source code that defines the content of specific processing executed by the function “Fi” in the function “Fi” (S5). The details of the processing in step S5 will be described below with reference to the flowchart shown in FIG.

ステップS5において、前記CPU1は、以下に示す第1の条件が成立しているか否かを判別する(S11)。前記第1の条件は、次に示す条件1.1及び条件1.2の2つの条件のうちの1つ以上が成立するという条件である。   In step S5, the CPU 1 determines whether or not the following first condition is satisfied (S11). The first condition is a condition that one or more of the following two conditions of condition 1.1 and condition 1.2 are satisfied.

まず、条件1.1は、前記起動イベントが前記二次側イベント又は前記自分のイベントであり、かつ、前記データ中継用RTコンポーネント23の一次側の通信ポートが前記一次側データの受信を制御できるポートであるという条件である。ここで、前記データ中継用RTコンポーネント23の一次側の通信ポートが前記第4の通信ポート204である場合が、前記一次側データの受信を制御できる場合である。その他の通信ポートは、RTコンポーネント自体によるデータの受信タイミングの制御を行うことができない。次に、条件1.2は、前記起動イベントが前記一次側イベントであるという条件である。より具体的には、その一次側イベントは、"Set"イベント又は"Write"イベントである。   First, the condition 1.1 is that the activation event is the secondary event or the own event, and the primary communication port of the data relay RT component 23 can control reception of the primary data. It is a condition that it is a port. Here, the case where the primary communication port of the data relay RT component 23 is the fourth communication port 204 is a case where reception of the primary data can be controlled. Other communication ports cannot control the data reception timing by the RT component itself. Next, the condition 1.2 is a condition that the activation event is the primary event. More specifically, the primary event is a “Set” event or a “Write” event.

そして、前記第1の条件が成立していると判別された場合、前記CPU1は、関数"Fi"内に、前記一次側データを受信するためのソースコードを追加する(S12)。より具体的には、ステップS12で追加されるソースコードは、次の3種類のソースコードが考えられる。   If it is determined that the first condition is satisfied, the CPU 1 adds a source code for receiving the primary data to the function “Fi” (S12). More specifically, the following three types of source codes can be considered as the source code added in step S12.

1つ目は、前記第4の通信ポート204を通じて、前記一次側RTコンポーネント21にデータを要求するソースコードである。このソースコードは、条件1.1が成立する場合に追加される。例えば、前記CPU1は、前記一次側RTコンポーネント21により提供されるサービス関数"Get"を利用して前記一次側データを要求するソースコードを追加する。ロボット制御の実行環境において、前記RTミドルウェア120は、その要求に応じて、前記一次側データを前記一次側RTコンポーネント21から前記データ中継用RTコンポーネント23へ転送する。   The first is source code for requesting data from the primary RT component 21 through the fourth communication port 204. This source code is added when the condition 1.1 is satisfied. For example, the CPU 1 adds a source code for requesting the primary data by using a service function “Get” provided by the primary RT component 21. In the robot control execution environment, the RT middleware 120 transfers the primary data from the primary RT component 21 to the data relay RT component 23 in response to the request.

2つ目は、前記第2の通信ポート202を通じて、前記一次側RTコンポーネント21からデータを取得するソースコードである。このソースコードは、条件1.2が成立する場合に追加されるソースコードのうちの1つである。例えば、前記CPU1は、コールバック関数"OnWrite"の引数として前記一次側RTコンポーネント21から引き渡される前記一次側データを取得するソースコードを追加する。   The second is source code for acquiring data from the primary RT component 21 through the second communication port 202. This source code is one of the source codes added when the condition 1.2 is satisfied. For example, the CPU 1 adds source code for acquiring the primary data delivered from the primary RT component 21 as an argument of the callback function “OnWrite”.

3つ目は、前記第3の通信ポート203を通じて、前記一次側RTコンポーネント21からデータを取得するソースコードである。このソースコードは、条件1.2が成立する場合に追加されるソースコードのうちの1つである。例えば、前記CPU1は、当該データ中継用RTコンポーネント23が提供するサービス関数"Set"の利用により、前記一次側RTコンポーネント21から引き渡される前記一次側データを、取得するソースコードを追加する。そのデータは、例えば、サービス関数"Set"の引数として引き渡される。   The third is source code for acquiring data from the primary RT component 21 through the third communication port 203. This source code is one of the source codes added when the condition 1.2 is satisfied. For example, the CPU 1 adds a source code for acquiring the primary data delivered from the primary RT component 21 by using the service function “Set” provided by the data relay RT component 23. The data is delivered as an argument of the service function “Set”, for example.

ところで、前記第1の条件が成立しない状況は、前記起動イベントが前記二次側イベントであって、かつ、前記一次側データを受信するためのソースコード、即ち、前記一次側イベントを自発的に発生させるためのソースコードが、そもそも存在しない状況である。従って、前記データ中継用RTコンポーネント23の一次側の通信ポートが、前記第4の通信ポート204ではない。この場合、前記データ中継用RTコンポーネント23は、主体的にデータ受信を行うことができない。即ち、データ受信のタイミングは、前記RTミドルウェア120によって制御される。   By the way, the situation where the first condition is not satisfied is that the activation event is the secondary event and the source code for receiving the primary data, that is, the primary event is voluntarily generated. There is no source code to generate them in the first place. Therefore, the primary communication port of the data relay RT component 23 is not the fourth communication port 204. In this case, the data relay RT component 23 cannot independently receive data. That is, the timing of data reception is controlled by the RT middleware 120.

一方、前記第1の条件が成立していないと判別された場合、前記CPU1は、関数"Fi"内に、前記一次側データを入力用の内部データバッファから読み出すためのソースコードを追加する(S13)。   On the other hand, when it is determined that the first condition is not satisfied, the CPU 1 adds source code for reading the primary data from the internal data buffer for input to the function “Fi” ( S13).

また、前記CPU1は、関数"Fi"内に、データ変換処理のソースコードを追加する(S14)。このステップS14の処理の手順は、図4に示されるが、その内容は後述する。   Further, the CPU 1 adds a source code for data conversion processing to the function “Fi” (S14). The procedure of the process in step S14 is shown in FIG. 4 and will be described later.

また、前記CPU1は、ステップS5の処理の一部として、以下に示す第2の条件が成立しているか否かを判別する(S14)。前記第2の条件は、次に示す条件2.1及び条件2.2の2つの条件のうちの1つ以上が成立するという条件である。   Further, the CPU 1 determines whether or not the following second condition is satisfied as part of the process of step S5 (S14). The second condition is a condition that one or more of the following two conditions 2.1 and 2.2 are satisfied.

まず、条件2.1は、前記起動イベントが前記一次側イベント又は前記自分のイベントであり、かつ、前記データ中継用RTコンポーネント23の二次側の通信ポートが前記二次側データの送信を制御できるポートであるという条件である。ここで、前記データ中継用RTコンポーネント23の二次側の通信ポートが前記第4の通信ポート204である場合が、前記二次側データの送信を制御できる場合である。その他の通信ポートは、RTコンポーネント自体によるデータの送信タイミングの制御を行うことができない。次に、条件2.2は、前記起動イベントが前記二次側イベントであるという条件である。より具体的には、その二次側イベントは、"Read"イベント又は"Get"イベントである。   First, the condition 2.1 is that the start event is the primary event or the own event, and the secondary communication port of the data relay RT component 23 controls the transmission of the secondary data. It is a condition that it is a possible port. Here, the case where the secondary communication port of the data relay RT component 23 is the fourth communication port 204 is a case where the transmission of the secondary data can be controlled. Other communication ports cannot control the data transmission timing by the RT component itself. Next, the condition 2.2 is a condition that the start event is the secondary event. More specifically, the secondary event is a “Read” event or a “Get” event.

そして、前記第2の条件が成立していると判別された場合、前記CPU1は、関数"Fi"内に、前記二次側データを送信するためのソースコードを追加する(S15)。より具体的には、ステップS15で追加されるソースコードは、次の3種類のソースコードが考えられる。   If it is determined that the second condition is satisfied, the CPU 1 adds a source code for transmitting the secondary data to the function “Fi” (S15). More specifically, the following three types of source codes can be considered as the source code added in step S15.

1つ目は、前記第4の通信ポート204を通じて、前記二次側RTコンポーネント22に対するデータ送信を要求するソースコードである。このソースコードは、条件2.1が成立する場合に追加される。例えば、前記CPU1は、前記二次側RTコンポーネント22により提供されるサービス関数"Set"を利用して前記二次側データの送信を要求するソースコードを追加する。ロボット制御の実行環境において、前記RTミドルウェア120は、その要求に応じて、前記二次側データを前記データ中継用RTコンポーネント23から前記二次側RTコンポーネント22へ転送する。   The first is source code for requesting data transmission to the secondary RT component 22 through the fourth communication port 204. This source code is added when the condition 2.1 is satisfied. For example, the CPU 1 uses the service function “Set” provided by the secondary RT component 22 to add source code for requesting transmission of the secondary data. In the robot control execution environment, the RT middleware 120 transfers the secondary data from the data relay RT component 23 to the secondary RT component 22 in response to the request.

2つ目は、前記第1の通信ポート201を通じて、前記二次側RTコンポーネント22に対してデータを引き渡すソースコードである。このソースコードは、条件2.2が成立する場合に追加されるソースコードのうちの1つである。例えば、前記CPU1は、コールバック関数"OnRead"の引数として、前記二次側RTコンポーネント22に対して前記二次側データを引き渡すソースコードを追加する。   The second is source code for transferring data to the secondary RT component 22 through the first communication port 201. This source code is one of the source codes added when the condition 2.2 is satisfied. For example, the CPU 1 adds source code that delivers the secondary data to the secondary RT component 22 as an argument of the callback function “OnRead”.

3つ目は、前記第3の通信ポート203を通じて、前記二次側RTコンポーネント22に対してデータを引き渡すソースコードである。例えば、前記CPU1は、当該データ中継用RTコンポーネント23が提供するサービス関数"Get"を利用して前記二次側RTコンポーネント22が要求するデータを、その二次側RTコンポーネント22に引き渡すソースコードを追加する。そのデータは、例えば、サービス関数"Get"の戻り値として引き渡される。   The third is source code for transferring data to the secondary RT component 22 through the third communication port 203. For example, the CPU 1 uses the service function “Get” provided by the data relay RT component 23 to supply the source code that passes the data requested by the secondary RT component 22 to the secondary RT component 22. to add. The data is delivered as a return value of the service function “Get”, for example.

ところで、前記第2の条件が成立しない状況は、前記起動イベントが前記一次側イベントであって、かつ、前記二次側データを送信するためのソースコード、即ち、前記二次側イベントを自発的に発生させるためのソースコードが、そもそも存在しない状況である。従って、前記データ中継用RTコンポーネント23の二次側の通信ポートが、前記第4の通信ポート204ではない。この場合、前記データ中継用RTコンポーネント23は、主体的にデータ送信を行うことができない。即ち、データ送信のタイミングは、前記RTミドルウェア120によって制御される。   By the way, the situation where the second condition is not satisfied is that the activation event is the primary side event and the source code for transmitting the secondary side data, that is, the secondary side event is voluntarily generated. In the first place, there is no source code to generate. Therefore, the secondary communication port of the data relay RT component 23 is not the fourth communication port 204. In this case, the data relay RT component 23 cannot independently transmit data. That is, the data transmission timing is controlled by the RT middleware 120.

一方、前記第2の条件が成立していないと判別された場合、前記CPU1は、関数"Fi"内に、前記二次データを出力用の内部データバッファへ書き込むためのソースコードを追加する(S17)。ステップS5においては、以上に示したステップS11からステップS17までの処理が行われる。なお、ステップS11からステップS13までの手順と、ステップS14の手順と、ステップS15からステップS17までの手順との実行順序は、入れ替えられてもよい。   On the other hand, if it is determined that the second condition is not satisfied, the CPU 1 adds a source code for writing the secondary data to the internal data buffer for output in the function “Fi” ( S17). In step S5, the processes from step S11 to step S17 described above are performed. The execution order of the procedure from step S11 to step S13, the procedure of step S14, and the procedure from step S15 to step S17 may be interchanged.

以下、図4に示されるフローチャートを参照しつつ、ステップS14の処理の詳細について説明する。ステップS14において、前記CPU1は、ステップS1において前記数値変換用情報が入力されたか否か、即ち、前記データ中継条件情報に前記数値変換用情報が含まれているか否かを判別する(S21)。そして、前記数値変換用情報が入力されたと判別された場合、前記CPU1は、前記数値変換用情報に基づく数値変換処理を行うためのソースコードを関数"Fi"内に追加する(S22)。より具体的には、前記一次側データの値に対し、前記乗算係数kを乗算し、前記オフセット値hを加算することにより得られる変換後の値を、所定の変数に代入する式を表すソースコードを追加する。一方、前記数値変換用情報が入力されていないと判別された場合、前記CPU1は、ステップS22の処理をスキップする。   Hereinafter, the details of the process of step S14 will be described with reference to the flowchart shown in FIG. In step S14, the CPU 1 determines whether or not the numerical value conversion information is input in step S1, that is, whether or not the numerical value conversion information is included in the data relay condition information (S21). When it is determined that the numerical value conversion information has been input, the CPU 1 adds source code for performing numerical value conversion processing based on the numerical value conversion information to the function “Fi” (S22). More specifically, a source representing an expression for substituting a converted value obtained by multiplying the value of the primary data by the multiplication coefficient k and adding the offset value h to a predetermined variable Add code. On the other hand, when it is determined that the numerical value conversion information is not input, the CPU 1 skips the process of step S22.

また、前記CPU1は、前記一次側データのデータ型の変換が必要であるか否か、即ち、前記一次側データのデータ型と前記二次側データのデータ型とが異なっているか否かを判別する(S23)。そして、データ型の変換が必要であると判別された場合、前記CPU1は、前記変換後の値のデータに対し、そのデータ型を前記二次側データのデータ型へ変換するキャスト処理を行うためのソースコードを関数"Fi"内に追加する(S24)。一方、データ型の変換が不要であると判別された場合、前記CPU1は、ステップS24の処理をスキップする。ステップS14においては、以上に示したステップS21からステップS24までの処理が行われる。   Further, the CPU 1 determines whether the data type of the primary data needs to be converted, that is, whether the data type of the primary data is different from the data type of the secondary data. (S23). When it is determined that the data type needs to be converted, the CPU 1 performs a cast process for converting the data type to the data type of the secondary data for the converted value data. Is added to the function "Fi" (S24). On the other hand, when it is determined that the data type conversion is unnecessary, the CPU 1 skips the process of step S24. In step S14, the processes from step S21 to step S24 described above are performed.

なお、ステップS21及びステップS22の手順と、ステップS23及びステップS24の手順との実行順序は、逆であってもよい。また、前記CPU1が、前記一次側データのデータ型を、最も分解能の高いデータ型へ変換した後に、ステップS22の処理とステップS24の処理とを行うことも考えられる。これにより、データ変換処理における大きな丸め誤差の発生が、回避される。   In addition, the execution order of the procedure of step S21 and step S22 and the procedure of step S23 and step S24 may be reversed. It is also conceivable that the CPU 1 performs the process of step S22 and the process of step S24 after converting the data type of the primary data to the data type with the highest resolution. Thereby, the occurrence of a large rounding error in the data conversion process is avoided.

また、前記CPU1は、以上に示したステップS1〜S5の処理に加え、図1に示されるステップS6及びステップS7の処理を実行する。即ち、前記CPU1は、前記一次側RTコンポーネント21及び前記二次側RTコンポーネント22の一方又は両方との間でデータを送信又は受信するための通信用ソースコードを追加する必要があるか否かを判別する(S6)。   Further, in addition to the processes of steps S1 to S5 described above, the CPU 1 executes the processes of step S6 and step S7 shown in FIG. That is, whether or not the CPU 1 needs to add communication source code for transmitting or receiving data to or from one or both of the primary RT component 21 and the secondary RT component 22 is determined. Discriminate (S6).

より具体的には、前記CPU1は、以下の第3の条件が成立している場合に、前記フレームワークに、前記一次側データを受信するためのソースコードを追加する必要があると判別する(S6)。前記第3の条件は、前記起動イベントが前記二次側イベントであり、かつ、前記データ中継用RTコンポーネント23の一次側の通信ポートが前記一次側データの受信を制御できないポートであるという条件である。この条件が成立する場合、前記データ中継用RTコンポーネント23の一次側の通信ポートは、前記第2の通信ポート202又は前記第3の通信ポート203である。   More specifically, the CPU 1 determines that it is necessary to add source code for receiving the primary data to the framework when the following third condition is satisfied ( S6). The third condition is that the start event is the secondary event, and the primary communication port of the data relay RT component 23 is a port that cannot control reception of the primary data. is there. When this condition is satisfied, the primary communication port of the data relay RT component 23 is the second communication port 202 or the third communication port 203.

そして、前記第3の条件が成立している場合、前記CPU1は、前記フレームワークに、前記一次側データを受信するためのソースコードを追加する(S7)。例えば、前記CPU1は、前記一次側データの受信ポートが前記第2の通信ポート202である場合、コールバック関数"OnWrite"を利用して前記一次側RTコンポーネント21から前記一次側データを取得するソースコードを追加する。或いは、前記CPU1は、前記一次側データの受信ポートが前記第3の通信ポート202である場合、当該データ中継用RTコンポーネント23が提供するサービス関数"Set"を利用して前記一次側RTコンポーネント21が提供するデータを取得するソースコードを追加する。   When the third condition is satisfied, the CPU 1 adds source code for receiving the primary data to the framework (S7). For example, when the primary data reception port is the second communication port 202, the CPU 1 uses the callback function “OnWrite” to acquire the primary data from the primary RT component 21. Add code. Alternatively, when the primary data reception port is the third communication port 202, the CPU 1 uses the service function “Set” provided by the data relay RT component 23 to use the primary RT component 21. Add source code to get data provided by.

また、前記CPU1は、以下の第4の条件が成立している場合に、前記フレームワークに、前記二次側データを送信するためのソースコードを追加する必要があると判別する(S6)。前記第4の条件は、前記起動イベントが前記一次側イベントであり、かつ、前記データ中継用RTコンポーネント23の二次側の通信ポートが前記二次側データの送信を制御できないポートであるという条件である。この条件が成立する場合、前記データ中継用RTコンポーネント23の二次側の通信ポートは、前記第1の通信ポート201又は前記第3の通信ポート203である。   Further, the CPU 1 determines that the source code for transmitting the secondary data needs to be added to the framework when the following fourth condition is satisfied (S6). The fourth condition is that the start event is the primary event, and the secondary communication port of the data relay RT component 23 is a port that cannot control the transmission of the secondary data. It is. When this condition is satisfied, the secondary communication port of the data relay RT component 23 is the first communication port 201 or the third communication port 203.

そして、前記第4の条件が成立している場合、前記CPU1は、前記フレームワークに、前記二次側データを送信するためのソースコードを追加する(S7)。例えば、前記CPU1は、前記二次側データの送信ポートが前記第1の通信ポート201である場合、コールバック関数"OnRead"を利用して前記二次側RTコンポーネント22へ前記二次側データを送信するソースコードを追加する。或いは、前記CPU1は、前記二次側データの送信ポートが前記第3の通信ポート202である場合、当該データ中継用RTコンポーネント23が提供するサービス関数"Get"を利用して前記二次側RTコンポーネント21が要求するデータを、前記二次側RTコンポーネント21へ引き渡すソースコードを追加する。   When the fourth condition is satisfied, the CPU 1 adds source code for transmitting the secondary data to the framework (S7). For example, when the secondary data transmission port is the first communication port 201, the CPU 1 uses the callback function “OnRead” to send the secondary data to the secondary RT component 22. Add the source code to be sent. Alternatively, when the secondary data transmission port is the third communication port 202, the CPU 1 uses the service function “Get” provided by the data relay RT component 23 to use the secondary RT Source code for passing data requested by the component 21 to the secondary RT component 21 is added.

一方、前記第3の条件及び前記第4の条件の両方が成立していない場合、前記CPU1は、ステップS7の処理をスキップする。以上に示したように、前記CPU1は、前記データ中継用RTコンポーネント生成プログラム11を実行することにより、ステップS1〜ステップS7の処理を実行する。なお、ステップS4〜S7の手順が行われる順序は、図2に示される以外の順序であってもよい。例えば、ステップS6及びS7の手順が行われた後に、ステップS4及びS5の手順が行われること、又は、ステップS4とステップS5との間で、ステップS6及びS7の手順が行われること等が考えられる。   On the other hand, when both the third condition and the fourth condition are not satisfied, the CPU 1 skips the process of step S7. As described above, the CPU 1 executes the processing of step S1 to step S7 by executing the data relay RT component generation program 11. Note that the order in which the steps S4 to S7 are performed may be an order other than that shown in FIG. For example, the procedures of steps S4 and S5 are performed after the procedures of steps S6 and S7 are performed, or the procedures of steps S6 and S7 are performed between steps S4 and S5. It is done.

また、前記データ中継用RTコンポーネント生成プログラム11は、図2〜図4に示された手順を実行するためのプログラムの他、想定通りに処理が進まない場合に行われるエラー処理を実行するためのプログラムも含んでいる。例えば、前記データ中継用RTコンポーネント生成プログラム11には、前記一次側データ又は前記二次側データが格納されるデータバッファの参照が開始されてから、そのデータバッファにデータが存在しない状況が一定時間以上継続した場合に、データの参照を中止してエラー通知を行うためのプログラム等が含まれる。   In addition to the program for executing the procedures shown in FIGS. 2 to 4, the data relay RT component generation program 11 executes error processing that is performed when processing does not proceed as expected. Includes programs. For example, in the data relay RT component generation program 11, a situation in which no data exists in the data buffer after a reference to the data buffer storing the primary data or the secondary data is started for a certain period of time. A program or the like for canceling the data reference and notifying the error when it continues is included.

前記CPU1が、前記データ中継用RTコンポーネント生成プログラム11を実行することにより、前記データ中継用RTコンポーネント23のソースコードが、前記記憶装置4に記録される。そのソースコードは、前記コンパイラ12によってオブジェクトコードに変換されることにより、ロボットが備えるプロセッサが実行可能な前記データ中継用RTコンポーネント23になる。また、前記データ中継用RTコンポーネント生成プログラム11が、前記CPU1に対し、前記コンパイラ12によるソースコードのコンパイル処理まで実行させるプログラムであることも考えられる。   When the CPU 1 executes the data relay RT component generation program 11, the source code of the data relay RT component 23 is recorded in the storage device 4. The source code is converted into an object code by the compiler 12 to become the data relay RT component 23 that can be executed by the processor provided in the robot. It is also conceivable that the data relay RT component generation program 11 is a program that causes the CPU 1 to execute processing up to source code compilation processing by the compiler 12.

図2、図3及び図4に示されたフローチャートにおいて、ステップS1は、前記データ中継条件情報を入力する情報入力手順の一例である。また、ステップS2〜S7は、前記一次側データ(第1データ)の入力処理と、データ変換処理と、前記二次側データ(第2データ)の出力処理とを、ロボットが備えるプロセッサに実行させるための前記データ中継用RTコンポーネント23のソースコードを自動生成して前記記憶装置4に記憶させるソースコード生成手順の一例である。また、ステップS2、ステップS12及びステップS7は、前記一次側データの出力ポートの仕様に対応して前記一次側データを入力する第1データ入力処理を、前記プロセッサに実行させるためのソースコードを自動生成して前記記憶装置4に記憶させる手順の一例である。また、ステップS2、ステップS15及びステップS7は、前記二次側データをその入力ポートの仕様に対応して出力する第2データ出力処理を、前記プロセッサに実行させるためのソースコードを自動生成して前記記憶装置4に記憶させる手順の一例である。   In the flowcharts shown in FIGS. 2, 3 and 4, step S1 is an example of an information input procedure for inputting the data relay condition information. Steps S2 to S7 cause the processor included in the robot to execute the input process of the primary data (first data), the data conversion process, and the output process of the secondary data (second data). 5 is an example of a source code generation procedure for automatically generating a source code of the data relay RT component 23 and storing the source code in the storage device 4. In steps S2, S12 and S7, source code for causing the processor to execute a first data input process for inputting the primary data corresponding to the specification of the output port of the primary data is automatically generated. It is an example of a procedure for generating and storing in the storage device 4. Steps S2, S15, and S7 automatically generate source code for causing the processor to execute a second data output process for outputting the secondary data corresponding to the specifications of the input port. It is an example of a procedure for storing in the storage device 4.

前記データ中継用RTコンポーネント生成処理によれば、前記一次側RTコンポーネント21と前記二次側RTコンポーネント22との間のデータの仕様の違いを吸収する前記データ中継用RTコンポーネント23のソースコードを簡易に作成することができる。その結果、前記RTミドルウェア120と既存のRTコンポーネント20(前記一次側RTコンポーネント21及び前記二次側RTコンポーネント22)を利用してロボットを作ることが容易となる。   According to the data relay RT component generation process, the source code of the data relay RT component 23 that absorbs the difference in data specifications between the primary RT component 21 and the secondary RT component 22 is simplified. Can be created. As a result, it becomes easy to make a robot using the RT middleware 120 and the existing RT component 20 (the primary RT component 21 and the secondary RT component 22).

また、前記データ中継用RTコンポーネント生成処理では、前記データ変換処理が実行されるタイミングは、前記イベント指定情報の入力によって調整可能である。これにより、前記データ中継用RTコンポーネント23の動作内容が、高い自由度で設定可能となる。例えば、前記一次側イベントの発生頻度と前記二次側イベントの発生頻度とが異なる場合に、発生頻度の低い方のイベントを前記起動イベントとして指定することにより、前記データ変換処理の実行回数が必要最小限に抑えられる。その結果、ロボットが供えるプロセッサの演算負荷は小さくて済む。   In the data relay RT component generation process, the timing at which the data conversion process is executed can be adjusted by inputting the event designation information. As a result, the operation content of the data relay RT component 23 can be set with a high degree of freedom. For example, when the occurrence frequency of the primary event is different from the occurrence frequency of the secondary event, the number of execution times of the data conversion process is required by designating the event with the lower occurrence frequency as the activation event. Minimized. As a result, the processing load on the processor provided by the robot can be reduced.

また、前記一次側データが、行列を構成する複数の行列要素である場合が考えられる。例えば、前記一次側データが、複数の行列要素に相当するデータの集合からなる配列データである場合等である。この場合、前述した実施形態におけるステップS1において、変換行列の情報が、前記数値変換用情報の一部として入力されることも考えられる。前記変換行列の情報は、前記一次側データにより特定される行列を、所望の他の行列(前記二次側データ)へ変換するために用いられる行列を特定する情報である。この場合、前記CPU1は、ステップS22において、複数の行列要素である前記一次側データに対し、前記変換行列を用いた行列変換処理を行うことによって前記二次側データを導出する。   In addition, the primary data may be a plurality of matrix elements constituting a matrix. For example, the primary data is array data composed of a set of data corresponding to a plurality of matrix elements. In this case, in step S1 in the above-described embodiment, it is conceivable that information on the transformation matrix is input as a part of the numerical value conversion information. The information of the conversion matrix is information for specifying a matrix used for converting a matrix specified by the primary side data into another desired matrix (the secondary side data). In this case, in step S22, the CPU 1 derives the secondary side data by performing matrix transformation processing using the transformation matrix on the primary side data which is a plurality of matrix elements.

このような行列変換処理が、数値変換処理(S22)として行われることにより、前記一次側データから前記二次側データへのアフィン変換が可能となる。このアフィン変換は、RTコンポーネント21及び前記二次側RTコンポーネント22の各々において採用されるデータの座標系が異なる場合に有効である。   By performing such matrix conversion processing as numerical value conversion processing (S22), affine conversion from the primary data to the secondary data becomes possible. This affine transformation is effective when the coordinate system of data adopted in each of the RT component 21 and the secondary RT component 22 is different.

RTコンポーネントの生成に利用可能である。   It can be used to generate RT components.

1 CPU
2 データ入力装置
3 表示装置
4 記憶装置
10 オペレーティングシステム
11 データ中継用RTコンポーネント生成プログラム
12 コンパイラ
100 計算機
201 第1の通信ポート
202 第2の通信ポート
203 第3の通信ポート
204 第4の通信ポート
20 RTコンポーネント
21 一次側RTコンポーネント
22 二次側RTコンポーネント
23 データ中継用RTコンポーネント
110 オペレーティングシステム
120 RTミドルウェア
1 CPU
2 Data Input Device 3 Display Device 4 Storage Device 10 Operating System 11 Data Relay RT Component Generation Program 12 Compiler 100 Computer 201 First Communication Port 202 Second Communication Port 203 Third Communication Port 204 Fourth Communication Port 20 RT component 21 Primary RT component 22 Secondary RT component 23 Data relay RT component 110 Operating system 120 RT middleware

Claims (5)

第1のRTコンポーネントから提供される第1データを第2データへ変換し、該第2データを第2のRTコンポーネントに提供する処理をRTミドルウェア上でプロセッサに実行させるデータ中継用RTコンポーネントを生成するデータ中継用RTコンポーネント生成方法であって、
所定のデータ入力手段を通じて、前記第1のRTコンポーネントにおける前記第1データの出力ポートの仕様と前記第2のRTコンポーネントにおける前記第2データの入力ポートの仕様と前記第1データのデータ型と前記第2データのデータ型と数値変換用情報とを含むデータ中継条件情報を入力する情報入力手順と、
前記出力ポートの仕様に対応して前記第1データを入力する第1データ入力処理と、該第1データに対して前記数値変換用情報を用いた数値変換処理及び前記第1データのデータ型から前記第2データのデータ型へのデータ型変換処理の各々を施すことにより前記第2データを導出するデータ変換処理と、該第2データを前記入力ポートの仕様に対応して出力する第2データ出力処理と、をロボットが備えるプロセッサに実行させるためのデータ中継用RTコンポーネントのソースコードを自動生成して記憶手段に記憶させるソースコード生成手順と、
をコンピュータにより実行することを特徴とするデータ中継用RTコンポーネント生成方法。
The first data provided from the first RT component is converted into the second data, and a data relay RT component is generated that causes the processor to execute processing for providing the second data to the second RT component on the RT middleware. An RT component generation method for data relay,
The specification of the output port of the first data in the first RT component, the specification of the input port of the second data in the second RT component, the data type of the first data, and the data type through predetermined data input means An information input procedure for inputting data relay condition information including the data type of the second data and information for numerical conversion;
From the first data input process for inputting the first data corresponding to the specifications of the output port, the numerical value conversion process using the numerical value conversion information for the first data, and the data type of the first data Data conversion processing for deriving the second data by performing data type conversion processing to the data type of the second data, and second data for outputting the second data corresponding to the specifications of the input port A source code generation procedure for automatically generating the source code of the RT component for data relay for causing the processor included in the robot to execute the output process and storing it in the storage means;
Is executed by a computer. A method for generating an RT component for data relay.
前記数値変換用情報は、乗算係数の情報及びオフセット値の情報を含み、
前記数値変換処理は、前記乗算係数の情報を用いた乗算処理と前記オフセット値の情報を用いた加算処理とを含む、
請求項1に記載のデータ中継用RTコンポーネント生成方法。
The numerical value conversion information includes multiplication coefficient information and offset value information,
The numerical value conversion process includes a multiplication process using information on the multiplication coefficient and an addition process using information on the offset value.
The method for generating an RT component for data relay according to claim 1.
前記データ中継条件情報は、少なくとも前記第1のRTコンポーネントに起因して生じるイベント及び前記第2のRTコンポーネントに起因して生じるイベントのいずれかを指定するイベント指定情報を含み、
前記ソースコード生成手順は、前記イベント指定情報に基づいて特定されるイベントの発生に応じて前記データ変換処理を前記プロセッサに実行させるための前記ソースコードを自動生成する、
請求項1又は請求項2に記載のデータ中継用RTコンポーネント生成方法。
The data relay condition information includes event designation information for designating at least one of an event caused by the first RT component and an event caused by the second RT component,
The source code generation procedure automatically generates the source code for causing the processor to execute the data conversion process in response to an event specified based on the event designation information.
The data relay RT component generation method according to claim 1 or 2.
前記数値変換用情報は、変換行列の情報を含み、
前記数値変換処理は、行列を構成する複数の行列要素である前記第1データに対し、前記変換行列を用いた行列変換処理を含む、
請求項1乃至請求項3のいずれかに記載のデータ中継用RTコンポーネント生成方法。
The information for numerical conversion includes information of a conversion matrix,
The numerical value conversion process includes a matrix conversion process using the conversion matrix for the first data which is a plurality of matrix elements constituting a matrix.
The method for generating an RT component for data relay according to any one of claims 1 to 3.
第1のRTコンポーネントから提供される第1データを第2データへ変換し、該第2データを第2のRTコンポーネントに提供する処理をRTミドルウェア上でプロセッサに実行させるデータ中継用RTコンポーネントのソースコードを生成する処理を、コンピュータに実行させるためのデータ中継用RTコンポーネント生成プログラムであって、
所定のデータ入力手段を通じて、前記第1のRTコンポーネントにおける前記第1データの出力ポートの仕様と前記第2のRTコンポーネントにおける前記第2データの入力ポートの仕様と前記第1データのデータ型と前記第2データのデータ型と数値変換用情報とを含むデータ中継条件情報を入力する情報入力手順と、
前記出力ポートの仕様に対応して前記第1データを入力する第1データ入力処理と、該第1データに対して前記数値変換用情報を用いた数値変換処理及び前記第1データのデータ型から前記第2データのデータ型へのデータ型変換処理の各々を施すことにより前記第2データを導出するデータ変換処理と、該第2データを前記入力ポートの仕様に対応して出力する第2データ出力処理と、をロボットが備えるプロセッサに実行させるためのデータ中継用RTコンポーネントのソースコードを自動生成して記憶手段に記憶させるソースコード生成手順と、
をコンピュータに実行させるためのデータ中継用RTコンポーネント生成プログラム。
The source of the data relay RT component that converts the first data provided from the first RT component into the second data and causes the processor to execute processing for providing the second data to the second RT component on the RT middleware A data relay RT component generation program for causing a computer to execute a code generation process,
The specification of the output port of the first data in the first RT component, the specification of the input port of the second data in the second RT component, the data type of the first data, and the data type through predetermined data input means An information input procedure for inputting data relay condition information including the data type of the second data and information for numerical conversion;
From the first data input process for inputting the first data corresponding to the specifications of the output port, the numerical value conversion process using the numerical value conversion information for the first data, and the data type of the first data Data conversion processing for deriving the second data by performing data type conversion processing to the data type of the second data, and second data for outputting the second data corresponding to the specifications of the input port A source code generation procedure for automatically generating the source code of the RT component for data relay for causing the processor included in the robot to execute the output process and storing it in the storage means;
RT component generation program for data relay for causing a computer to execute
JP2009239548A 2009-10-16 2009-10-16 Method and program for generating rt component for data relay Pending JP2011086182A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2009239548A JP2011086182A (en) 2009-10-16 2009-10-16 Method and program for generating rt component for data relay
PCT/JP2009/069465 WO2011045870A1 (en) 2009-10-16 2009-11-17 Data relay-use rt component generation method and program for same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009239548A JP2011086182A (en) 2009-10-16 2009-10-16 Method and program for generating rt component for data relay

Publications (1)

Publication Number Publication Date
JP2011086182A true JP2011086182A (en) 2011-04-28

Family

ID=43875927

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009239548A Pending JP2011086182A (en) 2009-10-16 2009-10-16 Method and program for generating rt component for data relay

Country Status (2)

Country Link
JP (1) JP2011086182A (en)
WO (1) WO2011045870A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013210982A (en) * 2012-03-30 2013-10-10 Mitsubishi Heavy Ind Ltd Framework, computer system and system construction method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000267844A (en) * 1999-03-16 2000-09-29 Nippon Telegr & Teleph Corp <Ntt> Software development system
JP2002041293A (en) * 2000-07-28 2002-02-08 Hitachi Ltd Program control method and program control system
WO2003045639A2 (en) * 2001-11-28 2003-06-05 Evolution Robotics, Inc. Sensor and actuator abstraction and aggregation in a hardware abstraction layer for a robot
JP2007226743A (en) * 2006-02-27 2007-09-06 Fujitsu Ltd Mediation program development support program, mediation program development support method, and mediation program development support device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013210982A (en) * 2012-03-30 2013-10-10 Mitsubishi Heavy Ind Ltd Framework, computer system and system construction method

Also Published As

Publication number Publication date
WO2011045870A1 (en) 2011-04-21

Similar Documents

Publication Publication Date Title
US8196155B2 (en) XML-based event driven interface for OPC data access
JP5701458B1 (en) Drawing device and control system
TWI672570B (en) Data processing apparatus, data processing method, setting management apparatus and data processing system
CN110674083B (en) Workflow migration method, device, equipment and computer-readable storage medium
Protic et al. Implementation of a bi-directional digital twin for industry 4 labs in academia: a solution based on OPC UA
JP6644202B1 (en) Data processing device, data processing system, data processing method, and program
US7505875B2 (en) Monitor system, and monitor device and data collecting device therefor
CN100495331C (en) Construction method, device and system
WO2011045870A1 (en) Data relay-use rt component generation method and program for same
JP5066222B2 (en) Network analysis support device, network analysis support method, and program
Tambe et al. An extensible CBM architecture for naval fleet maintenance using open standards
JP5725974B2 (en) Power distribution monitoring control system
JP4257364B2 (en) COMMUNICATION ERROR INFORMATION OUTPUT PROGRAM, COMMUNICATION ERROR INFORMATION OUTPUT METHOD, AND COMMUNICATION ERROR INFORMATION OUTPUT DEVICE
US11640153B2 (en) Control system, support device, and recording medium
CN111666455B (en) Service flow deployment method and device
US20120272222A1 (en) Software Tool for Automation
CN116113521A (en) Method and system for robot programming
CN113641482A (en) AI algorithm off-line scheduling method, system, computer equipment and storage medium
JP2006127069A (en) Plant monitoring and control system
Morabito et al. Future-Proofing Mobile Networks: A Digital Twin Approach to Multi-Signal Management
Oxstrand et al. Automated Work Packages Prototype: Initial Design, Development, and Evaluation. Light Water Reactor Sustainability Program
JP2009053939A (en) Remote monitoring/diagnosing system
CN117415813A (en) Robot joint control method, device, system and computer equipment
JP4624044B2 (en) Communication system between programs, communication method between programs, data structure generation system and program
CN118607806A (en) A mobile target system based on multi-dimensional perception and digital twin technology