JP2021089206A - Angle detection method, encoder unit, and robot - Google Patents

Angle detection method, encoder unit, and robot Download PDF

Info

Publication number
JP2021089206A
JP2021089206A JP2019219697A JP2019219697A JP2021089206A JP 2021089206 A JP2021089206 A JP 2021089206A JP 2019219697 A JP2019219697 A JP 2019219697A JP 2019219697 A JP2019219697 A JP 2019219697A JP 2021089206 A JP2021089206 A JP 2021089206A
Authority
JP
Japan
Prior art keywords
angle
image
mark
movement amount
calibration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2019219697A
Other languages
Japanese (ja)
Inventor
近藤 貴幸
Takayuki Kondo
貴幸 近藤
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2019219697A priority Critical patent/JP2021089206A/en
Publication of JP2021089206A publication Critical patent/JP2021089206A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)
  • Optical Transform (AREA)
  • Manipulator (AREA)

Abstract

To provide an angle detection method and an encoder unit that can improve detection accuracy, and to provide a robot including the encoder unit.SOLUTION: A method for detecting a rotation angle by using an encoder having a scale unit including first marks and second marks, a first image pick-up device, and a second image pick-up device arranged at a position symmetrical thereto, includes the steps of: acquiring a first [i] template image when the scale unit is at a [i]-th calibration angle; acquiring a second [i] template image when the scale unit is at the [i]-th calibration angle; determining the correlation relationship established between the amount of change of the [i]-th calibration angle, the amount of movement of the first marks, and the amount of movement of the second marks; determining a first angle measurement movement amount of the first marks by template matching; determining a second angle measurement movement amount of the second marks by template matching; and determining a measurement angle based on the [i]-th calibration angle, first angle measurement movement amount, second angle measurement movement amount, and correlation relationship.SELECTED DRAWING: Figure 10

Description

本発明は、角度検出方法、エンコーダーユニットおよびロボットに関するものである。 The present invention relates to an angle detection method, an encoder unit and a robot.

従来、エンコーダーの一種として光学式のロータリーエンコーダーが知られている。例えば、特許文献1に記載のロータリーエンコーダーは、目盛盤と、目盛盤の周縁付近に設けられたコードパターンと、対称位置のコードパターンを読み取る一対のCCDリニアセンサーと、を備える。このロータリーエンコーダーでは、目盛盤の偏心に関する偏心因子をあらかじめ記憶しておき、測角した値を偏心因子で補正して、偏心による角度誤差を取り除くようにしている。 Conventionally, an optical rotary encoder is known as a kind of encoder. For example, the rotary encoder described in Patent Document 1 includes a scale plate, a code pattern provided near the periphery of the scale plate, and a pair of CCD linear sensors that read a code pattern at a symmetrical position. In this rotary encoder, the eccentricity factor related to the eccentricity of the dial is stored in advance, and the measured value is corrected by the eccentricity factor to remove the angle error due to the eccentricity.

特開2007−178320号公報Japanese Unexamined Patent Publication No. 2007-178320

減速機やモーター等の出力軸は、回転に伴って軸振れ(動的な偏心)が生じるため、特許文献1に記載の方法のように、あらかじめ記憶しておいた偏心因子を用いて偏心による角度誤差を取り除こうとしても、軸振れに起因する誤差については、軽減することができない。このため、従来のロータリーエンコーダーでは、軸振れを伴う場合、検出精度を高めることが難しいという課題がある。 Since the output shafts of speed reducers, motors, etc. cause shaft runout (dynamic eccentricity) as they rotate, eccentricity is caused by using an eccentric factor stored in advance as in the method described in Patent Document 1. Even if an attempt is made to remove the angle error, the error caused by the shaft runout cannot be reduced. For this reason, the conventional rotary encoder has a problem that it is difficult to improve the detection accuracy when the shaft runout is involved.

本発明の適用例に係る角度検出方法は、
回動軸まわりに環状に並ぶ第1マークおよび第2マークを含む複数のマークを有するスケール部と、前記第1マークを撮像する第1撮像素子と、前記回動軸に対して前記第1撮像素子と対称の位置に配置され、前記第2マークを撮像する第2撮像素子と、を有し、前記第1撮像素子および前記第2撮像素子に対して前記スケール部が前記回動軸まわりに相対的に回動するエンコーダーを用いて、前記回動軸の回動角度を検出する角度検出方法であって、
前記スケール部が第[i]校正角にあるとき、前記第1撮像素子により前記第1マークを撮像して第1[i]基準画像を生成し、第1[i]テンプレート画像および前記第1[i]基準画像における前記第1マークの第1[i]基準座標を取得するステップと、
前記スケール部が前記第[i]校正角にあるとき、前記第2撮像素子により前記第2マークを撮像して第2[i]基準画像を生成し、第2[i]テンプレート画像および前記第2[i]基準画像における前記第2マークの第2[i]基準座標を取得するステップと、
前記第[i]校正角を変化させたとき、その変化量と、前記第1マークの移動量と、前記第2マークの移動量と、の間に成り立つ相関関係を求めるステップと、
前記スケール部が計測角にあるとき、前記第1撮像素子により前記第1マークを撮像して第1測角画像を生成し、前記第1[i]テンプレート画像に基づくテンプレートマッチングにより、前記第1測角画像における前記第1マークの前記第1[i]基準座標からの第1測角移動量を求めるステップと、
前記スケール部が前記計測角にあるとき、前記第2撮像素子により前記第2マークを撮像して第2測角画像を生成し、前記第2[i]テンプレート画像に基づくテンプレートマッチングにより、前記第2測角画像における前記第2マークの前記第2[i]基準座標からの第2測角移動量を求めるステップと、
前記第[i]校正角、前記第1測角移動量、前記第2測角移動量、および前記相関関係に基づいて、前記計測角を求めるステップと、
を有することを特徴とする。
The angle detection method according to the application example of the present invention is
A scale unit having a plurality of marks including the first mark and the second mark arranged in an annular shape around the rotation axis, a first image sensor that images the first mark, and the first image pickup with respect to the rotation axis. It has a second image sensor that is arranged at a position symmetrical to the element and images the second mark, and the scale portion is around the rotation axis with respect to the first image sensor and the second image sensor. An angle detection method for detecting the rotation angle of the rotation shaft using a relatively rotating encoder.
When the scale unit is at the first [i] calibration angle, the first mark is imaged by the first image sensor to generate a first [i] reference image, and the first [i] template image and the first [I] A step of acquiring the first [i] reference coordinates of the first mark in the reference image, and
When the scale unit is at the [i] calibration angle, the second mark is imaged by the second image sensor to generate a second [i] reference image, and the second [i] template image and the first 2 [i] A step of acquiring the second [i] reference coordinates of the second mark in the reference image, and
[I] When the calibration angle is changed, the step of obtaining the correlation established between the amount of change, the amount of movement of the first mark, and the amount of movement of the second mark.
When the scale unit is at the measurement angle, the first mark is imaged by the first image sensor to generate a first angle measurement image, and the first is performed by template matching based on the first [i] template image. The step of obtaining the first angle-measurement movement amount from the first [i] reference coordinate of the first mark in the angle-measurement image, and
When the scale unit is at the measurement angle, the second mark is imaged by the second image sensor to generate a second angle measurement image, and template matching based on the second [i] template image is performed to obtain the second mark. 2. A step of obtaining the second angle movement amount of the second mark from the second [i] reference coordinate in the angle measurement image, and
The step of obtaining the measurement angle based on the first [i] calibration angle, the first angle movement amount, the second angle measurement movement amount, and the correlation.
It is characterized by having.

実施形態に係るロボットを示す側面図である。It is a side view which shows the robot which concerns on embodiment. 第1実施形態に係るエンコーダーユニットを示す断面図である。It is sectional drawing which shows the encoder unit which concerns on 1st Embodiment. 図2のエンコーダーを示す機能ブロック図である。It is a functional block diagram which shows the encoder of FIG. 図2のエンコーダーが備えるスケール部を説明するための図である。It is a figure for demonstrating the scale part provided in the encoder of FIG. 図4に示すスケール部のE1部拡大図である。It is an enlarged view of E1 part of the scale part shown in FIG. 図4に示すスケール部のE2部拡大図である。It is an enlarged view of E2 part of the scale part shown in FIG. 図5に示すスケール部の部分拡大図である。It is a partially enlarged view of the scale part shown in FIG. 第1実施形態に係る角度検出方法を示すフローチャートである。It is a flowchart which shows the angle detection method which concerns on 1st Embodiment. 図8に示す角度検出方法のうち、ステップS1を詳細に示すフローチャートである。Of the angle detection methods shown in FIG. 8, it is a flowchart showing step S1 in detail. 図9に示すステップS1を説明するための図である。It is a figure for demonstrating step S1 shown in FIG. 図9に示す角度検出方法で取得される、校正角、テンプレート画像、基準座標、および、係数を示す一覧表である。It is a list which shows the calibration angle, the template image, the reference coordinate, and the coefficient acquired by the angle detection method shown in FIG. 第2実施形態に係る角度検出方法のうち、ステップS1を詳細に示すフローチャートである。It is a flowchart which shows step S1 in detail in the angle detection method which concerns on 2nd Embodiment. 図12に示す角度検出方法で取得される、校正角、テンプレート画像、基準座標、および、係数を示す一覧表である。It is a list which shows the calibration angle, the template image, the reference coordinate, and the coefficient acquired by the angle detection method shown in FIG. 第3実施形態に係る角度検出方法のうち、ステップS1を詳細に示すフローチャートである。It is a flowchart which shows step S1 in detail among the angle detection method which concerns on 3rd Embodiment. 図14に示す角度検出方法で取得される、校正角、テンプレート画像、基準座標、および、係数を示す一覧表である。It is a list which shows the calibration angle, the template image, the reference coordinate, and the coefficient acquired by the angle detection method shown in FIG. 第4実施形態に係る角度検出方法のうち、ステップS1を詳細に示すフローチャートである。It is a flowchart which shows step S1 in detail in the angle detection method which concerns on 4th Embodiment. 図16に示す角度検出方法で取得される、校正角、テンプレート画像、基準座標、および、係数を示す一覧表である。It is a list which shows the calibration angle, the template image, the reference coordinate, and the coefficient acquired by the angle detection method shown in FIG.

以下、本発明の角度検出方法、エンコーダーユニットおよびロボットの好適な実施形態を添付図面に基づいて詳細に説明する。 Hereinafter, preferred embodiments of the angle detection method, encoder unit, and robot of the present invention will be described in detail with reference to the accompanying drawings.

1.ロボット
図1は、実施形態に係るロボットを示す側面図である。なお、以下では、説明の便宜上、図1中の上側を「上」、下側を「下」と言う。また、図1中の基台側を「基端側」、その反対側を「先端側」と言う。
1. 1. Robot FIG. 1 is a side view showing a robot according to an embodiment. In the following, for convenience of explanation, the upper side in FIG. 1 is referred to as “upper” and the lower side is referred to as “lower”. Further, the base side in FIG. 1 is referred to as a "base end side", and the opposite side is referred to as a "tip side".

図1に示すロボット100は、いわゆる水平多関節ロボット(スカラロボット)であり、例えば、精密機器等を製造する製造工程等で用いられ、精密機器や部品等の把持や搬送等を行うことができる。 The robot 100 shown in FIG. 1 is a so-called horizontal articulated robot (SCARA robot), and is used, for example, in a manufacturing process for manufacturing precision equipment and the like, and can grip and transport precision equipment and parts. ..

図1に示すように、ロボット100は、基台110と、第1アーム120と、第2アーム130と、作業ヘッド140と、エンドエフェクター150と、配線引き回し部160と、を有している。以下、ロボット100の各部を順次簡単に説明する。 As shown in FIG. 1, the robot 100 has a base 110, a first arm 120, a second arm 130, a work head 140, an end effector 150, and a wiring routing portion 160. Hereinafter, each part of the robot 100 will be briefly described in sequence.

基台110は、例えば、図示しない床面にボルト等によって固定されている。基台110の上端部には、第1アーム120が連結されている。第1アーム120は、基台110を通る第1軸J1まわりに回動可能となっている。 The base 110 is fixed to, for example, a floor surface (not shown) with bolts or the like. The first arm 120 is connected to the upper end of the base 110. The first arm 120 is rotatable around the first axis J1 passing through the base 110.

基台110内には、第1アーム120を回動させる駆動力を発生させるモーター111と、モーター111の駆動力を減速する減速機112とが設置されている。減速機112の入力軸は、モーター111の回動軸に連結され、減速機112の出力軸は、第1アーム120に連結されている。そのため、モーター111が駆動し、その駆動力が減速機112を介して第1アーム120に伝達されると、第1アーム120が基台110に対して第1軸J1まわりに回動する。 A motor 111 that generates a driving force for rotating the first arm 120 and a speed reducer 112 that reduces the driving force of the motor 111 are installed in the base 110. The input shaft of the speed reducer 112 is connected to the rotation shaft of the motor 111, and the output shaft of the speed reducer 112 is connected to the first arm 120. Therefore, when the motor 111 is driven and the driving force is transmitted to the first arm 120 via the speed reducer 112, the first arm 120 rotates around the first axis J1 with respect to the base 110.

また、基台110および第1アーム120には、減速機112の出力軸の回動角度を検出することで、基台110に対する第1アーム120の回動状態を検出する第1エンコーダーであるエンコーダー1が設けられている。 Further, the base 110 and the first arm 120 are encoders that are first encoders that detect the rotational state of the first arm 120 with respect to the base 110 by detecting the rotation angle of the output shaft of the speed reducer 112. 1 is provided.

第1アーム120の先端部には、第2アーム130が連結している。第2アーム130は、第1アーム120に対して第2軸J2まわりに回動可能となっている。図示しないが、第2アーム130内には、第2アーム130を回動させる駆動力を発生させる第2モーターと、第2モーターの駆動力を減速する減速機とが設置されている。そして、第2モーターの駆動力が減速機を介して第1アーム120に伝達されることにより、第2アーム130が第1アーム120に対して第2軸J2まわりに回動する。また、図示しないが、第2モーターには、第1アーム120に対する第2アーム130の回動状態を検出する、前述したエンコーダー1とは別のエンコーダーが設けられている。 A second arm 130 is connected to the tip of the first arm 120. The second arm 130 is rotatable around the second axis J2 with respect to the first arm 120. Although not shown, a second motor that generates a driving force for rotating the second arm 130 and a speed reducer that reduces the driving force of the second motor are installed in the second arm 130. Then, the driving force of the second motor is transmitted to the first arm 120 via the speed reducer, so that the second arm 130 rotates around the second axis J2 with respect to the first arm 120. Further, although not shown, the second motor is provided with an encoder different from the encoder 1 described above, which detects the rotational state of the second arm 130 with respect to the first arm 120.

第2アーム130の先端部には、作業ヘッド140が配置されている。作業ヘッド140は、第2アーム130の先端部に同軸的に配置された、図示しないスプラインナットおよび図示しないボールネジナットに挿通されたスプラインシャフト141を有している。スプラインシャフト141は、第2アーム130に対して第3軸J3まわりに回転可能であり、かつ、上下方向に移動(昇降)可能となっている。 A work head 140 is arranged at the tip of the second arm 130. The working head 140 has a spline shaft 141 inserted through a spline nut (not shown) and a ball screw nut (not shown) coaxially arranged at the tip of the second arm 130. The spline shaft 141 can rotate around the third axis J3 with respect to the second arm 130, and can move (up and down) in the vertical direction.

第2アーム130内には、図示しないが、回転モーターおよび昇降モーターが配置されている。回転モーターの駆動力は、図示しない駆動力伝達機構によってスプラインナットに伝達され、スプラインナットが正逆回転すると、スプラインシャフト141が鉛直方向に沿う第3軸J3まわりに正逆回転する。また、図示しないが、回転モーターには、第2アーム130に対するスプラインシャフト141の回動状態を検出する、前述したエンコーダー1とは別のエンコーダーが設けられている。 Although not shown, a rotary motor and an elevating motor are arranged in the second arm 130. The driving force of the rotary motor is transmitted to the spline nut by a driving force transmission mechanism (not shown), and when the spline nut rotates forward and reverse, the spline shaft 141 rotates forward and reverse around the third axis J3 along the vertical direction. Further, although not shown, the rotary motor is provided with an encoder different from the encoder 1 described above, which detects the rotational state of the spline shaft 141 with respect to the second arm 130.

一方、昇降モーターの駆動力は、図示しない駆動力伝達機構によってボールネジナットに伝達され、ボールネジナットが正逆回転すると、スプラインシャフト141が上下に移動する。昇降モーターには、第2アーム130に対するスプラインシャフト141の移動量を検出する、前述したエンコーダー1とは別のエンコーダーが設けられている。 On the other hand, the driving force of the elevating motor is transmitted to the ball screw nut by a driving force transmission mechanism (not shown), and when the ball screw nut rotates in the forward and reverse directions, the spline shaft 141 moves up and down. The elevating motor is provided with an encoder different from the encoder 1 described above, which detects the amount of movement of the spline shaft 141 with respect to the second arm 130.

スプラインシャフト141の先端部(下端部)には、エンドエフェクター150が連結されている。エンドエフェクター150としては、特に限定されず、例えば、被搬送物を把持するもの、被加工物を加工するもの等が挙げられる。 An end effector 150 is connected to the tip end portion (lower end portion) of the spline shaft 141. The end effector 150 is not particularly limited, and examples thereof include those that grip an object to be transported, those that process an object to be processed, and the like.

第2アーム130内に配置された各電子部品、例えば、第2モーター、回転モーター、昇降モーター、各エンコーダー等に接続される複数の配線は、第2アーム130と基台110とを連結する管状の配線引き回し部160内を通って基台110内まで引き回されている。さらに、かかる複数の配線は、基台110内でまとめられることによって、モーター111およびエンコーダー1に接続される配線とともに、基台110の外部に設置され、ロボット100を統括制御する図示しない制御装置まで引き回される。 A plurality of wirings connected to each electronic component arranged in the second arm 130, for example, a second motor, a rotary motor, an elevating motor, each encoder, etc., are tubular connecting the second arm 130 and the base 110. It is routed to the base 110 through the wiring route 160 of the above. Further, such a plurality of wirings are grouped in the base 110, and together with the wirings connected to the motor 111 and the encoder 1, are installed outside the base 110 to a control device (not shown) that controls the robot 100 in an integrated manner. Be routed.

以上、ロボット100の構成について簡単に説明したが、このロボット100は、前述したように、第1部材である基台110と、基台110に対して回動する第2部材である第1アーム120と、エンコーダーユニット10と、を備える。ここで、本実施形態に係るエンコーダーユニット10は、回動軸まわりに回転して駆動力を出力する出力軸を有する減速機112と、減速機112の出力軸の回動角度を検出するエンコーダー1と、を有する。そして、基台110内には減速機112が設置されていて、減速機112の出力軸が第1アーム120に接続されている。このようなロボット100によれば、後述するように第1アーム120の回動角度を高精度に検出し、その検出結果に基づいて、第1アーム120の駆動制御を高精度に行うことができる。 The configuration of the robot 100 has been briefly described above. As described above, the robot 100 has a base 110 which is a first member and a first arm which is a second member which rotates with respect to the base 110. A 120 and an encoder unit 10 are provided. Here, the encoder unit 10 according to the present embodiment is a speed reducer 112 having an output shaft that rotates around a rotation shaft and outputs a driving force, and an encoder 1 that detects the rotation angle of the output shaft of the speed reducer 112. And have. A speed reducer 112 is installed in the base 110, and the output shaft of the speed reducer 112 is connected to the first arm 120. According to such a robot 100, as will be described later, the rotation angle of the first arm 120 can be detected with high accuracy, and the drive control of the first arm 120 can be performed with high accuracy based on the detection result. ..

2.第1実施形態
2.1.エンコーダーユニット
以下、第1実施形態に係るエンコーダーユニット10について説明する。なお、エンコーダーユニット10は、様々な機器に組み込まれるが、以下では、エンコーダーユニット10をロボット100に組み込む場合を例に説明する。
2. First Embodiment 2.1. Encoder Unit Hereinafter, the encoder unit 10 according to the first embodiment will be described. The encoder unit 10 is incorporated in various devices, but the case where the encoder unit 10 is incorporated in the robot 100 will be described below as an example.

図2は、第1実施形態に係るエンコーダーユニットを示す断面図である。図3は、図2のエンコーダーを示す機能ブロック図である。図4は、図2のエンコーダーが備えるスケール部を説明するための図である。図5は、図4に示すスケール部のE1部拡大図である。図6は、図4に示すスケール部のE2部拡大図である。図7は、図5に示すスケール部の部分拡大図である。なお、図2および図4〜図7では、説明の便宜上、各部の縮尺が適宜変更されており、図示の構成は実際の縮尺と必ずしも一致するわけではなく、また、各部の図示を適宜簡略化している。 FIG. 2 is a cross-sectional view showing an encoder unit according to the first embodiment. FIG. 3 is a functional block diagram showing the encoder of FIG. FIG. 4 is a diagram for explaining a scale unit included in the encoder of FIG. FIG. 5 is an enlarged view of the E1 portion of the scale portion shown in FIG. FIG. 6 is an enlarged view of the E2 portion of the scale portion shown in FIG. FIG. 7 is a partially enlarged view of the scale portion shown in FIG. In FIGS. 2 and 4 to 7, the scale of each part is appropriately changed for convenience of explanation, the structure shown does not necessarily match the actual scale, and the illustration of each part is simplified as appropriate. ing.

図2に示すように、前述したロボット100の基台110は、モーター111と減速機112を支持する支持部材114を有し、モーター111および減速機112を収納している。このような基台110に対して、第1アーム120は、第1軸J1まわりに回動可能になっている。 As shown in FIG. 2, the base 110 of the robot 100 described above has a support member 114 that supports the motor 111 and the speed reducer 112, and houses the motor 111 and the speed reducer 112. With respect to such a base 110, the first arm 120 is rotatable around the first axis J1.

