JP7375426B2 - Robot control arithmetic processing FPGA and data bus width determination method for arithmetic processing FPGA - Google Patents

Robot control arithmetic processing FPGA and data bus width determination method for arithmetic processing FPGA Download PDF

Info

Publication number
JP7375426B2
JP7375426B2 JP2019177060A JP2019177060A JP7375426B2 JP 7375426 B2 JP7375426 B2 JP 7375426B2 JP 2019177060 A JP2019177060 A JP 2019177060A JP 2019177060 A JP2019177060 A JP 2019177060A JP 7375426 B2 JP7375426 B2 JP 7375426B2
Authority
JP
Japan
Prior art keywords
bit width
fpga
stage
determination
data
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.)
Active
Application number
JP2019177060A
Other languages
Japanese (ja)
Other versions
JP2021056609A (en
Inventor
大介 川瀬
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.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
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 Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2019177060A priority Critical patent/JP7375426B2/en
Publication of JP2021056609A publication Critical patent/JP2021056609A/en
Application granted granted Critical
Publication of JP7375426B2 publication Critical patent/JP7375426B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Numerical Control (AREA)
  • Manipulator (AREA)

Description

本発明は、可動部を有するロボットを制御するための演算処理を行うFPGA,及びそのFPGAが記憶部にアクセスするためのデータバス幅を決定する方法に関する。 The present invention relates to an FPGA that performs arithmetic processing to control a robot having a movable part, and a method for determining a data bus width for the FPGA to access a storage part.

ロボットの実働時や教示時又は動作シミュレーション時に、ロボットと例えば設備のような障害物とが衝突するか否かを判定する処理を行う技術がある。この衝突判定処理の演算は非常に負荷が高いため、特に衝突判定処理をリアルタイムで演算するには、高性能な演算処理機能を有したCPUを用いる必要がある。 There is a technology that performs processing to determine whether or not a robot will collide with an obstacle such as equipment during actual operation, teaching, or motion simulation of the robot. Since the computation of this collision determination process is very heavy, it is necessary to use a CPU having high-performance arithmetic processing functions, especially in order to perform the collision determination process in real time.

特開2013-184242号公報Japanese Patent Application Publication No. 2013-184242

しかしながら、高性能なCPUは当然に高価であるため、製品のコストアップを抑える観点からは、安価なCPUを用いても衝突判定処理のリアルタイム演算が可能になることが望ましい。そのためには、FPGA(Field Programmable Gate Array)を併用してFPGAに衝突判定処理を実行させ、CPUは判定結果のみを取得する構成が想定される。 However, since a high-performance CPU is naturally expensive, from the viewpoint of suppressing an increase in product costs, it is desirable to be able to perform collision determination processing in real time even with an inexpensive CPU. To this end, a configuration is assumed in which an FPGA (Field Programmable Gate Array) is used in conjunction with the FPGA to execute the collision determination process, and the CPU acquires only the determination result.

FPGAが衝突判定処理を行うには、判定対象となる物体の位置及び形状等を表すモデルデータをメモリから読み出す必要があるが、判定処理を高速に実行するためには、各モデルデータを1回のメモリアクセスで読み出せるようにデータバス幅を決定することが望ましい。従来、上記のようにデータバス幅を決定するための具体的な指標は、提示されていなかった。 In order for the FPGA to perform collision determination processing, it is necessary to read model data representing the position and shape of the object to be determined from memory, but in order to execute the determination processing at high speed, each model data must be read once. It is desirable to determine the data bus width so that it can be read by memory access. Conventionally, no specific index has been presented for determining the data bus width as described above.

本発明は、上記実情に鑑みてなされたものであり、その目的は、CPUの演算処理負荷を低減して、衝突判定処理のリアルタイム演算を行うことを可能にするロボット制御の演算処理用FPGA,及び演算処理用FPGAのデータバス幅決定方法を提供することにある。 The present invention has been made in view of the above-mentioned circumstances, and its purpose is to provide an FPGA for arithmetic processing for robot control, which reduces the arithmetic processing load on the CPU and makes it possible to perform real-time calculations for collision determination processing. Another object of the present invention is to provide a data bus width determination method for an FPGA for arithmetic processing.

請求項1記載のロボット制御の演算処理用FPGAによれば、ロボットの可動部と障害物との衝突判定処理要求が入力されると、可動部の少なくとも一部の形状等と障害物の少なくとも一部の形状等とをそれぞれ表したモデルのデータが記憶されている記憶部より双方のモデルのデータを読み出して双方の衝突判定を行い、その判定結果を出力する際に、衝突判定に係る演算の少なくとも一部を並列処理するパイプラインを構成するようにロジックがコンフィギュレーションされる。尚、「形状等」は、物体の形状に加えて、位置,大きさを含むものとする。 According to the FPGA for arithmetic processing of robot control according to claim 1, when a request for collision determination processing between a movable part of the robot and an obstacle is input, the shape of at least a part of the movable part and the shape of at least one part of the obstacle are input. The data of both models is read out from the storage unit that stores the data of the models representing the shapes of the parts, etc., collision determination is made between both, and when the determination results are output, the calculations related to the collision determination are performed. Logic is configured to form a pipeline that processes at least in part in parallel. Note that "shape, etc." includes the position and size of an object in addition to its shape.

このように構成すれば、CPUがFPGAに対して衝突判定処理要求を入力すると、FPGAは、双方のモデルのデータを記憶部より読み出して双方の衝突判定を行い、その判定結果をCPUに出力する、というシステムを構成できる。したがって、比較的安価なCPUとFPGAとの組み合わせによって、CPUはFPGAに衝突判定を行わせながらロボットのその他の制御を処理することが可能になる。また、衝突判定の演算は処理負荷が高いが、その演算の少なくとも一部を並列処理するパイプラインを構成するようにFPGAをコンフィギュレーションすることで、演算を効率的に行うことが可能になり、CPUが要求する時間内に衝突判定を実行させることができる。 With this configuration, when the CPU inputs a collision determination processing request to the FPGA, the FPGA reads the data of both models from the storage unit, performs collision determination for both, and outputs the determination result to the CPU. It is possible to configure a system called . Therefore, by combining a relatively inexpensive CPU and FPGA, the CPU can process other controls of the robot while having the FPGA perform collision determination. In addition, collision determination calculations have a high processing load, but by configuring the FPGA to form a pipeline that processes at least part of the calculations in parallel, it is possible to perform the calculations efficiently. Collision determination can be executed within the time required by the CPU.

そして、ロボットの最大リンク長をL[mm],許容判定誤差をE[mm],モデルの形状等を複数のオブジェクトに分割した数をD,xの小数点以下を整数に切り上げる関数をfRU(x),最小限必要となるデータバスのビット幅DB0とすると、そのビット幅DB0を以下の(7)式により決定し、 Then, the maximum link length of the robot is L [mm], the allowable judgment error is E [mm], the number of divisions of the model shape etc. into multiple objects is D, and the function that rounds up the decimal point of x to an integer is f RU ( x), Assuming that the minimum required bit width of the data bus is DB W 0, the bit width DB W 0 is determined by the following equation (7),

Figure 0007375426000001
記憶部に接続されるデータバスのビット幅DB1を、ビット幅DB0以上に設定する。
Figure 0007375426000001
The bit width DB W 1 of the data bus connected to the storage section is set to be greater than or equal to the bit width DB W 0.

前記ビット幅DB0は、各モデルの位置を表すのに必要なデータのビット数や、各モデルの大きさを、複数のオブジェクトに分割することも考慮して必要になるデータのビット数も考慮して決定される。したがって、FPGAと記憶部とを接続するデータバスのビット幅DB1をビット幅DB0以上に設定すれば、FPGAは、モデルデータを1回のアクセスによって記憶部より確実に読み出すことができる。 The bit width DB W 0 includes the number of data bits required to represent the position of each model, and the number of data bits required in consideration of dividing the size of each model into multiple objects. Determined by consideration. Therefore, if the bit width DB W 1 of the data bus connecting the FPGA and the storage section is set to the bit width DB W 0 or more, the FPGA can reliably read model data from the storage section with one access. .

請求項2記載のロボット制御の演算処理用FPGAによれば、モデルの位置を表すデータのビット数をNとし、符号ビット及びクォータニオンを用いる際のビット幅DB2とすると、ビット幅DB2を以下の(8)式により決定し、
DB2=DB0+4(N+1) …(8)
記憶部に接続されるデータバスのビット幅DB3をビット幅DB2以上に設定する。このように、ビット幅DB0に4(N+1)ビット分を追加することで、モデルデータに符号及びクォータニオンも含めることができるので、データバスのビット幅DB3をビット幅DB2以上に設定すれば、FPGAは、衝突判定処理をより高速に実行できる。
According to the FPGA for arithmetic processing of robot control according to claim 2, if the number of bits of data representing the position of the model is N P and the bit width DB W when using a sign bit and a quaternion is 2, then the bit width DB W 2 is determined by the following formula (8),
DB W 2 = DB W 0 + 4 ( NP + 1) ... (8)
The bit width DB W 3 of the data bus connected to the storage section is set to the bit width DB W 2 or more. In this way, by adding 4 (N P +1) bits to the bit width DB W 0, the code and quaternion can also be included in the model data, so the bit width DB W 3 of the data bus can be reduced to the bit width DB W If set to 2 or more, the FPGA can execute collision determination processing faster.

請求項3記載のロボット制御の演算処理用FPGAによれば、双方のモデルを何れも直方体モデルとし、衝突判定は15方向の分離軸を用いて行う。直方体モデルは、衝突判定において一般的に使用されるモデルであり、その場合、衝突判定は15方向の分離軸を用いて行うことになる。この15方向の分離軸を用いた衝突判定に係る演算の少なくとも一部をパイプラインにて並列処理することで、直方体モデル同士の衝突判定を効率的に行うことができる。 According to the robot control arithmetic processing FPGA according to the third aspect, both models are rectangular parallelepiped models, and collision determination is performed using separation axes in 15 directions. The rectangular parallelepiped model is a model commonly used in collision determination, and in that case, collision determination is performed using separation axes in 15 directions. By processing at least part of the calculations related to collision determination using the separation axes in 15 directions in parallel in a pipeline, collision determination between rectangular parallelepiped models can be efficiently performed.

請求項4記載のロボット制御の演算処理用FPGAによれば、パイプラインを具体的には、記憶部よりモデルデータを読み出すロードステージ,双方の直方体モデルを同一の座標系に変換する座標変換ステージ,双方の直方体モデルの特定の軸方向又はそれらの外積により分離軸を求める方向演算ステージ,双方の直方体モデルを分離軸に投影して、各モデルの像が重なるか否かを判定する分離軸判定ステージ,分離軸判定ステージにおける全ての分離軸についての判定結果に基づき衝突判定を行う衝突判定ステージとで構成する。このように構成すれば、モデルデータの読み出しから衝突判定までの各処理を、パイプラインの各ステージによって効率的に行うことができる。 According to the FPGA for arithmetic processing of robot control according to claim 4, the pipeline specifically includes a load stage for reading model data from a storage section, a coordinate conversion stage for converting both rectangular parallelepiped models into the same coordinate system, A direction calculation stage that determines the separation axis from a specific axial direction of both rectangular parallelepiped models or their cross product, and a separation axis determination stage that projects both rectangular parallelepiped models onto the separation axis and determines whether the images of each model overlap. , and a collision determination stage that performs collision determination based on the determination results for all separated axes in the separation axis determination stage. With this configuration, each process from reading model data to collision determination can be efficiently performed by each stage of the pipeline.

第1実施形態であり、FPGAの内部ロジックで構成されるパイプライン構造を示す図This is the first embodiment and is a diagram showing a pipeline structure composed of internal logic of an FPGA. メモリロードステージに係る処理手順を示すフローチャートFlowchart showing the processing procedure related to the memory load stage 2つの物体の形状をそれぞれ直方体モデルとして扱う場合に行う分離軸判定を説明する図A diagram explaining the separation axis determination performed when the shapes of two objects are treated as rectangular parallelepiped models. ハードウェア構成の一例を示す図(その1)Diagram showing an example of hardware configuration (Part 1) ハードウェア構成の一例を示す図(その2)Diagram showing an example of hardware configuration (Part 2) ハードウェア構成の一例を示す図(その3)Diagram showing an example of hardware configuration (Part 3) CPUとFPGAとの間で行われる処理・演算タイミングの概要を示す図Diagram showing an overview of processing/calculation timing performed between the CPU and FPGA 第2実施形態であり、FPGAの内部ロジックで構成されるパイプライン構造を示す図This is a second embodiment and is a diagram showing a pipeline structure composed of internal logic of an FPGA. 第3実施形態であり、FPGAの内部ロジックで構成されるパイプライン構造を示す図This is a third embodiment, and is a diagram showing a pipeline structure composed of internal logic of an FPGA. 第4実施形態であり、FPGAの内部ロジックで構成されるパイプライン構造を示す図This is the fourth embodiment and is a diagram showing a pipeline structure composed of internal logic of an FPGA. 第5実施形態であり、FPGAの内部ロジックで構成されるパイプライン構造を示す図This is the fifth embodiment and is a diagram showing a pipeline structure composed of internal logic of an FPGA. 第6実施形態であり、FPGAの内部ロジックで構成されるパイプライン構造を示す図This is the sixth embodiment and is a diagram showing a pipeline structure composed of internal logic of an FPGA. 第7実施形態であり、FPGAの内部ロジックで構成されるパイプライン構造を示す図This is the seventh embodiment and is a diagram showing a pipeline structure composed of internal logic of an FPGA. 第8実施形態であり、FPGAの内部ロジックで構成されるパイプライン構造を示す図This is the eighth embodiment and is a diagram showing a pipeline structure composed of internal logic of an FPGA. 第9実施形態であり、FPGAの内部ロジックで構成されるパイプライン構造を示す図This is the ninth embodiment and is a diagram showing a pipeline structure composed of internal logic of an FPGA.

(第1実施形態)
以下、第1実施形態について図1から図5を参照して説明する。本実施形態は、FPGAの内部ロジックをどのように定義してコンフィギュレーションするかという点と、FPGAがモデルデータを読み出すためのメモリバス幅をどのように設定するか、という点に特徴がある。したがって、外部的なハードウェア構成は、一般的なCPU1とFPGA2との組合せである。
(First embodiment)
The first embodiment will be described below with reference to FIGS. 1 to 5. This embodiment is characterized by how the internal logic of the FPGA is defined and configured, and how the memory bus width for the FPGA to read model data is set. Therefore, the external hardware configuration is a general combination of CPU1 and FPGA2.

例えば図4Aに示すように、CPU1は、自身の制御プログラムがROMやハードディスク等から転送されると共に、ワークエリアとして使用されるRAM3にアクセスし、FPGA2は、衝突判定用のモデルデータがハードディスク等から転送されるRAM4にアクセスする構成である。図4Bは、FPGA2の内部にRAM4が組み込まれている構成である。図4Cは、CPU1,FPGA2及びRAM4がSoC(System on Chip)5として構成されており、RAM3がSoC5に外付けされた構成である。尚、SoC5内のRAM4の容量が十分に確保できる場合には外付けのRAM3を除いて、CPU1もRAM4にアクセスする構成を採用しても良い。 For example, as shown in FIG. 4A, the CPU 1 has its own control program transferred from the ROM, hard disk, etc., and accesses the RAM 3 used as a work area, and the FPGA 2 receives model data for collision determination from the hard disk, etc. The configuration is such that the RAM 4 to be transferred is accessed. FIG. 4B shows a configuration in which the RAM 4 is incorporated inside the FPGA 2. FIG. 4C shows a configuration in which the CPU 1, FPGA 2, and RAM 4 are configured as an SoC (System on Chip) 5, and the RAM 3 is externally attached to the SoC 5. Note that if the capacity of the RAM 4 in the SoC 5 can be sufficiently secured, a configuration may be adopted in which the CPU 1 also accesses the RAM 4, excluding the external RAM 3.

図5は、本実施形態におけるCPU1とFPGA2との間で行われる処理シーケンスを示している。CPU1は、電源が投入されて起動すると、FPGA2に対してコンフィギュレーションを指示する。コンフィギュレーションの指示は、FPGA2に対するリセットの解除でも良い。するとFPGA2はコンフィギュレーションプログラムを例えばPROMやフラッシュROM等から読み出してコンフィギュレーションを実行し、完了するとCPU1に対してコンフィギュレーション完了を通知する。それ以降、CPU2はFPGA2に対して衝突判定処理の開始の指示を入力すると、FPGA2は衝突判定処理演算を行う。衝突判定処理演算が完了すると、その完了及び判定結果をCPU1に通知することを繰り返す。CPU1は、その間にロボットの制御に関する他の演算処理を実行する。 FIG. 5 shows a processing sequence performed between the CPU 1 and the FPGA 2 in this embodiment. When the CPU 1 is powered on and started, it instructs the FPGA 2 to configure. The configuration instruction may also be a release of reset for the FPGA 2. Then, the FPGA 2 reads the configuration program from, for example, a PROM or a flash ROM, executes the configuration, and upon completion, notifies the CPU 1 of the completion of the configuration. After that, when the CPU 2 inputs an instruction to start the collision determination process to the FPGA 2, the FPGA 2 performs a collision determination process calculation. When the collision determination processing calculation is completed, the CPU 1 is repeatedly notified of the completion and the determination result. During this time, the CPU 1 executes other arithmetic processing related to robot control.

一例として、CPU1の動作クロック周波数は1G~2GHz程度,FPGA2の動作クロック周波数は500MHz程度で、衝突判定処理の実行間隔は、例えば1ms程度である。 As an example, the operating clock frequency of the CPU 1 is about 1 GHz to 2 GHz, the operating clock frequency of the FPGA 2 is about 500 MHz, and the execution interval of the collision determination process is, for example, about 1 ms.

図3は、ロボットの可動部であるアームの形状と、例えば工場内における各設備等を障害物とした際に、その障害物の形状とをそれぞれ直方体モデルとして扱う場合に行う分離軸判定を説明するものである。2つの物体を物体A,Bとする。物体Aの各方向ベクトルを、図中に示すXA,YA,ZAとし、物体Bの各方向ベクトルをXB,YB,ZBとする。そして、判定軸Vを方向ベクトルXAとする。また、
LA=[LAX LAY LAZ],PA=[PAX PAY PAZ]
LB=[LBX LBY LBZ],PB=[PBX PBY PBZ]
とする。
Figure 3 explains the separation axis determination performed when the shape of the arm, which is the movable part of the robot, and the shape of the obstacle, for example, each piece of equipment in a factory, are treated as a rectangular parallelepiped model. It is something to do. Let two objects be objects A and B. Let the directional vectors of object A be XA, YA, and ZA shown in the figure, and let the directional vectors of object B be XB, YB, and ZB. Then, the determination axis V is set as the direction vector XA. Also,
LA=[LAX LAY LAZ], PA=[PAX PAY PAZ]
LB=[LBX LBY LBZ], PB=[PBX PBY PBZ]
shall be.

以下の判定式
(|LA・V|-|LB・V|)/2<|(PA-PB)・V| …(1)
が成立すれば、判定軸Vは分離軸であり、物体Aと物体Bとは衝突しない。一方、上記の条件が成立しなければ判定軸Vは分離軸ではなく、物体Aと物体Bとは衝突することになる。V=XAの場合、判定式(1)は以下のようになる。
(LAX+LXB’)/2<|PAX-PBX| …(2)
The following judgment formula (|LA・V|-|LB・V|)/2<|(PA-PB)・V|...(1)
If this holds true, the determination axis V is a separation axis, and objects A and B do not collide. On the other hand, if the above conditions are not met, the determination axis V is not the separation axis, and objects A and B will collide. In the case of V=XA, the determination formula (1) becomes as follows.
(LAX+LXB')/2<|PAX-PBX|...(2)

そして、直方体モデルの分離軸判定は、以下の15軸を判定軸として行う。
・物体Aの各方向ベクトル:XA,YA,ZA
・物体Bの各方向ベクトル:XB,YB,ZB
・物体A,Bの各方向ベクトルの外積:XA×XB,XA×YB,XA×ZB
YA×XB,YA×YB,YA×ZB,ZA×XB,ZA×YB,ZA×ZB
そして、これら15軸の判定軸に分離軸が1つも存在しなければ、物体Aと物体Bとは衝突していることになる。
Separation axis determination for the rectangular parallelepiped model is performed using the following 15 axes as determination axes.
・Each direction vector of object A: XA, YA, ZA
・Each direction vector of object B: XB, YB, ZB
- Cross product of each direction vector of objects A and B: XA×XB, XA×YB, XA×ZB
YA×XB, YA×YB, YA×ZB, ZA×XB, ZA×YB, ZA×ZB
If there is no separation axis among these 15 judgment axes, it means that object A and object B have collided with each other.

図1に示すように、本実施形態のFPGA2は、5ステージで5段のパイプラインを構成するようにロジックがコンフィギュレーションされる。パイプラインの各ステージは、以下のようになる
L:メモリロードステージ
T:座標変換ステージ
D:方向演算ステージ
S15:分離軸判定ステージ
R:衝突判定ステージ
As shown in FIG. 1, the logic of the FPGA 2 of this embodiment is configured to form a five-stage pipeline. Each stage of the pipeline is as follows: L: Memory load stage T: Coordinate transformation stage D: Direction calculation stage S15: Separation axis determination stage R: Collision determination stage

<メモリロードステージ>
RAM4から各モデルデータの形状を、複数に分割したオブジェクト単位で読み込む。
<座標変換ステージ>
双方の直方体モデルを同一の座標系に変換する。
<方向演算ステージ>
双方の直方体モデルの特定の軸方向又はそれらの外積により分離軸を求める。
<分離軸判定ステージ>
双方の直方体モデルを分離軸に投影して、各モデルの像が重なるか否かを判定する。ここで、15方向の分離軸について並列処理を行う。
<衝突判定ステージ>
分離軸判定ステージにおける全ての分離軸についての判定結果に基づき、衝突判定を行う。
<Memory load stage>
The shape of each model data is read from the RAM 4 in units of objects divided into a plurality of parts.
<Coordinate transformation stage>
Convert both rectangular parallelepiped models to the same coordinate system.
<Direction calculation stage>
The separation axis is determined by specific axial directions of both rectangular parallelepiped models or their cross product.
<Separation axis judgment stage>
Both rectangular parallelepiped models are projected onto the separation axis, and it is determined whether the images of each model overlap. Here, parallel processing is performed on separation axes in 15 directions.
<Collision judgment stage>
Collision determination is performed based on the determination results for all the separated axes in the separated axis determination stage.

図2は、メモリロードステージにおいて、各モデルのデータをオブジェクト毎に読み込む場合の挙動を示すフローチャートである。先ず、オブジェクト情報が格納されたメモリM,つまりRAM4から、オブジェクト番号[1]を判定用のレジスタMAにロードする(S1)。a,bは、それぞれ物体A,Bの判定対象オブジェクト番号が格納されるポインタであり、ポインタa,bにそれぞれ「2」が格納される(S2,S3)。 FIG. 2 is a flowchart showing the behavior when data of each model is read for each object in the memory load stage. First, the object number [1] is loaded from the memory M in which object information is stored, that is, the RAM 4, into the determination register MA (S1). A and b are pointers in which the determination target object numbers of objects A and B are stored, respectively, and "2" is stored in pointers a and b, respectively (S2, S3).

次に、ポインタbがオブジェクト数N以下か否かを判断し(S4)、N以下であれば(YES)判定用のレジスタMBにM[b]の内容をロードする(S5)。そして、ポインタbをインクリメントしてから(S6)ステップS4に戻る。ステップS4において、ポインタbがオブジェクト数Nを超えると(NO)、ポインタbがオブジェクト数N未満か否かを判断する(S7)。N未満であれば(YES)、A側と同様に、レジスタMAにM[a]の内容をロードして(S8)ポインタaをインクリメントする(S9)。それから、ポインタaの内容をポインタbに格納すると、ステップS4に戻る。ステップS7において、ポインタaがオブジェクト数Nに達すると(NO)終了となる。 Next, it is determined whether the pointer b is less than or equal to the number of objects N (S4), and if it is less than or equal to N (YES), the contents of M[b] are loaded into the determination register MB (S5). Then, after incrementing the pointer b (S6), the process returns to step S4. In step S4, if the pointer b exceeds the number N of objects (NO), it is determined whether the pointer b is less than the number N of objects (S7). If it is less than N (YES), similarly to the A side, the contents of M[a] are loaded into the register MA (S8) and the pointer a is incremented (S9). Then, after storing the contents of pointer a into pointer b, the process returns to step S4. In step S7, when the pointer a reaches the number of objects N (NO), the process ends.

上記の処理では、物体Bの衝突判定モデルを先に更新し、それが最後まで行ったら、Bを最初に戻して他方Aを次の衝突判定モデルに更新しているが、A,Bの関係は逆でも良い。 In the above process, the collision detection model for object B is updated first, and when it reaches the end, B is returned to the beginning and the other A is updated to the next collision detection model, but the relationship between A and B is The opposite may also be true.

例えば、Aを最初に戻してからBが更新される前の判定は、衝突なしとして無視するか、演算を実施しなくても良い。ただし、同じ組み合わせの衝突判定演算を2回行うだけなので、そのまま演算しても良い。その場合、各周期の最初の衝突判定時に、前回の位置関係でのオブジェクトが残ってしまう可能性がある。しかし、この過検出による影響は無視しても問題ない程度なので、そのまま演算しても良い。また、最初の衝突判定モデルを別のレジスタに退避しておくことで、Bを次の衝突判定モデルに更新している間に、レジスタからAを最初に戻すこともできる。 For example, a determination made after A is returned to the beginning and before B is updated may be ignored as no collision, or no calculation may be performed. However, since the collision determination calculation for the same combination is only performed twice, the calculation may be performed as is. In that case, there is a possibility that objects in the previous positional relationship may remain at the time of the first collision determination in each cycle. However, since the influence of this over-detection can be ignored without any problem, the calculation may be performed as is. Furthermore, by saving the first collision determination model in another register, A can be returned to the beginning from the register while B is being updated to the next collision determination model.

図1に示すメモリロードステージの「L1,2」,「L1,3」,…,「L1,N」等は、図2のステップS1,S5,S8の処理に対応しており、最後の「L(N-1),N」を実行した後にステップS7で「NO」と判断することになる。このように、FPGA2が衝突判定を5ステージ・5段のパイプラインにより処理することで、演算を効率的に実行できる。 "L1, 2", "L1, 3", ..., "L1, N", etc. of the memory load stage shown in FIG. 1 correspond to the processing of steps S1, S5, S8 in FIG. After executing "L(N-1), N", a "NO" determination is made in step S7. In this way, the FPGA 2 processes collision determination using a five-stage, five-stage pipeline, allowing efficient execution of calculations.

ここで、図1に示すように、パイプライン処理を円滑に実行するためには、メモリロードステージにおいて、必要なサイズ,つまりビット数のデータを1回で読み込む必要がある。具体的に、FPGA2及びRAM4間でデータを1回で転送するために、どれ位のデータバス幅が必要になるかを検討する。 Here, as shown in FIG. 1, in order to smoothly execute pipeline processing, it is necessary to read data of a required size, that is, the number of bits, at one time in the memory load stage. Specifically, we will consider how much data bus width is required to transfer data between the FPGA 2 and the RAM 4 at one time.

ロボットの全リンクのうち最大のリンク長をL[mm],許容判定誤差をE[mm],モデルの分割数をDとする。この分割数Dは、上述したオブジェクト数Nに等しい。各モデルの位置を表すには、少なくとも Assume that the maximum link length among all the links of the robot is L [mm], the allowable judgment error is E [mm], and the number of model divisions is D. This number of divisions D is equal to the number of objects N described above. To represent the position of each model, at least

Figure 0007375426000002
Figure 0007375426000002

ビットは必要となる。但し、右辺の関数fRU(x)は、xの小数点以下を整数に切り上げる関数である。また、各モデルの大きさは、分割により細分化されることを考慮すると、少なくとも bits are required. However, the function f RU (x) on the right side is a function that rounds up the decimal part of x to an integer. Also, considering that the size of each model is subdivided by division, the size of each model is at least

Figure 0007375426000003
Figure 0007375426000003

ビットは必要となる。以上を合計すると、少なくとも bits are required. In total, at least

Figure 0007375426000004
Figure 0007375426000004

ビットのメモリ幅が必要となる。また、切り上げ関数をまとめることで近似して Requires memory width of bits. Also, by combining round-up functions, we can approximate

Figure 0007375426000005
Figure 0007375426000005

ビットのメモリ幅以上のメモリ幅が必要と評価しても問題ない。 There is no problem in evaluating that a memory width greater than the memory width of bits is required.

例えばリンク長が500[mm]で許容判定誤差を1[mm],分割数を16とすると、N=9,N=8となり、DB0=3×9+3×8=51となるから、ビット幅DB1として51ビット以上のメモリが必要ということになる。例えばDB1を52ビット等にする。つまり、一般的に使用されることが多い32ビットのバス幅では、一度のメモリロードで衝突判定モデルのロード完了しないことを意味する。 For example, if the link length is 500 [mm], the allowable judgment error is 1 [mm], and the number of divisions is 16, then N P = 9, N S = 8, and DB W 0 = 3 x 9 + 3 x 8 = 51. , a memory with a bit width of DB W 1 of 51 bits or more is required. For example, DB W 1 is set to 52 bits. In other words, with the commonly used 32-bit bus width, loading the collision determination model cannot be completed with one memory load.

FPGA2に衝突判定モデルが読み込まれた後、それを使用した衝突判定結果が出力されるまでの間に、(5)又は(6)式で求められるビット数以上のメモリをロードすれば良い。また、パイプラインが、オーバーラップして処理可能な複数の演算ブロックにより構成されている場合には、各ブロックのうち最長の演算時間の間に、(5)又は(6)式で求められるビット数以上のメモリをロードすれば良い。 After the collision determination model is loaded into the FPGA 2 and until the collision determination result using the model is output, it is sufficient to load memory with a number of bits greater than or equal to that determined by equation (5) or (6). In addition, if the pipeline is composed of multiple calculation blocks that can be processed in an overlapping manner, the bits determined by equation (5) or (6) during the longest calculation time among each block. All you have to do is load more memory than that number.

尚、上記の式ではモデル位置に符号ビットを含めていないが、各モデルの座標系の原点を適切に設定することで、例えば、各軸のそれぞれ最も小さい箇所を原点とすれば、位置を正方向のみで表現できるためである。勿論、全体で3ビット増えるが、位置にそれぞれ符号ビットを付加しても良い。 Although the above formula does not include the sign bit in the model position, by appropriately setting the origin of the coordinate system of each model, for example, if the smallest point of each axis is set as the origin, the position can be corrected. This is because it can be expressed only by direction. Of course, the total number increases by 3 bits, but a sign bit may be added to each position.

また、衝突検出モデルの方向成分は、それが属する座標系,例えば、アームの1軸目リンクを構成する衝突検出モデルであれば、1軸目リンクの座標系と同一としても問題ないため、上記の式には方向成分を含めていない。
方向成分を含めることを考えると、例えばクォータニオンをq={w,(x,y,z)}で表記し、単位クォータニオンであることを利用すれば、例えば
w=√{1-(x+y+z)}
としてwを求めることで、1要素はメモリからロードせずとも計算で求めることができる。したがって、3要素で表現できる。
In addition, the direction component of the collision detection model can be the same as the coordinate system to which it belongs, for example, the coordinate system of the first axis link if it is a collision detection model that constitutes the first axis link of the arm. The expression does not include the directional component.
Considering the inclusion of the directional component, for example, if we write the quaternion as q={w,(x,y,z)} and use the fact that it is a unit quaternion, we can write, for example, w=√{1-(x 2 + y 2 +z 2 )}
By finding w as , one element can be found by calculation without loading it from memory. Therefore, it can be expressed with three elements.

モデル位置と同等のビット数に符号ビットを加えると、1要素当たり最低でも
=N+1ビットは必要となる。勿論、クォータニオンの4要素を全てモデルに持たせても良いし、方向成分を9要素からなる3×3の回転行列で持たせても良い。要素数を増やせば、座標変換や方向演算に必要な演算処理を低減できる。特に、3要素だけでは残りの1要素を計算で導出する必要があり、その際には平方根の計算などの回路規模が比較的の大きくなる演算が必要となるから、メモリ帯域を広げた方が全体の回路規模が小さくなる場合もある。そのため、最も適しているのはクォータニオンの4要素全てを持たせる構成となる。
Adding the sign bit to the number of bits equivalent to the model position, at least N R =N P +1 bits are required per element. Of course, the model may have all four elements of the quaternion, or the direction component may be provided as a 3×3 rotation matrix consisting of nine elements. By increasing the number of elements, the calculation processing required for coordinate transformation and direction calculation can be reduced. In particular, if there are only three elements, it is necessary to derive the remaining one element by calculation, which requires calculations such as square root calculations that require a relatively large circuit size, so it is better to widen the memory bandwidth. The overall circuit scale may also be reduced. Therefore, the most suitable configuration is one that has all four quaternion elements.

ただし、演算時間については、残りの1要素を演算する回転要素補間演算部を新たにパイプラインのステージ,つまり演算ブロックとして追加することで、衝突検出処理全体としては演算時間の増加の影響を抑えることができる。この場合、各モデル間の判定ではなく、全判定で1回の演算分しか増加しない。 However, regarding the calculation time, by adding a rotating element interpolation calculation unit that calculates the remaining one element as a new pipeline stage, that is, a calculation block, the impact of the increase in calculation time on the collision detection process as a whole can be suppressed. be able to. In this case, the amount of calculation increases by only one time for all the determinations, not for the determination between each model.

先に提示した具体例の場合、N=9であるからN=10となり、回転成分を4要素とすれば、DB2=51+4×10=91ビット以上のメモリ幅が必要となる。つまり、ビット幅DB2は、
DB2=DB0+4(N+1) …(8)
で決定される。この場合、64ビットのメモリ幅,又はこれにECC (Error Check and Correct:エラー訂正機能)機能の付与を想定した72ビットのメモリ幅でも、一回のメモリロードで衝突判定モデルのロードは完了しない。本実施形態では、91ビット以上のメモリ幅に対応して、例えば96ビットのデータバス構成を採用している。この96ビットはビット幅DB3の一例である。
In the case of the specific example presented earlier, since N P =9, N R =10, and if the rotation component is 4 elements, a memory width of DB W 2 = 51 + 4 x 10 = 91 bits or more is required. In other words, the bit width DB W 2 is
DB W 2 = DB W 0 + 4 ( NP + 1) ... (8)
determined by In this case, even with a 64-bit memory width or a 72-bit memory width with an ECC (Error Check and Correct) function added, loading the collision detection model will not be completed in one memory load. . In this embodiment, a 96-bit data bus configuration, for example, is adopted in response to a memory width of 91 bits or more. This 96 bits is an example of the bit width DB W 3.

尚、ここまでの検討は、衝突判定演算を固定小数点で実行することを前提としている。固定小数点とする利点は、必要精度を最小限の回路規模で実現できることである。これに対して、CPUで演算していた内容と同じ結果となることが要求される場合、浮動小数点で演算しても良い。この場合、方向成分を含めない場合は32×6=192ビット、方向成分を含めた場合,4要素とすれば、32×10=320ビットが必要となり、要求されるメモリ幅は更に大きくなる。 Note that the discussion up to this point is based on the assumption that the collision determination calculation is performed using a fixed point. The advantage of using fixed-point numbers is that the required accuracy can be achieved with a minimum circuit scale. On the other hand, if it is required to obtain the same result as the content calculated by the CPU, the calculation may be performed using floating point numbers. In this case, if the direction component is not included, 32×6=192 bits are required, and if the direction component is included, 32×10=320 bits are required for four elements, and the required memory width becomes even larger.

以上のように本実施形態によれば、FPGA2は、CPU1より、ロボットのアームと障害物との衝突判定処理要求が入力されると、アームの少なくとも一部の形状等と障害物の少なくとも一部の形状等とをそれぞれ表したモデルのデータが記憶されているRAM4より各モデルのデータを読み出して双方の衝突判定を行い、その判定結果をCPU1に出力する。そして、FPGA2は、衝突判定に係る演算の少なくとも一部を並列処理するパイプラインを構成するようにロジックがコンフィギュレーションされる。 As described above, according to the present embodiment, when the CPU 1 inputs a request for processing for determining a collision between the arm of the robot and an obstacle, the FPGA 2 determines the shape of at least a portion of the arm and the shape of at least a portion of the obstacle. The data of each model is read out from the RAM 4 in which data representing the shape, etc. of each model is stored, a collision determination is made between the two, and the determination result is output to the CPU 1. The logic of the FPGA 2 is configured to form a pipeline that processes at least a portion of calculations related to collision determination in parallel.

これにより、CPU1がFPGA2に対して衝突判定処理要求を入力すると、FPGA2が双方のモデルのデータをRAM4より読み出して衝突判定を行い、その判定結果をCPU1に出力する、というシステムを構成できる。したがって、比較的安価なCPU1とFPGA2との組み合わせにより、CPU1はFPGA2に衝突判定を行わせながらロボットのその他の制御を処理することが可能になる。また、衝突判定の演算は処理負荷が高いが、その演算の少なくとも一部を並列処理するパイプラインを構成するようにFPGA2をコンフィギュレーションすることで、演算を効率的に行うことが可能になり、CPU1が要求する時間内に衝突判定を実行させることができる。 Thereby, when the CPU 1 inputs a collision determination processing request to the FPGA 2, a system can be constructed in which the FPGA 2 reads data of both models from the RAM 4, performs collision determination, and outputs the determination result to the CPU 1. Therefore, by combining the relatively inexpensive CPU 1 and FPGA 2, the CPU 1 can process other controls of the robot while having the FPGA 2 perform collision determination. In addition, collision determination calculations have a high processing load, but by configuring the FPGA 2 to form a pipeline that processes at least part of the calculations in parallel, it is possible to perform the calculations efficiently. Collision determination can be executed within the time required by the CPU 1.

この場合、双方のモデルを何れも直方体モデルとし、衝突判定に15方向の分離軸を用いて行う。直方体モデルは、衝突判定において一般的に使用されるモデルであるから、15方向の分離軸を用いた衝突判定に係る演算の少なくとも一部をパイプラインにて並列処理することで、直方体モデル同士の衝突判定を効率的に行うことができる。 In this case, both models are rectangular parallelepiped models, and collision determination is performed using separation axes in 15 directions. The rectangular parallelepiped model is a model commonly used in collision detection, so by processing at least a part of the calculations related to collision determination using separation axes in 15 directions in parallel in the pipeline, it is possible to improve the relationship between the rectangular parallelepiped models. Collision determination can be performed efficiently.

また、FPGA2のパイプラインを具体的には、RAM4よりモデルデータを読み出すロードステージ,双方の直方体モデルを同一の座標系に変換する座標変換ステージ,双方の直方体モデルの特定の軸方向又はそれらの外積により分離軸を求める方向演算ステージ,双方の直方体モデルを分離軸に投影して、各モデルの像が重なるか否かを判定する分離軸判定ステージ,分離軸判定ステージにおける全ての分離軸についての判定結果に基づき衝突判定を行う衝突判定ステージとで構成する。これにより、モデルデータの読み出しから衝突判定までの各処理を、パイプラインの各ステージによって効率的に行うことができる。 Specifically, the pipeline of FPGA2 includes a load stage that reads model data from RAM4, a coordinate conversion stage that transforms both rectangular parallelepiped models into the same coordinate system, a specific axis direction of both rectangular parallelepiped models, or their outer product. A direction calculation stage that calculates the separation axis by , a separation axis judgment stage that projects both rectangular parallelepiped models onto the separation axis and determines whether the images of each model overlap, and a judgment about all separation axes in the separation axis judgment stage. It consists of a collision determination stage that performs collision determination based on the results. This allows each stage of the pipeline to efficiently perform each process from reading model data to collision determination.

そして、最小限必要となるデータバスのビット幅DB0とすると、そのビット幅DB0を(6)式により決定し、RAM4に接続されるデータバスのビット幅DB1をビット幅DB0以上に設定する。このビット幅DB0は、各モデルの位置を表すのに必要なデータのビット数や、各モデルの大きさを、複数のオブジェクトに分割することも考慮して必要になるデータのビット数も考慮して決定されている。したがって、データバスのビット幅DB1をビット幅DB0以上に設定することで、FPGA2は、モデルデータを1回のアクセスによってRAM4より確実に読み出すことができる。 Then, assuming that the minimum required bit width of the data bus is DB W 0, the bit width DB W 0 is determined by equation (6), and the bit width DB W 1 of the data bus connected to the RAM 4 is determined as the bit width DB. W Set to 0 or higher. This bit width DB W 0 also includes the number of data bits required to represent the position of each model, and the number of data bits required to take into account the size of each model to be divided into multiple objects. It has been decided with consideration. Therefore, by setting the bit width DB W 1 of the data bus to be greater than or equal to the bit width DB W 0, the FPGA 2 can reliably read model data from the RAM 4 with one access.

更に、ビット幅DB2を(8)式により決定し、RAM4に接続されるデータバスのビット幅DB3をビット幅DB2以上に設定することで、モデルデータに符号及びクォータニオンも含めることができるので、FPGA2は、衝突判定処理をより高速に実行できる。 Furthermore, by determining the bit width DB W 2 using equation (8) and setting the bit width DB W 3 of the data bus connected to the RAM 4 to be greater than or equal to the bit width DB W 2, the code and quaternion can also be included in the model data. Therefore, the FPGA 2 can execute collision determination processing at higher speed.

(第2実施形態)
以下、第1実施形態と同一部分には同一符号を付して説明を省略し、異なる部分について説明する。図6に示すように、第2実施形態では、FPGA2のパイプラインを、6ステージ・3段構成とするようにロジックをコンフィギュレーションする。第1実施形態と異なるステージは、以下になる。
LA:第1メモリロードステージ
LB:第2メモリロードステージ
D/S9A:方向演算ステージ(分離軸判定の一部を並列処理)
S9B:分離軸判定ステージ
(Second embodiment)
Hereinafter, parts that are the same as those in the first embodiment are given the same reference numerals and explanations will be omitted, and different parts will be explained. As shown in FIG. 6, in the second embodiment, the logic is configured so that the pipeline of the FPGA 2 has a six-stage, three-stage configuration. The stages different from the first embodiment are as follows.
LA: 1st memory load stage LB: 2nd memory load stage D/S9A: Direction calculation stage (parallel processing of part of separation axis determination)
S9B: Separation axis judgment stage

<第1メモリロードステージ>
RAM4から物体Aのモデルデータの形状等を、複数に分割したオブジェクト単位で読み込む。
<第2メモリロードステージ>
RAM4から物体Bのモデルデータの形状等を、複数に分割したオブジェクト単位で読み込む。すなわち、第2実施形態では、パイプライン1段の処理で物体A,Bのモデルデータを順次読み込む。
<方向演算ステージ>
分離軸を求めると共に、・物体Aの各方向ベクトルXA,YA,ZA及び物体Bの各方向ベクトルXB,YB,ZBの分離軸判定を6並列処理する。これが第1処理に相当する。
<分離軸判定ステージ>
残り9方向の外積演算を含む分離軸判定について並列処理を行う。これが第2処理に相当する。
<1st memory load stage>
The shape and the like of the model data of object A are read from the RAM 4 in units of objects divided into a plurality of parts.
<Second memory load stage>
The shape and the like of the model data of object B are read from the RAM 4 in units of objects divided into a plurality of parts. That is, in the second embodiment, model data of objects A and B are sequentially read in one stage of pipeline processing.
<Direction calculation stage>
In addition to finding the separation axes, the separation axis determination of each directional vector XA, YA, ZA of object A and each directional vector XB, YB, ZB of object B is processed six times in parallel. This corresponds to the first process.
<Separation axis judgment stage>
Parallel processing is performed on separation axis determination including cross product calculations in the remaining nine directions. This corresponds to the second process.

尚、方向演算ステージで並列処理する6方向の分離軸判定を「S9A」としているのは、分離軸判定ステージで使用する「S9B」と同じ演算ブロックを使用していることによる。したがって、これらは並列に実行できない。 The reason why the 6-direction separation axis determination that is processed in parallel in the direction calculation stage is set to "S9A" is that the same calculation block as "S9B" used in the separation axis determination stage is used. Therefore, they cannot be executed in parallel.

以上のように第2実施形態によれば、メモリロードステージを、物体Aの直方体モデルのデータを読み出す第1ステージと、物体Bの直方体モデルのデータを読み出す第2ステージとで構成する。これにより、データバス幅の制約等により、1回のメモリアクセスで双方のモデルデータを同時に読み出すことができず、メモリアクセスを2回行わざるを得ない場合にも対応させることができる。 As described above, according to the second embodiment, the memory load stage is composed of a first stage that reads data of a rectangular parallelepiped model of object A, and a second stage that reads data of a rectangular parallelepiped model of object B. This makes it possible to cope with the case where both model data cannot be read out simultaneously in one memory access due to data bus width constraints, etc., and the memory access must be performed twice.

そして、15方向の分離軸のうち、物体A,Bの方向ベクトルのみからなる分離軸判定を並列処理する第1処理と、残りの分離軸判定を並列処理する第2処理とに分別する。すなわち、第1処理は外積演算が無い分離軸判定となり、第2処理は外積演算を含む分離軸判定となる。これにより、方向演算ステージにおいて第1処理を並列処理することが可能になり、分離軸判定ステージでは第2処理を並列処理すれば良くなる。 Then, among the 15 separation axes, the process is divided into a first process in which the separation axis judgment consisting of only the direction vectors of objects A and B is processed in parallel, and a second process in which the remaining separation axis judgments are processed in parallel. That is, the first process is a separation axis determination without a cross product calculation, and the second process is a separation axis determination including a cross product calculation. This makes it possible to process the first process in parallel in the direction calculation stage, and only needs to process the second process in parallel in the separation axis determination stage.

このように構成すれば、メモリロードステージを第1及び第2ステージに分けたことに伴い、分離軸判定の並列処理の一部を方向演算ステージで行うようにすると、FPGA2内の各演算ブロックの稼働率が向上する。したがって、FPGA2内の論理回路リソースの使用量と演算速度とのバランスが良好になる。更に、FPGA2を、分離軸判定の第1処理と第2処理とを、共通の演算ブロックで実行するようにコンフィギュレーションするので、論理回路リソースをより効率的に使用できる。 With this configuration, if the memory load stage is divided into the first and second stages, and part of the parallel processing for separation axis determination is performed in the direction calculation stage, each calculation block in the FPGA 2 will be Operation rate improves. Therefore, there is a good balance between the amount of logic circuit resources used in the FPGA 2 and the calculation speed. Furthermore, since the FPGA 2 is configured to execute the first and second processing of separation axis determination using a common calculation block, logic circuit resources can be used more efficiently.

その他、パイプライン1段の処理で物体A,Bのモデルデータを順次読み込む構成としては、
・メモリを複数持ち、それらに少なくとも一部同じ衝突判定モデルデータを格納する。例えばメモリA,Bがある場合、最初に判定されるロボットや柵などはメモリAでしか使用しないので、メモリBに格納しなくても良く、最後に判定されるロボットや柵などはメモリBでしか使用しないのでメモリAに格納しなくても良い。つまり、メモリA,Bに格納されるデータを完全に同一にする必要はない。
・判定対象のロボット毎と、柵などの障害物とを、それぞれ違うメモリに格納する。
・デュアルポートメモリを使用して、同じタイミングで両方の衝突判定モデルを同一のメモリからロードする。
等がある。
Other configurations that sequentially read the model data of objects A and B in one stage of pipeline processing include:
- Have multiple memories and store at least some of the same collision judgment model data in them. For example, if there are memories A and B, the robots and fences that are judged first are used only in memory A, so they do not need to be stored in memory B, and the robots and fences that are judged last are stored in memory B. There is no need to store it in memory A since it is only used. In other words, it is not necessary that the data stored in memories A and B be completely the same.
- Store each robot to be judged and obstacles such as fences in separate memories.
・Use dual-port memory to load both collision detection models from the same memory at the same time.
etc.

(第3~第9実施形態)
第3~第9実施形態は、パイプライン構成のバリエーションを示す。FPGAの内部ロジックのリソースによっては、1ステージで並列に処理できる処理数に制約があることも想定される。そのような場合にも対応できるように、以下にバリエーションを示す。
(Third to Ninth Embodiments)
The third to ninth embodiments show variations in pipeline configuration. Depending on the internal logic resources of the FPGA, it is assumed that there is a limit to the number of processes that can be processed in parallel in one stage. To accommodate such cases, variations are shown below.

図7に示す第3実施形態は、第1実施形態の分離軸判定ステージを、第1ステージ:S8Aと第2ステージ:S8Bとに分けて6ステージ・3段構成とした場合である。例えば「S8A」は8並列処理,「S8B」は7並列処理とするが、これらは同じ演算ブロックを使用する。 The third embodiment shown in FIG. 7 is a case in which the separation axis determination stage of the first embodiment is divided into a first stage: S8A and a second stage: S8B, and configured into six stages and three stages. For example, "S8A" is 8-parallel processing, and "S8B" is 7-parallel processing, but they use the same calculation block.

図8に示す第4実施形態は、第1実施形態の分離軸判定ステージを、第1ステージ:S5A,第2ステージ:S5B,第3ステージ:S5Cとに分けて7ステージ・3段構成とした場合である。「S5A」~「S5C」はそれぞれ5並列処理を行い、何れも同じ演算ブロックを使用する。 In the fourth embodiment shown in FIG. 8, the separation axis determination stage of the first embodiment is divided into a first stage: S5A, a second stage: S5B, and a third stage: S5C, and has a seven-stage, three-stage configuration. This is the case. "S5A" to "S5C" each perform 5 parallel processing and use the same calculation block.

図9に示す第5実施形態は、第4実施形態の分離軸判定第1ステージ:S5Aを、方向演算ステージに組み込んで並列処理することで、6ステージ・2段構成とした場合である。この場合、「S5A」では、第2実施形態と同様に、物体Aの各方向ベクトルXA,YA,ZA及び物体Bの各方向ベクトルXB,YB,ZBの内から5つを選択して並列処理する。 The fifth embodiment shown in FIG. 9 is a case where the separation axis determination first stage S5A of the fourth embodiment is incorporated into the direction calculation stage and processed in parallel, resulting in a six-stage, two-stage configuration. In this case, in "S5A", five of the directional vectors XA, YA, ZA of object A and the directional vectors XB, YB, ZB of object B are selected and processed in parallel, as in the second embodiment. do.

図10に示す第6実施形態は、第1実施形態の分離軸判定ステージを、第1ステージ:S3A~第5ステージ:S3Eに分けて9ステージ・2段構成とした場合である。「S3A」~「S3E」はそれぞれ3並列処理を行い、何れも同じ演算ブロックを使用する。 The sixth embodiment shown in FIG. 10 is a case where the separation axis determination stage of the first embodiment is divided into a first stage: S3A to a fifth stage: S3E, and configured into nine stages and two stages. "S3A" to "S3E" each perform three parallel processes and use the same calculation block.

図11に示す第7実施形態は、第5実施形態の分離軸判定第1ステージ:S3Aを、方向演算ステージに組み込んで並列処理することで、8ステージ・2段構成とした場合である。この場合、「S3A」では、物体Aの各方向ベクトルXA,YA,ZA及び物体Bの各方向ベクトルXB,YB,ZBの内から3つを選択して並列処理する。 The seventh embodiment shown in FIG. 11 is a case in which the first separated axis determination stage S3A of the fifth embodiment is incorporated into the direction calculation stage and processed in parallel, resulting in an eight-stage, two-stage configuration. In this case, in "S3A", three of the directional vectors XA, YA, ZA of object A and the directional vectors XB, YB, ZB of object B are selected and processed in parallel.

図12に示す第8実施形態は、第1実施形態の分離軸判定ステージを、第1ステージ:S2A~第8ステージ:S2Hに分けて12ステージ・2段構成とした場合である。「S2A」~「S2G」はそれぞれ2並列処理を行い、「S2H」は単独処理を行う。これらは何れも同じ演算ブロックを使用する。 The eighth embodiment shown in FIG. 12 is a case where the separation axis determination stage of the first embodiment is divided into 12 stages, 2 stages, from the first stage: S2A to the eighth stage: S2H. "S2A" to "S2G" each perform two parallel processes, and "S2H" performs single processing. All of these use the same calculation block.

図13に示す第9実施形態は、第8実施形態の分離軸判定第1ステージ:S2Aを、方向演算ステージに組み込んで並列処理することで、11ステージ・2段構成とした場合である。この場合、「S2A」では、物体Aの各方向ベクトルXA,YA,ZA及び物体Bの各方向ベクトルXB,YB,ZBの内から2つを選択して並列処理する。 The ninth embodiment shown in FIG. 13 is a case where the first separated axis determination stage S2A of the eighth embodiment is incorporated into the direction calculation stage and processed in parallel, resulting in an 11-stage, two-stage configuration. In this case, in "S2A", two of the directional vectors XA, YA, ZA of object A and the directional vectors XB, YB, ZB of object B are selected and processed in parallel.

本発明は上記した、又は図面に記載した実施形態にのみ限定されるものではなく、以下のような変形又は拡張が可能である。
CPU及びFPGAの動作クロック周波数は、個別の設計に応じて適宜変更すれば良い。
DB0~DB3の具体数値についても、個別の設計に応じて適宜設定すれば良い。
衝突判定を行う対象モデルは、直方体モデルに限らない。したがって、分離軸判定を行う方向数も「15」に限らない。
The present invention is not limited to the embodiments described above or illustrated in the drawings, but can be modified or expanded as described below.
The operating clock frequencies of the CPU and FPGA may be changed as appropriate depending on individual designs.
The specific numerical values of DB W 0 to DB W 3 may also be set as appropriate depending on the individual design.
The target model for collision determination is not limited to a rectangular parallelepiped model. Therefore, the number of directions in which separation axis determination is performed is not limited to "15".

図面中、1はCPU、2はFPGA、4はRAMを示す。 In the drawings, 1 represents a CPU, 2 represents an FPGA, and 4 represents a RAM.

Claims (6)

ロボットの可動部と障害物との衝突判定処理要求が入力されると、前記可動部の少なくとも一部の形状等と前記障害物の少なくとも一部の形状等とをそれぞれ表したモデルのデータが記憶されている記憶部より双方のモデルのデータを読み出して双方の衝突判定を行い、その判定結果を出力するため、前記衝突判定に係る演算の少なくとも一部を並列処理するパイプラインを構成するようにロジックがコンフィギュレーションされ、
ロボットの全リンクのうち最大のリンク長をL[mm],許容判定誤差をE[mm],モデルの形状等を複数のオブジェクトに分割した数をD,xの小数点以下を整数に切り上げる関数をfRU(x),最小限必要となるデータバスのビット幅DB0とすると、前記ビット幅DB0が以下の式により決定され、
Figure 0007375426000006
前記記憶部に接続されるデータバスのビット幅DB1が前記ビット幅DB0以上に設定されているロボット制御の演算処理用FPGA。
When a request for collision determination processing between a movable part of the robot and an obstacle is input, data of a model representing the shape, etc. of at least a part of the movable part and the shape, etc. of at least a part of the obstacle is stored. In order to read the data of both models from the storage unit in which the data is stored, perform a collision determination for both, and output the determination result, a pipeline is configured to process at least a part of the calculations related to the collision determination in parallel. The logic is configured and
The maximum link length among all the links of the robot is L [mm], the allowable judgment error is E [mm], the number of divisions of the model shape etc. into multiple objects is D, and the function that rounds up the decimal point of x to an integer is f RU (x) and the minimum required data bus bit width DB W 0, the bit width DB W 0 is determined by the following formula,
Figure 0007375426000006
An FPGA for arithmetic processing for robot control, wherein a bit width DB W 1 of a data bus connected to the storage section is set to be greater than or equal to the bit width DB W 0.
モデルの位置を表すデータのビット数をNとし、符号ビット及びクォータニオンを用いる際のビット幅DB2とすると、前記ビット幅DB2が以下の式
DB2=DB0+4(N+1)
により決定され、
前記記憶部に接続されるデータバスのビット幅DB3が前記ビット幅DB2以上に設定されている請求項1記載のロボット制御の演算処理用FPGA。
If the number of bits of data representing the position of the model is N P , and the bit width when using sign bits and quaternions is DB W 2, then the bit width DB W 2 is expressed as the following formula: DB W 2=DB W 0+4(N P +1)
determined by
2. The FPGA for robot control arithmetic processing according to claim 1, wherein a bit width DB W 3 of a data bus connected to said storage section is set to be greater than said bit width DB W 2.
前記双方のモデルは、何れも直方体モデルであり、
前記衝突判定は、15方向の分離軸を用いて行う請求項1又は2記載のロボット制御の演算処理用FPGA。
Both of the above models are rectangular parallelepiped models,
3. The FPGA for arithmetic processing of robot control according to claim 1, wherein said collision determination is performed using separation axes in 15 directions.
前記パイプラインは、
前記記憶部より前記データを読み出すロードステージと、
双方の直方体モデルを同一の座標系に変換する座標変換ステージと、
前記双方の直方体モデルの特定の軸方向又はそれらの外積により分離軸を求める方向演算ステージと、
前記双方の直方体モデルを前記分離軸に投影して、各モデルの像が重なるか否かを判定する分離軸判定ステージと、
この分離軸判定ステージにおける全ての分離軸についての判定結果に基づき、衝突判定を行う衝突判定ステージとを備える請求項3記載のロボット制御の演算処理用FPGA。
The pipeline is
a load stage for reading the data from the storage unit;
a coordinate transformation stage that transforms both rectangular parallelepiped models into the same coordinate system;
a direction calculation stage for determining a separation axis by a specific axis direction of both of the rectangular parallelepiped models or their cross product;
a separation axis determination stage that projects both of the rectangular parallelepiped models onto the separation axis and determines whether images of each model overlap;
4. The FPGA for arithmetic processing of robot control according to claim 3, further comprising a collision determination stage that performs collision determination based on the determination results for all the separation axes in the separation axis determination stage.
ロボットの可動部と障害物との衝突判定処理要求が入力されると、前記可動部の少なくとも一部の形状等と前記障害物の少なくとも一部の形状等とをそれぞれ表したモデルのデータが記憶されている記憶部より双方のモデルのデータを読み出して双方の衝突判定を行い、その判定結果を出力するもので、
前記衝突判定に係る演算の少なくとも一部を並列処理するパイプラインを構成するようにロジックがコンフィギュレーションされるロボット制御の演算処理用FPGAに適用するデータバス幅の決定方法であって、
ロボットの全リンクのうち最大のリンク長をL[mm],許容判定誤差をE[mm],モデルの形状等を複数のオブジェクトに分割した数をD,xの小数点以下を整数に切り上げる関数をfRU(x),最小限必要となるデータバスのビット幅DB0とすると、前記ビット幅DB0を以下の式により決定し、
Figure 0007375426000007
前記記憶部に接続されるデータバスのビット幅DB1を前記ビット幅DB0以上にする演算処理用FPGAのデータバス幅決定方法。
When a request for collision determination processing between a movable part of the robot and an obstacle is input, data of a model representing the shape, etc. of at least a part of the movable part and the shape, etc. of at least a part of the obstacle is stored. It reads the data of both models from the storage unit that is installed, performs a collision judgment for both, and outputs the judgment result.
A data bus width determination method applied to a robot control arithmetic processing FPGA in which logic is configured to form a pipeline that processes at least a part of the calculations related to collision determination in parallel, the method comprising:
The maximum link length among all the links of the robot is L [mm], the allowable judgment error is E [mm], the number of divisions of the model shape etc. into multiple objects is D, and the function that rounds up the decimal point of x to an integer is f RU (x) and the minimum required data bus bit width DB W 0, the bit width DB W 0 is determined by the following formula,
Figure 0007375426000007
A data bus width determining method for an FPGA for arithmetic processing in which a bit width DB W 1 of a data bus connected to the storage unit is set to be equal to or greater than the bit width DB W 0.
モデルの位置を表すデータのビット数をNとし、符号ビット及びクォータニオンを用いる際のビット幅DB2とすると、前記ビット幅DB2を以下の式
DB2=DB0+4(N+1)
により決定し、
前記記憶部に接続されるデータバスのビット幅DB3を前記ビット幅DB2以上にする請求項5記載の演算処理用FPGAのデータバス幅決定方法。
If the number of bits of data representing the position of the model is N P and the bit width when using sign bits and quaternions is DB W 2, then the bit width DB W 2 can be expressed as the following formula: DB W 2=DB W 0+4(N P +1)
determined by
6. The data bus width determination method for an arithmetic processing FPGA according to claim 5, wherein the bit width DB W 3 of the data bus connected to the storage section is set to be equal to or larger than the bit width DB W 2.
JP2019177060A 2019-09-27 2019-09-27 Robot control arithmetic processing FPGA and data bus width determination method for arithmetic processing FPGA Active JP7375426B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019177060A JP7375426B2 (en) 2019-09-27 2019-09-27 Robot control arithmetic processing FPGA and data bus width determination method for arithmetic processing FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019177060A JP7375426B2 (en) 2019-09-27 2019-09-27 Robot control arithmetic processing FPGA and data bus width determination method for arithmetic processing FPGA

Publications (2)

Publication Number Publication Date
JP2021056609A JP2021056609A (en) 2021-04-08
JP7375426B2 true JP7375426B2 (en) 2023-11-08

Family

ID=75270734

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019177060A Active JP7375426B2 (en) 2019-09-27 2019-09-27 Robot control arithmetic processing FPGA and data bus width determination method for arithmetic processing FPGA

Country Status (1)

Country Link
JP (1) JP7375426B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150223952A1 (en) 2012-03-29 2015-08-13 össur hf Powered prosthetic hip joint

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150223952A1 (en) 2012-03-29 2015-08-13 össur hf Powered prosthetic hip joint

Also Published As

Publication number Publication date
JP2021056609A (en) 2021-04-08

Similar Documents

Publication Publication Date Title
US7454451B2 (en) Method for finding local extrema of a set of values for a parallel processing element
JP7016942B2 (en) Arithmetic Accelerator
US7447720B2 (en) Method for finding global extrema of a set of bytes distributed across an array of parallel processing elements
US7574466B2 (en) Method for finding global extrema of a set of shorts distributed across an array of parallel processing elements
US5019968A (en) Three-dimensional vector processor
US10768894B2 (en) Processor, information processing apparatus and operation method for processor
JPS63316167A (en) Parallel processing system and method
CN112506567B (en) Data reading method and data reading circuit
CN111183418B (en) Configurable hardware accelerator
CN110750925B (en) Modeling method and device for flexible manipulator force deformation model
JP7375426B2 (en) Robot control arithmetic processing FPGA and data bus width determination method for arithmetic processing FPGA
JP2021056610A (en) Fpga for arithmetic processing for robot control
WO1993019431A1 (en) Parallel vector processor architecture
JP2015179409A (en) Data processing apparatus
JPS6123276A (en) Data processor
US20210117352A1 (en) Semiconductor device and method of controlling the same
JP4916151B2 (en) Parallel computing device
RU2819403C1 (en) Vector computing core
JP7157457B2 (en) data processor
JP7140201B2 (en) Arithmetic processing device and method of controlling arithmetic processing device
JP2022074442A (en) Arithmetic device and arithmetic method
Hahanov et al. Automaton MQT-model for virtual computer design
CN115964085A (en) Operation unit and matrix transposition and operation fusion execution method
KR101202481B1 (en) Methods of scanning record using single instruction multiple data cpu architecture and apparatuses for using the same
JP3547316B2 (en) Processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220824

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230926

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231009

R150 Certificate of patent or registration of utility model

Ref document number: 7375426

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150