JP2011086182A - Method and program for generating rt component for data relay - Google Patents
Method and program for generating rt component for data relay Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 111
- 230000008569 process Effects 0.000 claims abstract description 67
- 238000006243 chemical reaction Methods 0.000 claims abstract description 56
- 238000012545 processing Methods 0.000 claims abstract description 38
- 239000011159 matrix material Substances 0.000 claims description 17
- 230000004044 response Effects 0.000 claims description 7
- 238000004891 communication Methods 0.000 abstract description 128
- 230000004913 activation Effects 0.000 description 16
- 230000005540 biological transmission Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 6
- 230000009466 transformation Effects 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000000474 nursing effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation 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)とが、コンピュータにより実行される。
【選択図】図2An 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
また、非特許文献1に示されるように、RTミドルウェアにおけるRTコンポーネントの仕様は、OMG(Object Management Group)により標準化が進められている。OMGは、分散オブジェクト指向システムの標準化を目的として設立されたコンソーシアムである。このOMGにより規定される仕様に準拠したRTコンポーネントは、様々な企業や機関から提供される。また、RTコンポーネントは、予め定め標準化された仕様に準拠して自作することも可能である。例えば、非特許文献2には、入力データに対し、型変換又は加算/減算等の単純な処理を施すRTコンポーネントを作成した旨が示されている。
As shown in
そして、複数の既存の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
図10(a)に示されるように、前記第2の通信ポート202は、前記第1の通信ポート201により出力されるデータを受け取ることができる。また、図10(b)に示されるように、前記第4の通信ポート204は、前記第3の通信ポート203により出力されるデータを受け取ることができる。また、前記第4の通信ポート204は、前記第3の通信ポート203に対してデータを引き渡すこともできる。
As shown in FIG. 10A, the
より具体的には、"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
しかしながら、図10(c)に示されるように、前記第1の通信ポート201と前記第4の通信ポート204との組合せは、ミスマッチの組合せである。また、図10(d)に示されるように、前記第3の通信ポート203と前記第2の通信ポート202との組合せも、ミスマッチの組合せである。これらミスマッチの組合せの下では、データの受け渡しを行うことができない。
However, as shown in FIG. 10C, the combination of the
また、既存の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コンポーネントと二次側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.
以下添付図面を参照しながら、本発明の実施の形態について説明し、本発明の理解に供する。なお、以下の実施の形態は、本発明を具体化した一例であり、本発明の技術的範囲は、以下の実施の形態の内容に限定されない。 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
前記CPU1は、前記記憶装置4に記憶されたプログラムを実行する演算手段である。前記データ入力装置2は、当該計算機100にデータを入力するデータ入力手段の一例である。前記データ入力装置2は、例えば、当該計算機100のオペレータによる操作に従って当該計算機100にデータを入力するキーボード又はマウス等である。また、外部装置からネットワークを介してデータを入力するネットワークインターフェースカード等の通信手段が、前記データ入力装置2の一部又は全部として採用されてもよい。前記表示装置3は、液晶ディスプレイ又はCRT等であり、前記CPU1により実行されるプログラムの内容に応じて各種の情報を表示する装置である。前記記憶装置4は、ハードディスク又はRAMディスク等の記憶手段である。前記記憶装置4は、例えば、オペレーティングシステム10、データ中継用RTコンポーネント生成プログラム11及びコンパイラ12等が、予め記憶される。また、前記CPU1の処理によって生成されるデータ中継用RTコンポーネント23が、前記記憶装置4に記録される。
The
前記データ中継用RTコンポーネント23は、データを提供する側の前記一次側RTコンポーネント21から、データを受け取る側の前記二次側RTコンポーネント22へのデータの伝送を中継するRTコンポーネントである。前記一次側RTコンポーネント21、前記二次側RTコンポーネント22及び前記データ中継用RTコンポーネント23は、いずれもRTミドルウェア120上で動作するソフトウェアである。
The data relay
前記データ中継用RTコンポーネント23は、次の3つの処理を、ロボットが備えるマイクロプロセッサに実行させるためのプログラムモジュールである。その第1の処理は、前記一次側RTコンポーネント21から提供される一次側データを取得する処理である。第2の処理は、前記一次側データを前記二次側RTコンポーネント22に提供される二次側データへ変換する処理である。第3の処理は、前記二次側データを前記二次側RTコンポーネント22に提供する処理である。そして、前記データ中継用RTコンポーネント生成プログラム11は、前記データ入力装置2を通じて入力される所定の情報に基づいて、前記データ中継用RTコンポーネント23を自動生成する処理を前記CPU1に実行させるためのプログラムである。
The data relay
次に、図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
まず、前記CPU1は、前記データ入力装置2を通じて、データ中継条件情報を入力して前記記憶装置4に記録する処理を実行する(S1)。前記データ中継条件情報には、前記一次側RTコンポーネント21及び前記二次側RTコンポーネント各々の仕様に関する情報と、前記一次側データから前記二次側データへの数値変換に関する情報とが含まれている。以下、前者をコンポーネント仕様情報と称し、後者を数値変換用情報と称する。さらに、前記データ中継条件情報には、後述するイベント指定情報も含まれる。
First, the
また、前記コンポーネント仕様情報には、前記一次側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
前記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
例えば、各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
例えば、前記一次側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
また、前記数値変換用情報は、前記乗算係数及び前記オフセット値を一意に特定できる間接的な情報であることも考えられる。例えば、前記一次側データの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
なお、前記コンポーネント仕様情報、前記数値変換用情報及び前記イベント指定情報が、それぞれ異なるルートで入力されることも考えられる。例えば、前記コンポーネント仕様情報が、ネットワーク経由により、又は、前記記憶装置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
次に、前記CPU1は、前記コンポーネント仕様情報に基づいて、前記データ中継用RTコンポーネント23のフレームワークを生成し、そのフレームワークを前記記憶装置4に記録する(S2)。以下、このステップS2で生成される前記データ中継用RTコンポーネント23のフレームワークのことを、単にフレームワークと称する。RTコンポーネントのフレームワークを生成するためのプログラムは、例えば、独立行政法人産業技術総合研究所から"RtcTemplate"として提供されており、そのプログラムは、ステップS2の処理を行うプログラムとして採用できる。"RtcTemplate"は、"OpenRTM-aist"として提供されるプログラム群の一部である。
Next, the
前記フレームワークには、前記一次側RTコンポーネント21の通信ポートに対応してデータを受信する一次側の通信インターフェースのソースコードと、前記二次側RTコンポーネント22の通信ポートに対応してデータを送信する二次側の通信インターフェースのソースコードとが含められる。
The framework transmits source code corresponding to the communication port of the
例えば、前記一次側の通信インターフェースのソースコードには、入力側のデータバッファを定義するソースコードが含められる。また、前記二次側の通信インターフェースのソースコードには、出力側のデータバッファを定義するソースコードが含められる。前記入力側のデータバッファは、前記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
なお、前記一次側の通信インターフェースのソースコードは、前記一次側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
以下、図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
図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
また、パターン<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
前記CPU1は、ステップS2において、パターン<P1>〜パターン<P9>のいずれかに対応した前記一次側の通信インターフェース及び前記二次側の通信インターフェース各々のソースコードを含む前記フレームワークを生成する。即ち、ポートの組合せが、パターン<P1>〜パターン<P3>のいずれかである場合、前記第2の通信ポート202として動作するためのインターフェースが、前記一次側の通信インターフェースとして設定される。また、ポートの組合せが、パターン<P4>〜パターン<P6>のいずれかである場合、前記第4の通信ポート204として動作するためのインターフェースが、前記一次側の通信インターフェースとして設定される。また、ポートの組合せが、パターン<P7>〜パターン<P9>のいずれかである場合、前記第3の通信ポート203として動作するためのインターフェースが、前記一次側の通信インターフェースとして設定される。
In step S2, the
また、通信ポートの組合せが、パターン<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
次に、前記CPU1は、前記一次側データから前記二次側データへのデータ変換処理を実行する前提条件となるイベントを判別する処理を行う(S3)。以下、そのイベントのことを起動イベントと称する。前記起動イベントの判別は、前記一次側データの出力ポート及び前記二次側データの入力ポート各々の種類(仕様)と、前記イベント指定情報とに基づいて行われる。前記イベント指定情報は、少なくとも前記一次側RTコンポーネント21の動作に起因して生じるイベント及び前記二次側RTコンポーネント21の動作に起因して生じるイベントのいずれかを指定する情報である。
Next, the
前記起動イベントの判別は、以下の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
ここで、"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
前記CPU1は、ステップS3において、通信ポートの組合せのパターンに応じた前記起動イベントの候補の中から、前記イベント指定情報により指定される候補を、前記起動イベントとして選択する。前記イベント指定情報は、通信ポートの組合せのパターンに応じた前記起動イベントの候補が複数存在する場合に、前記一次側イベント、前記二次側イベント及び前記自分のイベントのうちのいずれを前記起動イベントとして選択するかを指定する情報である。なお、前記イベント指定情報により指定される候補が存在しない場合の例外処理は、各種考えられる。前記例外処理としては、例えば、エラーメッセージを出力することによる中断処理、又は、前記自分のイベントを選択する処理等が考えられる。
In step S <b> 3, the
次に、前記CPU1は、ステップS3での判別結果である前記起動イベントに対応したイベントドリブン型の関数を前記フレームワークに設定する(S4)。以下、このイベントドリブン型の関数を関数"Fi"と称する。このステップS4では、具体的な処理を実行するためのソースコードが未だ含まれていない状態の関数"Fi"が、前記フレームワーク内に定義される。さらに、ステップS4では、関数"Fi"が、前記起動イベントの発生に応じて前記RTミドルウェア120によって起動されるための所定の登録処理が行われる。
Next, the
例えば、前記起動イベントが"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
次に、前記CPU1は、関数"Fi"内に、当該関数"Fi"が実行する具体的な処理の内容を規定するソースコードを追加する(S5)。以下、図3に示されるフローチャートを参照しつつ、ステップS5における処理の詳細について説明する。
Next, the
ステップS5において、前記CPU1は、以下に示す第1の条件が成立しているか否かを判別する(S11)。前記第1の条件は、次に示す条件1.1及び条件1.2の2つの条件のうちの1つ以上が成立するという条件である。
In step S5, the
まず、条件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
そして、前記第1の条件が成立していると判別された場合、前記CPU1は、関数"Fi"内に、前記一次側データを受信するためのソースコードを追加する(S12)。より具体的には、ステップS12で追加されるソースコードは、次の3種類のソースコードが考えられる。
If it is determined that the first condition is satisfied, the
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
2つ目は、前記第2の通信ポート202を通じて、前記一次側RTコンポーネント21からデータを取得するソースコードである。このソースコードは、条件1.2が成立する場合に追加されるソースコードのうちの1つである。例えば、前記CPU1は、コールバック関数"OnWrite"の引数として前記一次側RTコンポーネント21から引き渡される前記一次側データを取得するソースコードを追加する。
The second is source code for acquiring data from the
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
ところで、前記第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
一方、前記第1の条件が成立していないと判別された場合、前記CPU1は、関数"Fi"内に、前記一次側データを入力用の内部データバッファから読み出すためのソースコードを追加する(S13)。
On the other hand, when it is determined that the first condition is not satisfied, the
また、前記CPU1は、関数"Fi"内に、データ変換処理のソースコードを追加する(S14)。このステップS14の処理の手順は、図4に示されるが、その内容は後述する。
Further, the
また、前記CPU1は、ステップS5の処理の一部として、以下に示す第2の条件が成立しているか否かを判別する(S14)。前記第2の条件は、次に示す条件2.1及び条件2.2の2つの条件のうちの1つ以上が成立するという条件である。
Further, the
まず、条件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
そして、前記第2の条件が成立していると判別された場合、前記CPU1は、関数"Fi"内に、前記二次側データを送信するためのソースコードを追加する(S15)。より具体的には、ステップS15で追加されるソースコードは、次の3種類のソースコードが考えられる。
If it is determined that the second condition is satisfied, the
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
2つ目は、前記第1の通信ポート201を通じて、前記二次側RTコンポーネント22に対してデータを引き渡すソースコードである。このソースコードは、条件2.2が成立する場合に追加されるソースコードのうちの1つである。例えば、前記CPU1は、コールバック関数"OnRead"の引数として、前記二次側RTコンポーネント22に対して前記二次側データを引き渡すソースコードを追加する。
The second is source code for transferring data to the
3つ目は、前記第3の通信ポート203を通じて、前記二次側RTコンポーネント22に対してデータを引き渡すソースコードである。例えば、前記CPU1は、当該データ中継用RTコンポーネント23が提供するサービス関数"Get"を利用して前記二次側RTコンポーネント22が要求するデータを、その二次側RTコンポーネント22に引き渡すソースコードを追加する。そのデータは、例えば、サービス関数"Get"の戻り値として引き渡される。
The third is source code for transferring data to the
ところで、前記第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
一方、前記第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
以下、図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
また、前記CPU1は、前記一次側データのデータ型の変換が必要であるか否か、即ち、前記一次側データのデータ型と前記二次側データのデータ型とが異なっているか否かを判別する(S23)。そして、データ型の変換が必要であると判別された場合、前記CPU1は、前記変換後の値のデータに対し、そのデータ型を前記二次側データのデータ型へ変換するキャスト処理を行うためのソースコードを関数"Fi"内に追加する(S24)。一方、データ型の変換が不要であると判別された場合、前記CPU1は、ステップS24の処理をスキップする。ステップS14においては、以上に示したステップS21からステップS24までの処理が行われる。
Further, the
なお、ステップ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
また、前記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
より具体的には、前記CPU1は、以下の第3の条件が成立している場合に、前記フレームワークに、前記一次側データを受信するためのソースコードを追加する必要があると判別する(S6)。前記第3の条件は、前記起動イベントが前記二次側イベントであり、かつ、前記データ中継用RTコンポーネント23の一次側の通信ポートが前記一次側データの受信を制御できないポートであるという条件である。この条件が成立する場合、前記データ中継用RTコンポーネント23の一次側の通信ポートは、前記第2の通信ポート202又は前記第3の通信ポート203である。
More specifically, the
そして、前記第3の条件が成立している場合、前記CPU1は、前記フレームワークに、前記一次側データを受信するためのソースコードを追加する(S7)。例えば、前記CPU1は、前記一次側データの受信ポートが前記第2の通信ポート202である場合、コールバック関数"OnWrite"を利用して前記一次側RTコンポーネント21から前記一次側データを取得するソースコードを追加する。或いは、前記CPU1は、前記一次側データの受信ポートが前記第3の通信ポート202である場合、当該データ中継用RTコンポーネント23が提供するサービス関数"Set"を利用して前記一次側RTコンポーネント21が提供するデータを取得するソースコードを追加する。
When the third condition is satisfied, the
また、前記CPU1は、以下の第4の条件が成立している場合に、前記フレームワークに、前記二次側データを送信するためのソースコードを追加する必要があると判別する(S6)。前記第4の条件は、前記起動イベントが前記一次側イベントであり、かつ、前記データ中継用RTコンポーネント23の二次側の通信ポートが前記二次側データの送信を制御できないポートであるという条件である。この条件が成立する場合、前記データ中継用RTコンポーネント23の二次側の通信ポートは、前記第1の通信ポート201又は前記第3の通信ポート203である。
Further, the
そして、前記第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
一方、前記第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
また、前記データ中継用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
前記CPU1が、前記データ中継用RTコンポーネント生成プログラム11を実行することにより、前記データ中継用RTコンポーネント23のソースコードが、前記記憶装置4に記録される。そのソースコードは、前記コンパイラ12によってオブジェクトコードに変換されることにより、ロボットが備えるプロセッサが実行可能な前記データ中継用RTコンポーネント23になる。また、前記データ中継用RTコンポーネント生成プログラム11が、前記CPU1に対し、前記コンパイラ12によるソースコードのコンパイル処理まで実行させるプログラムであることも考えられる。
When the
図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コンポーネント生成処理によれば、前記一次側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コンポーネント生成処理では、前記データ変換処理が実行されるタイミングは、前記イベント指定情報の入力によって調整可能である。これにより、前記データ中継用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
また、前記一次側データが、行列を構成する複数の行列要素である場合が考えられる。例えば、前記一次側データが、複数の行列要素に相当するデータの集合からなる配列データである場合等である。この場合、前述した実施形態におけるステップ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
このような行列変換処理が、数値変換処理(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コンポーネントの生成に利用可能である。 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
Claims (5)
所定のデータ入力手段を通じて、前記第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又は請求項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の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
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)
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)
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 |
-
2009
- 2009-10-16 JP JP2009239548A patent/JP2011086182A/en active Pending
- 2009-11-17 WO PCT/JP2009/069465 patent/WO2011045870A1/en active Application Filing
Cited By (1)
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 |