第1アーム120は、図2の左右に延在するアーム本体部121と、アーム本体部121から下方に向けて突出している軸部122と、を有し、これらが互いに接続されている。そして、軸部122は、軸受115を介して基台110に対して第1軸J1まわりに回動可能になっているとともに、減速機112の出力軸に接続されている。また、減速機112の入力軸は、モーター111の回動軸1111に接続されている。減速機112としては、特に限定されないが、例えば、波動減速機、遊星歯車減速機、サイクロ減速機、RV減速機等が挙げられる。 The first arm 120 has an arm main body 121 extending to the left and right in FIG. 2 and a shaft portion 122 protruding downward from the arm main body 121, and these are connected to each other. The shaft portion 122 is rotatable around the first shaft J1 with respect to the base 110 via the bearing 115, and is connected to the output shaft of the speed reducer 112. Further, the input shaft of the speed reducer 112 is connected to the rotation shaft 1111 of the motor 111. The speed reducer 112 is not particularly limited, and examples thereof include a wave speed reducer, a planetary gear speed reducer, a cyclo speed reducer, and an RV speed reducer.

ここで、基台110は、その自重や基台110が支える他の質量による荷重が加わる構造体である。同様に、第1アーム120も、その自重や第1アーム120が支える他の質量による荷重が加わる構造体である。このような基台110および第1アーム120の構成材料としては、それぞれ、特に限定されないが、例えば、金属材料が挙げられる。 Here, the base 110 is a structure to which a load due to its own weight or another mass supported by the base 110 is applied. Similarly, the first arm 120 is also a structure to which a load due to its own weight or another mass supported by the first arm 120 is applied. The constituent materials of the base 110 and the first arm 120 are not particularly limited, and examples thereof include a metal material.

本実施形態では、基台110および第1アーム120の外表面は、ロボット100の外表面の一部を構成している。なお、基台110および第1アーム120の外表面上には、カバー、衝撃吸収材等の外装部材が装着されていてもよい。 In the present embodiment, the outer surfaces of the base 110 and the first arm 120 form a part of the outer surface of the robot 100. An exterior member such as a cover or a shock absorbing material may be mounted on the outer surfaces of the base 110 and the first arm 120.

このような相対的に回動する基台110および第1アーム120には、これらの回動状態を検出するエンコーダー1が設けられている。 Such a relatively rotating base 110 and the first arm 120 are provided with an encoder 1 for detecting these rotating states.

エンコーダー1は、第1アーム120に設けられているスケール部2と、基台110に設けられている第1検出部3aおよび第2検出部3bと、第1検出部3aおよび第2検出部3bに電気的に接続された回路部4と、を有する。回路部4は、処理部5と、記憶部6と、を有する。 The encoder 1 includes a scale unit 2 provided on the first arm 120, a first detection unit 3a and a second detection unit 3b provided on the base 110, and a first detection unit 3a and a second detection unit 3b. It has a circuit unit 4 electrically connected to the circuit unit 4. The circuit unit 4 includes a processing unit 5 and a storage unit 6.

図2に示すように、スケール部2は、アーム本体部121の基台110と対向する部分、すなわち、アーム本体部121の下面であって軸部122を囲む部分に設けられている。このスケール部2は、図4に示すように、第1軸J1とは異なる位置で第1軸J1まわりに沿って配置されているドットパターンを有している。 As shown in FIG. 2, the scale portion 2 is provided on a portion of the arm main body portion 121 facing the base 110, that is, a portion on the lower surface of the arm main body portion 121 that surrounds the shaft portion 122. As shown in FIG. 4, the scale portion 2 has a dot pattern arranged around the first axis J1 at a position different from that of the first axis J1.

スケール部2は、例えば第1アーム120の表面に設けられる。これにより、スケール部2を設けるための部材を第1アーム120とは別に設ける必要がない。そのため、部品点数を少なくすることができる。なお、スケール部2は、第1アーム120の表面に直に設けられている場合に限定されず、例えば、第1アーム120の表面に貼着されたシート状の部材に設けられていてもよいし、第1アーム120とともに回動するように設けられた板状の部材に設けられていてもよい。すなわち、スケール部2が設けられる部材は、第1アーム120とともに基台110に対して第1軸J1まわりに回動する部材であればよい。 The scale portion 2 is provided on the surface of the first arm 120, for example. As a result, it is not necessary to provide a member for providing the scale portion 2 separately from the first arm 120. Therefore, the number of parts can be reduced. The scale portion 2 is not limited to the case where it is provided directly on the surface of the first arm 120, and may be provided on, for example, a sheet-like member attached to the surface of the first arm 120. However, it may be provided on a plate-shaped member provided so as to rotate together with the first arm 120. That is, the member provided with the scale portion 2 may be a member that rotates around the first axis J1 with respect to the base 110 together with the first arm 120.

図4ないし図7に示すように、スケール部2は、複数のドット20が列状に配置されてなるマーク21を複数有している。複数のマーク21は、第1軸J1を中心とする円周に沿って、ほぼ等間隔で配置されている。なお、以下の説明では、第1軸J1を中心とする円の半径が延在する方向を「半径方向DR」といい、半径方向DRに直交する方向を「周方向DC」という。 As shown in FIGS. 4 to 7, the scale unit 2 has a plurality of marks 21 in which a plurality of dots 20 are arranged in a row. The plurality of marks 21 are arranged at substantially equal intervals along the circumference centered on the first axis J1. In the following description, the direction in which the radius of the circle centered on the first axis J1 extends is referred to as "radial DR", and the direction orthogonal to the radial DR is referred to as "circumferential DC".

マーク21は、図5および図6に示すように、それぞれ、周方向DCにおける長さに比べて半径方向DRにおける長さが長い形状をなしている。このマーク21は、図7に示すように、複数のドット20が半径方向DRに沿って列をなし、かつ、その列が周方向DCに沿って4列並んだものである。各列では、一部のドット20が周方向DCに沿ってずれているが、このドット20のずれのパターンが、マーク21を一意に識別する固有の識別子として機能する。本実施形態では、半径方向DRに並んだ4つのドット20で形成される列を1つの単位とし、この単位が周方向DCに4列並んでなる16個のドット20によって、後述するテンプレートマッチングにおいてテンプレート画像になり得る配列パターンが構成されている。したがって、各マーク21は、それぞれ、それ自身以外のマーク21とは異なる配列パターンを含んでいる。 As shown in FIGS. 5 and 6, the mark 21 has a shape in which the length in the radial direction DR is longer than the length in the circumferential direction DC, respectively. As shown in FIG. 7, the mark 21 has a plurality of dots 20 arranged in a row along the radial DR, and the rows are arranged in four rows along the circumferential direction DC. In each column, some dots 20 are displaced along the circumferential DC, and the pattern of the deviation of the dots 20 functions as a unique identifier that uniquely identifies the mark 21. In the present embodiment, a row formed by four dots 20 arranged in the radial direction DR is set as one unit, and 16 dots 20 in which the units are arranged in four rows in the circumferential direction DC are used in template matching described later. An array pattern that can be a template image is configured. Therefore, each mark 21 contains an arrangement pattern different from that of the other marks 21.

そうすると、このようなマーク21を有するスケール部2を第1軸J1まわりに回動させたとき、後述する撮像画像内の所定領域において、同じ配列パターンは2回以上出現しないことになる。本願明細書では、このような識別性を持つことを「ユニーク」といい、ユニークなパターンのことを「ユニークパターンUP」という。各マーク21に含まれた固有のユニークパターンUPを識別することができれば、スケール部2の周方向における絶対位置を識別することができる。 Then, when the scale portion 2 having such a mark 21 is rotated around the first axis J1, the same array pattern does not appear more than once in a predetermined region in the captured image described later. In the specification of the present application, having such distinctiveness is referred to as "unique", and a unique pattern is referred to as "unique pattern UP". If the unique unique pattern UP included in each mark 21 can be identified, the absolute position of the scale portion 2 in the circumferential direction can be identified.

また、ユニークパターンUPは、マーク21の半径方向DRにおいて繰り返し含まれているのが好ましい。これにより、図5に示す撮像領域RI1および図6に示す撮像領域RI2がそれぞれ半径方向DRにずれた場合でも、これらの領域にユニークパターンUPを捉えることができる。 Further, it is preferable that the unique pattern UP is repeatedly included in the radial DR of the mark 21. As a result, even when the imaging region RI1 shown in FIG. 5 and the imaging region RI2 shown in FIG. 6 are displaced in the radial direction, the unique pattern UP can be captured in these regions.

図7に示すドット20の位置、大きさ、数、配列パターン等は、一例であり、これに限定されるものではない。また、図2とは逆に、スケール部2を基台110側に配置し、検出部3a、3bを第1アーム120側に配置してもよい。 The positions, sizes, numbers, arrangement patterns, and the like of the dots 20 shown in FIG. 7 are examples, and are not limited thereto. Further, contrary to FIG. 2, the scale unit 2 may be arranged on the base 110 side, and the detection units 3a and 3b may be arranged on the first arm 120 side.

各図に示すマーク21は、白地に複数の黒色のドット20をユニークに配置することにより構成されている。なお、ドット20の形状は、図示では円形であるが、これに限定されず、例えば、楕円形、四角形、異形状等であってもよい。また、マーク21は、複数のドット20で構成されたドットパターンに限定されず、例えば、直線状のラインで構成されたパターン、曲線状のラインで構成されたパターン、ドット、直線状のラインおよび曲線状のラインのうちの少なくとも2つを組み合わせて構成されたパターンであってもよい。さらに、マーク21は、上述したパターンの白地と黒色のドットまたはラインを反転したパターン、すなわち黒地と白色のドットまたはラインのパターンであってもよい。また、ドット20は、例えば、染料、顔料等のインクで形成されたものであってもよいし、凹凸形状によるものであってもよい。 The mark 21 shown in each figure is configured by uniquely arranging a plurality of black dots 20 on a white background. The shape of the dot 20 is circular in the drawing, but is not limited to this, and may be, for example, an ellipse, a quadrangle, or an irregular shape. Further, the mark 21 is not limited to a dot pattern composed of a plurality of dots 20, and for example, a pattern composed of linear lines, a pattern composed of curved lines, dots, linear lines, and the like. The pattern may be composed of a combination of at least two of the curved lines. Further, the mark 21 may be a pattern in which the white background and the black dots or lines of the above-mentioned pattern are inverted, that is, a pattern of the black background and the white dots or lines. Further, the dots 20 may be formed of, for example, an ink such as a dye or a pigment, or may have an uneven shape.

また、マーク21は、ドット20のような図柄を用いたものに限定されず、例えば、数字を含んでいてもよいし、ローマ字、アラビア文字、漢字等の文字を含んでいてもよいし、文字以外の記号、符号、しるし、標章、図案、1次元バーコード、QRコード(登録商標)等を含んでいてもよい。 Further, the mark 21 is not limited to the one using a pattern such as a dot 20, and may include, for example, a number, a character such as a Roman character, an Arabic character, or a Chinese character, or a character. Other symbols, codes, marks, marks, designs, one-dimensional barcodes, QR codes (registered trademarks) and the like may be included.

図2に示す第1検出部3aは、基台110内に設けられている第1撮像素子31aと、基台110が有する開口に設けられている第1光学系32aと、を有し、第1撮像素子31aが第1光学系32aを介してスケール部2の周方向DCの一部、具体的には図5の撮像領域RI1を撮像する。撮像領域RI1の画角は、複数のマーク21を同一画像内に捉えられる角度に設定されるのが好ましい。なお、必要に応じて、第1撮像素子31aの撮像領域RI1を照明する光源を設けてもよい。 The first detection unit 3a shown in FIG. 2 includes a first image sensor 31a provided in the base 110 and a first optical system 32a provided in the opening of the base 110. 1 The image sensor 31a images a part of the circumferential direction DC of the scale unit 2, specifically, the image pickup region RI1 of FIG. 5 via the first optical system 32a. The angle of view of the imaging region RI1 is preferably set to an angle at which a plurality of marks 21 can be captured in the same image. If necessary, a light source that illuminates the image pickup region RI1 of the first image sensor 31a may be provided.

第1撮像素子31aとしては、例えば、CCD(Charge Coupled Devices)、CMOS(Complementary Metal Oxide Semiconductor)等が挙げられる。このような第1撮像素子31aは、撮影された画像を画素ごとの電気信号に変換して出力する。第1撮像素子31aは、2次元撮像素子(エリアイメージセンサ)、あるいは1次元撮像素子(ラインイメージセンサ)のどちらであってもよい。1次元撮像素子は、画素の並びがアームの旋回円に接する方向に配置することが望ましい。2次元撮像素子を用いた場合は、情報量の多い2次元画像を生成でき、後述のテンプレートマッチングによるドット20の検出精度を高めやすい。その結果、第1アーム120の回動状態を高精度に検出することができる。1次元撮像素子を用いた場合は、画像のサンプリング周期いわゆるフレームレートが高いため、検出頻度を高めることが可能になり、高速動作時に有利である。なお、本実施形態では、第1撮像素子31aは、2次元撮像素子である。 Examples of the first image sensor 31a include CCD (Charge Coupled Devices), CMOS (Complementary Metal Oxide Semiconductor), and the like. Such a first image sensor 31a converts the captured image into an electric signal for each pixel and outputs the image. The first image sensor 31a may be either a two-dimensional image sensor (area image sensor) or a one-dimensional image sensor (line image sensor). It is desirable that the one-dimensional image sensor is arranged in a direction in which the arrangement of pixels is in contact with the swirling circle of the arm. When a two-dimensional image sensor is used, a two-dimensional image having a large amount of information can be generated, and it is easy to improve the detection accuracy of the dot 20 by template matching described later. As a result, the rotational state of the first arm 120 can be detected with high accuracy. When a one-dimensional image sensor is used, since the image sampling cycle, that is, the frame rate, is high, it is possible to increase the detection frequency, which is advantageous during high-speed operation. In the present embodiment, the first image sensor 31a is a two-dimensional image sensor.

第1光学系32aは、スケール部2と第1撮像素子31aとの間に配置されている結像光学系である。この第1光学系32aは、少なくとも物体側(スケール部2側)がテレセントリックであることが好ましい。これにより、スケール部2と第1撮像素子31aとの間の距離が変動しても、第1撮像素子31aへの結像倍率の変化を低減することができ、その結果、エンコーダー1の検出精度の低下を低減することができる。特に、第1光学系32aが両側テレセントリックである場合、第1光学系32aが有するレンズと第1撮像素子31aとの間の距離が変動しても、第1撮像素子31aへの結像倍率の変化を低減することができる。そのため、第1光学系32aの組み立てが容易になるという利点がある。 The first optical system 32a is an imaging optical system arranged between the scale unit 2 and the first image pickup device 31a. It is preferable that at least the object side (scale portion 2 side) of the first optical system 32a is telecentric. As a result, even if the distance between the scale unit 2 and the first image sensor 31a fluctuates, the change in the imaging magnification to the first image sensor 31a can be reduced, and as a result, the detection accuracy of the encoder 1 can be reduced. Can be reduced. In particular, when the first optical system 32a is telecentric on both sides, even if the distance between the lens of the first optical system 32a and the first image sensor 31a fluctuates, the image magnification on the first image sensor 31a is increased. The change can be reduced. Therefore, there is an advantage that the first optical system 32a can be easily assembled.

ここで、図5に示すように、第1撮像素子31aの撮像領域RI1は、スケール部2の周方向DCにおける一部と重なるように設定されている。これにより、第1撮像素子31aは、撮像領域RI1内にあるドット20を撮像することができる。したがって、回路部4においてこのドット20を読み取ることにより、第1アーム120の回動状態を知ることができる。 Here, as shown in FIG. 5, the image pickup region RI1 of the first image pickup device 31a is set so as to overlap a part of the scale unit 2 in the circumferential direction DC. As a result, the first image sensor 31a can image the dots 20 in the image pickup region RI1. Therefore, by reading the dot 20 in the circuit unit 4, the rotational state of the first arm 120 can be known.

一方、第2検出部3bは、回動軸である第1軸J1に対して第1検出部3aと対称となる位置に配置されている。第2検出部3bは、前述した第1検出部3aと同様に構成されている。すなわち、第2検出部3bは、基台110内に設けられている第2撮像素子31bと、基台110が有する開口に設けられている第2光学系32bと、を有し、第2撮像素子31bが第2光学系32bを介してスケール部2の周方向での一部、具体的には図6の撮像領域RI2を撮像する。 On the other hand, the second detection unit 3b is arranged at a position symmetrical to the first detection unit 3a with respect to the first axis J1 which is the rotation axis. The second detection unit 3b is configured in the same manner as the first detection unit 3a described above. That is, the second detection unit 3b has a second image sensor 31b provided in the base 110 and a second optical system 32b provided in the opening of the base 110, and the second image pickup is performed. The element 31b images a part of the scale unit 2 in the circumferential direction via the second optical system 32b, specifically, the image pickup region RI2 of FIG.

第2撮像素子31bは、第1撮像素子31aと同じ解像度でスケール部2を撮像することが好ましい。これにより、後述する方法でスケール部2の回動角を算出する際に、その計算が簡単となる。このような観点から、第2撮像素子31bは、第1撮像素子31aと同じサイズおよび画素数であることが好ましく、また、第2光学系32bは、第1光学系32aと同じ倍率であることが好ましい。 It is preferable that the second image sensor 31b images the scale unit 2 with the same resolution as the first image sensor 31a. This simplifies the calculation when calculating the rotation angle of the scale unit 2 by the method described later. From this point of view, the second image sensor 31b preferably has the same size and number of pixels as the first image sensor 31a, and the second optical system 32b has the same magnification as the first optical system 32a. Is preferable.

なお、対称となる位置とは、回動軸である第1軸J1に沿った方向から見たとき、第1軸J1を対称軸として第1撮像素子31aと第2撮像素子31bとが互いに点対称の関係を満たす位置のことをいう。ただし、この位置には、多少のずれが許容される。例えば、第1撮像素子31aの中心と第1軸J1とを結ぶ線分と、第2撮像素子31bの中心と第1軸J1とを結ぶ線分と、のなす角度は、前述した点対称の関係を完全に満たす場合には180°となるが、180±6°程度のずれは許容される。この程度のずれがあっても、本実施形態の効果を得ることができる。 The symmetrical position means that the first image sensor 31a and the second image sensor 31b point to each other with the first axis J1 as the axis of symmetry when viewed from the direction along the first axis J1 which is the rotation axis. A position that satisfies a symmetrical relationship. However, some deviation is allowed in this position. For example, the angle formed by the line segment connecting the center of the first imaging element 31a and the first axis J1 and the line segment connecting the center of the second imaging element 31b and the first axis J1 is point-symmetrical as described above. When the relationship is completely satisfied, it becomes 180 °, but a deviation of about 180 ± 6 ° is allowed. Even if there is such a deviation, the effect of the present embodiment can be obtained.

図2および図3に示す回路部4は、処理装置である処理部5(プロセッサー)と、ROM(Read only memory)、RAM(Random Access Memory)等の記憶部6(メモリー)と、を有する。ここで、記憶部6には、処理部5で読み取り可能な指示や情報が記憶されており、処理部5は、記憶部6から指示や情報を適宜読み取って実行することで、各種機能を実現する。このような回路部4は、例えば、マイコンやASIC(application specific integrated circuit)またはFPGA(field-programmable gate array)等を用いて構成することができる。特にASICまたはFPGAを用いて回路部4をハードウェア化することで、回路部4の高処理速度化、小型化および低コスト化を図ることができる。なお、回路部4の少なくとも一部は、前述したロボット100の制御装置に組み込まれていてもよい。 The circuit unit 4 shown in FIGS. 2 and 3 includes a processing unit 5 (processor) which is a processing device, and a storage unit 6 (memory) such as a ROM (Read only memory) and a RAM (Random Access Memory). Here, the storage unit 6 stores instructions and information that can be read by the processing unit 5, and the processing unit 5 realizes various functions by appropriately reading and executing the instructions and information from the storage unit 6. To do. Such a circuit unit 4 can be configured by using, for example, a microcomputer, an ASIC (application specific integrated circuit), an FPGA (field-programmable gate array), or the like. In particular, by hardwareizing the circuit unit 4 using an ASIC or FPGA, it is possible to increase the processing speed, reduce the size, and reduce the cost of the circuit unit 4. At least a part of the circuit unit 4 may be incorporated in the control device of the robot 100 described above.

処理部5は、第1検出部3aおよび第2検出部3bの検出結果に基づいて、基台110および第1アーム120の相対的な回動状態を推定する。この回動状態としては、例えば、回動角度、回動速度、回動方向等が挙げられる。 The processing unit 5 estimates the relative rotational state of the base 110 and the first arm 120 based on the detection results of the first detection unit 3a and the second detection unit 3b. Examples of the rotation state include a rotation angle, a rotation speed, a rotation direction, and the like.

特に、処理部5は、第1撮像素子31aおよび第2撮像素子31bの撮像画像に対してテンプレート画像を用いてテンプレートマッチングすることでユニークパターンUPを画像認識し、その認識結果を用いて、基台110に対する第1アーム120の相対的な回動状態を推定する。このように、第1撮像素子31aおよび第2撮像素子31bの双方の撮像画像を用いて回動状態を推定することで、減速機112の出力軸の回転に伴う軸振れ(偏心)に起因する検出誤差を低減することができる。これにより、第1撮像素子31aまたは第2撮像素子31bのいずれかのみを用いて回動状態を推定する場合に比べて、検出精度を高めることができる。なお、この点については、後に詳述する。 In particular, the processing unit 5 recognizes the unique pattern UP by template matching using the template image with respect to the captured images of the first image sensor 31a and the second image sensor 31b, and uses the recognition result to base the image. The relative rotation state of the first arm 120 with respect to the base 110 is estimated. In this way, by estimating the rotational state using the captured images of both the first image sensor 31a and the second image sensor 31b, it is caused by the shaft runout (eccentricity) accompanying the rotation of the output shaft of the speed reducer 112. The detection error can be reduced. As a result, the detection accuracy can be improved as compared with the case where the rotational state is estimated using only either the first image sensor 31a or the second image sensor 31b. This point will be described in detail later.

また、処理部5は、第1撮像素子31aおよび第2撮像素子31bの撮像画像内におけるユニークパターンUPの位置に基づいて、基台110に対する第1アーム120の相対的な回動角度をより細かく推定する機能を有する。さらに、処理部5は、ユニークパターンUPが検出される時間間隔およびユニークパターンUPの移動量に基づいて回動速度を求めたり、検出されるユニークパターンUPの種類の順序に基づいて回動方向を推定したりする機能も有する。そして、処理部5は、前述した推定結果に応じた信号、すなわち、基台110に対する第1アーム120の相対的な回動状態に応じた信号を出力する。この信号は、例えば、図示しない制御装置に入力され、ロボット100の動作の制御に用いられる。 Further, the processing unit 5 makes the relative rotation angle of the first arm 120 with respect to the base 110 finer based on the positions of the unique patterns UP in the captured images of the first image sensor 31a and the second image sensor 31b. It has a function to estimate. Further, the processing unit 5 obtains the rotation speed based on the time interval in which the unique pattern UP is detected and the movement amount of the unique pattern UP, and determines the rotation direction based on the order of the types of the detected unique pattern UP. It also has a function to estimate. Then, the processing unit 5 outputs a signal corresponding to the above-mentioned estimation result, that is, a signal corresponding to the relative rotation state of the first arm 120 with respect to the base 110. This signal is input to, for example, a control device (not shown) and used to control the operation of the robot 100.

また、処理部5は、第1撮像素子31aの撮像画像および第2撮像素子31bの撮像画像の一部を切り取ってテンプレート画像を生成する機能を有する。このテンプレート画像の生成は、基台110に対する第1アーム120の相対的な回動状態を推定するのに先立って、あるいは、必要に応じて適時、基台110に対する第1アーム120の相対的な回動角度における所定の校正角ごとに行われる。そして、生成したテンプレート画像は、校正角ごとに対応して記憶部6に記憶される。そして、処理部5は、記憶部6に記憶されているテンプレート画像を用いて、テンプレートマッチングを行う。なお、テンプレートマッチングおよびそれを用いた回動状態の推定については、後に詳述する。 In addition, the processing unit 5 has a function of cutting out a part of the image captured by the first image sensor 31a and the image captured by the second image sensor 31b to generate a template image. The generation of this template image is prior to estimating the rotational state of the first arm 120 relative to the base 110, or as needed, relative to the first arm 120 relative to the base 110. It is performed at each predetermined calibration angle in the rotation angle. Then, the generated template image is stored in the storage unit 6 corresponding to each calibration angle. Then, the processing unit 5 performs template matching using the template image stored in the storage unit 6. The template matching and the estimation of the rotation state using the template matching will be described in detail later.

なお、処理部5は、基台110内に設けられた機器(内部機器)と基台110外に設けられた機器(外部機器)の双方を含む構成であってもよい。この場合、外部機器は、例えばパーソナルコンピューターで構成される。外部機器は、撮像画像の一部を切り取ってテンプレート画像を生成する機能を担うのが好ましい。この機能を外部機器に担わせることにより、内部機器の機能を簡素化することができ、基台110の小型化および低コスト化を図りやすくなる。 The processing unit 5 may be configured to include both a device (internal device) provided inside the base 110 and a device (external device) provided outside the base 110. In this case, the external device is composed of, for example, a personal computer. The external device preferably has a function of cutting out a part of the captured image to generate a template image. By assigning this function to the external device, the function of the internal device can be simplified, and it becomes easy to reduce the size and cost of the base 110.

記憶部6には、処理部5で読み取り可能な指示(プログラム)の他、処理部5で読み取り可能な各種情報(データ)が記憶されている。具体的には、記憶部6には、基台110に対する第1アーム120の相対的な回動状態ごとに、前述した撮像画像が、撮像画像内でのユニークパターンUPの座標(基準座標)に関する情報、および、第1アーム120の回動角度に関する情報(角度情報)とともに記憶されている。このような記憶部6は、不揮発性メモリー、揮発性メモリーのいずれであってもよいが、電力を供給しなくても情報を記憶した状態を保持することができ、省電力化を図ることができるという観点から、不揮発性メモリーであることが好ましい。 In addition to instructions (programs) that can be read by the processing unit 5, various information (data) that can be read by the processing unit 5 is stored in the storage unit 6. Specifically, in the storage unit 6, the above-mentioned captured image relates to the coordinates (reference coordinates) of the unique pattern UP in the captured image for each relative rotation state of the first arm 120 with respect to the base 110. It is stored together with the information and the information (angle information) regarding the rotation angle of the first arm 120. Such a storage unit 6 may be either a non-volatile memory or a volatile memory, but can hold a state in which information is stored without supplying power, and power saving can be achieved. From the viewpoint of being able to do so, a non-volatile memory is preferable.

2.2.角度検出方法
次に、第1実施形態に係る角度検出方法について説明する。
2.2. Angle detection method Next, the angle detection method according to the first embodiment will be described.

第1実施形態に係る角度検出方法は、テンプレート画像とそれに関する情報を取得するステップS1と、取得したテンプレート画像に基づいてスケール部2の回動角度を検出するステップS2と、を有する。かかる角度検出方法によれば、軸振れを伴う場合であっても、検出精度を高めることができる。 The angle detection method according to the first embodiment includes a step S1 for acquiring a template image and information related thereto, and a step S2 for detecting the rotation angle of the scale unit 2 based on the acquired template image. According to such an angle detection method, the detection accuracy can be improved even when the shaft runout is involved.

図8は、第1実施形態に係る角度検出方法を示すフローチャートである。図9は、図8に示す角度検出方法のうち、ステップS1を詳細に示すフローチャートである。図10は、図9に示すステップS1を説明するための図である。図11は、図9に示す角度検出方法で取得される、校正角、テンプレート画像、基準座標、および、係数を示す一覧表である。 FIG. 8 is a flowchart showing the angle detection method according to the first embodiment. FIG. 9 is a flowchart showing step S1 in detail among the angle detection methods shown in FIG. FIG. 10 is a diagram for explaining step S1 shown in FIG. FIG. 11 is a list showing the calibration angle, the template image, the reference coordinates, and the coefficients acquired by the angle detection method shown in FIG.

ステップS1は、図9に示すように、ステップS101〜S118を含んでいる。以下、各ステップについて説明する。 Step S1 includes steps S101 to S118, as shown in FIG. Hereinafter, each step will be described.

2.2.1.テンプレート画像等の取得
図8に示すステップS1では、テンプレートマッチングを用いて基台110に対する第1アーム120の相対的な回動状態を推定するのに先立って、テンプレートマッチングに用いるテンプレート画像とそれに関する情報を含むデータセットを取得する。このテンプレート画像等の取得は、最初のテンプレートマッチングの前に1回行うだけでよいが、その後必要に応じて適時行ってもよい。その場合、テンプレートマッチングに用いるテンプレート画像を、新たに取得したテンプレート画像に更新することができる。
2.2.1. Acquisition of template image, etc. In step S1 shown in FIG. 8, prior to estimating the relative rotation state of the first arm 120 with respect to the base 110 by using template matching, the template image used for template matching and related to the template image. Get a dataset that contains information. The acquisition of the template image or the like may be performed only once before the first template matching, but may be performed after that as needed. In that case, the template image used for template matching can be updated with the newly acquired template image.

このステップS1では、まず、ステップS101として、エンコーダー1の回動軸と図示しない校正用エンコーダーとを機械的に接続する。校正用エンコーダーは、エンコーダー1の回動軸の回動角度、すなわちスケール部2の回動角度を十分な高精度で検出する角度校正用のエンコーダーである。これにより、テンプレート画像に対し、高精度の角度情報を付与することができる。 In step S1, first, as step S101, the rotation shaft of the encoder 1 and a calibration encoder (not shown) are mechanically connected. The calibration encoder is an angle calibration encoder that detects the rotation angle of the rotation shaft of the encoder 1, that is, the rotation angle of the scale unit 2 with sufficiently high accuracy. As a result, highly accurate angle information can be added to the template image.

次に、ステップS102として、エンコーダー1の回動軸を回動させ、スケール部2を開始角に合わせる。開始角は、特に限定されないが、スケール部2が含む複数のマーク21の1つを、第1撮像素子31aの撮像画像に捉えたときの回動角度とする。 Next, in step S102, the rotation shaft of the encoder 1 is rotated to align the scale portion 2 with the start angle. The start angle is not particularly limited, but is a rotation angle when one of the plurality of marks 21 included in the scale unit 2 is captured in the image captured by the first image sensor 31a.

ここで、校正用エンコーダーで検出したエンコーダー1の回動軸の回動角度、すなわちスケール部2の回動角度を校正角θ[i](第[i]校正角)とする。変数iは、周方向DCに沿ってマーク21に付した番号に相当する値であり、スケール部2に設けられたマーク21の個数n+1に対応して、0からnまでの整数をとる。 Here, the rotation angle of the rotation shaft of the encoder 1 detected by the calibration encoder, that is, the rotation angle of the scale unit 2 is defined as the calibration angle θ [i] (the [i] calibration angle). The variable i is a value corresponding to the number assigned to the mark 21 along the circumferential direction DC, and takes an integer from 0 to n corresponding to the number n + 1 of the marks 21 provided in the scale unit 2.

次に、ステップS103として、変数iを0とする。エンコーダー1の回動軸が前述した開始角にあるとき、第1撮像素子31aの撮像画像および第2撮像素子31bの撮像画像には、それぞれ、いずれかのマーク21が捉えられている。 Next, in step S103, the variable i is set to 0. When the rotation axis of the encoder 1 is at the start angle described above, either mark 21 is captured in the image captured by the first image sensor 31a and the image captured by the second image sensor 31b, respectively.

次に、ステップS104として、校正用エンコーダーで検出した校正角θ[i]を記憶部6に記憶させる。ここでは、変数iとして0を設定しているため、校正角θ[0]を記憶させる。 Next, in step S104, the calibration angle θ [i] detected by the calibration encoder is stored in the storage unit 6. Here, since 0 is set as the variable i, the calibration angle θ [0] is stored.

次に、ステップS105として、エンコーダー1の第1撮像素子31aにマーク21を撮像させる。これにより、撮像画像1[i](第1[i]基準画像)を生成する。ここでは、変数iとして0を設定しているため、撮像画像1[0]を生成する。撮像画像1[0]には、マーク21に含まれたユニークパターンUP(第1マーク)が捉えられている。また、エンコーダー1の第2撮像素子31bにマーク21を撮像させる。これにより、撮像画像2[i](第2[i]基準画像)を生成する。ここでは、変数iとして0を設定しているため、撮像画像2[0]を生成する。撮像画像2[0]にも、マーク21に含まれたユニークパターンUP(第2マーク)が捉えられている。生成した撮像画像1[0]および撮像画像2[0]は、記憶部6に一時的に記憶させる。 Next, in step S105, the first image sensor 31a of the encoder 1 is made to image the mark 21. As a result, the captured image 1 [i] (first [i] reference image) is generated. Here, since 0 is set as the variable i, the captured image 1 [0] is generated. In the captured image 1 [0], the unique pattern UP (first mark) included in the mark 21 is captured. Further, the mark 21 is imaged by the second image sensor 31b of the encoder 1. As a result, the captured image 2 [i] (second [i] reference image) is generated. Here, since 0 is set as the variable i, the captured image 2 [0] is generated. The unique pattern UP (second mark) included in the mark 21 is also captured in the captured image 2 [0]. The generated captured image 1 [0] and captured image 2 [0] are temporarily stored in the storage unit 6.

次に、ステップS106として、変数iが0より大きいか否かを判断する。変数iが0より大きい場合、ステップS107〜S109に移行する。変数iが0である場合、ステップS110〜S118に移行する。この時点では、変数iが0であるため、まず、ステップS110〜S118について説明し、ステップS107〜S109については、後述する。 Next, in step S106, it is determined whether or not the variable i is larger than 0. If the variable i is larger than 0, the process proceeds to steps S107 to S109. If the variable i is 0, the process proceeds to steps S110 to S118. Since the variable i is 0 at this point, steps S110 to S118 will be described first, and steps S107 to S109 will be described later.

ステップS110では、変数iがn以下であるか否かを判断する。この変数iがn以下である場合、後述するテンプレート画像の取得を引き続き進める必要があるため、ステップS111に移行する。変数iがnより大きい場合、つまり、n+1である場合、全てのマーク21について、テンプレート画像の取得を終了したことになるため、テンプレート画像の取得等についてのステップフローは終了する。なお、この時点では変数iが0であるため、以下の説明では、まず、ステップS111等について説明する。 In step S110, it is determined whether or not the variable i is n or less. If this variable i is n or less, it is necessary to continue to acquire the template image described later, so the process proceeds to step S111. When the variable i is larger than n, that is, when it is n + 1, it means that the acquisition of the template image is completed for all the marks 21, so the step flow for acquiring the template image and the like is completed. Since the variable i is 0 at this point, step S111 and the like will be described first in the following description.

ステップS111では、記憶部6から撮像画像1[i](第1[i]基準画像)を読み出し、ユニークパターンUP(第1マーク)が欠けることなく含まれるように、撮像画像1[i]の切り出し位置を決定する。ここでは、変数iとして0を設定しているため、撮像画像1[0]の切り出し位置を決定する。 In step S111, the captured image 1 [i] (first [i] reference image) is read from the storage unit 6, and the captured image 1 [i] is included so that the unique pattern UP (first mark) is included without being missing. Determine the cutting position. Here, since 0 is set as the variable i, the cutout position of the captured image 1 [0] is determined.

ステップS112では、撮像画像1[i]における切り出し位置の左上端の座標を基準座標1[i](第1[i]基準座標)とする。ここでは、変数iとして0を設定しているため、図10に示すように、撮像画像1[i]における切り出し位置の左上端の座標を基準座標1[0](第1[0]基準座標)とする。 In step S112, the coordinates of the upper left end of the cutout position in the captured image 1 [i] are set as the reference coordinates 1 [i] (first [i] reference coordinates). Here, since 0 is set as the variable i, as shown in FIG. 10, the coordinates of the upper left end of the cutout position in the captured image 1 [i] are set to the reference coordinates 1 [0] (first [0] reference coordinates. ).

ステップS113では、撮像画像1[i]の基準座標1[i]に基づいて、ユニークパターンUPの画像を切り出す。これにより、テンプレート画像1[i](第1[i]テンプレート画像)を取得する。ここでは、変数iとして0を設定しているため、図10に示すように、テンプレート画像1[0](第1[0]テンプレート画像)を取得する。取得したテンプレート画像1[0]および基準座標1[0]は、記憶部6に記憶させる。一方、一時的に記憶されていた撮像画像1[i]は、これ以降、任意のタイミングで破棄するか、新たな撮像画像を生成したときに上書きされる。 In step S113, an image of the unique pattern UP is cut out based on the reference coordinate 1 [i] of the captured image 1 [i]. As a result, the template image 1 [i] (the first [i] template image) is acquired. Here, since 0 is set as the variable i, the template image 1 [0] (first [0] template image) is acquired as shown in FIG. The acquired template image 1 [0] and reference coordinates 1 [0] are stored in the storage unit 6. On the other hand, the temporarily stored captured image 1 [i] is subsequently overwritten when it is discarded at an arbitrary timing or when a new captured image is generated.

このように本実施形態では、テンプレート画像1[i]の取得に際し、ユニークパターンUPよりもサイズが大きい撮像画像1[i]から、ユニークパターンUPが欠けることなく含まれる領域を切り出し位置として選択し、そこから切り出した画像をテンプレート画像1[i]として採用するという方法を用いている。これにより、ユニークパターンUPの形成精度を必要以上に高めることなく、テンプレート画像1[i]を取得することができる。このため、スケール部2の形成が容易になるとともに、形成コストの低減を図ることができる。換言すれば、形成精度が低いスケール部2を用いた場合でも、テンプレート画像1[i]の取得に際して、低い形成精度を不問にすることができる。 As described above, in the present embodiment, when the template image 1 [i] is acquired, the region including the unique pattern UP is selected as the cutout position from the captured image 1 [i] having a size larger than that of the unique pattern UP. , The method of adopting the image cut out from the template image 1 [i] is used. As a result, the template image 1 [i] can be acquired without increasing the formation accuracy of the unique pattern UP more than necessary. Therefore, the scale portion 2 can be easily formed and the formation cost can be reduced. In other words, even when the scale portion 2 having a low forming accuracy is used, the low forming accuracy can be made unquestioned when the template image 1 [i] is acquired.

図10には、エンコーダー1の回動軸が校正角θ[0]にあるときに撮像された撮像画像1[0]の例が示されている。撮像画像1[0]で捉えられている複数のマーク21のうち、画像中心に近いものを選択し、そこからユニークパターンUP(第1マーク)を特定して、それが欠けることなく含まれる領域を切り出し位置とする。そして、撮像画像1[0]から、切り出し位置の左上端の座標を求め、これを基準座標1[0](第1[0]基準座標)として求める。また、切り出し位置に含まれるユニークパターンUPの画像を図11に示すようなテンプレート画像1[0]として切り出す。 FIG. 10 shows an example of the captured image 1 [0] captured when the rotation axis of the encoder 1 is at the calibration angle θ [0]. Among the plurality of marks 21 captured in the captured image 1 [0], the one close to the center of the image is selected, the unique pattern UP (first mark) is specified from the marks, and the area in which the unique pattern UP (first mark) is included without being missing is included. Is the cutout position. Then, the coordinates of the upper left end of the cutout position are obtained from the captured image 1 [0], and this is obtained as the reference coordinates 1 [0] (first [0] reference coordinates). Further, the image of the unique pattern UP included in the cutout position is cut out as the template image 1 [0] as shown in FIG.

ステップS114では、記憶部6から撮像画像2[i](第2[i]基準画像)を読み出し、ユニークパターンUP(第2マーク)が欠けることなく含まれるように、撮像画像2[i]の切り出し位置を決定する。ここでは、変数iとして0を設定しているため、撮像画像2[0]の切り出し位置を決定する。 In step S114, the captured image 2 [i] (second [i] reference image) is read from the storage unit 6, and the captured image 2 [i] is included so that the unique pattern UP (second mark) is included without being missing. Determine the cutting position. Here, since 0 is set as the variable i, the cutout position of the captured image 2 [0] is determined.

ステップS115では、撮像画像2[i]における切り出し位置の左上端の座標を基準座標2[i](第2[i]基準座標)とする。ここでは、変数iとして0を設定しているため、撮像画像2[0]における切り出し位置の左上端の座標を基準座標2[0](第2[0]基準座標)とする。 In step S115, the coordinates of the upper left end of the cutout position in the captured image 2 [i] are set as the reference coordinates 2 [i] (second [i] reference coordinates). Here, since 0 is set as the variable i, the coordinates of the upper left end of the cutout position in the captured image 2 [0] are set as the reference coordinates 2 [0] (second [0] reference coordinates).

ステップS116では、撮像画像2[i]の基準座標2[i]に基づいて、ユニークパターンUPの画像を切り出す。これにより、テンプレート画像2[i](第2[i]テンプレート画像)を取得する。ここでは、変数iとして0を設定しているため、テンプレート画像2[0](第2[0]テンプレート画像)を取得する。取得したテンプレート画像2[0]および基準座標2[0]は、記憶部6に記憶させる。一方、一時的に記憶されていた撮像画像2[i]は、これ以降、任意のタイミングで破棄するか、新たな撮像画像を生成したときに上書きされる。 In step S116, an image of the unique pattern UP is cut out based on the reference coordinate 2 [i] of the captured image 2 [i]. As a result, the template image 2 [i] (second [i] template image) is acquired. Here, since 0 is set as the variable i, the template image 2 [0] (second [0] template image) is acquired. The acquired template image 2 [0] and reference coordinates 2 [0] are stored in the storage unit 6. On the other hand, the temporarily stored captured image 2 [i] is subsequently overwritten when it is discarded at an arbitrary timing or when a new captured image is generated.

このように本実施形態では、テンプレート画像2[i]の取得に際し、ユニークパターンUPよりもサイズが大きい撮像画像2[i]から、ユニークパターンUPが欠けることなく含まれる領域を切り出し位置として選択し、そこから切り出した画像をテンプレート画像2[i]として採用するという方法を用いている。これにより、ユニークパターンUPの形成精度を必要以上に高めることなく、テンプレート画像2[i]を取得することができる。このため、スケール部2の形成が容易になるとともに、形成コストの低減を図ることができる。換言すれば、形成精度が低いスケール部2を用いた場合でも、テンプレート画像2[i]の取得に際して、低い形成精度を不問にすることができる。 As described above, in the present embodiment, when the template image 2 [i] is acquired, the region including the unique pattern UP is selected as the cutout position from the captured image 2 [i] having a size larger than that of the unique pattern UP. , The method of adopting the image cut out from the template image 2 [i] is used. As a result, the template image 2 [i] can be acquired without increasing the formation accuracy of the unique pattern UP more than necessary. Therefore, the scale portion 2 can be easily formed and the formation cost can be reduced. In other words, even when the scale portion 2 having a low forming accuracy is used, the low forming accuracy can be made unquestioned when the template image 2 [i] is acquired.

図10には、エンコーダー1の回動軸が校正角θ[0]にあるときに撮像された撮像画像2[0]の例が示されている。撮像画像2[0]に捉えられている複数のマーク21のうち、画像中心に近いものを選択し、そこからユニークパターンUP(第2マーク)を特定して、それが欠けることなく含まれる領域を切り出し位置とする。そして、撮像画像2[0]から、切り出し位置の左上端の座標を求め、これを基準座標2[0](第2[0]基準座標)として求める。また、切り出し位置に含まれるユニークパターンUPの画像を図11に示すようなテンプレート画像2[0]として切り出す。 FIG. 10 shows an example of the captured image 2 [0] captured when the rotation axis of the encoder 1 is at the calibration angle θ [0]. Among the plurality of marks 21 captured in the captured image 2 [0], the one close to the center of the image is selected, the unique pattern UP (second mark) is specified from the marks, and the area in which the unique pattern UP (second mark) is included without being chipped Is the cutout position. Then, the coordinates of the upper left end of the cutout position are obtained from the captured image 2 [0], and this is obtained as the reference coordinates 2 [0] (second [0] reference coordinates). Further, the image of the unique pattern UP included in the cutout position is cut out as the template image 2 [0] as shown in FIG.

次に、ステップS117では、エンコーダー1の回動軸を所定の角度進める。所定の角度とは、例えばマーク21の配置間隔に相当する角度であり、校正角θ[i]において撮像画像1[i]の中心付近に捉えたマーク21と、それに隣り合うマーク21と、の離角に相当する角度とされる。これにより、第1撮像素子31aおよび第2撮像素子31bでは、隣のマーク21、すなわち後述する校正角θ[i2]に対応するマーク21を視野に捉えることができる。 Next, in step S117, the rotation axis of the encoder 1 is advanced by a predetermined angle. The predetermined angle is, for example, an angle corresponding to the arrangement interval of the marks 21, and the mark 21 captured near the center of the captured image 1 [i] at the calibration angle θ [i] and the mark 21 adjacent thereto. It is an angle corresponding to the elongation. As a result, the first image sensor 31a and the second image sensor 31b can capture the adjacent mark 21, that is, the mark 21 corresponding to the calibration angle θ [i2] described later in the field of view.

次に、ステップS118では、変数iとしてi+1を設定する(変数iを更新する)。ここでは、更新前の変数iと更新後の変数iとを区別するため、更新後の変数iを「i2」と表記する。なお、各フローチャートでは、図示の便宜上、更新前および更新後を区別することなく変数iを使用している。 Next, in step S118, i + 1 is set as the variable i (the variable i is updated). Here, in order to distinguish between the variable i before the update and the variable i after the update, the variable i after the update is referred to as “i2”. In each flowchart, the variable i is used without distinguishing between before and after the update for convenience of illustration.

本ステップS118の直前では、変数iとして0を設定していたので、本ステップS118では変数i2として1が設定されることになる。ステップS118が終了すると、ステップフローは、ステップS104に戻る。 Immediately before this step S118, 0 was set as the variable i, so in this step S118, 1 is set as the variable i2. When step S118 is completed, the step flow returns to step S104.

2回目のステップS104でも、記憶部6に校正角θ[i2](第[i2]校正角)を記憶させる。ここでは、変数i2として1を設定しているため、校正角θ[1]を記憶させる。 Also in the second step S104, the storage unit 6 stores the calibration angle θ [i2] (the [i2] calibration angle). Here, since 1 is set as the variable i2, the calibration angle θ [1] is stored.

2回目のステップS105でも、第1撮像素子31aにマーク21を撮像させる。これにより、撮像画像1[i2](第1[i2]基準画像)を生成する。ここでは、変数i2として1を設定しているため、撮像画像1[1]を生成する。また、第2撮像素子31bにマーク21を撮像させる。これにより、撮像画像2[i2](第2[i2]基準画像)を生成する。ここでは、変数i2として1を設定しているため、撮像画像2[1]を生成する。生成した撮像画像1[1]および撮像画像2[1]は、記憶部6に一時的に記憶させる。 Also in the second step S105, the first image sensor 31a is made to image the mark 21. As a result, the captured image 1 [i2] (first [i2] reference image) is generated. Here, since 1 is set as the variable i2, the captured image 1 [1] is generated. Further, the second image sensor 31b is made to image the mark 21. As a result, the captured image 2 [i2] (second [i2] reference image) is generated. Here, since 1 is set as the variable i2, the captured image 2 [1] is generated. The generated captured image 1 [1] and captured image 2 [1] are temporarily stored in the storage unit 6.

2回目のステップS106でも、変数i2が0より大きいか否かを判断する。変数i2が0より大きい場合、ステップS107〜S109に移行する。この説明の例では、この時点で変数i2が1であるため、以下、ステップS107〜S109について説明する。 Also in the second step S106, it is determined whether or not the variable i2 is larger than 0. If the variable i2 is larger than 0, the process proceeds to steps S107 to S109. In the example of this explanation, since the variable i2 is 1 at this point, steps S107 to S109 will be described below.

ステップS107では、記憶部6からテンプレート画像1[i2−1]を読み出し、生成した撮像画像1[i2]に対してテンプレートマッチングを行う。そうすると、撮像画像1[i2]において、テンプレート画像1[i2−1]と合致するユニークパターンUP(第1マーク)が捉えられるので、捉えたユニークパターンUPの左上端の座標を、合致座標1[i2−1]とする。ここでは、変数i2として1を設定しているため、テンプレート画像1[0]を読み出し、生成した撮像画像1[1]に対してテンプレートマッチングを行う。そうすると、図10に示すように合致座標1[0]が求められる。求めた合致座標1[0]を、記憶部6に一時的に記憶させる。 In step S107, the template image 1 [i2-1] is read out from the storage unit 6, and template matching is performed on the generated captured image 1 [i2]. Then, in the captured image 1 [i2], the unique pattern UP (first mark) that matches the template image 1 [i2-1] is captured. Therefore, the coordinates of the upper left end of the captured unique pattern UP are set to the matching coordinates 1 [. i2-1]. Here, since 1 is set as the variable i2, the template image 1 [0] is read out, and template matching is performed on the generated captured image 1 [1]. Then, as shown in FIG. 10, the matching coordinates 1 [0] are obtained. The obtained matching coordinates 1 [0] are temporarily stored in the storage unit 6.

ステップS108では、記憶部6からテンプレート画像2[i2−1]を読み出し、生成した撮像画像2[i2]に対してテンプレートマッチングを行う。そうすると、撮像画像2[i2]において、テンプレート画像2[i2−1]と合致するユニークパターンUP(第2マーク)が捉えられるので、捉えたユニークパターンUPの左上端の座標を、合致座標2[i2−1]とする。ここでは、変数i2として1を設定しているため、テンプレート画像2[0]を読み出し、生成した撮像画像2[1]に対してテンプレートマッチングを行う。そうすると、図10に示すように合致座標2[0]が求められる。 In step S108, the template image 2 [i2-1] is read out from the storage unit 6, and template matching is performed on the generated captured image 2 [i2]. Then, in the captured image 2 [i2], the unique pattern UP (second mark) that matches the template image 2 [i2-1] is captured. Therefore, the coordinates of the upper left end of the captured unique pattern UP are set to the matching coordinates 2 [. i2-1]. Here, since 1 is set as the variable i2, the template image 2 [0] is read out, and template matching is performed on the generated captured image 2 [1]. Then, as shown in FIG. 10, the matching coordinates 2 [0] are obtained.

なお、ステップS107、S108では、テンプレートマッチングを行う際、サブピクセル推定という処理を行うようにしてもよい。サブピクセル推定によれば、テンプレートマッチングによってユニークパターンUPの位置を推定する際、1画素以下の単位で位置を推定することができる。その結果、合致座標1[i2−1]および合致座標2[i2−1]をより高精度に求めることができる。 In steps S107 and S108, a process called sub-pixel estimation may be performed when performing template matching. According to the sub-pixel estimation, when the position of the unique pattern UP is estimated by template matching, the position can be estimated in units of one pixel or less. As a result, the matching coordinates 1 [i2-1] and the matching coordinates 2 [i2-1] can be obtained with higher accuracy.

ステップS109では、求めた合致座標1[i2−1]と、記憶部6に記憶させておいた基準座標1[i2−1]と、の差を求める。この差は、エンコーダー1の回動軸が校正角θ[i2−1](第[i2−1]校正角)から校正角θ[i2](第[i2]校正角)へと回動したときの、撮像画像1[i2]におけるユニークパターンUPの移動量に相当する。そして、求めた差を、移動量1[i2−1](第1[i2−1]基準移動量)とする。ここでは、変数i2として1を設定しているので、図10に示すように、合致座標1[0]と、記憶部6に記憶させておいた基準座標1[0]と、の差を求める。そして、求めた差を、移動量1[0]とする。 In step S109, the difference between the obtained matching coordinates 1 [i2-1] and the reference coordinates 1 [i2-1] stored in the storage unit 6 is obtained. This difference is when the rotation axis of the encoder 1 rotates from the calibration angle θ [i2-1] (the [i2-1] calibration angle) to the calibration angle θ [i2] (the [i2] calibration angle). Corresponds to the amount of movement of the unique pattern UP in the captured image 1 [i2]. Then, the obtained difference is defined as the movement amount 1 [i2-1] (first [i2-1] reference movement amount). Here, since 1 is set as the variable i2, as shown in FIG. 10, the difference between the matching coordinate 1 [0] and the reference coordinate 1 [0] stored in the storage unit 6 is obtained. .. Then, the obtained difference is set to the movement amount 1 [0].

これと同様に、求めた合致座標2[i2−1]と、記憶部6に記憶させておいた基準座標2[i2−1]と、の差を求める。この差は、エンコーダー1の回動軸が校正角θ[i2−1](第[i2−1]校正角)から校正角θ[i2](第[i2]校正角)へと回動したときの、撮像画像2[i2]におけるユニークパターンUPの移動量に相当する。そして、求めた差を、移動量2[i2−1](第2[i2−1]基準移動量)とする。ここでは、変数i2として1を設定しているので、図10に示すように、合致座標2[0]と、記憶部6に記憶させておいた基準座標2[0]と、の差を求める。そして、求めた差を、移動量2[0]とする。 Similarly to this, the difference between the obtained matching coordinates 2 [i2-1] and the reference coordinates 2 [i2-1] stored in the storage unit 6 is obtained. This difference is when the rotation axis of the encoder 1 rotates from the calibration angle θ [i2-1] (the [i2-1] calibration angle) to the calibration angle θ [i2] (the [i2] calibration angle). Corresponds to the amount of movement of the unique pattern UP in the captured image 2 [i2]. Then, the obtained difference is defined as the movement amount 2 [i2-1] (second [i2-1] reference movement amount). Here, since 1 is set as the variable i2, as shown in FIG. 10, the difference between the matching coordinate 2 [0] and the reference coordinate 2 [0] stored in the storage unit 6 is obtained. .. Then, the obtained difference is set to the movement amount 2 [0].

そして、校正角θ[i2−1](第[i2−1]校正角)、校正角θ[i2](第[i2]校正角)、移動量1[i2−1](第1[i2−1]基準移動量)、および、移動量2[i2−1](第2[i2−1]基準移動量)、の間に成り立つ相関関係を求め、記憶部6に記憶させる。この相関関係は、スケール部2の回動角度と撮像画像内の距離との相関関係を示すものであり、どのような形態で表されたものであってもよいが、後述するステップS2において、移動量から回動角度を逆算することができる形態とされる。 Then, the calibration angle θ [i2-1] (the [i2-1] calibration angle), the calibration angle θ [i2] (the [i2] calibration angle), the movement amount 1 [i2-1] (the first [i2-]). 1] Reference movement amount) and movement amount 2 [i2-1] (second [i2-1] reference movement amount) are obtained, and stored in the storage unit 6. This correlation indicates the correlation between the rotation angle of the scale unit 2 and the distance in the captured image, and may be expressed in any form, but in step S2 described later, The rotation angle can be calculated back from the amount of movement.

ここで、移動量1[i2−1]を算出するのに用いた撮像画像1[i2−1]、および、移動量2[i2−1]を算出するのに用いた撮像画像2[i2−1]は、エンコーダー1の回動軸が互いに同じ回動角度(校正角θ[i2−1])にあるタイミングで生成された画像である。エンコーダー1の回動軸が互いに同じ回動角度にあるタイミングとは、撮像画像1[i2−1]を撮像するときの回動角度と、撮像画像2[i2−1]を撮像するときの回動角度と、が同じであるタイミングということである。 Here, the captured image 1 [i2-1] used to calculate the movement amount 1 [i2-1] and the captured image 2 [i2-] used to calculate the movement amount 2 [i2-1]. 1] is an image generated at the timing when the rotation axes of the encoder 1 are at the same rotation angle (calibration angle θ [i2-1]). The timing at which the rotation axes of the encoder 1 are at the same rotation angle is the rotation angle when the captured image 1 [i2-1] is imaged and the rotation when the captured image 2 [i2-1] is imaged. It means that the moving angle is the same timing.

同様に、移動量1[i2−1]を算出するのに用いた撮像画像1[i2]、および、移動量2[i2−1]を算出するのに用いた撮像画像2[i2]も、エンコーダー1の回動軸が互いに同じ回動角度(校正角θ[i2])にあるタイミングで生成された画像である。この場合も、前述したように、エンコーダー1の回動軸が互いに同じ回動角度にあるタイミングとは、撮像画像1[i2]を撮像するときの回動角度と、撮像画像2[i2]を撮像するときの回動角度と、が同じであるタイミングということである。 Similarly, the captured image 1 [i2] used to calculate the movement amount 1 [i2-1] and the captured image 2 [i2] used to calculate the movement amount 2 [i2-1] are also This is an image generated at the timing when the rotation axes of the encoder 1 are at the same rotation angle (calibration angle θ [i2]). Also in this case, as described above, the timing at which the rotation axes of the encoder 1 are at the same rotation angle is the rotation angle when the captured image 1 [i2] is imaged and the captured image 2 [i2]. This is the timing at which the rotation angle at the time of imaging is the same.

なお、エンコーダー1の回動軸が停止している場合には、撮像画像1[i2−1]を撮像する時刻と、撮像画像2[i2−1]を撮像する時刻と、が異なっていてもよく、同様に、撮像画像1[i2]を撮像する時刻と、撮像画像2[i2]を撮像する時刻と、が異なっていてもよいが、これらは好ましくは同時とされる。 When the rotation axis of the encoder 1 is stopped, even if the time for capturing the captured image 1 [i2-1] and the time for capturing the captured image 2 [i2-1] are different. Similarly, the time at which the captured image 1 [i2] is captured and the time at which the captured image 2 [i2] is captured may be different, but these are preferably at the same time.

また、撮像画像1[i2−1]および撮像画像1[i2]を撮像する第1撮像素子31aと、撮像画像2[i2−1]および撮像画像2[i2]を撮像する第2撮像素子31bは、前述したように、回動軸である第1軸J1に対して互いに対称(点対称)となる位置に配置されている。 In addition, the first image sensor 31a that captures the captured image 1 [i2-1] and the captured image 1 [i2] and the second image sensor 31b that captures the captured image 2 [i2-1] and the captured image 2 [i2]. Are arranged at positions that are symmetrical (point symmetric) with respect to the first axis J1 which is the rotation axis, as described above.

このような条件を満たすことにより、撮像画像1[i2−1]および撮像画像2[i2−1]、ならびに、撮像画像1[i2]および撮像画像2[i2]は、それぞれ、エンコーダー1の回動軸が軸振れを伴っていたとしても、並進方向が互いに逆で、かつ、並進長さが互いに等しい、という軸並進成分を含んだものとなる。したがって、撮像画像1[i2−1]および撮像画像1[i2]から求められた移動量1[i2−1]、ならびに、撮像画像2[i2−1]および撮像画像2[i2]から求められた移動量2[i2−1]には、エンコーダー1の回動軸が校正角θ[i2−1]から校正角θ[i2]に変化する間に生じた軸並進成分の変化が、並進方向が互いに逆で、かつ、並進長さが互いに等しい、という関係を満たしつつ反映されていることになる。 By satisfying such conditions, the captured image 1 [i2-1] and the captured image 2 [i2-1], and the captured image 1 [i2] and the captured image 2 [i2] are each rotated by the encoder 1. Even if the moving axes are accompanied by axial runout, they include an axial translation component in which the translation directions are opposite to each other and the translation lengths are equal to each other. Therefore, it is obtained from the movement amount 1 [i2-1] obtained from the captured image 1 [i2-1] and the captured image 1 [i2], and from the captured image 2 [i2-1] and the captured image 2 [i2]. In the movement amount 2 [i2-1], the change in the axial translation component that occurs while the rotation axis of the encoder 1 changes from the calibration angle θ [i2-1] to the calibration angle θ [i2] is the translation direction. Are reflected while satisfying the relationship that they are opposite to each other and their translation lengths are equal to each other.

したがって、本ステップS109で相関関係を求めるにあたって、移動量1[i2−1]および移動量2[i2−1]を用いることにより、軸並進成分の影響を減少または相殺することができる。その結果、後述するステップS2において移動量から回動角度を逆算する際、軸並進成分の影響が低減または除去される、換言すれば、軸回転成分のみが抽出されることになり、誤差の少ない回動角度を算出することができる。つまり、このような軸並進成分の影響を低減または除去し得る相関関係を本ステップS109であらかじめ求めておくことにより、後述するステップS2では、この相関関係に基づいて、より短時間で精度の高い回動角度を求めることができる。また、それに伴い、検出する回動角度の分解能を高めることも容易になる。 Therefore, by using the movement amount 1 [i2-1] and the movement amount 2 [i2-1] in obtaining the correlation in this step S109, the influence of the axial translation component can be reduced or offset. As a result, when the rotation angle is calculated back from the movement amount in step S2 described later, the influence of the shaft translation component is reduced or eliminated, in other words, only the shaft rotation component is extracted, and there is little error. The rotation angle can be calculated. That is, by obtaining in advance a correlation capable of reducing or eliminating the influence of such an axial translation component in this step S109, in step S2 described later, based on this correlation, the accuracy is higher in a shorter time. The rotation angle can be obtained. Along with this, it becomes easy to improve the resolution of the rotation angle to be detected.

以上のように、前述した相関関係を求めるステップS1は、スケール部2が校正角θ[i2](第[i2]校正角)にあるとき、第1撮像素子31aに第1マークを含むマーク21を撮像させて撮像画像1[i2](第1[i2]基準画像)を生成し、テンプレート1[i2−1](第1[i2−1]テンプレート画像)に基づくテンプレートマッチングにより、撮像画像1[i2]における第1マークの基準座標1[i2−1](第1[i2−1]基準座標)からの移動量1[i2−1](第1[i2−1]移動量)を求めるステップS107と、スケール部2が校正角θ[i2](第[i2]校正角)にあるとき、第2撮像素子31bに第2マークを含むマーク21を撮像させて撮像画像2[i2](第2[i2]基準画像)を生成し、テンプレート2[i2−1](第2[i2−1]テンプレート画像)に基づくテンプレートマッチングにより、撮像画像2[i2]における第2マークの基準座標2[i2−1](第2[i2−1]基準座標)からの移動量2[i2−1](第2[i2−1]移動量)を求めるステップS108と、を含んでいる。 As described above, in step S1 for obtaining the correlation described above, when the scale unit 2 is at the calibration angle θ [i2] (the [i2] calibration angle), the mark 21 including the first mark in the first image sensor 31a Image 1 [i2] (first [i2] reference image) is generated, and image 1 is captured by template matching based on template 1 [i2-1] (first [i2-1] template image). Obtain the movement amount 1 [i2-1] (first [i2-1] movement amount) from the reference coordinate 1 [i2-1] (first [i2-1] reference coordinate) of the first mark in [i2]. In step S107 and when the scale unit 2 is at the calibration angle θ [i2] (the [i2] calibration angle), the second image sensor 31b is made to image the mark 21 including the second mark, and the captured image 2 [i2] ( The second [i2] reference image) is generated, and the reference coordinates 2 of the second mark in the captured image 2 [i2] are obtained by template matching based on the template 2 [i2-1] (second [i2-1] template image). It includes step S108 for obtaining the movement amount 2 [i2-1] (second [i2-1] movement amount) from [i2-1] (second [i2-1] reference coordinates).

一例として、この相関関係は、校正角θ[i2](第[i2]校正角)と校正角θ[i2−1](第[i2−1]校正角)との差、および、移動量1[i2−1](第1[i2−1]基準移動量)と移動量2[i2−1](第2[i2−1]基準移動量)との和、の間に成り立つ相関関係とされる。移動量1[i2−1]と移動量2[i2−1]との和を含むことにより、少ない計算量で、軸並進成分を減少または相殺し得る相関関係を導くことができる。このため、かかる相関関係を反映させることによって、回動角度を算出する際の演算負荷を軽減し、高速化を図ることができる。 As an example, this correlation is the difference between the calibration angle θ [i2] (the [i2] calibration angle) and the calibration angle θ [i2-1] (the [i2-1] calibration angle), and the amount of movement 1. It is a correlation established between [i2-1] (first [i2-1] reference movement amount) and the sum of movement amount 2 [i2-1] (second [i2-1] reference movement amount). To. By including the sum of the movement amount 1 [i2-1] and the movement amount 2 [i2-1], it is possible to derive a correlation capable of reducing or canceling the axial translation component with a small amount of calculation. Therefore, by reflecting such a correlation, it is possible to reduce the calculation load when calculating the rotation angle and to increase the speed.

また、相関関係の具体的な形態としては、例えば、移動量1[i2−1](第1[i2−1]基準移動量)と移動量2[i2−1](第2[i2−1]基準移動量)との和、に対する、校正角θ[i2](第[i2]校正角)と校正角θ[i2−1](第[i2−1]校正角)との差、の比として求められる係数[i2−1]が挙げられる。相関関係の形態としては、例えば前述した和と差に基づいて移動量から回動角度を求める一覧表(計算テーブル)という形態も考えられるが、この場合、回動角度の算出に時間を要する場合もある。これに対し、このような係数[i2−1]を算出し、記憶部6に記憶させておくことにより、後述するステップS2において移動量から回動角度を逆算する際、計算の高速化を図ることができる。 Further, as specific forms of the correlation, for example, the movement amount 1 [i2-1] (first [i2-1] reference movement amount) and the movement amount 2 [i2-1] (second [i2-1]). ] Reference movement amount), and the ratio of the difference between the calibration angle θ [i2] (the [i2] calibration angle) and the calibration angle θ [i2-1] (the [i2-1] calibration angle). The coefficient [i2-1] obtained as the above can be mentioned. As a form of correlation, for example, a list (calculation table) for obtaining the rotation angle from the movement amount based on the sum and difference described above can be considered, but in this case, when it takes time to calculate the rotation angle. There is also. On the other hand, by calculating such a coefficient [i2-1] and storing it in the storage unit 6, when the rotation angle is back-calculated from the movement amount in step S2 described later, the calculation speed is increased. be able to.

係数[i2−1]は、例えば、以下の式で求められる。 The coefficient [i2-1] is obtained by, for example, the following equation.

Figure 2021089206
Figure 2021089206

なお、ここでは、変数i2として1を設定しているため、係数[0]は、図11に示す式で求められる。 Since 1 is set as the variable i2 here, the coefficient [0] is obtained by the formula shown in FIG.

ステップS109の終了後、ステップS110に移行する。
ステップS110では、前述したように、変数i2がn以下であるか否かを判断する。ここでは、変数i2が1であるため、ステップS111に移行する。そして、これ以降は、上述したステップS111〜S118と同様にしてステップフローを進めた後、ステップS104に戻る。なお、ステップS118では、変数i2としてi2+1を設定する(変数i2を更新する)。更新後の変数i2を「i3」と表記する。
After the end of step S109, the process proceeds to step S110.
In step S110, as described above, it is determined whether or not the variable i2 is n or less. Here, since the variable i2 is 1, the process proceeds to step S111. After that, the step flow is advanced in the same manner as in steps S111 to S118 described above, and then the process returns to step S104. In step S118, i2 + 1 is set as the variable i2 (the variable i2 is updated). The updated variable i2 is referred to as "i3".

以降、同様にして、3回目のステップS104〜S106、および、2回目のステップS107〜S109を行い、係数[i3−1]を求めることができる。 Subsequently, in the same manner, the third steps S104 to S106 and the second steps S107 to S109 can be performed to obtain the coefficient [i3-1].

さらにその後、同様にして、係数[i4−1]、係数[i5−1]、・・・、係数[i(n+1)−1]を求めることができる。これにより、全てのマーク21について、係数による相関関係を求め、記憶部6に記憶することができる。そして、これらの相関関係を用いることにより、後述するステップS2において、エンコーダー1の回動軸の回動角度によらず、精度の高い回動角度を求めることができる。 After that, the coefficient [i4-1], the coefficient [i5-1], ..., The coefficient [i (n + 1) -1] can be obtained in the same manner. As a result, for all the marks 21, the correlation by the coefficient can be obtained and stored in the storage unit 6. Then, by using these correlations, it is possible to obtain a highly accurate rotation angle in step S2, which will be described later, regardless of the rotation angle of the rotation shaft of the encoder 1.

その後、再び、ステップS110に移行する。ステップS110では、前述したように、変数i(n+2)がn以下であるか否かを判断する。全てのマーク21について相関関係を求めた後では、変数i(n+2)としてn+1が設定されているため、図9に示すステップフローを終了する。このとき、校正用エンコーダーは不要となるため、ステップS110の判断後、校正用エンコーダーを取り外す(ステップS120)。 After that, the process proceeds to step S110 again. In step S110, as described above, it is determined whether or not the variable i (n + 2) is n or less. After obtaining the correlation for all the marks 21, since n + 1 is set as the variable i (n + 2), the step flow shown in FIG. 9 ends. At this time, since the calibration encoder is unnecessary, the calibration encoder is removed after the determination in step S110 (step S120).

以上のようにして、後述するステップS2で回動角度を検出するために必要な校正角、テンプレート画像、基準座標および係数で構成されるデータセットを得ることができる。 As described above, it is possible to obtain a data set composed of the calibration angle, the template image, the reference coordinates, and the coefficients necessary for detecting the rotation angle in step S2 described later.

2.2.2.回動角度の検出
図8に示すステップS2では、ステップS1で取得したデータセットを用いて、スケール部2の回動角度θを検出する。
2.2.2. Detection of rotation angle In step S2 shown in FIG. 8, the rotation angle θ of the scale unit 2 is detected using the data set acquired in step S1.

ステップS2は、図8に示すように、ステップS201〜S205を含んでいる。以下、各ステップについて説明する。 Step S2 includes steps S201-S205, as shown in FIG. Hereinafter, each step will be described.

このステップS2では、まず、ステップS201として、スケール部2が未知の回動角度θ(計測角)にあるとき、第1撮像素子31aにマーク21を撮像させる。これにより、測角画像1(第1測角画像)を生成する。生成した測角画像1は、記憶部6に記憶させる。 In step S2, first, in step S201, when the scale unit 2 is at an unknown rotation angle θ (measurement angle), the first image sensor 31a is made to image the mark 21. As a result, the angle measurement image 1 (first angle measurement image) is generated. The generated angle measurement image 1 is stored in the storage unit 6.

次に、ステップS202として、スケール部2がステップS201と同じ回動角度θ(計測角)にあるとき、第2撮像素子31bにマーク21を撮像させる。これにより、測角画像2(第2測角画像)を生成する。生成した測角画像2は、記憶部6に記憶させる。 Next, in step S202, when the scale unit 2 is at the same rotation angle θ (measurement angle) as step S201, the second image sensor 31b is made to image the mark 21. As a result, the angle measurement image 2 (second angle measurement image) is generated. The generated angle measurement image 2 is stored in the storage unit 6.

なお、ステップS1と同様、測角画像1および測角画像2は、スケール部2が同じ回動軸の回動角度θ(計測角)にあるときに撮像された画像とされ、好ましくは同時に撮像された画像とされる。また、回動角度θは、校正角θ[i]と校正角θ[i2]との間にあるものとする。 As in step S1, the angle measurement image 1 and the angle measurement image 2 are images taken when the scale unit 2 is at the rotation angle θ (measurement angle) of the same rotation axis, and are preferably taken at the same time. It is said to be an image. Further, it is assumed that the rotation angle θ is between the calibration angle θ [i] and the calibration angle θ [i2].

次のステップS203では、記憶部6から測角画像1およびステップS1で取得したテンプレート画像1[i]を読み出し、測角画像1に対してテンプレートマッチングを行う。なお、テンプレートマッチングの際には、必要に応じて、サブピクセル推定を行う。テンプレートマッチングを行うことにより、測角画像1において、テンプレート画像1[i]と合致するユニークパターンUP(第1マーク)が捉えられるので、捉えたユニークパターンUPの左上端の座標を、測角合致座標1とする。求めた測角合致座標1は、記憶部6に記憶させる。 In the next step S203, the angle measurement image 1 and the template image 1 [i] acquired in step S1 are read out from the storage unit 6, and template matching is performed on the angle measurement image 1. At the time of template matching, sub-pixel estimation is performed as necessary. By performing template matching, the unique pattern UP (first mark) that matches the template image 1 [i] is captured in the angle measurement image 1, so the coordinates of the upper left end of the captured unique pattern UP are matched in the angle measurement. Let the coordinates be 1. The obtained angle measurement matching coordinates 1 are stored in the storage unit 6.

次のステップS204では、記憶部6から測角画像2およびステップS1で取得したテンプレート画像2[i]を読み出し、測角画像2に対してテンプレートマッチングを行う。なお、テンプレートマッチングの際には、必要に応じて、サブピクセル推定を行う。テンプレートマッチングを行うことにより、測角画像2において、テンプレート画像2[i]と合致するユニークパターンUP(第2マーク)が捉えられるので、捉えたユニークパターンUPの左上端の座標を、測角合致座標2とする。求めた測角合致座標2は、記憶部6に記憶させる。 In the next step S204, the angle measurement image 2 and the template image 2 [i] acquired in step S1 are read out from the storage unit 6, and template matching is performed on the angle measurement image 2. At the time of template matching, sub-pixel estimation is performed as necessary. By performing template matching, the unique pattern UP (second mark) that matches the template image 2 [i] is captured in the angle measurement image 2, so the coordinates of the upper left end of the captured unique pattern UP are matched by the angle measurement. Let the coordinates be 2. The obtained angle measurement matching coordinates 2 are stored in the storage unit 6.

次のステップS205では、記憶部6から測角合致座標1および測角合致座標2を読み出す。また、ステップS1で取得した、テンプレート画像1[i]に対応する基準座標1[i]およびテンプレート画像2[i]に対応する基準座標2[i]を読み出す。そして、次の計算式に基づいて、移動量1(第1測角移動量)および移動量2(第2測角移動量)を算出する。 In the next step S205, the angle-measurement matching coordinates 1 and the angle-measurement matching coordinates 2 are read out from the storage unit 6. Further, the reference coordinates 1 [i] corresponding to the template image 1 [i] and the reference coordinates 2 [i] corresponding to the template image 2 [i] acquired in step S1 are read out. Then, the movement amount 1 (first angle measurement movement amount) and the movement amount 2 (second angle measurement movement amount) are calculated based on the following calculation formulas.

移動量1=測角合致座標1−基準座標1[i]
移動量2=測角合致座標2−基準座標2[i]
Movement amount 1 = Angle matching coordinate 1-Reference coordinate 1 [i]
Movement amount 2 = Angle matching coordinates 2-Reference coordinates 2 [i]

この移動量1および移動量2は、スケール部2が校正角θ[i]から回動角度θへと回動したときの、測角画像1および測角画像2におけるユニークパターンUPの各移動量に相当する。 The movement amount 1 and the movement amount 2 are the movement amounts of the unique patterns UP in the angle measurement image 1 and the angle measurement image 2 when the scale unit 2 rotates from the calibration angle θ [i] to the rotation angle θ. Corresponds to.

ここで、移動量1を算出するのに用いた測角画像1、および、移動量2を算出するのに用いた測角画像2は、前述したように、スケール部2が互いに同じ回動角度θ(計測角)にあるタイミングで生成された画像である。したがって、測角画像1および測角画像2は、スケール部2が軸振れを伴っていたとしても、並進方向が互いに逆で、かつ、並進長さが互いに等しい、という軸並進成分を含んだものとなる。したがって、移動量1および移動量2を用いて、後述する手順で回動角度θを算出することにより、軸並進成分の影響が低減または除去され、誤差の少ない回動角度θを算出することができる。つまり、より短時間で精度の高い回動角度θを求めることができる。また、それに伴い、検出する回動角度θの分解能を高めることも容易になる。 Here, in the angle measurement image 1 used to calculate the movement amount 1 and the angle measurement image 2 used to calculate the movement amount 2, the scale portions 2 have the same rotation angle with each other as described above. It is an image generated at the timing at θ (measurement angle). Therefore, the angle measurement image 1 and the angle measurement image 2 include an axial translation component in which the translation directions are opposite to each other and the translation lengths are equal to each other even if the scale portion 2 is accompanied by axial runout. It becomes. Therefore, by calculating the rotation angle θ by the procedure described later using the movement amount 1 and the movement amount 2, the influence of the axial translation component can be reduced or eliminated, and the rotation angle θ with less error can be calculated. it can. That is, it is possible to obtain a highly accurate rotation angle θ in a shorter time. Along with this, it becomes easy to improve the resolution of the rotation angle θ to be detected.

続いて、ステップS205では、記憶部6から係数[i]を読み出す。そして、以下の式により、回動角度θを算出する。
回動角度θ=校正角θ[i]+(移動量1+移動量2)×係数[i]
Subsequently, in step S205, the coefficient [i] is read from the storage unit 6. Then, the rotation angle θ is calculated by the following formula.
Rotation angle θ = Calibration angle θ [i] + (Movement amount 1 + Movement amount 2) × Coefficient [i]

以上のようにして、回動角度θを算出することができる。算出した回動角度θは、回路部4から出力され、例えばロボット100の制御装置においてアームの駆動制御に用いられる。なお、本実施形態では、ステップS2において生成した測角画像を記憶部6に記憶させた後、テンプレートマッチングを用いて測角合致座標を取得する例を示したが、処理部5に複数の処理装置を設け、各撮像素子から処理部5に測角画素が転送される度に処理部5がテンプレートマッチング処理を行い、測角画像の生成と測角合致座標の取得を並列処理させることが好ましい。 As described above, the rotation angle θ can be calculated. The calculated rotation angle θ is output from the circuit unit 4, and is used, for example, in the control device of the robot 100 for driving control of the arm. In the present embodiment, an example is shown in which the angle measurement image generated in step S2 is stored in the storage unit 6 and then the angle measurement matching coordinates are acquired by using template matching, but the processing unit 5 has a plurality of processes. It is preferable to provide an apparatus and perform template matching processing by the processing unit 5 each time the angle measurement pixels are transferred from each image sensor to the processing unit 5, so that the generation of the angle measurement image and the acquisition of the angle measurement matching coordinates are processed in parallel. ..

以上のように、本実施形態に係る角度検出方法は、スケール部2と第1撮像素子31aと第2撮像素子31bとを有するエンコーダー1を用いて、回動軸の回動角度を検出する方法である。このうち、スケール部2は、回動軸である第1軸J1まわりに環状に並ぶ第1マークおよび第2マークを含む複数のマーク21を有する。また、第1撮像素子31aは、第1マークを撮像する素子であり、第2撮像素子31bは、第1軸J1に対して第1撮像素子31aと対称の位置に配置され、第2マークを撮像する素子である。そして、エンコーダー1は、第1撮像素子31aおよび第2撮像素子31bに対してスケール部2が回動軸まわりに相対的に回動するように構成されている。 As described above, the angle detection method according to the present embodiment is a method of detecting the rotation angle of the rotation shaft by using the encoder 1 having the scale unit 2, the first image sensor 31a, and the second image sensor 31b. Is. Of these, the scale portion 2 has a plurality of marks 21 including a first mark and a second mark arranged in an annular shape around the first axis J1 which is a rotation axis. Further, the first image sensor 31a is an element that images the first mark, and the second image sensor 31b is arranged at a position symmetrical to the first image sensor 31a with respect to the first axis J1 to form the second mark. It is an image sensor. The encoder 1 is configured such that the scale unit 2 rotates relative to the first image sensor 31a and the second image sensor 31b around the rotation axis.

このような角度検出方法は、前述したステップS101〜S118を含むステップS1と、前述したステップS201〜S205を含むステップS2と、を有する。
このうち、ステップS104、S105、S111〜S113は、スケール部2が校正角θ[i](第[i]校正角)にあるとき、第1撮像素子31aに第1マークを撮像させて撮像画像1[i](第1[i]基準画像)を生成し、テンプレート画像1[i](第1[i]テンプレート画像)および撮像画像1[i]における第1マークの基準座標1[i](第1[i]基準座標)を取得するステップである。
Such an angle detection method includes a step S1 including the above-mentioned steps S101 to S118 and a step S2 including the above-mentioned steps S201 to S205.
Of these, in steps S104, S105, and S111 to S113, when the scale unit 2 is at the calibration angle θ [i] (the [i] calibration angle), the first image sensor 31a is made to image the first mark to capture an image. 1 [i] (first [i] reference image) is generated, and the reference coordinates 1 [i] of the first mark in the template image 1 [i] (first [i] template image) and the captured image 1 [i] are generated. This is a step of acquiring (first [i] reference coordinates).

ステップS104、S105、S114〜S116は、スケール部2が校正角θ[i](第[i]校正角)にあるとき、第2撮像素子31bに第2マークを撮像させて撮像画像2[i](第2[i]基準画像)を生成し、テンプレート画像2[i](第2[i]テンプレート画像)および撮像画像2[i]における第2マークの基準座標2[i](第2[i]基準座標)を取得するステップである。 In steps S104, S105, and S114 to S116, when the scale unit 2 is at the calibration angle θ [i] (the [i] calibration angle), the second image sensor 31b is made to image the second mark, and the captured image 2 [i] is captured. ] (Second [i] reference image), and the reference coordinates 2 [i] (second) of the second mark in the template image 2 [i] (second [i] template image) and the captured image 2 [i]. [I] This is a step of acquiring the reference coordinates).

ステップS104〜S109、S118は、スケール部2の回動角度と撮像画像内の距離との相関関係として、校正角θ[i2−1]を校正角θ[i2]に変化させたとき、その変化量(校正角θ[i2]と校正角θ[i2−1]との差)と、第1マークの移動量(移動量1[i2−1])と、第2マークの移動量(移動量2[i2−1])と、の間に成り立つ相関関係を求めるステップである。 Steps S104 to S109 and S118 change the calibration angle θ [i2-1] to the calibration angle θ [i2] as a correlation between the rotation angle of the scale unit 2 and the distance in the captured image. Amount (difference between calibration angle θ [i2] and calibration angle θ [i2-1]), movement amount of the first mark (movement amount 1 [i2-1]), movement amount of the second mark (movement amount) This is a step of finding the correlation that holds between 2 [i2-1]) and.

ステップS201、S203、S205は、スケール部2が回動角度θ(計測角)にあるとき、第1撮像素子31aに第1マークを撮像させて測角画像1(第1測角画像)を生成する。そして、テンプレート画像1[i](第1[i]テンプレート画像)に基づくテンプレートマッチングにより、測角画像1における第1マークの、基準座標1[i](第1[i]基準座標)からの移動量である第1測角移動量を求めるステップである。 In steps S201, S203, and S205, when the scale unit 2 is at the rotation angle θ (measurement angle), the first image sensor 31a is made to image the first mark to generate the angle measurement image 1 (first angle measurement image). To do. Then, by template matching based on the template image 1 [i] (first [i] template image), the first mark in the angle measurement image 1 is derived from the reference coordinates 1 [i] (first [i] reference coordinates). This is a step of obtaining the first angular movement amount, which is the movement amount.

ステップS202、S204、S205は、スケール部2が回動角度θ(計測角)にあるとき、第2撮像素子31bに第2マークを撮像させて測角画像2(第2測角画像)を生成する。そして、テンプレート画像2[i](第2[i]テンプレート画像)に基づくテンプレートマッチングにより、測角画像2における第2マーク、の基準座標2[i](第2[i]基準座標)からの移動量である第2測角移動量を求めるステップである。 In steps S202, S204, and S205, when the scale unit 2 is at the rotation angle θ (measurement angle), the second image sensor 31b is made to image the second mark to generate the angle measurement image 2 (second angle measurement image). To do. Then, by template matching based on the template image 2 [i] (second [i] template image), the reference coordinates 2 [i] (second [i] reference coordinates) of the second mark in the angle measurement image 2 are obtained. This is a step of obtaining the second angular movement amount, which is the movement amount.

そして、ステップS205は、校正角θ[i](第[i]校正角)、第1測角移動量、第2測角移動量、および前述した相関関係に基づいて、回動角度θを求めるステップである。 Then, in step S205, the rotation angle θ is obtained based on the calibration angle θ [i] (the [i] calibration angle), the first angle measurement movement amount, the second angle measurement movement amount, and the above-mentioned correlation. It's a step.

このような角度検出方法では、スケール部2が互いに同じ校正角にあるときに撮像された画像に基づいて第1マークの移動量および第2マークの移動量を算出し、これらの移動量と校正角の変化との相関関係を利用して、回動角度θを求めている。また、この画像を撮像するのに用いた第1撮像素子31aおよび第2撮像素子31bは、回動軸である第1軸J1に対して互いに対称の位置に配置されている。このため、第1マークの移動量および第2マークの移動量は、並進方向が互いに逆で、かつ、並進長さが互いに等しい、という軸並進成分を含んだものとなる。したがって、これらの移動量と校正角との間の相関関係をあらかじめ導いておくことにより、回動角度θの計測時には、軸並進成分の影響を低減または除去した、精度の高い回動角度θを求めることができる。 In such an angle detection method, the movement amount of the first mark and the movement amount of the second mark are calculated based on the images captured when the scale units 2 are at the same calibration angle, and these movement amounts and calibration are performed. The rotation angle θ is obtained by using the correlation with the change in the angle. Further, the first image sensor 31a and the second image sensor 31b used for capturing this image are arranged at positions symmetrical with respect to the first axis J1 which is the rotation axis. Therefore, the movement amount of the first mark and the movement amount of the second mark include an axial translation component in which the translation directions are opposite to each other and the translation lengths are equal to each other. Therefore, by deriving the correlation between these movement amounts and the calibration angle in advance, a highly accurate rotation angle θ that reduces or eliminates the influence of the axial translation component when measuring the rotation angle θ can be obtained. Can be sought.

また、この方法では、従来のように、あらかじめ求めた偏心因子を用いて角度誤差を取り除く方法ではないため、例えば減速機112として動的な偏心が生じる減速機を使用したとしても、軸並進成分の影響を低減または除去することができ、精度の高い回動角度θを求めることができる。つまり、あらかじめ決めた偏心因子を用いて算出する方法ではないため、動的に偏心量が変化する減速機を使用した場合でも、回動角度θを精度よく求めることができる。 Further, since this method is not a method of removing the angle error by using an eccentricity factor obtained in advance as in the conventional method, for example, even if a speed reducer in which dynamic eccentricity is generated is used as the speed reducer 112, the axial translation component It is possible to reduce or eliminate the influence of the above, and it is possible to obtain a highly accurate rotation angle θ. That is, since it is not a method of calculating using a predetermined eccentricity factor, the rotation angle θ can be accurately obtained even when a speed reducer whose eccentricity amount changes dynamically is used.

さらに、この方法では、テンプレート画像1[i]の取得に際し、ユニークパターンUPよりもサイズが大きい撮像画像1[i]から、ユニークパターンUPが欠けることなく含まれる領域を切り出し位置として選択し、そこから切り出した画像をテンプレート画像1[i]として採用するという方法を用いている。これにより、ユニークパターンUPの形成精度を必要以上に高めることなく、テンプレート画像1[i]を取得することができる。このため、スケール部2の形成が容易になるとともに、形成コストの低減を図ることができる。換言すれば、形成精度が低いスケール部2を用いた場合でも、テンプレート画像1[i]の取得に際して、低い形成精度を不問にすることができる。テンプレート画像2[i]の取得に際しても、これと同様の効果が得られる。 Further, in this method, when acquiring the template image 1 [i], a region including the unique pattern UP without being missing is selected as a cutout position from the captured image 1 [i] having a size larger than that of the unique pattern UP. The method of adopting the image cut out from the above as the template image 1 [i] is used. As a result, the template image 1 [i] can be acquired without increasing the formation accuracy of the unique pattern UP more than necessary. Therefore, the scale portion 2 can be easily formed and the formation cost can be reduced. In other words, even when the scale portion 2 having a low forming accuracy is used, the low forming accuracy can be made unquestioned when the template image 1 [i] is acquired. Similar effects can be obtained when the template image 2 [i] is acquired.

また、本実施形態に係るエンコーダーユニット10は、エンコーダー1と処理部5と記憶部6とを有する。このうち、エンコーダー1は、スケール部2と第1撮像素子31aと第2撮像素子31bとを有しており、第1撮像素子31aおよび第2撮像素子31bに対してスケール部2が回動軸まわりに相対的に回動するように構成されている。スケール部2は、回動軸である第1軸J1まわりに環状に並ぶ第1マークおよび第2マークを含む複数のマーク21を有する。第1撮像素子31aは、第1マークを撮像する素子であり、第2撮像素子31bは、第1軸J1に対して第1撮像素子31aと対称の位置に配置され、第2マークを撮像する素子である。処理部5は、第1撮像素子31aの撮像結果および第2撮像素子31bの撮像結果に基づいて、エンコーダー1の回動軸の回動角度を求める処理を実行する。記憶部6は、処理部5で読み取り可能な指示を記憶する。 Further, the encoder unit 10 according to the present embodiment includes an encoder 1, a processing unit 5, and a storage unit 6. Of these, the encoder 1 has a scale unit 2, a first image sensor 31a, and a second image sensor 31b, and the scale unit 2 has a rotation axis with respect to the first image sensor 31a and the second image sensor 31b. It is configured to rotate relatively around. The scale portion 2 has a plurality of marks 21 including a first mark and a second mark arranged in an annular shape around the first axis J1 which is a rotation axis. The first image sensor 31a is an element that images the first mark, and the second image sensor 31b is arranged at a position symmetrical to the first image sensor 31a with respect to the first axis J1 to image the second mark. It is an element. The processing unit 5 executes a process of obtaining the rotation angle of the rotation axis of the encoder 1 based on the image pickup result of the first image pickup element 31a and the image pickup result of the second image pickup element 31b. The storage unit 6 stores an instruction that can be read by the processing unit 5.

このようなエンコーダーユニット10では、スケール部2が校正角θ[i](第[i]校正角)にあるとき、第1撮像素子31aに第1マークを撮像させて撮像画像1[i](第1[i]基準画像)を生成し、テンプレート画像1[i](第1[i]テンプレート画像)および撮像画像1[i]における第1マークの基準座標1[i](第1[i]基準座標)を取得する。 In such an encoder unit 10, when the scale unit 2 is at the calibration angle θ [i] (the [i] calibration angle), the first image sensor 31a is made to image the first mark, and the captured image 1 [i] ( The first [i] reference image) is generated, and the reference coordinates 1 [i] (first [i]) of the first mark in the template image 1 [i] (first [i] template image) and the captured image 1 [i] are generated. ] Reference coordinates) is acquired.

また、エンコーダーユニット10は、スケール部2が校正角θ[i](第[i]校正角)にあるとき、第2撮像素子31bに第2マークを撮像させて撮像画像2[i](第2[i]基準画像)を生成し、テンプレート画像2[i](第2[i]テンプレート画像)および撮像画像2[i]における第2マークの基準座標2[i](第2[i]基準座標)を取得する。 Further, in the encoder unit 10, when the scale unit 2 is at the calibration angle θ [i] (the [i] calibration angle), the second image sensor 31b is made to image the second mark, and the captured image 2 [i] (third). 2 [i] reference image) is generated, and the reference coordinates 2 [i] (second [i]) of the second mark in the template image 2 [i] (second [i] template image) and the captured image 2 [i] are generated. Reference coordinates) are acquired.

さらに、エンコーダーユニット10は、スケール部2の回動角度と撮像画像内の距離との相関関係として、校正角θ[i2−1]を校正角θ[i2]に変化させたとき、その変化量(校正角θ[i2]と校正角θ[i2−1]との差)と、第1マークの移動量(移動量1[i2−1])と、第2マークの移動量(移動量2[i2−1])と、の間に成り立つ相関関係を求める。 Further, the encoder unit 10 changes the calibration angle θ [i2-1] to the calibration angle θ [i2] as a correlation between the rotation angle of the scale unit 2 and the distance in the captured image. (Difference between calibration angle θ [i2] and calibration angle θ [i2-1]), movement amount of the first mark (movement amount 1 [i2-1]), and movement amount of the second mark (movement amount 2). [I2-1]) and the correlation that holds between them are obtained.

また、エンコーダーユニット10は、スケール部2が回動角度θ(計測角)にあるとき、第1撮像素子31aに第1マークを撮像させて測角画像1(第1測角画像)を生成する。そして、テンプレート画像1[i](第1[i]テンプレート画像)に基づくテンプレートマッチングにより、測角画像1における第1マークの、基準座標1[i](第1[i]基準座標)からの移動量である第1測角移動量を求める。 Further, when the scale unit 2 is at the rotation angle θ (measurement angle), the encoder unit 10 causes the first image sensor 31a to image the first mark to generate the angle measurement image 1 (first angle measurement image). .. Then, by template matching based on the template image 1 [i] (first [i] template image), the first mark in the angle measurement image 1 is derived from the reference coordinates 1 [i] (first [i] reference coordinates). The first angular movement amount, which is the movement amount, is obtained.

さらに、エンコーダーユニット10は、スケール部2が回動角度θ(計測角)にあるとき、第2撮像素子31bに第2マークを撮像させて測角画像2(第2測角画像)を生成する。そして、テンプレート画像2[i](第2[i]テンプレート画像)に基づくテンプレートマッチングにより、測角画像2における第2マーク、の基準座標2[i](第2[i]基準座標)からの移動量である第2測角移動量を求める。 Further, when the scale unit 2 is at the rotation angle θ (measurement angle), the encoder unit 10 causes the second image sensor 31b to image the second mark to generate the angle measurement image 2 (second angle measurement image). .. Then, by template matching based on the template image 2 [i] (second [i] template image), the reference coordinates 2 [i] (second [i] reference coordinates) of the second mark in the angle measurement image 2 are obtained. The second angular movement amount, which is the movement amount, is obtained.

また、エンコーダーユニット10は、校正角θ[i]、第1測角移動量、第2測角移動量、および前述した相関関係に基づいて、回動角度θを求める。 Further, the encoder unit 10 obtains the rotation angle θ based on the calibration angle θ [i], the first angle measurement movement amount, the second angle measurement movement amount, and the above-mentioned correlation.

このようなエンコーダーユニット10では、スケール部2が互いに同じ校正角にあるときに撮像された画像に基づいて第1マークの移動量および第2マークの移動量を算出し、これらの移動量と校正角の変化との相関関係を利用して、回動角度θを求めている。また、この画像を撮像するのに用いた第1撮像素子31aおよび第2撮像素子31bは、回動軸である第1軸J1に対して互いに対称の位置に配置されている。このため、第1マークの移動量および第2マークの移動量は、並進方向が互いに逆で、かつ、並進長さが互いに等しい、という軸並進成分を含んだものとなる。したがって、これらの移動量と校正角との間の相関関係をあらかじめ導いておくことにより、回動角度θの計測時には、軸並進成分の影響を低減または除去した、精度の高い回動角度θを求めることができる。 In such an encoder unit 10, the movement amount of the first mark and the movement amount of the second mark are calculated based on the images captured when the scale units 2 are at the same calibration angle, and these movement amounts and calibration are performed. The rotation angle θ is obtained by using the correlation with the change in the angle. Further, the first image sensor 31a and the second image sensor 31b used for capturing this image are arranged at positions symmetrical with respect to the first axis J1 which is the rotation axis. Therefore, the movement amount of the first mark and the movement amount of the second mark include an axial translation component in which the translation directions are opposite to each other and the translation lengths are equal to each other. Therefore, by deriving the correlation between these movement amounts and the calibration angle in advance, a highly accurate rotation angle θ that reduces or eliminates the influence of the axial translation component when measuring the rotation angle θ can be obtained. Can be sought.

また、本実施形態に係るロボット100は、第1部材である基台110と、基台110に対して回動する第2部材である第1アーム120と、エンコーダーユニット10と、を備えている。そして、スケール部2が第1アーム120に設けられ、第1撮像素子31aおよび第2撮像素子31bが基台110に設けられている。 Further, the robot 100 according to the present embodiment includes a base 110 which is a first member, a first arm 120 which is a second member which rotates with respect to the base 110, and an encoder unit 10. .. The scale unit 2 is provided on the first arm 120, and the first image sensor 31a and the second image sensor 31b are provided on the base 110.

このようなロボット100によれば、エンコーダーユニット10において検出される第1アーム120の回動角度の精度が高いため、第1アーム120を高精度に制御することができる。これにより、より正確で繊細な作業を行い得る信頼性の高いロボット100を実現することができる。 According to such a robot 100, since the accuracy of the rotation angle of the first arm 120 detected by the encoder unit 10 is high, the first arm 120 can be controlled with high accuracy. As a result, it is possible to realize a highly reliable robot 100 capable of performing more accurate and delicate work.

3.第2実施形態
次に、第2実施形態に係る角度検出方法について説明する。
3. 3. Second Embodiment Next, the angle detection method according to the second embodiment will be described.

図12は、第2実施形態に係る角度検出方法のうち、ステップS1を詳細に示すフローチャートである。図13は、図12に示す角度検出方法で取得される、校正角、テンプレート画像、基準座標、および、係数を示す一覧表である。 FIG. 12 is a flowchart showing step S1 in detail in the angle detection method according to the second embodiment. FIG. 13 is a list showing the calibration angle, the template image, the reference coordinates, and the coefficients acquired by the angle detection method shown in FIG.

以下、第2実施形態について説明するが、以下の説明では、第1実施形態との相違点を中心に説明し、同様の事項についてはその説明を省略する。また、図12および図13において、前記第1実施形態と同様の構成については、同一の符号を付している。 Hereinafter, the second embodiment will be described, but in the following description, the differences from the first embodiment will be mainly described, and the same matters will be omitted. Further, in FIGS. 12 and 13, the same reference numerals are given to the same configurations as those in the first embodiment.

第2実施形態は、校正角とマークの移動量との相関関係を示す係数が異なる以外、第1実施形態と同様である。具体的には、前述した第1実施形態では、校正角ごとに係数を算出し、回動角度θの算出に用いている。これに対し、第2実施形態では、複数の校正角で平均の係数を算出し、いずれの校正角の近傍にあっても、この平均の係数を回動角度θの算出に用いている。 The second embodiment is the same as the first embodiment except that the coefficient indicating the correlation between the calibration angle and the movement amount of the mark is different. Specifically, in the first embodiment described above, a coefficient is calculated for each calibration angle and used for calculating the rotation angle θ. On the other hand, in the second embodiment, the average coefficient is calculated at a plurality of calibration angles, and the average coefficient is used for calculating the rotation angle θ regardless of the vicinity of any calibration angle.

3.1.テンプレート画像等の取得
図12に示す位置検出方法は、図9に示すステップS109に代えて、ステップS109Aを有している。
3.1. Acquisition of template image and the like The position detection method shown in FIG. 12 includes step S109A instead of step S109 shown in FIG.

ステップS109Aでは、第1実施形態に係るステップS109と同様、まず、全てのマーク21、つまり、校正角θ[i]のi=0からi=nまでの全てについて、それぞれ、
移動量1[i]=合致座標1[i]−基準座標1[i]
移動量2[i]=合致座標2[i]−基準座標2[i]
で定義される移動量1[i]および移動量2[i]を算出する。
In step S109A, as in step S109 according to the first embodiment, first, all the marks 21, that is, all of the calibration angles θ [i] from i = 0 to i = n, are respectively.
Movement amount 1 [i] = Match coordinates 1 [i] -Reference coordinates 1 [i]
Movement amount 2 [i] = Match coordinates 2 [i] -Reference coordinates 2 [i]
The movement amount 1 [i] and the movement amount 2 [i] defined in are calculated.

そして、次の式により、これらの移動量1[i]および移動量2[i]を合算して、移動量和[i]を求める。
移動量和[i]=移動量1[i]+移動量2[i]
Then, the movement amount 1 [i] and the movement amount 2 [i] are added up to obtain the movement amount sum [i] by the following equation.
Total amount of movement [i] = amount of movement 1 [i] + amount of movement 2 [i]

ここで、本実施形態に係る位置検出方法のステップフローについて、図12を参照しつつ説明する。 Here, the step flow of the position detection method according to the present embodiment will be described with reference to FIG.

まず、ステップS103では、変数iを0とするほか、累積移動量和も0にリセットする。 First, in step S103, the variable i is set to 0, and the cumulative movement amount sum is also reset to 0.

1回目のステップS109Aでは、変数iから変数i2への更新を経ているので、校正角θ[i2−1](第1位置)と、校正角θ[i2](第2位置)と、移動量和[i2−1]と、を求める。そして、以下の式により、累積移動量和を更新する。
更新後の累積移動量和=更新前の累積移動量和+移動量和[i2−1]
In the first step S109A, since the variable i is updated to the variable i2, the calibration angle θ [i2-1] (first position), the calibration angle θ [i2] (second position), and the movement amount The sum [i2-1] is obtained. Then, the cumulative movement amount sum is updated by the following formula.
Cumulative movement sum after update = Cumulative movement sum before update + movement sum [i2-1]

ここでは、変数i2として1を設定し、更新前の累積移動量和は、それぞれ0としていることから、更新後の累積移動量和は、移動量和[0]となる。 Here, since 1 is set as the variable i2 and the cumulative movement amount sum before the update is 0, the cumulative movement amount sum after the update is the movement amount sum [0].

2回目のステップS109Aでは、変数i2から変数i3への更新を経ているので、校正角θ[i3−1](第2位置)と、校正角θ[i3](第3位置)と、移動量和[i3−1]と、を求める。そして、以下の式により、累積移動量和を更新する。
更新後の累積移動量和=更新前の累積移動量和+移動量和[i3−1]
In the second step S109A, since the variable i2 has been updated to the variable i3, the calibration angle θ [i3-1] (second position), the calibration angle θ [i3] (third position), and the amount of movement The sum [i3-1] is obtained. Then, the cumulative movement amount sum is updated by the following formula.
Cumulative movement sum after update = Cumulative movement sum before update + movement sum [i3-1]

ここでは、変数i3として2を設定していることから、更新後の累積移動量和は、移動量和[0](更新前の累積移動量和)+移動量和[1]となる。 Here, since 2 is set as the variable i3, the cumulative movement amount sum after the update is the movement amount sum [0] (cumulative movement amount sum before the update) + the movement amount sum [1].

そして、変数を更新するたびに、以上のようなステップS109Aを繰り返すことにより、累積移動量和を随時更新することができる。そして、最終的に得られる累積移動量和から後述する平均係数Aを求めることができる。 Then, each time the variable is updated, the cumulative movement amount sum can be updated at any time by repeating step S109A as described above. Then, the average coefficient A, which will be described later, can be obtained from the finally obtained cumulative movement amount sum.

具体的には、第1実施形態において、最後のステップS110の後には、ステップフローを終了させるが、本実施形態では、最後のステップS110の後に、ステップS119を追加している。 Specifically, in the first embodiment, the step flow is terminated after the final step S110, but in the present embodiment, step S119 is added after the final step S110.

ステップS119では、まず、テンプレート画像を取得するときの最初の校正角θ[0]から最後の校正角θ[m+1]までの合計変化量を、校正角θ[m+1]−校正角θ[0]により求める。そして、下記式により、平均係数Aを算出する。 In step S119, first, the total amount of change from the first calibration angle θ [0] to the last calibration angle θ [m + 1] when the template image is acquired is set to the calibration angle θ [m + 1] − calibration angle θ [0]. Obtained by. Then, the average coefficient A is calculated by the following formula.

Figure 2021089206
Figure 2021089206

上式において、mは、m≦nの任意の整数である。
このようにして求めた平均係数Aは、第1実施形態において校正角θ[i]ごとに設定されていた係数を、図13に示すように、全ての校正角θ[i]に共通して置き換えることができる。これにより、校正角θ[i]ごとに個別の係数を算出して記憶部6に記憶させておく必要がなく、1つの平均係数Aのみを記憶させておけばよいことになる。その結果、計算の省力化と、記憶部6の使用量の削減と、を図ることができる。このとき、校正用エンコーダーは不要となるため、ステップS119の後、校正用エンコーダーを取り外す(ステップS120)。
なお、前述した累積移動量を算出する際の整数mは、n未満であってもよい。
In the above equation, m is an arbitrary integer of m ≦ n.
The average coefficient A thus obtained is a coefficient set for each calibration angle θ [i] in the first embodiment, and is common to all calibration angles θ [i] as shown in FIG. Can be replaced. As a result, it is not necessary to calculate individual coefficients for each calibration angle θ [i] and store them in the storage unit 6, and it is sufficient to store only one average coefficient A. As a result, it is possible to save labor in calculation and reduce the amount of use of the storage unit 6. At this time, since the calibration encoder is unnecessary, the calibration encoder is removed after step S119 (step S120).
The integer m when calculating the cumulative movement amount described above may be less than n.

3.2.回動角度の検出
前述した第1実施形態では、校正角θ[i]に固有の係数[i]と、移動量1および移動量2と、を用いて回動角度θを算出する。一方、各係数[i]の算出には、第1撮像素子31aおよび第2撮像素子31bが撮像した基準画像や測角画像が用いられるが、これらの画像には、不可避的に発生するランダムノイズが含まれている。このため、各係数[i]には、ランダムノイズに起因する測定誤差が含まれている。
3.2. Detection of Rotation Angle In the first embodiment described above, the rotation angle θ is calculated using the coefficient [i] peculiar to the calibration angle θ [i], the movement amount 1 and the movement amount 2. On the other hand, the reference image and the angle measurement image captured by the first image sensor 31a and the second image sensor 31b are used for the calculation of each coefficient [i], and the random noise inevitably generated in these images is used. It is included. Therefore, each coefficient [i] includes a measurement error due to random noise.

一方、本実施形態では、累積の移動量から平均係数Aを求め、これを用いて回動角度θを算出する。具体的には、以下の式により、回動角度θを算出する。
回動角度θ=校正角θ[i]+(測角合致座標−基準座標[i])×平均係数A
On the other hand, in the present embodiment, the average coefficient A is obtained from the cumulative amount of movement, and the rotation angle θ is calculated using this. Specifically, the rotation angle θ is calculated by the following formula.
Rotation angle θ = Calibration angle θ [i] + (angle measurement matching coordinates-reference coordinates [i]) × average coefficient A

ここで、前述したランダムノイズは、正規分布に従うことが知られている。このため、ステップS1において累積の移動量を求めるという平均係数Aの算出過程は、正規分布に従うランダムノイズに起因した測定誤差を、その平均値であるゼロに収斂させるという効果を有する。このため、上記式により算出された回動角度θでは、ランダムノイズに起因した測定誤差の発生が抑えられている。したがって、本実施形態によれば、第1実施形態に比べて、測定誤差が少なく、より高精度な回動角度θを検出することができる。
なお、以上のような第2実施形態においても、第1実施形態と同様の効果が得られる。
Here, it is known that the above-mentioned random noise follows a normal distribution. Therefore, the process of calculating the average coefficient A, which is to obtain the cumulative movement amount in step S1, has the effect of converging the measurement error due to the random noise following the normal distribution to the average value of zero. Therefore, in the rotation angle θ calculated by the above formula, the occurrence of measurement error due to random noise is suppressed. Therefore, according to the present embodiment, the measurement error is smaller than that of the first embodiment, and the rotation angle θ can be detected with higher accuracy.
In the second embodiment as described above, the same effect as that of the first embodiment can be obtained.

4.第3実施形態
次に、第3実施形態に係る角度検出方法について説明する。
4. Third Embodiment Next, the angle detection method according to the third embodiment will be described.

図14は、第3実施形態に係る角度検出方法のうち、ステップS1を詳細に示すフローチャートである。図15は、図14に示す角度検出方法で取得される、校正角、テンプレート画像、基準座標、および、係数を示す一覧表である。 FIG. 14 is a flowchart showing step S1 in detail in the angle detection method according to the third embodiment. FIG. 15 is a list showing calibration angles, template images, reference coordinates, and coefficients acquired by the angle detection method shown in FIG.

以下、第3実施形態について説明するが、以下の説明では、第1実施形態との相違点を中心に説明し、同様の事項についてはその説明を省略する。また、図14および図15において、前記第1実施形態と同様の構成については、同一の符号を付している。 Hereinafter, the third embodiment will be described, but in the following description, the differences from the first embodiment will be mainly described, and the same matters will be omitted. Further, in FIGS. 14 and 15, the same reference numerals are given to the same configurations as those in the first embodiment.

第3実施形態は、校正角とマークの移動量との相関関係を示す係数が異なる以外、第1実施形態と同様である。具体的には、前述した第1実施形態では、移動量1[i2−1]と移動量2[i2−1]との和を含む係数[i2−1]を用いて回動角度θを算出している。これに対し、第3実施形態では、移動量1[i2−1]から第1係数を算出し、移動量2[i2−1]から第2係数を算出した後、これらを用いて演算角θ1および演算角θ2を算出し、その後、回動角度θを算出する。 The third embodiment is the same as the first embodiment except that the coefficient indicating the correlation between the calibration angle and the movement amount of the mark is different. Specifically, in the first embodiment described above, the rotation angle θ is calculated using the coefficient [i2-1] including the sum of the movement amount 1 [i2-1] and the movement amount 2 [i2-1]. doing. On the other hand, in the third embodiment, the first coefficient is calculated from the movement amount 1 [i2-1], the second coefficient is calculated from the movement amount 2 [i2-1], and then the calculation angle θ1 is used. And the calculation angle θ2 is calculated, and then the rotation angle θ is calculated.

4.1.テンプレート画像等の取得
図14に示す角度検出方法は、図9に示すステップS1のステップS109に代えて、ステップS109C、S109Dを有している。
4.1. Acquisition of template image and the like The angle detection method shown in FIG. 14 includes steps S109C and S109D instead of step S109 of step S1 shown in FIG.

ステップS109Cでは、校正角θ[i2−1](第[i2−1]校正角)、校正角θ[i2](第[i2]校正角)、および、移動量1[i2−1](第1[i2−1]基準移動量)、の間に成り立つ第1相関関係を求める。 In step S109C, the calibration angle θ [i2-1] (the [i2-1] calibration angle), the calibration angle θ [i2] (the [i2] calibration angle), and the movement amount 1 [i2-1] (the first). The first correlation that holds between 1 [i2-1] reference movement amount) is obtained.

ステップS109Dでは、校正角θ[i2−1](第i2−1校正角)、校正角θ[i2](第[i2]校正角)、および、移動量2[i2−1](第2[i2−1]基準移動量)、の間に成り立つ第2相関関係を求める。 In step S109D, the calibration angle θ [i2-1] (the second i2-1 calibration angle), the calibration angle θ [i2] (the [i2] calibration angle), and the movement amount 2 [i2-1] (the second [i2-1]). The second correlation that holds between i2-1] reference movement amount) is obtained.

上記のように、本実施形態では、後述するステップS2で回動角度θを算出する際に用いる相関関係が、校正角θ[i2]と校正角θ[i2−1]との差、および、移動量1[i2−1]、の間に成り立つ第1相関関係と、校正角θ[i2]と校正角θ[i2−1]との差、および、移動量2[i2−1]、の間に成り立つ第2相関関係と、を含む。このような第1相関関係および第2相関関係をあらかじめ求めた後、これらを回動角度θの算出に反映させる方法によっても、回動角度θを精度よく検出することができる。 As described above, in the present embodiment, the correlation used when calculating the rotation angle θ in step S2 described later is the difference between the calibration angle θ [i2] and the calibration angle θ [i2-1], and The first correlation established between the movement amount 1 [i2-1], the difference between the calibration angle θ [i2] and the calibration angle θ [i2-1], and the movement amount 2 [i2-1]. Includes a second correlation that holds between them. The rotation angle θ can also be detected accurately by a method in which such a first correlation and a second correlation are obtained in advance and then reflected in the calculation of the rotation angle θ.

また、第1相関関係の具体的な形態としては、移動量1[i2−1](第1[i2−1]基準移動量)に対する、校正角θ[i2]と校正角θ[i2−1]との差、の比として求められる係数1[i2−1](第1係数)が挙げられる。さらに、第2相関関係の具体的な形態としては、移動量2[i2−1](第2[i2−1]基準移動量)に対する、校正角θ[i2]と校正角θ[i2−1]との差、の比として求められる係数2[i2−1](第2係数)が挙げられる。このような係数をあらかじめ求めた後、これらを回動角度θの算出に反映させる方法によっても、回動角度θを精度よく求めることができる。また、あらかじめ係数を算出しておくことにより、回動角度θを算出する際の演算負荷を軽減し、高速化を図ることができる。求めた係数1[i2−1]および係数2[i2−1]は、記憶部6に記憶させる。 Further, as a specific form of the first correlation, the calibration angle θ [i2] and the calibration angle θ [i2-1] with respect to the movement amount 1 [i2-1] (the first [i2-1] reference movement amount). ] And the coefficient 1 [i2-1] (first coefficient) obtained as a ratio of the difference. Further, as a specific form of the second correlation, the calibration angle θ [i2] and the calibration angle θ [i2-1] with respect to the movement amount 2 [i2-1] (the second [i2-1] reference movement amount) ] And the coefficient 2 [i2-1] (second coefficient) obtained as a ratio of the difference. The rotation angle θ can also be obtained with high accuracy by a method in which such coefficients are obtained in advance and then reflected in the calculation of the rotation angle θ. Further, by calculating the coefficient in advance, the calculation load when calculating the rotation angle θ can be reduced and the speed can be increased. The obtained coefficient 1 [i2-1] and the coefficient 2 [i2-1] are stored in the storage unit 6.

なお、例えば、変数i2として1を設定した場合、係数1[0]および係数2[0]は、それぞれ図15に示す式で求められる。 For example, when 1 is set as the variable i2, the coefficient 1 [0] and the coefficient 2 [0] are obtained by the equations shown in FIG. 15, respectively.

4.2.回動角度の検出
本実施形態に係るステップS2は、係数1[i](第1係数)および係数2[i](第2係数)を用いて回動角度θを求めること以外、第1実施形態に係るステップS2と同様である。
4.2. Detection of Rotation Angle In step S2 according to the present embodiment, the first embodiment is performed except that the rotation angle θ is obtained by using the coefficient 1 [i] (first coefficient) and the coefficient 2 [i] (second coefficient). This is the same as step S2 according to the embodiment.

本実施形態に係るステップS205では、記憶部6から係数1[i]および係数2[i]を読み出す。そして、以下の式により、演算角θ1および演算角θ2を算出する。 In step S205 according to the present embodiment, the coefficient 1 [i] and the coefficient 2 [i] are read out from the storage unit 6. Then, the calculation angle θ1 and the calculation angle θ2 are calculated by the following equations.

演算角θ1=校正角θ[i]+移動量1×係数1[i]
演算角θ2=校正角θ[i]+移動量2×係数2[i]
Calculation angle θ1 = Calibration angle θ [i] + Movement amount 1 x Coefficient 1 [i]
Calculation angle θ2 = Calibration angle θ [i] + Movement amount 2 x Coefficient 2 [i]

求められた演算角θ1および演算角θ2は、移動量1および移動量2がそれぞれ含む軸並進成分の影響に伴う角度誤差を含んでいる。一方、移動量1および移動量2が含む軸並進成分の影響は、並進方向が互いに逆で、かつ、並進長さが互いに等しい、というものである。このため、演算角θ1および演算角θ2が含む角度誤差も、互いに逆向きで、かつ、互いに等しい大きさ、となる。 The calculated calculation angle θ1 and the calculation angle θ2 include an angle error due to the influence of the axial translation component included in the movement amount 1 and the movement amount 2, respectively. On the other hand, the influence of the axial translation components included in the movement amount 1 and the movement amount 2 is that the translation directions are opposite to each other and the translation lengths are equal to each other. Therefore, the angle errors included in the calculation angles θ1 and the calculation angles θ2 are also opposite to each other and have the same magnitude.

したがって、以下の式により、演算角θ1と演算角θ2の和を求めることにより、軸並進による誤差を打ち消すことができる。そして、和の半分を算出することにより、回動角度θが算出される。
回動角度θ=(演算角θ1+演算角θ2)÷2
Therefore, the error due to the axis translation can be canceled by obtaining the sum of the calculation angle θ1 and the calculation angle θ2 by the following equation. Then, the rotation angle θ is calculated by calculating half of the sum.
Rotation angle θ = (calculation angle θ1 + calculation angle θ2) ÷ 2

以上のようにして、回動角度θを算出することができる。
なお、このような第3実施形態においても、第1実施形態と同様の効果が得られる。
As described above, the rotation angle θ can be calculated.
In addition, even in such a third embodiment, the same effect as that of the first embodiment can be obtained.

5.第4実施形態
次に、第4実施形態に係る角度検出方法について説明する。
5. Fourth Embodiment Next, the angle detection method according to the fourth embodiment will be described.

図16は、第4実施形態に係る角度検出方法のうち、ステップS1を詳細に示すフローチャートである。図17は、図16に示す角度検出方法で取得される、校正角、テンプレート画像、基準座標、および、係数を示す一覧表である。 FIG. 16 is a flowchart showing step S1 in detail in the angle detection method according to the fourth embodiment. FIG. 17 is a list showing calibration angles, template images, reference coordinates, and coefficients acquired by the angle detection method shown in FIG.

以下、第4実施形態について説明するが、以下の説明では、第3実施形態との相違点を中心に説明し、同様の事項についてはその説明を省略する。また、図16および図17において、前記第3実施形態と同様の構成については、同一の符号を付している。 Hereinafter, the fourth embodiment will be described, but in the following description, the differences from the third embodiment will be mainly described, and the description of the same matters will be omitted. Further, in FIGS. 16 and 17, the same reference numerals are given to the same configurations as those in the third embodiment.

第4実施形態は、校正角とマークの移動量との相関関係を示す係数が異なる以外、第3実施形態と同様である。具体的には、前述した第3実施形態では、校正角ごとに係数1[i]および係数2[i]を算出し、回動角度θの算出に用いている。これに対し、第4実施形態では、複数の校正角で第1平均係数および第2平均係数を算出し、校正角によらず、回動角度θの算出に用いている。 The fourth embodiment is the same as the third embodiment except that the coefficient indicating the correlation between the calibration angle and the movement amount of the mark is different. Specifically, in the third embodiment described above, the coefficient 1 [i] and the coefficient 2 [i] are calculated for each calibration angle and used for calculating the rotation angle θ. On the other hand, in the fourth embodiment, the first average coefficient and the second average coefficient are calculated at a plurality of calibration angles and used for calculating the rotation angle θ regardless of the calibration angle.

5.1.テンプレート画像等の取得
図16に示す位置検出方法は、図9に示すステップS109に代えて、ステップS109E、S109Fを有している。
5.1. Acquisition of template image and the like The position detection method shown in FIG. 16 includes steps S109E and S109F instead of step S109 shown in FIG.

ステップS109E、S109Fでは、第1実施形態に係るステップS109と同様、まず、全てのマーク21、つまり、校正角θ[i]のi=0からi=nまでの全てについて、それぞれ、
移動量1[i]=合致座標1[i]−基準座標1[i]
移動量2[i]=合致座標2[i]−基準座標2[i]
で定義される移動量1[i]および移動量2[i]を算出する。
In steps S109E and S109F, as in step S109 according to the first embodiment, first, all the marks 21, that is, all of the calibration angles θ [i] from i = 0 to i = n, are respectively.
Movement amount 1 [i] = Match coordinates 1 [i] -Reference coordinates 1 [i]
Movement amount 2 [i] = Match coordinates 2 [i] -Reference coordinates 2 [i]
The movement amount 1 [i] and the movement amount 2 [i] defined in are calculated.

そして、次の式により、これらの移動量1[i]および移動量2[i]を合算して、累積移動量1および累積移動量2を求める。 Then, the cumulative movement amount 1 [i] and the movement amount 2 [i] are added up to obtain the cumulative movement amount 1 and the cumulative movement amount 2 by the following equation.

Figure 2021089206
Figure 2021089206

Figure 2021089206
Figure 2021089206

上式において、mは、m≦nの任意の整数である。
ここで、本実施形態に係る位置検出方法のステップフローについて、図16を参照しつつ説明する。
In the above equation, m is an arbitrary integer of m ≦ n.
Here, the step flow of the position detection method according to the present embodiment will be described with reference to FIG.

まず、ステップS103では、変数iを0とするほか、累積移動量1および累積移動量2もそれぞれ0にリセットする。 First, in step S103, in addition to setting the variable i to 0, the cumulative movement amount 1 and the cumulative movement amount 2 are also reset to 0, respectively.

1回目のステップS109E、S109Fでは、変数iから変数i2への更新を経ているので、校正角θ[i2−1](第1位置)と、校正角θ[i2](第2位置)と、移動量1[i2−1](第1[i2−1]基準移動量)と、移動量2[i2−1](第2[i2−1]基準移動量)と、を求める。そして、以下の式により、累積移動量1および累積移動量2を更新する。 In the first steps S109E and S109F, since the variable i is updated to the variable i2, the calibration angle θ [i2-1] (first position), the calibration angle θ [i2] (second position), and the calibration angle θ [i2] (second position). The movement amount 1 [i2-1] (first [i2-1] reference movement amount) and the movement amount 2 [i2-1] (second [i2-1] reference movement amount) are obtained. Then, the cumulative movement amount 1 and the cumulative movement amount 2 are updated by the following equations.

更新後の累積移動量1=更新前の累積移動量1+移動量1[i2−1]
更新後の累積移動量2=更新前の累積移動量2+移動量2[i2−1]
Cumulative movement amount 1 after update = Cumulative movement amount 1 before update + movement amount 1 [i2-1]
Cumulative movement amount 2 after update = Cumulative movement amount 2 before update + movement amount 2 [i2-1]

ここでは、変数i2として1を設定し、更新前の累積移動量1および更新前の累積移動量2は、それぞれ0としていることから、更新後の累積移動量1は、移動量1[0]であり、更新後の累積移動量2は、移動量2[0]となる。 Here, 1 is set as the variable i2, and the cumulative movement amount 1 before the update and the cumulative movement amount 2 before the update are set to 0, respectively. Therefore, the cumulative movement amount 1 after the update is the movement amount 1 [0]. The cumulative movement amount 2 after the update is the movement amount 2 [0].

2回目のステップS109E、S109Fでは、変数i2から変数i3への更新を経ているので、校正角θ[i3−1](第2位置)と、校正角θ[i3](第3位置)と、移動量1[i3−1](第1[i3−1]基準移動量)と、移動量2[i3−1](第2[i3−1]基準移動量)と、を求める。そして、以下の式により、累積移動量1および累積移動量2を更新する。 In the second steps S109E and S109F, since the variable i2 has been updated to the variable i3, the calibration angle θ [i3-1] (second position), the calibration angle θ [i3] (third position), and the calibration angle θ [i3] (third position). The movement amount 1 [i3-1] (first [i3-1] reference movement amount) and the movement amount 2 [i3-1] (second [i3-1] reference movement amount) are obtained. Then, the cumulative movement amount 1 and the cumulative movement amount 2 are updated by the following equations.

更新後の累積移動量1=更新前の累積移動量1+移動量1[i3−1]
更新後の累積移動量2=更新前の累積移動量2+移動量2[i3−1]
Cumulative movement amount 1 after update = Cumulative movement amount 1 before update + movement amount 1 [i3-1]
Cumulative movement amount 2 after update = Cumulative movement amount 2 before update + movement amount 2 [i3-1]

ここでは、変数i3として2を設定していることから、更新後の累積移動量1は、移動量1[0](更新前の累積移動量1)+移動量1[1]であり、更新後の累積移動量2は、移動量2[0](更新前の累積移動量2)+移動量2[1]となる。 Here, since 2 is set as the variable i3, the cumulative movement amount 1 after the update is the movement amount 1 [0] (cumulative movement amount 1 before the update) + the movement amount 1 [1], and is updated. The subsequent cumulative movement amount 2 becomes the movement amount 2 [0] (cumulative movement amount 2 before the update) + the movement amount 2 [1].

そして、変数を更新するたびに、以上のようなステップS109E、S109Fを繰り返すことにより、累積移動量1および累積移動量2を随時更新することができる。そして、最終的に得られる更新後の累積移動量1および更新後の累積移動量2から前述した平均係数1および平均係数2を求めることができる。 Then, by repeating the above steps S109E and S109F each time the variable is updated, the cumulative movement amount 1 and the cumulative movement amount 2 can be updated at any time. Then, the above-mentioned average coefficient 1 and average coefficient 2 can be obtained from the finally obtained cumulative movement amount 1 after renewal and cumulative movement amount 2 after renewal.

具体的には、第3実施形態において、最後のステップS110の後には、ステップフローを終了させるが、本実施形態では、最後のステップS110の後に、ステップS119Aを追加している。 Specifically, in the third embodiment, the step flow is terminated after the final step S110, but in the present embodiment, step S119A is added after the final step S110.

ステップS119Aでは、まず、テンプレート画像を取得するときの最初の校正角θ[0]から最後の校正角θ[m+1]までの合計変化量を、校正角θ[m+1]−校正角θ[0]により求める。そして、下記式により、平均係数1および平均係数2を算出する。 In step S119A, first, the total amount of change from the first calibration angle θ [0] to the last calibration angle θ [m + 1] when acquiring the template image is calculated by the calibration angle θ [m + 1] − calibration angle θ [0]. Obtained by. Then, the average coefficient 1 and the average coefficient 2 are calculated by the following formulas.

Figure 2021089206
Figure 2021089206

Figure 2021089206
Figure 2021089206

このようにして求めた平均係数1および平均係数2は、第3実施形態において校正角θ[i]ごとに設定されていた第1係数および第2係数を、図17に示すように、全ての校正角θ[i]に共通して平均係数1および平均係数2に置き換えることができる。これにより、校正角θ[i]ごとに個別の第1係数および第2係数を算出し、記憶部6に記憶させておく必要がなく、2つの平均係数1および平均係数2のみを記憶させておけばよいことになる。その結果、計算の省力化と、記憶部6の使用量の削減と、を図ることができる。このとき、校正用エンコーダーは不要となるため、ステップS119Aの後、校正用エンコーダーを取り外す(ステップS120)。 The average coefficient 1 and the average coefficient 2 obtained in this way are all the first and second coefficients set for each calibration angle θ [i] in the third embodiment, as shown in FIG. It can be replaced with the average coefficient 1 and the average coefficient 2 in common with the calibration angle θ [i]. As a result, it is not necessary to calculate the individual first coefficient and the second coefficient for each calibration angle θ [i] and store them in the storage unit 6, and only the two average coefficients 1 and 2 are stored. It will be good to do it. As a result, it is possible to save labor in calculation and reduce the amount of use of the storage unit 6. At this time, since the calibration encoder is unnecessary, the calibration encoder is removed after step S119A (step S120).

なお、整数mは、n未満であってもよい。 The integer m may be less than n.

5.2.回動角度の検出
本実施形態に係るステップS2は、平均係数1および平均係数2を用いて回動角度θを求めること以外、第3実施形態に係るステップS2と同様である。
5.2. Detection of Rotation Angle Step S2 according to the present embodiment is the same as step S2 according to the third embodiment except that the rotation angle θ is obtained by using the average coefficient 1 and the average coefficient 2.

ステップS2では、前述した平均係数1および平均係数2を用いて回動角度θを算出する。具体的には、以下の式により、まず、演算角θ1および演算角θ2を算出する。 In step S2, the rotation angle θ is calculated using the above-mentioned average coefficient 1 and average coefficient 2. Specifically, the calculation angle θ1 and the calculation angle θ2 are first calculated by the following formulas.

演算角θ1=校正角θ[i]+移動量1×平均係数1
演算角θ2=校正角θ[i]+移動量2×平均係数2
Calculation angle θ1 = Calibration angle θ [i] + Movement amount 1 x Average coefficient 1
Calculation angle θ2 = Calibration angle θ [i] + Movement amount 2 x Average coefficient 2

求められた演算角θ1および演算角θ2は、移動量1および移動量2がそれぞれ含む軸並進成分の影響に伴う角度誤差を含んでいる。一方、移動量1および移動量2が含む軸並進成分の影響は、並進方向が互いに逆で、かつ、並進長さが互いに等しい、というものである。このため、演算角θ1および演算角θ2が含む角度誤差も、互いに逆向きで、かつ、互いに等しい大きさ、となる。 The calculated calculation angle θ1 and the calculation angle θ2 include an angle error due to the influence of the axial translation component included in the movement amount 1 and the movement amount 2, respectively. On the other hand, the influence of the axial translation components included in the movement amount 1 and the movement amount 2 is that the translation directions are opposite to each other and the translation lengths are equal to each other. Therefore, the angle errors included in the calculation angles θ1 and the calculation angles θ2 are also opposite to each other and have the same magnitude.

したがって、以下の式により、演算角θ1と演算角θ2の和を求めることにより、軸並進による誤差を打ち消すことができる。そして、和の半分を算出することにより、回動角度θが算出される。
回動角度θ=(演算角θ1+演算角θ2)÷2
Therefore, the error due to the axis translation can be canceled by obtaining the sum of the calculation angle θ1 and the calculation angle θ2 by the following equation. Then, the rotation angle θ is calculated by calculating half of the sum.
Rotation angle θ = (calculation angle θ1 + calculation angle θ2) ÷ 2

以上のようにして、回動角度θを算出することができる。
そして、このような第4実施形態においても、第3実施形態と同様の効果が得られる。
As described above, the rotation angle θ can be calculated.
Then, even in such a fourth embodiment, the same effect as that of the third embodiment can be obtained.

なお、前述した第3実施形態では、校正角θ[i]に固有の係数1[i]および係数2[i]と、移動量1および移動量2と、を用いて回動角度θを算出する。一方、各係数1[i]および各係数2[i]の算出には、第1撮像素子31aおよび第2撮像素子31bが撮像した基準画像や測角画像が用いられるが、これらの画像には、不可避的に発生するランダムノイズが含まれている。このため、各係数1[i]および各係数2[i]には、ランダムノイズに起因する測定誤差が含まれている。 In the third embodiment described above, the rotation angle θ is calculated using the coefficients 1 [i] and the coefficients 2 [i] peculiar to the calibration angle θ [i], and the movement amount 1 and the movement amount 2. To do. On the other hand, the reference image and the angle measurement image captured by the first image sensor 31a and the second image sensor 31b are used for the calculation of each coefficient 1 [i] and each coefficient 2 [i]. , Contains inevitably generated random noise. Therefore, each coefficient 1 [i] and each coefficient 2 [i] include a measurement error due to random noise.

これに対し、本実施形態では、ランダムノイズに起因した測定誤差を抑えることができる。具体的には、ステップS1において累積移動量1および累積移動量2を求めるという平均係数1および平均係数2の算出過程は、正規分布に従うランダムノイズに起因した測定誤差を、その平均値であるゼロに収斂させるという効果を有する。このため、上記式により算出された回動角度θでは、ランダムノイズに起因した測定誤差の発生が抑えられている。したがって、本実施形態では、第3実施形態に比べて、測定誤差が少なく、より高精度な回動角度θを検出することができる。 On the other hand, in the present embodiment, the measurement error caused by the random noise can be suppressed. Specifically, in the calculation process of the average coefficient 1 and the average coefficient 2 of obtaining the cumulative movement amount 1 and the cumulative movement amount 2 in step S1, the measurement error due to the random noise following the normal distribution is set to zero, which is the average value. It has the effect of converging on. Therefore, in the rotation angle θ calculated by the above formula, the occurrence of measurement error due to random noise is suppressed. Therefore, in the present embodiment, the measurement error is smaller than in the third embodiment, and the rotation angle θ can be detected with higher accuracy.

以上、本発明の角度検出方法、エンコーダーユニットおよびロボットを図示の好適な実施形態に基づいて説明したが、本発明はこれに限定されるものではなく、各部の構成は、同様の機能を有する任意の構成のものに置換することができる。また、他の任意の構成物が付加されていてもよい。また、前述した2つ以上の実施形態の構成を組み合わせてもよい。 Although the angle detection method, the encoder unit, and the robot of the present invention have been described above based on the preferred embodiments shown in the drawings, the present invention is not limited thereto, and the configuration of each part is arbitrary having the same function. Can be replaced with the one of the configuration of. Moreover, other arbitrary components may be added. Further, the configurations of the two or more embodiments described above may be combined.

また、本発明のエンコーダーユニットは、アブソリュート型およびインクリメンタル型のいずれの形式にも適用可能である。 Further, the encoder unit of the present invention can be applied to both absolute type and incremental type.

さらに、前述した実施形態では、ロボットの基台を「第1部材」とし、第1アームを「第2部材」とした場合を例に説明したが、これに限定されず、相対的に回動する任意の2つの部材の一方を「第1部材」とし、他方を「第2部材」とすることができる。すなわち、エンコーダーの設置箇所は、基台と第1アームとの関節部に限定されず、相対的に回動する任意の2つのアームの関節部であってもよい。また、エンコーダーの設置箇所は、ロボットが有する関節部に限定されない。 Further, in the above-described embodiment, the case where the base of the robot is the “first member” and the first arm is the “second member” has been described as an example, but the present invention is not limited to this, and the robot rotates relatively. One of any two members can be referred to as a "first member" and the other can be referred to as a "second member". That is, the location where the encoder is installed is not limited to the joint between the base and the first arm, and may be the joint of any two arms that rotate relative to each other. Further, the installation location of the encoder is not limited to the joint portion of the robot.

また、前述した実施形態では、ロボットアームの数は1つであるが、ロボットアームの数は2つ以上でもよい。すなわち、本発明のロボットは、例えば、双腕ロボット等の複数腕ロボットであってもよい。 Further, in the above-described embodiment, the number of robot arms is one, but the number of robot arms may be two or more. That is, the robot of the present invention may be a multi-arm robot such as a dual-arm robot, for example.

さらに、前述した実施形態では、ロボットアームが有するアームの数は、6つであったが、アームの数は、これに限定されず、1つでもよいし、2つ以上5つ以下または7つ以上でもよい。 Further, in the above-described embodiment, the number of arms possessed by the robot arm is six, but the number of arms is not limited to this, and may be one, or two or more and five or less or seven. The above may be sufficient.

また、ロボットの設置箇所は、床面に限定されず、例えば、天井面や側壁面等でもよいし、AGV(Automatic Guided Vehicle)等の移動体でもよい。 Further, the installation location of the robot is not limited to the floor surface, and may be, for example, a ceiling surface, a side wall surface, or a moving body such as an AGV (Automatic Guided Vehicle).

1…エンコーダー、2…スケール部、3a…第1検出部、3b…第2検出部、4…回路部、5…処理部、6…記憶部、10…エンコーダーユニット、20…ドット、21…マーク、31a…第1撮像素子、31b…第2撮像素子、32a…第1光学系、32b…第2光学系、100…ロボット、110…基台、111…モーター、112…減速機、114…支持部材、115…軸受、120…第1アーム、121…アーム本体部、122…軸部、130…第2アーム、140…作業ヘッド、141…スプラインシャフト、150…エンドエフェクター、160…配線引き回し部、1111…回動軸、DC…周方向、DR…半径方向、J1…第1軸、J2…第2軸、J3…第3軸、RI1…撮像領域、RI2…撮像領域、S1…ステップ、S101…ステップ、S102…ステップ、S103…ステップ、S104…ステップ、S105…ステップ、S106…ステップ、S107…ステップ、S108…ステップ、S109…ステップ、S109A…ステップ、S109C…ステップ、S109D…ステップ、S109E…ステップ、S109F…ステップ、S110…ステップ、S111…ステップ、S112…ステップ、S113…ステップ、S114…ステップ、S115…ステップ、S116…ステップ、S117…ステップ、S118…ステップ、S119…ステップ、S119A…ステップ、S120…ステップ、S2…ステップ、S201…ステップ、S202…ステップ、S203…ステップ、S204…ステップ、S205…ステップ、UP…ユニークパターン 1 ... Encoder, 2 ... Scale unit, 3a ... 1st detection unit, 3b ... 2nd detection unit, 4 ... Circuit unit, 5 ... Processing unit, 6 ... Storage unit, 10 ... Encoder unit, 20 ... Dot, 21 ... Mark , 31a ... 1st imaging element, 31b ... 2nd imaging element, 32a ... 1st optical system, 32b ... 2nd optical system, 100 ... robot, 110 ... base, 111 ... motor, 112 ... reducer, 114 ... support Member, 115 ... Bearing, 120 ... First arm, 121 ... Arm body, 122 ... Shaft, 130 ... Second arm, 140 ... Work head, 141 ... Spline shaft, 150 ... End effector, 160 ... Wiring route, 1111 ... Rotation axis, DC ... Circumferential direction, DR ... Radial direction, J1 ... 1st axis, J2 ... 2nd axis, J3 ... 3rd axis, RI1 ... Imaging area, RI2 ... Imaging area, S1 ... Step, S101 ... Step, S102 ... Step, S103 ... Step, S104 ... Step, S105 ... Step, S106 ... Step, S107 ... Step, S108 ... Step, S109 ... Step, S109A ... Step, S109C ... Step, S109D ... Step, S109E ... Step, S109F ... step, S110 ... step, S111 ... step, S112 ... step, S113 ... step, S114 ... step, S115 ... step, S116 ... step, S117 ... step, S118 ... step, S119 ... step, S119A ... step, S120 ... Step, S2 ... Step, S201 ... Step, S202 ... Step, S203 ... Step, S204 ... Step, S205 ... Step, UP ... Unique pattern

Claims (7)

回動軸まわりに環状に並ぶ第1マークおよび第2マークを含む複数のマークを有するスケール部と、前記第1マークを撮像する第1撮像素子と、前記回動軸に対して前記第1撮像素子と対称の位置に配置され、前記第2マークを撮像する第2撮像素子と、を有し、前記第1撮像素子および前記第2撮像素子に対して前記スケール部が前記回動軸まわりに相対的に回動するエンコーダーを用いて、前記回動軸の回動角度を検出する角度検出方法であって、
前記スケール部が第[i]校正角にあるとき、前記第1撮像素子により前記第1マークを撮像して第1[i]基準画像を生成し、第1[i]テンプレート画像および前記第1[i]基準画像における前記第1マークの第1[i]基準座標を取得するステップと、
前記スケール部が前記第[i]校正角にあるとき、前記第2撮像素子により前記第2マークを撮像して第2[i]基準画像を生成し、第2[i]テンプレート画像および前記第2[i]基準画像における前記第2マークの第2[i]基準座標を取得するステップと、
前記第[i]校正角を変化させたとき、その変化量と、前記第1マークの移動量と、前記第2マークの移動量と、の間に成り立つ相関関係を求めるステップと、
前記スケール部が計測角にあるとき、前記第1撮像素子により前記第1マークを撮像して第1測角画像を生成し、前記第1[i]テンプレート画像に基づくテンプレートマッチングにより、前記第1測角画像における前記第1マークの前記第1[i]基準座標からの第1測角移動量を求めるステップと、
前記スケール部が前記計測角にあるとき、前記第2撮像素子により前記第2マークを撮像して第2測角画像を生成し、前記第2[i]テンプレート画像に基づくテンプレートマッチングにより、前記第2測角画像における前記第2マークの前記第2[i]基準座標からの第2測角移動量を求めるステップと、
前記第[i]校正角、前記第1測角移動量、前記第2測角移動量、および前記相関関係に基づいて、前記計測角を求めるステップと、
を有することを特徴とする角度検出方法。
A scale unit having a plurality of marks including the first mark and the second mark arranged in an annular shape around the rotation axis, a first image sensor that images the first mark, and the first image pickup with respect to the rotation axis. It has a second image sensor that is arranged at a position symmetrical to the element and images the second mark, and the scale portion is around the rotation axis with respect to the first image sensor and the second image sensor. An angle detection method for detecting the rotation angle of the rotation shaft using a relatively rotating encoder.
When the scale unit is at the first [i] calibration angle, the first mark is imaged by the first image sensor to generate a first [i] reference image, and the first [i] template image and the first [I] A step of acquiring the first [i] reference coordinates of the first mark in the reference image, and
When the scale unit is at the [i] calibration angle, the second mark is imaged by the second image sensor to generate a second [i] reference image, and the second [i] template image and the first 2 [i] A step of acquiring the second [i] reference coordinates of the second mark in the reference image, and
[I] When the calibration angle is changed, the step of obtaining the correlation established between the amount of change, the amount of movement of the first mark, and the amount of movement of the second mark.
When the scale unit is at the measurement angle, the first mark is imaged by the first image sensor to generate a first angle measurement image, and the first is performed by template matching based on the first [i] template image. The step of obtaining the first angle-measurement movement amount from the first [i] reference coordinate of the first mark in the angle-measurement image, and
When the scale unit is at the measurement angle, the second mark is imaged by the second image sensor to generate a second angle measurement image, and template matching based on the second [i] template image is performed to obtain the second mark. 2. A step of obtaining the second angle movement amount of the second mark from the second [i] reference coordinate in the angle measurement image, and
The step of obtaining the measurement angle based on the first [i] calibration angle, the first angle movement amount, the second angle measurement movement amount, and the correlation.
An angle detection method characterized by having.
前記相関関係を求めるステップは、
前記スケール部が第[i2]校正角にあるとき、前記第1撮像素子により前記第1マークを撮像して第1[i2]基準画像を生成し、第1[i2−1]テンプレート画像に基づくテンプレートマッチングにより、前記第1[i2]基準画像における前記第1マークの第1[i2−1]基準座標からの第1[i2−1]基準移動量を求めるステップと、
前記スケール部が前記第[i2]校正角にあるとき、前記第2撮像素子により前記第2マークを撮像して第2[i2]基準画像を生成し、第2[i2−1]テンプレート画像に基づくテンプレートマッチングにより、前記第2[i2]基準画像における前記第2マークの第2[i2−1]基準座標からの第2[i2−1]基準移動量を求めるステップと、
を含み、
前記相関関係は、前記第[i2]校正角と第[i2−1]校正角との差、および、前記第1[i2−1]基準移動量と前記第2[i2−1]基準移動量との和、の間に成り立つ関係である請求項1に記載の角度検出方法。
The step of finding the correlation is
When the scale unit is at the first [i2] calibration angle, the first mark is imaged by the first image sensor to generate a first [i2] reference image, which is based on the first [i2-1] template image. A step of obtaining the first [i2-1] reference movement amount from the first [i2-1] reference coordinates of the first mark in the first [i2] reference image by template matching, and
When the scale unit is at the [i2] calibration angle, the second mark is imaged by the second image sensor to generate a second [i2] reference image, which is used as a second [i2-1] template image. A step of obtaining the second [i2-1] reference movement amount from the second [i2-1] reference coordinates of the second mark in the second [i2] reference image by template matching based on the above.
Including
The correlation includes the difference between the [i2] calibration angle and the [i2-1] calibration angle, and the first [i2-1] reference movement amount and the second [i2-1] reference movement amount. The angle detection method according to claim 1, which is a relationship that holds between the sum and the sum.
前記相関関係は、前記和に対する前記差の比として求められる係数である請求項2に記載の角度検出方法。 The angle detection method according to claim 2, wherein the correlation is a coefficient obtained as a ratio of the difference to the sum. 前記相関関係を求めるステップは、
前記スケール部が第[i2]校正角にあるとき、前記第1撮像素子により前記第1マークを撮像して第1[i2]基準画像を生成し、第1[i2−1]テンプレート画像に基づくテンプレートマッチングにより、前記第1[i2]基準画像における前記第1マークの第1[i2−1]基準座標からの第1[i2−1]基準移動量を求めるステップと、
前記スケール部が前記第[i2]校正角にあるとき、前記第2撮像素子により前記第2マークを撮像して第2[i2]基準画像を生成し、第2[i2−1]テンプレート画像に基づくテンプレートマッチングにより、前記第2[i2]基準画像における前記第2マークの第2[i2−1]基準座標からの第2[i2−1]基準移動量を求めるステップと、
を含み、
前記相関関係は、
前記第[i2]校正角と第[i2−1]校正角との差、および、前記第1[i2−1]基準移動量、の間に成り立つ第1相関関係と、
前記第[i2]校正角と第[i2−1]校正角との差、および、前記第2[i2−1]基準移動量、の間に成り立つ第2相関関係と、
を含む請求項1に記載の角度検出方法。
The step of finding the correlation is
When the scale unit is at the first [i2] calibration angle, the first mark is imaged by the first image sensor to generate a first [i2] reference image, which is based on the first [i2-1] template image. A step of obtaining the first [i2-1] reference movement amount from the first [i2-1] reference coordinates of the first mark in the first [i2] reference image by template matching, and
When the scale unit is at the [i2] calibration angle, the second mark is imaged by the second image sensor to generate a second [i2] reference image, which is used as a second [i2-1] template image. A step of obtaining the second [i2-1] reference movement amount from the second [i2-1] reference coordinates of the second mark in the second [i2] reference image by template matching based on the above.
Including
The correlation is
The first correlation established between the difference between the first [i2] calibration angle and the first [i2-1] calibration angle and the first [i2-1] reference movement amount,
The second correlation established between the difference between the second [i2] calibration angle and the [i2-1] calibration angle and the second [i2-1] reference movement amount,
The angle detection method according to claim 1.
前記第1相関関係は、前記第1[i2−1]基準移動量に対する前記差の比として求められる第1係数であり、
前記第2相関関係は、前記第2[i2−1]基準移動量に対する前記差の比として求められる第2係数である請求項4に記載の角度検出方法。
The first correlation is a first coefficient obtained as a ratio of the difference to the first [i2-1] reference movement amount.
The angle detection method according to claim 4, wherein the second correlation is a second coefficient obtained as a ratio of the difference to the second [i2-1] reference movement amount.
回動軸まわりに環状に並ぶ第1マークおよび第2マークを含む複数のマークを有するスケール部と、前記第1マークを撮像する第1撮像素子と、前記回動軸に対して前記第1撮像素子と対称の位置に配置され、前記第2マークを撮像する第2撮像素子と、を有し、前記第1撮像素子および前記第2撮像素子に対して前記スケール部が前記回動軸まわりに相対的に回動するエンコーダーと、
前記第1撮像素子の撮像結果および前記第2撮像素子の撮像結果に基づいて、前記エンコーダーの前記回動軸の回動角度を求める処理を実行する処理部と、
前記処理部で読み取り可能な指示を記憶する記憶部と、
を有し、
前記処理部は、前記記憶部に記憶されている前記指示に基づき、
前記スケール部が第[i]校正角にあるとき、前記第1撮像素子に前記第1マークを撮像させて第1[i]基準画像を生成し、第1[i]テンプレート画像および前記第1[i]基準画像における前記第1マークの第1[i]基準座標を取得し、
前記スケール部が前記第[i]校正角にあるとき、前記第2撮像素子に前記第2マークを撮像させて第2[i]基準画像を生成し、第2[i]テンプレート画像および前記第2[i]基準画像における前記第2マークの第2[i]基準座標を取得し、
前記第[i]校正角を変化させたとき、その変化量と、前記第1マークの移動量と、前記第2マークの移動量と、の間に成り立つ相関関係を求め、
前記スケール部が計測角にあるとき、前記第1撮像素子に前記第1マークを撮像させて第1測角画像を生成し、前記第1[i]テンプレート画像に基づくテンプレートマッチングにより、前記第1測角画像における前記第1マークの前記第1[i]基準座標からの第1測角移動量を求め、
前記スケール部が前記計測角にあるとき、前記第2撮像素子に前記第2マークを撮像させて第2測角画像を生成し、前記第2[i]テンプレート画像に基づくテンプレートマッチングにより、前記第2測角画像における前記第2マークの前記第2[i]基準座標からの第2測角移動量を求め、
前記第[i]校正角、前記第1測角移動量、前記第2測角移動量、および前記相関関係に基づいて、前記計測角を求める処理を実行することを特徴とするエンコーダーユニット。
A scale unit having a plurality of marks including the first mark and the second mark arranged in an annular shape around the rotation axis, a first image sensor that images the first mark, and the first image pickup with respect to the rotation axis. It has a second image sensor that is arranged symmetrically with the element and images the second mark, and the scale unit is around the rotation axis with respect to the first image sensor and the second image sensor. With a relatively rotating encoder,
A processing unit that executes a process of obtaining the rotation angle of the rotation axis of the encoder based on the image pickup result of the first image pickup element and the image pickup result of the second image pickup element.
A storage unit that stores instructions that can be read by the processing unit,
Have,
The processing unit is based on the instruction stored in the storage unit.
When the scale unit is at the first [i] calibration angle, the first image sensor is made to image the first mark to generate a first [i] reference image, and the first [i] template image and the first [I] Acquire the first [i] reference coordinates of the first mark in the reference image, and obtain the first [i] reference coordinates.
When the scale unit is at the [i] calibration angle, the second image sensor is made to image the second mark to generate a second [i] reference image, and the second [i] template image and the first 2 [i] Acquire the second [i] reference coordinates of the second mark in the reference image, and obtain the second [i] reference coordinates.
When the first [i] calibration angle is changed, the correlation established between the amount of change, the amount of movement of the first mark, and the amount of movement of the second mark is obtained.
When the scale unit is at the measurement angle, the first image sensor is made to image the first mark to generate a first angle measurement image, and the first is performed by template matching based on the first [i] template image. The amount of movement of the first angle measurement from the first [i] reference coordinate of the first mark in the angle measurement image is obtained.
When the scale unit is at the measurement angle, the second image sensor is made to image the second mark to generate a second angle measurement image, and template matching based on the second [i] template image is performed to obtain the second mark. The second angle movement amount of the second mark from the second [i] reference coordinate in the two angle measurement image is obtained.
[I] An encoder unit characterized by executing a process of obtaining the measurement angle based on the calibration angle, the first angle measurement movement amount, the second angle measurement movement amount, and the correlation.
第1部材と、
前記第1部材に対して回動する第2部材と、
請求項6に記載のエンコーダーユニットと、
を備え、
前記スケール部が前記第2部材に設けられ、前記第1撮像素子および前記第2撮像素子が前記第1部材に設けられていることを特徴とするロボット。
The first member and
A second member that rotates with respect to the first member,
The encoder unit according to claim 6 and
With
A robot characterized in that the scale portion is provided on the second member, and the first image pickup element and the second image pickup element are provided on the first member.
JP2019219697A 2019-12-04 2019-12-04 Angle detection method, encoder unit, and robot Pending JP2021089206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019219697A JP2021089206A (en) 2019-12-04 2019-12-04 Angle detection method, encoder unit, and robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019219697A JP2021089206A (en) 2019-12-04 2019-12-04 Angle detection method, encoder unit, and robot

Publications (1)

Publication Number Publication Date
JP2021089206A true JP2021089206A (en) 2021-06-10

Family

ID=76220074

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019219697A Pending JP2021089206A (en) 2019-12-04 2019-12-04 Angle detection method, encoder unit, and robot

Country Status (1)

Country Link
JP (1) JP2021089206A (en)

Similar Documents

Publication Publication Date Title
US10775204B2 (en) Encoder unit, angle measuring method, and robot
CN103453848B (en) Device and method for measuring shape, position and dimension features of machine elements
CN1067932C (en) Device and method for calibrating robot
KR101234798B1 (en) Method and apparatus for measuring position of the mobile robot
JP6180087B2 (en) Information processing apparatus and information processing method
US9886029B2 (en) Workpiece processing apparatus and workpiece transfer system
CN102782721B (en) System and method for runtime determination of camera calibration errors
CN100335860C (en) Workpiece inspection method
JP6809245B2 (en) robot
US20070051884A1 (en) Positional sensing system and method
JP5176975B2 (en) Stator coil shape inspection method and shape inspection jig
KR20020049039A (en) Alignment apparatus
CN107121060B (en) Inner wall measuring instrument and offset calculating method
JP3754402B2 (en) Industrial robot control method and control apparatus
JP2002168617A (en) Device and system for measuring tubular object such as tunnel
US20150109626A1 (en) Tire Digitizer
JP2009220247A (en) Robot apparatus and control method of robot apparatus
JP2003035517A (en) Lead pin pitch/levelness testing device using two- dimensional laser displacement sensor
JP2021089206A (en) Angle detection method, encoder unit, and robot
JP2009008483A (en) Measuring method of surface to be measured
JP4284765B2 (en) Robot hand position measuring device
JP2021089224A (en) Position detection method, encoder unit, and robot
JP5173629B2 (en) Shape measuring device
JP2008294065A (en) Mounting method and mounting device for electronic component
JP5516974B2 (en) Vision sensor mounting apparatus and method