JP7384653B2 - Control device for robot equipment that controls the position of the robot - Google Patents

Control device for robot equipment that controls the position of the robot Download PDF

Info

Publication number
JP7384653B2
JP7384653B2 JP2019219104A JP2019219104A JP7384653B2 JP 7384653 B2 JP7384653 B2 JP 7384653B2 JP 2019219104 A JP2019219104 A JP 2019219104A JP 2019219104 A JP2019219104 A JP 2019219104A JP 7384653 B2 JP7384653 B2 JP 7384653B2
Authority
JP
Japan
Prior art keywords
robot
amount
workpiece
image
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019219104A
Other languages
Japanese (ja)
Other versions
JP2021024075A (en
Inventor
健太郎 古賀
航 宮▲崎▼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to US16/923,485 priority Critical patent/US11679508B2/en
Priority to DE102020119704.7A priority patent/DE102020119704A1/en
Priority to CN202010745050.8A priority patent/CN112297004A/en
Publication of JP2021024075A publication Critical patent/JP2021024075A/en
Priority to US18/138,927 priority patent/US20230256615A1/en
Application granted granted Critical
Publication of JP7384653B2 publication Critical patent/JP7384653B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Manipulator (AREA)

Description

本発明は、ロボットの位置を制御するロボット装置の制御装置に関する。 The present invention relates to a control device for a robot device that controls the position of a robot.

ロボットを備えるロボット装置では、作業に応じた作業ツールをロボットに取り付けることにより所望の作業を行うことができる。例えば、作業ツールとしてワークを把持するハンドをロボットに取り付けることにより、ロボット装置は、ワークを所望の位置まで搬送することができる。 2. Description of the Related Art In a robot device equipped with a robot, a desired work can be performed by attaching a work tool corresponding to the work to the robot. For example, by attaching a hand that grips a work as a work tool to a robot, the robot device can transport the work to a desired position.

ロボット装置にてワークを搬送するときに、ワークの位置および姿勢を制御することによりロボット装置が把持しているワークを他のワークに取り付けたり、他のワークの内部に配置したりすることができる。このような作業を行う場合には、他のワークに対してロボット装置が把持しているワークの厳密な位置合わせを行うことが好ましい。例えば、1つのワークを他のワークに嵌合する作業を行う場合に、1つのワークの位置および姿勢が他のワークの位置および姿勢からずれると作業が失敗する場合がある。 When a workpiece is transported by a robot device, by controlling the position and posture of the workpiece, the workpiece held by the robot device can be attached to or placed inside another workpiece. . When performing such work, it is preferable to precisely align the workpiece held by the robot device with respect to other workpieces. For example, when performing work to fit one workpiece to another workpiece, the work may fail if the position and orientation of one workpiece deviates from the position and orientation of the other workpiece.

従来の技術においては、1つのワークを他のワークに取り付ける作業を行う場合に、カメラにて撮像した画像を用いてロボットの位置の制御を行うことが知られている。例えば、1つのワークまたは他のワークのゴール画像を予め準備しておくことができる。ロボット装置にてワークを搬送する時にカメラにてワークを撮像する。そして、ワークの画像をゴール画像と比較することにより、ロボットの位置を調整する制御が知られている(例えば、特開2013-180380号公報、および特開2015-214022号公報を参照)。 2. Description of the Related Art In conventional technology, it is known to control the position of a robot using an image captured by a camera when attaching one workpiece to another workpiece. For example, a goal image of one work or another work can be prepared in advance. A camera takes an image of the workpiece when the robot device transports the workpiece. Control that adjusts the position of a robot by comparing an image of a workpiece with a goal image is known (see, for example, Japanese Patent Laid-Open Nos. 2013-180380 and 2015-214022).

また、ロボット座標系に対して視覚センサ座標系を予め較正して、視覚センサ座標系におけるワークの位置に基づいてワークの3次元の位置を算出する制御が知られている。または、画像における特徴部位の位置および大きさに関するヤコビアン行列を予め生成することができる。カメラにて撮像した画像における特徴部位の位置、目標データにおける特徴部位の位置、およびヤコビアン行列に基づいてロボットの位置を修正する制御が知られている(例えば、特開2017-170599号公報を参照)。 Furthermore, control is known in which the visual sensor coordinate system is calibrated in advance with respect to the robot coordinate system, and the three-dimensional position of the workpiece is calculated based on the position of the workpiece in the visual sensor coordinate system. Alternatively, a Jacobian matrix regarding the position and size of a feature part in an image can be generated in advance. Control that corrects the position of a robot based on the position of a characteristic part in an image captured by a camera, the position of a characteristic part in target data, and a Jacobian matrix is known (for example, see Japanese Patent Application Laid-Open No. 2017-170599). ).

特開2013-180380号公報Japanese Patent Application Publication No. 2013-180380 特開2015-214022号公報Japanese Patent Application Publication No. 2015-214022 特開2017-170599号公報JP 2017-170599 Publication

ロボットの位置を調整するためにヤコビアン行列を用いる方法では、画像の特徴部位における特徴量の差にヤコビアン行列を乗じることにより、ロボットの移動量を算出することができる。しかしながら、ヤコビアン行列を算出するときの測定誤差などにより、ヤコビアン行列が精度良く算出できない場合がある。また、ヤコビアン行列は、ロボットの位置を微小量にて移動したときの視覚センサ座標系での位置のずれに基づいて算出される。このために、特徴部位の近傍ではロボットを精度よく駆動できるが、特徴部位から離れると精度が低下する。例えば、ロボットを大きな移動量にて移動させると精度が悪いという問題がある。この結果、ロボットの位置を精度よく制御することができない場合がある。 In a method that uses a Jacobian matrix to adjust the position of the robot, the amount of movement of the robot can be calculated by multiplying the difference in feature amounts between feature parts of images by the Jacobian matrix. However, due to measurement errors when calculating the Jacobian matrix, the Jacobian matrix may not be calculated with high accuracy. Furthermore, the Jacobian matrix is calculated based on the positional shift in the visual sensor coordinate system when the robot's position is moved by a minute amount. For this reason, the robot can be driven with high accuracy near the characteristic part, but the accuracy decreases when moving away from the characteristic part. For example, there is a problem that accuracy is poor when a robot is moved by a large amount of movement. As a result, the position of the robot may not be controlled accurately.

視覚センサ座標系を較正する方法では、2次元カメラの画像に基づいて、特徴部位の3次元の位置を検出することができる。しかしながら、この方法では、ロボット座標系に対して、視覚センサ座標系の位置の較正を予め行う必要が有る。 In the method of calibrating the visual sensor coordinate system, the three-dimensional position of a feature can be detected based on a two-dimensional camera image. However, with this method, it is necessary to calibrate the position of the visual sensor coordinate system in advance with respect to the robot coordinate system.

本開示の一態様は、視覚センサにて撮像された第1の部材および第2の部材の画像に基づいて、第1の部材の位置を検出するための第1の特徴部位の位置に関する第1の特徴量と、第2の部材の位置を検出するための第2の特徴部位の位置に関する第2の特徴量とを検出する特徴量検出部と、第1の特徴量と第2の特徴量とに基づいて相対位置量を算出する算出部と、第1の部材に対して第2の部材が目標の位置に配置されているときの第1の特徴部位および第2の特徴部位の画像を含む基準画像における相対位置量を取得し、前記視覚センサにて撮像した画像における相対位置量と基準画像における相対位置量とに基づいて、第1の部材に対して第2の部材が目標の位置に配置されるようにロボットを動作させる移動指令を生成する指令生成部と、を備える制御装置である。 One aspect of the present disclosure provides a first method for detecting the position of a first characteristic region based on images of the first member and the second member captured by a visual sensor. a feature amount detection unit that detects a feature amount and a second feature amount related to the position of a second feature part for detecting the position of the second member; and a first feature amount and a second feature amount. a calculation unit that calculates a relative position amount based on the image of the first characteristic part and the second characteristic part when the second member is arranged at the target position with respect to the first member; The target position of the second member relative to the first member is obtained based on the relative position amount in the image captured by the visual sensor and the relative position amount in the reference image. This control device includes a command generation unit that generates a movement command to operate the robot so that the robot is placed in the robot.

本開示によれば、簡易な方法にてロボットの位置を精度よく制御するロボット装置の制御装置を提供することができる。 According to the present disclosure, it is possible to provide a control device for a robot device that accurately controls the position of a robot using a simple method.

実施の形態における第1のロボット装置の概略図である。FIG. 2 is a schematic diagram of a first robot device in an embodiment. 第1のロボット装置における第1のワーク、第2のワーク、およびハンドの拡大斜視図である。FIG. 2 is an enlarged perspective view of a first work, a second work, and a hand in the first robot device. 実施の形態における第1のロボット装置のブロック図である。FIG. 2 is a block diagram of a first robot device in an embodiment. 実施の形態における第1のロボット装置の第1の制御の第1のフローチャートである。It is a 1st flowchart of the 1st control of the 1st robot apparatus in embodiment. 実施の形態における第1のロボット装置の基準画像である。It is a reference image of the first robot device in the embodiment. 実施の形態における第1のロボット装置の第1の制御の第2のフローチャートである。It is a 2nd flowchart of the 1st control of the 1st robot apparatus in embodiment. 第1のワークに対して第2のワークの位置がずれているときの画像である。This is an image when the second workpiece is misaligned with respect to the first workpiece. 第1のワークに対して第2のワークの位置がずれているときの他の画像である。This is another image when the position of the second workpiece is shifted from the first workpiece. 実施の形態の第2のロボット装置における第1のワーク、第2のワーク、およびハンドの拡大斜視図である。FIG. 6 is an enlarged perspective view of a first work, a second work, and a hand in the second robot device of the embodiment. 第2のロボット装置において、第1のワークに対する第2のワークの姿勢がずれた時の第1のワーク、第2のワーク、およびハンドの拡大斜視図である。FIG. 7 is an enlarged perspective view of the first work, the second work, and the hand when the posture of the second work is shifted relative to the first work in the second robot device. 第1のワークに対して第2のワークの姿勢がずれた時に第1のカメラにて撮像した画像である。This is an image captured by the first camera when the posture of the second workpiece is shifted relative to the first workpiece. 第1のワークに対して第2のワークの姿勢が合っている時に第2のカメラにて撮像した画像である。This is an image captured by the second camera when the posture of the second workpiece matches that of the first workpiece. 第1のワークに対して第2のワークの姿勢がずれた時に第2のカメラにて撮像した画像である。This is an image captured by the second camera when the posture of the second workpiece is shifted relative to the first workpiece. 第2のロボット装置における第3の制御のフローチャートである。It is a flowchart of the 3rd control in a 2nd robot apparatus. 実施の形態の第3のロボット装置における第1のワーク、第2のワーク、およびハンドの拡大斜視図である。FIG. 7 is an enlarged perspective view of a first work, a second work, and a hand in the third robot device according to the embodiment. 実施の形態の第4のロボット装置における第1のワーク、第2のワーク、およびハンドの拡大斜視図である。FIG. 6 is an enlarged perspective view of a first work, a second work, and a hand in the fourth robot device according to the embodiment. 実施の形態における第5のロボット装置の概略図である。It is a schematic diagram of the 5th robot device in an embodiment. ケースに対してワークの位置が合っている時のケース、ワーク、およびハンドの拡大概略図である。FIG. 2 is an enlarged schematic diagram of the case, workpiece, and hand when the workpiece is aligned with the case. ケースに対してワークの位置がずれている時のケース、ワーク、およびハンドの拡大概略図である。FIG. 2 is an enlarged schematic diagram of the case, workpiece, and hand when the workpiece is misaligned with respect to the case. ケースに対してワークの位置がずれている時の画像である。This is an image when the workpiece is misaligned with respect to the case.

図1から図20を参照して、実施の形態におけるロボット装置の制御装置について説明する。本実施の形態では、製品を組み立てる作業を行うロボット装置およびケースの内部にワークを配置するロボット装置を例に取り上げて説明する。 A control device for a robot device according to an embodiment will be described with reference to FIGS. 1 to 20. In this embodiment, a robot device that assembles a product and a robot device that places a workpiece inside a case will be described as examples.

図1は、本実施の形態における第1のロボット装置の概略図である。第1のロボット装置5は、作業ツール(エンドエフェクタ)としてのハンド2と、ハンド2を移動するロボット1とを備える。第1のロボット装置5は、第1の部材としての第1のワーク81に第2の部材としての第2のワーク91を取り付ける作業を行う。 FIG. 1 is a schematic diagram of a first robot device in this embodiment. The first robot device 5 includes a hand 2 as a working tool (end effector) and a robot 1 that moves the hand 2. The first robot device 5 performs a work of attaching a second workpiece 91 as a second member to a first workpiece 81 as a first member.

ロボット1は、複数の関節部を含む多関節ロボットである。ロボット1は、ベース部14と、ベース部14に支持された旋回ベース13とを含む。ベース部14は、設置面に固定されている。旋回ベース13は、ベース部14に対して回転するように形成されている。ロボット1は、上部アーム11および下部アーム12を含む。下部アーム12は、関節部を介して旋回ベース13に回動可能に支持されている。上部アーム11は、関節部を介して回動可能に下部アーム12に支持されている。また、上部アーム11は、上部アーム11の延びる方向に平行な回転軸の周りに回転する。 The robot 1 is an articulated robot including multiple joints. The robot 1 includes a base part 14 and a swing base 13 supported by the base part 14. The base portion 14 is fixed to the installation surface. The pivot base 13 is formed to rotate with respect to the base portion 14. Robot 1 includes an upper arm 11 and a lower arm 12. The lower arm 12 is rotatably supported by a swing base 13 via a joint. The upper arm 11 is rotatably supported by the lower arm 12 via a joint. Further, the upper arm 11 rotates around a rotation axis parallel to the direction in which the upper arm 11 extends.

ロボット1は、上部アーム11の端部に連結されているリスト15を含む。リスト15は、関節部を介して回動可能に上部アーム11に支持されている。リスト15は、回転可能に形成されているフランジ16を含む。ハンド2は、フランジ16に固定されている。本実施の形態のロボット1は、6個の駆動軸を有するが、この形態に限られない。作業ツールを移動することができる任意のロボットを採用することができる。 The robot 1 includes a wrist 15 connected to the end of the upper arm 11. The wrist 15 is rotatably supported by the upper arm 11 via a joint. The wrist 15 includes a flange 16 which is configured to be rotatable. Hand 2 is fixed to flange 16. Although the robot 1 of this embodiment has six drive axes, the invention is not limited to this configuration. Any robot capable of moving work tools can be employed.

ハンド2は、ワーク91を把持したり解放したりする作業ツールである。ハンド2は、複数の爪部3を有する。ハンド2は爪部3が開いたり閉じたりするように形成されている。爪部3がワーク91を挟むことによりワーク91を把持する。第1のロボット装置5のハンド2は、爪部3を有するが、この形態に限られない。ハンドは、ワークを把持できるように形成されている任意の構成を採用することができる。例えば、吸着または磁力によりワークを把持するハンドが採用されても構わない。 The hand 2 is a work tool that grips and releases the workpiece 91. The hand 2 has a plurality of claw parts 3. The hand 2 is formed so that a claw portion 3 can be opened or closed. The claw portions 3 grip the work 91 by pinching the work 91. The hand 2 of the first robot device 5 has a claw portion 3, but is not limited to this form. The hand can adopt any configuration that is configured to be able to grip a workpiece. For example, a hand that grips the workpiece by attraction or magnetic force may be used.

本実施の形態におけるロボット装置5は、ロボット1に対して第1のワーク81を搬送する搬送機としてのコンベヤ75を含む。搬送機は、ロボット1の周りに配置される。コンベヤ75は、ワーク81を予め定められた位置まで搬送するように形成されている。コンベヤ75は、予め定められた移動速度にてワーク81を搬送するように形成されている。 Robot device 5 in this embodiment includes a conveyor 75 as a conveyor that conveys first work 81 to robot 1 . The transport machine is arranged around the robot 1. The conveyor 75 is formed to convey the work 81 to a predetermined position. The conveyor 75 is formed to convey the workpiece 81 at a predetermined moving speed.

本実施の形態の第1のロボット装置5では、コンベヤ75がワーク81の搬送を継続しながらロボット1がワーク91をワーク81に取り付ける。すなわち、ワーク91が取り付けられる作業を行う期間中に、ワーク81はコンベヤ75により移動している。ロボット1は、ワーク81を追従するように位置および姿勢を変化させながらワーク91をワーク81に取り付ける。 In the first robot device 5 of this embodiment, the robot 1 attaches the work 91 to the work 81 while the conveyor 75 continues to convey the work 81. That is, during the period when the work 91 is being attached, the work 81 is being moved by the conveyor 75. The robot 1 attaches the work 91 to the work 81 while changing its position and posture so as to follow the work 81.

図2に、第1のロボット装置における第1のワーク、第2のワーク、およびハンドの拡大斜視図を示す。図1および図2を参照して、第2のワーク91は、本体部の表面から突出する把持部94を有する。爪部3が把持部94を掴むことにより、第2のワーク91はハンド2に把持される。 FIG. 2 shows an enlarged perspective view of the first work, the second work, and the hand in the first robot device. Referring to FIGS. 1 and 2, the second workpiece 91 has a grip portion 94 protruding from the surface of the main body. The second workpiece 91 is gripped by the hand 2 by the claw portion 3 gripping the gripping portion 94 .

第1のワーク81は、本体部の表面から突出する突出部82,83を有する。突出部82および突出部83は違いに離れて配置されている。また、ワーク81は、突出部82および突出部83が鉛直方向に並ぶように、コンベヤ75に支持されている。それぞれの突出部82,83の上面には、穴部82a,83aが形成されている。第2のワーク91は、本体部の表面から突出する突出部92,93を有する。それぞれの突出部92,93には、ピン92a,93aが固定されている。ピン92aおよびピン93aは、互いに直線状に並ぶように配置されている。第1のロボット装置5が実施する第1の制御では、ピン92aを穴部82aに挿入すると共に、ピン93aを穴部83aに挿入する作業を実施する。 The first work 81 has protrusions 82 and 83 that protrude from the surface of the main body. The protrusion 82 and the protrusion 83 are arranged apart from each other. Further, the workpiece 81 is supported by the conveyor 75 so that the protrusion 82 and the protrusion 83 are aligned in the vertical direction. Holes 82a and 83a are formed in the upper surfaces of the respective protrusions 82 and 83. The second workpiece 91 has protrusions 92 and 93 that protrude from the surface of the main body. Pins 92a and 93a are fixed to the respective protrusions 92 and 93. The pins 92a and 93a are arranged linearly with each other. In the first control performed by the first robot device 5, the pin 92a is inserted into the hole 82a, and the pin 93a is inserted into the hole 83a.

本実施の形態の第1の制御では、穴部82a,83aに対してピン92a,93aの位置を合わせる制御を行う。第1の制御を実施する前には、ワーク81に対するワーク91の姿勢は調整されている。すなわち、ワーク91のピン92aおよびピン93aが、鉛直方向に延びる直線上に配置されるように、ロボット1の姿勢が調整されている。このために、第1の制御では、穴部82aの真上にピン92aを配置する制御を実施することにより、穴部82a,83aに対するピン92a,93aの位置を合わせることができる。本実施の形態の第1の制御を実施した後には、矢印103に示す鉛直方向の下側にワーク91を移動することにより、ピン92a,93aが穴部82a,83aに挿入されて、ワーク91がワーク81に取り付けられる。 In the first control of this embodiment, control is performed to align the positions of the pins 92a, 93a with respect to the holes 82a, 83a. Before performing the first control, the attitude of the work 91 with respect to the work 81 has been adjusted. That is, the posture of the robot 1 is adjusted so that the pins 92a and 93a of the workpiece 91 are arranged on a straight line extending in the vertical direction. For this reason, in the first control, the pins 92a and 93a can be aligned with respect to the holes 82a and 83a by performing control to arrange the pin 92a directly above the hole 82a. After carrying out the first control of this embodiment, by moving the workpiece 91 downward in the vertical direction shown by the arrow 103, the pins 92a and 93a are inserted into the holes 82a and 83a, and the workpiece 91 is moved downward in the vertical direction shown by the arrow 103. is attached to the workpiece 81.

ロボット装置5は、第1のワーク81および第2のワーク91の画像を撮像する視覚センサとしてのカメラ25を備える。本実施の形態におけるカメラ25は、2次元カメラである。カメラ25は、支持部材17を介してハンド2に支持されている。ロボット装置5におけるカメラ25は、ハンド2と共に位置および姿勢が変化する。 The robot device 5 includes a camera 25 as a visual sensor that captures images of the first work 81 and the second work 91. Camera 25 in this embodiment is a two-dimensional camera. The camera 25 is supported by the hand 2 via the support member 17. The position and posture of the camera 25 in the robot device 5 change together with the hand 2.

カメラ25は、第2のワーク91が第1のワーク81に接近した時の画像を撮像する。カメラ25は、第2のワーク91が第1のワーク81に嵌合する部分の近傍を撮像するように配置されている。また、カメラ25は、第1のワーク81の位置を検出するための第1の特徴部位および第2のワーク91の位置を検出するための第2の特徴部位を撮像することができる様に配置されている。ロボット装置5において、カメラ25は、ワーク81およびワーク91の上方からワーク81,91を撮像するように配置されている。 The camera 25 captures an image when the second work 91 approaches the first work 81. The camera 25 is arranged to image the vicinity of the portion where the second work 91 fits into the first work 81. Further, the camera 25 is arranged so as to be able to image a first characteristic part for detecting the position of the first workpiece 81 and a second characteristic part for detecting the position of the second workpiece 91. has been done. In the robot device 5, the camera 25 is arranged to take images of the works 81 and 91 from above.

ロボット装置5には、基準座標系51が設定されている。図1に示す例では、ロボット1のベース部14に、基準座標系51の原点が配置されている。基準座標系51はワールド座標系とも称される。基準座標系51は、原点の位置が固定され、更に、座標軸の向きが固定されている座標系である。ロボット1の位置および姿勢が変化しても基準座標系51の位置および向きは変化しない。基準座標系51は、座標軸として、互いに直交するX軸、Y軸、およびZ軸を有する。また、X軸の周りの座標軸としてW軸が設定される。Y軸の周りの座標軸としてP軸が設定される。Z軸の周りの座標軸としてR軸が設定される。 A reference coordinate system 51 is set in the robot device 5. In the example shown in FIG. 1, the origin of the reference coordinate system 51 is located at the base portion 14 of the robot 1. The reference coordinate system 51 is also called a world coordinate system. The reference coordinate system 51 is a coordinate system in which the position of the origin is fixed and the direction of the coordinate axes is also fixed. Even if the position and orientation of the robot 1 change, the position and orientation of the reference coordinate system 51 do not change. The reference coordinate system 51 has an X-axis, a Y-axis, and a Z-axis that are orthogonal to each other as coordinate axes. Further, the W axis is set as a coordinate axis around the X axis. The P axis is set as a coordinate axis around the Y axis. The R axis is set as a coordinate axis around the Z axis.

ロボット1の位置および姿勢は、基準座標系51にて表すことができる。例えば、ロボット1の位置は、ハンド2の先端に配置された工具先端点の位置にて表すことができる。また、工具先端点にハンド2と共に移動するツール座標系を設定することができる。ロボット1の姿勢は、基準座標系51に対するツール座標系の向きにて表すことができる。 The position and orientation of the robot 1 can be expressed using a reference coordinate system 51. For example, the position of the robot 1 can be expressed by the position of a tool tip point placed at the tip of the hand 2. Further, a tool coordinate system that moves together with the hand 2 can be set at the tool tip point. The posture of the robot 1 can be expressed by the orientation of the tool coordinate system with respect to the reference coordinate system 51.

図3に、本実施の形態におけるロボット装置のブロック図を示す。図1から図3を参照して、ロボット1は、ロボット1の位置および姿勢を変化させるロボット駆動装置を含む。ロボット駆動装置は、アームおよびリスト等の構成部材を駆動するロボット駆動モーター22を含む。ロボット駆動モーター22が駆動することにより、それぞれの構成部材の向きが変化する。 FIG. 3 shows a block diagram of the robot device in this embodiment. Referring to FIGS. 1 to 3, robot 1 includes a robot drive device that changes the position and posture of robot 1. FIG. The robot drive device includes a robot drive motor 22 that drives components such as an arm and a wrist. By driving the robot drive motor 22, the orientation of each component changes.

ハンド2は、ハンド2を駆動するハンド駆動装置を備える。ハンド駆動装置は、ハンド2の爪部3を駆動するハンド駆動モーター21を含む。ハンド駆動モーター21が駆動することによりハンド2の爪部3が開いたり閉じたりする。なお、爪部は、空気圧により作動するように形成されていても構わない。この場合には、ハンド駆動装置は、空気ポンプおよびシリンダなどの空気圧にて爪部を駆動する装置を含むことができる。 The hand 2 includes a hand drive device that drives the hand 2. The hand drive device includes a hand drive motor 21 that drives the claw portion 3 of the hand 2. The claw portion 3 of the hand 2 is opened and closed by driving the hand drive motor 21. Note that the claw portion may be formed to be operated by air pressure. In this case, the hand drive device may include a device that drives the pawl using pneumatic pressure, such as an air pump and a cylinder.

ロボット装置5の制御装置は、ロボット1およびハンド2を制御するロボット制御装置4を含む。ロボット制御装置4は、プロセッサとしてのCPU(Central Processing Unit)を有する演算処理装置(コンピュータ)を含む。演算処理装置は、CPUにバスを介して接続されたRAM(Random Access Memory)およびROM(Read Only Memory)等を有する。ロボット制御装置4には、ロボット1、ハンド2、およびコンベヤ75の制御を行うために予め作成された動作プログラム41が入力される。ロボット1およびハンド2は、動作プログラム41に基づいてワーク91を搬送する。コンベヤ75は、動作プログラム41に基づいてワーク81を搬送する。 The control device of the robot device 5 includes a robot control device 4 that controls the robot 1 and the hand 2 . The robot control device 4 includes an arithmetic processing device (computer) having a CPU (Central Processing Unit) as a processor. The arithmetic processing device includes a RAM (Random Access Memory), a ROM (Read Only Memory), etc. connected to the CPU via a bus. An operation program 41 created in advance for controlling the robot 1, hand 2, and conveyor 75 is input to the robot control device 4. The robot 1 and the hand 2 transport the workpiece 91 based on the operation program 41. The conveyor 75 conveys the work 81 based on the operation program 41.

ロボット制御装置4の演算処理装置は、予め定められた情報を記憶する記憶部42を含む。記憶部42は、ロボット1、ハンド2、およびコンベヤ75の制御に関する情報を記憶する。記憶部42は、揮発性メモリ、不揮発性メモリ、またはハードディスク等の情報を記憶可能な記憶媒体にて構成されることができる。動作プログラム41は、記憶部42に記憶される。ロボット制御装置4は、ロボット装置5に関する任意の情報を表示する表示器46を含む。表示器46は、例えば、液晶表示パネルを含む。 The arithmetic processing unit of the robot control device 4 includes a storage unit 42 that stores predetermined information. The storage unit 42 stores information regarding control of the robot 1, hand 2, and conveyor 75. The storage unit 42 can be configured with a storage medium capable of storing information, such as a volatile memory, a nonvolatile memory, or a hard disk. The operation program 41 is stored in the storage section 42. The robot control device 4 includes a display 46 that displays arbitrary information regarding the robot device 5. Display 46 includes, for example, a liquid crystal display panel.

演算処理装置は、ロボット1およびハンド2の動作指令を送出する動作制御部43を含む。動作制御部43は、動作プログラム41に従って駆動するプロセッサに相当する。動作制御部43は、記憶部42に記憶された情報を読み取り可能に形成されている。プロセッサは、動作プログラム41を読み込んで、動作プログラム41に定められた制御を実施することにより、動作制御部43として機能する。 The arithmetic processing unit includes a motion control section 43 that sends motion commands for the robot 1 and the hand 2. The operation control unit 43 corresponds to a processor that operates according to the operation program 41. The operation control section 43 is configured to be able to read information stored in the storage section 42. The processor functions as the operation control unit 43 by reading the operation program 41 and implementing control defined in the operation program 41.

動作制御部43は、動作プログラム41に基づいてロボット1を駆動するための動作指令をロボット駆動部45に送出する。ロボット駆動部45は、ロボット駆動モーター22を駆動する電気回路を含む。ロボット駆動部45は、動作指令に基づいてロボット駆動モーター22に電気を供給する。また、動作制御部43は、動作プログラム41に基づいてハンド2を駆動する動作指令をハンド駆動部44に送出する。ハンド駆動部44は、ハンド駆動モーター21を駆動する電気回路を含む。ハンド駆動部44は、動作指令に基づいてハンド駆動モーター21に電気を供給する。更に、本実施の形態のロボット制御装置4には、カメラ25が接続されている。動作制御部43は、動作プログラム41に基づいて、カメラ25に画像を撮像する指令を送出する。 The motion control section 43 sends motion commands for driving the robot 1 to the robot drive section 45 based on the motion program 41. Robot drive section 45 includes an electric circuit that drives robot drive motor 22 . The robot drive unit 45 supplies electricity to the robot drive motor 22 based on the operation command. Further, the motion control section 43 sends a motion command for driving the hand 2 to the hand drive section 44 based on the motion program 41 . The hand drive unit 44 includes an electric circuit that drives the hand drive motor 21. The hand drive unit 44 supplies electricity to the hand drive motor 21 based on the operation command. Furthermore, a camera 25 is connected to the robot control device 4 of this embodiment. The operation control unit 43 sends a command to the camera 25 to capture an image based on the operation program 41.

ロボット制御装置4の演算処理装置は、カメラ25にて撮像された画像を処理する画像処理部31を含む。画像処理部31は、それぞれのワーク81,91において、予め定められた特徴的な部分である特徴部位の特徴量を検出する特徴量検出部32を有する。画像処理部31は、第1のワーク81の特徴量と第2のワーク91の特徴量との差を相対量として算出する算出部33を有する。画像処理部31は、算出部33によって算出された相対量に基づいて、ロボットを動作させる移動指令を生成する指令生成部34を有する。 The arithmetic processing unit of the robot control device 4 includes an image processing unit 31 that processes images captured by the camera 25. The image processing section 31 includes a feature amount detection section 32 that detects the feature amount of a characteristic part that is a predetermined characteristic part in each of the works 81 and 91. The image processing section 31 includes a calculation section 33 that calculates the difference between the feature amount of the first workpiece 81 and the feature amount of the second workpiece 91 as a relative amount. The image processing unit 31 includes a command generation unit 34 that generates a movement command for operating the robot based on the relative amount calculated by the calculation unit 33.

画像処理部31は、動作プログラム41に従って駆動するプロセッサに相当する。特に、特徴量検出部32、算出部33、および指令生成部34のそれぞれのユニットは、動作プログラム41に従って駆動するプロセッサに相当する。プロセッサは、動作プログラム41を読み込んで、動作プログラム41に定められた制御を実施することにより、それぞれのユニットとして機能する。 The image processing section 31 corresponds to a processor that is driven according to the operation program 41. In particular, each of the feature detection section 32, calculation section 33, and command generation section 34 corresponds to a processor that is driven according to the operation program 41. The processors function as respective units by reading the operating program 41 and implementing control defined by the operating program 41.

ロボット装置5は、ロボット装置5の運転状態を検出する状態検出器を備える。本実施の形態の状態検出器は、ロボット1の位置および姿勢を検出する位置検出器23を含む。位置検出器23は、アーム等の構成部材の駆動軸に対応するロボット駆動モーター22に取り付けられている。例えば、位置検出器23は、ロボット駆動モーター22が駆動するときの回転角を検出する。位置検出器23の出力に基づいて、ロボット1の位置および姿勢が検出される。 The robot device 5 includes a state detector that detects the operating state of the robot device 5. The state detector of this embodiment includes a position detector 23 that detects the position and orientation of the robot 1. The position detector 23 is attached to a robot drive motor 22 corresponding to a drive shaft of a component such as an arm. For example, the position detector 23 detects the rotation angle when the robot drive motor 22 is driven. Based on the output of the position detector 23, the position and orientation of the robot 1 are detected.

ロボット装置5の制御装置は、コンベヤ75の動作を制御するコンベヤ制御装置76を備える。コンベヤ制御装置76は、CPUおよびRAM等を含む演算処理装置(コンピュータ)を含む。コンベヤ制御装置76は、ロボット制御装置4と互いに通信することができるように形成されている。動作制御部43は、動作プログラム41に基づいて、コンベヤ75を駆動する動作指令をコンベヤ制御装置76に送出する。コンベヤ制御装置76は、ロボット制御装置4からの動作指令を受信して、コンベヤ75を駆動する。 The control device of the robot device 5 includes a conveyor control device 76 that controls the operation of the conveyor 75. Conveyor control device 76 includes an arithmetic processing unit (computer) including a CPU, RAM, and the like. The conveyor control device 76 is configured to be able to communicate with the robot control device 4. The operation control unit 43 sends an operation command for driving the conveyor 75 to the conveyor control device 76 based on the operation program 41. The conveyor control device 76 receives an operation command from the robot control device 4 and drives the conveyor 75.

本実施の形態のロボット装置5の制御装置は、ロボット1およびハンド2を制御するロボット制御装置4と、コンベヤ75を制御するコンベヤ制御装置76とを備えるが、この形態に限られない。ロボット装置5は、1つの制御装置にて、ロボット1、ハンド2、およびコンベヤ75を制御するように形成されていても構わない。 The control device for the robot device 5 of this embodiment includes the robot control device 4 that controls the robot 1 and the hand 2, and the conveyor control device 76 that controls the conveyor 75, but is not limited to this form. The robot device 5 may be formed so that the robot 1, the hand 2, and the conveyor 75 are controlled by one control device.

更に、本実施の形態のロボット装置5の制御装置では、ロボット制御装置4が画像を処理する機能を有する画像処理部31を含むが、この形態に限られない。ロボット装置の制御装置は、画像処理部31を有する画像処理装置(コンピュータ)を備えていても構わない。画像処理装置は、プロセッサとしてのCPUを有する演算処理装置にて構成することができる。画像処理装置のプロセッサは、動作プログラムに基づいて、特徴量検出部、算出部、および指令生成部として機能する。画像処理装置は、ロボット制御装置と互いに通信することができるように形成される。 Further, in the control device for the robot device 5 according to the present embodiment, the robot control device 4 includes the image processing section 31 having a function of processing images, but the present invention is not limited to this embodiment. The control device of the robot device may include an image processing device (computer) having the image processing section 31. The image processing device can be configured with an arithmetic processing device having a CPU as a processor. The processor of the image processing device functions as a feature amount detection section, a calculation section, and a command generation section based on the operation program. The image processing device is configured to be able to communicate with the robot controller.

図4に、本実施の形態における第1の制御の第1のフローチャートを示す。図1、図2および図4を参照して、第1の制御では、1個のカメラ25にて撮像された画像を用いて、コンベヤ75にて搬送されるワーク81に対してワーク91の位置合わせを行う。前述の通りに、第1の制御の前には、ワーク81の姿勢に対するワーク91の姿勢は予め調整されている。すなわち、カメラ25にて画像を撮像するときのロボット1の姿勢は調整されている。ここでの制御では、穴部82aに対してピン92aの位置を合わせる制御を行う。 FIG. 4 shows a first flowchart of the first control in this embodiment. 1, 2, and 4, in the first control, the position of the workpiece 91 with respect to the workpiece 81 conveyed by the conveyor 75 is determined using an image captured by one camera 25. Make adjustments. As described above, before the first control, the posture of the workpiece 91 relative to the posture of the workpiece 81 is adjusted in advance. That is, the posture of the robot 1 when capturing an image with the camera 25 is adjusted. In this control, control is performed to align the pin 92a with respect to the hole 82a.

本実施の形態では、ロボット装置5にて実際に作業を行う前に、基準画像における相対位置量を算出する。そして、予め算出された基準画像の相対位置量を用いて、ロボット装置5にて作業を行う。第1のフローチャートには、基準画像における相対位置量を算出する制御が示されている。 In this embodiment, before the robot device 5 actually performs the work, the relative position amount in the reference image is calculated. Then, the robot device 5 performs the work using the relative position amount of the reference image calculated in advance. The first flowchart shows control for calculating the relative position amount in the reference image.

ステップ111においては、第1の制御を行うための基準画像を生成する。図5に、本実施の形態の第1の制御を行うための基準画像を示す。基準画像61は、第1のワーク81に対して第2のワーク91が目標の位置に配置されている時にカメラ25にて撮像された画像に相当する。本実施の形態では、基準画像61は、ワーク81の穴部82a,83aの真上に、ワーク91のピン92a,93aが配置された時にカメラ25によって撮像された画像である。基準画像61は、作業者が予め準備して、記憶部42に記憶させておくことができる。 In step 111, a reference image for performing the first control is generated. FIG. 5 shows a reference image for performing the first control of this embodiment. The reference image 61 corresponds to an image captured by the camera 25 when the second work 91 is placed at a target position with respect to the first work 81. In this embodiment, the reference image 61 is an image captured by the camera 25 when the pins 92a, 93a of the work 91 are placed directly above the holes 82a, 83a of the work 81. The reference image 61 can be prepared in advance by an operator and stored in the storage unit 42.

本実施の形態では、第1のワーク81の位置を検出するための第1の特徴部位が予め定められている。第1の制御では、突出部82の上面が第1の特徴部位に定められている。また、第2のワーク91の位置を検出するための第2の特徴部位が予め定められている。第1の制御では、突出部92の上面が第2の特徴部位に定められている。特徴部位は、画像を解析した時に形状が検出できる部分である。特徴部位は、ワークの一部分、ワークの表面に形成された模様、ワークの表面に記載された線または図などを採用することができる。また、特徴部位は、第1のワーク81に対して第2のワーク91が接触する部分の近傍に設定されることが好ましい。 In this embodiment, a first characteristic part for detecting the position of the first workpiece 81 is determined in advance. In the first control, the upper surface of the protrusion 82 is defined as the first characteristic region. Further, a second characteristic part for detecting the position of the second workpiece 91 is determined in advance. In the first control, the upper surface of the protrusion 92 is defined as the second characteristic region. A characteristic part is a part whose shape can be detected when an image is analyzed. As the characteristic part, a part of the workpiece, a pattern formed on the surface of the workpiece, a line or a diagram written on the surface of the workpiece, etc. can be employed. Further, it is preferable that the characteristic part is set near a portion where the second work 91 contacts the first work 81.

本実施の形態では、第1のワーク81には、第1の特徴部位としての突出部82の上面に、設定点P1が設定されている。設定点P1は、突出部82の角に設定されている。設定点P1の位置は、ワーク81の位置に相当する。第2のワーク91には、第2の特徴部位としての突出部92の上面に、設定点P2が配置されている。設定点P2は、突出部92の角に設定されている。設定点P2は、ワーク91の位置に相当する。設定点P1,P2は、カメラ25にて撮像するときに画像に含まれる領域に設定されている。 In this embodiment, the first workpiece 81 has a set point P1 set on the upper surface of the protrusion 82 as the first characteristic part. The set point P1 is set at the corner of the protrusion 82. The position of the set point P1 corresponds to the position of the workpiece 81. In the second workpiece 91, a set point P2 is arranged on the upper surface of a protrusion 92 as a second characteristic part. The set point P2 is set at the corner of the protrusion 92. The set point P2 corresponds to the position of the workpiece 91. The set points P1 and P2 are set in areas included in the image when the camera 25 captures the image.

図3、図4、および図5を参照して、ステップ112において、画像処理部31の特徴量検出部32は、基準画像61の第1の特徴部位および第2の特徴部位を検出する。特徴部位の検出方法としては、それぞれのワーク81,91の基準となるベース画像を予め準備しておくことができる。ベース画像とカメラ25にて撮像した画像とを用いてテンプレートマッチング等の方法により、カメラ25にて撮像した画像における特徴部位を検出することができる。ここでの例は、突出部82の上面および突出部92の上面を検出することができる。 Referring to FIGS. 3, 4, and 5, in step 112, feature detection section 32 of image processing section 31 detects a first characteristic region and a second characteristic region of reference image 61. As a method for detecting characteristic parts, base images that serve as references for each of the works 81 and 91 can be prepared in advance. By using a method such as template matching using the base image and the image captured by the camera 25, characteristic parts in the image captured by the camera 25 can be detected. In this example, the upper surface of the protrusion 82 and the upper surface of the protrusion 92 can be detected.

ステップ113において、特徴量検出部32は、第1の特徴部位の位置に関する第1の特徴量と、第2の特徴部位の位置に関する第2の特徴量とを検出する。本実施の形態においては、カメラ25にて撮像された画像にスクリーン座標系52が設定されている。スクリーン座標系52は、画像における任意の点を原点に設定したときの座標系である。スクリーン座標系52は、互いに直交するu軸およびv軸を有する。スクリーン座標系52は、カメラ25の視覚センサ座標系に対応する。 In step 113, the feature detection unit 32 detects a first feature related to the position of the first feature and a second feature related to the position of the second feature. In this embodiment, a screen coordinate system 52 is set in the image captured by the camera 25. The screen coordinate system 52 is a coordinate system when an arbitrary point in the image is set as the origin. Screen coordinate system 52 has a u-axis and a v-axis that are orthogonal to each other. Screen coordinate system 52 corresponds to the visual sensor coordinate system of camera 25.

本実施の形態の位置に関する特徴量は、画像におけるスクリーン座標系52のu軸の座標値およびv軸の座標値である。特徴量検出部32は、基準画像61において検出された特徴部位に基づいて、特徴部位に設定された設定点P1,P2の位置を検出することができる。特徴量検出部32は、第1の特徴量として、設定点P1のスクリーン座標系52の座標値(u1b,v1b)を検出する。また、特徴量検出部32は、第2の特徴量として、設定点P2のスクリーン座標系52の座標値(u2b,v2b)を検出する。 The feature amount related to the position in this embodiment is the u-axis coordinate value and the v-axis coordinate value of the screen coordinate system 52 in the image. The feature quantity detection unit 32 can detect the positions of the set points P1 and P2 set at the characteristic region based on the characteristic region detected in the reference image 61. The feature detection unit 32 detects the coordinate values (u1b, v1b) of the setting point P1 in the screen coordinate system 52 as the first feature. Further, the feature detection unit 32 detects the coordinate values (u2b, v2b) of the setting point P2 in the screen coordinate system 52 as the second feature.

次に、ステップ114において、画像処理部31の算出部33は、基準画像における第1の特徴量および第2の特徴量に関する相対量を算出する。算出部33は、ロボット1の位置の制御を行うために、相対量として相対位置量を算出する。相対位置量は、第1の特徴量と第2の特徴量との差である。例えば、算出部33は、相対位置量として、第1の特徴量の座標値と第2の特徴量の座標値との差(u1b-u2b,v1b-v2b)を算出する。算出部33にて算出された基準画像61における相対位置量は、基準相対位置量として記憶部42に記憶される。 Next, in step 114, the calculation unit 33 of the image processing unit 31 calculates relative amounts regarding the first feature amount and the second feature amount in the reference image. The calculation unit 33 calculates a relative position amount as a relative amount in order to control the position of the robot 1. The relative position amount is the difference between the first feature amount and the second feature amount. For example, the calculation unit 33 calculates the difference (u1b-u2b, v1b-v2b) between the coordinate value of the first feature amount and the coordinate value of the second feature amount as the relative position amount. The relative position amount in the reference image 61 calculated by the calculation unit 33 is stored in the storage unit 42 as a reference relative position amount.

このように、画像処理部31は、基準画像61における相対位置量を算出することができる。なお、本実施の形態では、基準画像61における相対位置量は、予め算出されて記憶部42に記憶されているが、この形態に限られない。基準画像61における相対位置量は、第1の制御を実施する度に算出されても構わない。 In this way, the image processing unit 31 can calculate the relative position amount in the reference image 61. Note that in the present embodiment, the relative position amount in the reference image 61 is calculated in advance and stored in the storage unit 42, but it is not limited to this form. The relative position amount in the reference image 61 may be calculated every time the first control is performed.

また、基準画像61は、実際にカメラ25にて撮像した画像を用いなくても構わない。例えば、それぞれのワーク81,91の3次元データをCAD(Computer Aided Design)装置等により生成することができる。ワーク81に対してワーク91が目標の位置に配置されているときの3次元データを生成することができる。この3次元データをカメラの向きに対応する方向に沿って1つの平面に投影することにより、基準画像61を生成しても構わない。 Further, the reference image 61 does not have to be an image actually captured by the camera 25. For example, three-dimensional data of the respective works 81 and 91 can be generated using a CAD (Computer Aided Design) device or the like. Three-dimensional data can be generated when the workpiece 91 is placed at a target position with respect to the workpiece 81. The reference image 61 may be generated by projecting this three-dimensional data onto one plane along a direction corresponding to the direction of the camera.

次に、ロボット制御装置4は、第1の特徴部位および第2の特徴部位がカメラ25の撮像範囲25aの内部に配置される様に、第1のワーク81の穴部82aに第2のワーク91のピン92aを近づける制御を実施する。この制御は、任意の制御にて実施することができる。例えば、ロボット制御装置4は、所定のセンサにてコンベヤ75におけるワーク81の位置を検出する。ロボット制御装置4は、コンベヤ75の移動速度に基づいてワーク81の位置を検出する。ロボット制御装置4は、ワーク91がワーク81に近づくように、ロボット1の位置および姿勢を制御することができる。 Next, the robot control device 4 inserts a second workpiece into the hole 82a of the first workpiece 81 so that the first characteristic part and the second characteristic part are arranged inside the imaging range 25a of the camera 25. Control is performed to bring the pins 92a of 91 closer together. This control can be implemented using any control. For example, the robot control device 4 detects the position of the workpiece 81 on the conveyor 75 using a predetermined sensor. The robot control device 4 detects the position of the workpiece 81 based on the moving speed of the conveyor 75. The robot control device 4 can control the position and posture of the robot 1 so that the work 91 approaches the work 81.

図6に、本実施の形態における第1の制御の第2のフローチャートを示す。図3および図6を参照して、ロボット制御装置4がワーク91をワーク81に近づける制御を実施した後に、ステップ115において、動作制御部43は、カメラ25にてワーク81,91を撮像する。 FIG. 6 shows a second flowchart of the first control in this embodiment. Referring to FIGS. 3 and 6, after robot control device 4 performs control to bring workpiece 91 closer to workpiece 81, in step 115, operation control unit 43 images workpieces 81 and 91 with camera 25.

図7に、第1のワークに対する第2のワークの位置を調整するためにカメラにて撮像した画像を示す。画像62には、第1の特徴部位である突出部82の上面の画像と第2の特徴部位である突出部92の上面の画像とが含まれている。画像62では、第1のワーク81に対して第2のワーク91は、矢印101に示すようにスクリーン座標系52のu軸の正側にずれている。 FIG. 7 shows an image taken by a camera to adjust the position of the second workpiece relative to the first workpiece. The image 62 includes an image of the upper surface of the protrusion 82, which is the first characteristic part, and an image of the upper surface of the protrusion 92, which is the second characteristic part. In the image 62, the second work 91 is shifted toward the positive side of the u-axis of the screen coordinate system 52, as shown by an arrow 101, with respect to the first work 81.

図8に、第1のワークに対する第2のワークの位置を調整するためにカメラにて撮像した他の画像を示す。画像63では、第2のワーク91は、矢印102に示すように、第1のワーク81に対してスクリーン座標系52のu軸の負側の方向にずれている。図7および図8を参照して、第1の制御では、このような第2のワーク91のずれを修正する制御を実施する。ここでは、図7および図8のうち、図7を例に取り上げて説明する。 FIG. 8 shows another image taken by the camera to adjust the position of the second workpiece relative to the first workpiece. In the image 63, the second work 91 is shifted in the negative direction of the u-axis of the screen coordinate system 52 with respect to the first work 81, as indicated by an arrow 102. Referring to FIGS. 7 and 8, in the first control, control for correcting such a shift of the second workpiece 91 is performed. Here, of FIGS. 7 and 8, FIG. 7 will be taken as an example for explanation.

図3、図6、および図7を参照して、ステップ116からステップ118では、基準画像61に対する制御と同様の制御を実施する。画像処理部31は、カメラ25にて撮像した画像62における第1の特徴量および第2の特徴量を検出し、第1の特徴量および第2の特徴量を用いて相対位置量を算出する。 Referring to FIGS. 3, 6, and 7, in steps 116 to 118, control similar to that for reference image 61 is performed. The image processing unit 31 detects a first feature amount and a second feature amount in the image 62 captured by the camera 25, and calculates a relative position amount using the first feature amount and the second feature amount. .

ステップ116においては、特徴量検出部32は、カメラ25にて撮像した画像62の第1の特徴部位および第2の特徴部位を検出する。ここでは、第1の特徴部位としてワーク81の突出部82の上面を検出し、第2の特徴部位としてワーク91の突出部92の上面を検出する。 In step 116, the feature detection unit 32 detects the first feature region and the second feature region of the image 62 captured by the camera 25. Here, the top surface of the protrusion 82 of the workpiece 81 is detected as the first feature, and the top surface of the protrusion 92 of the work 91 is detected as the second feature.

ステップ117において、特徴量検出部32は、カメラ25にて撮像した画像62における第1の特徴量および第2の特徴量を検出する。特徴量検出部32は、第1の特徴部位の位置に関する第1の特徴量として、設定点P1のスクリーン座標系52の座標値(u1m,v1m)を検出する。また、特徴量検出部32は、第2の特徴部位の位置に関する第2の特徴量として、設定点P2のスクリーン座標系52の座標値(u2m,v2m)を算出する。 In step 117, the feature amount detection unit 32 detects the first feature amount and the second feature amount in the image 62 captured by the camera 25. The feature detection unit 32 detects the coordinate values (u1m, v1m) of the set point P1 in the screen coordinate system 52 as the first feature related to the position of the first feature part. Further, the feature amount detection unit 32 calculates the coordinate values (u2m, v2m) of the setting point P2 in the screen coordinate system 52 as the second feature amount regarding the position of the second feature part.

ステップ118において、算出部33は、第1の特徴量と第2の特徴量との差を相対位置量として算出する。カメラ25にて撮像した画像62における相対位置量は、第1の特徴量の座標値と第2の特徴量の座標値との差(u1m-u2m,v1m-v2m)になる。 In step 118, the calculation unit 33 calculates the difference between the first feature amount and the second feature amount as a relative position amount. The relative position amount in the image 62 captured by the camera 25 is the difference (u1m-u2m, v1m-v2m) between the coordinate value of the first feature amount and the coordinate value of the second feature amount.

なお、第2のワーク91がハンド2の予め定められた位置にて把持されている場合には、第2のワーク91に関する第2の特徴量は一定になる。このために、第2の特徴量を予め測定して、記憶部42に記憶しておいても構わない。すなわち、設定点P2の座標値を予め記憶部42に記憶しておいても構わない。一方で、ハンド2が第2のワーク91を把持するときに、所望の位置からずれる場合がある。このために、本実施の形態では、実際に撮像した画像62に基づいて、ベース画像とのテンプレートマッチングの方法により、第2の特徴量も検出している。 Note that when the second workpiece 91 is held at a predetermined position of the hand 2, the second feature amount regarding the second workpiece 91 is constant. For this purpose, the second feature amount may be measured in advance and stored in the storage unit 42. That is, the coordinate values of the set point P2 may be stored in the storage unit 42 in advance. On the other hand, when the hand 2 grips the second workpiece 91, it may deviate from the desired position. For this reason, in this embodiment, the second feature quantity is also detected based on the actually captured image 62 by a method of template matching with the base image.

次に、画像処理部31の指令生成部34は、カメラ25にて撮像した画像62における相対位置量と、基準画像61における相対位置量とに基づいて、第1のワーク81に対して第2のワーク91が目標の位置に配置されるように、ロボット1の移動指令を生成する。本実施の形態の指令生成部34は、カメラ25にて撮像した画像62における相対位置量が、基準画像61における相対位置量に近づくように、ロボット1を動作させる移動指令を生成する。 Next, the command generation unit 34 of the image processing unit 31 generates a second workpiece for the first workpiece 81 based on the relative position amount in the image 62 captured by the camera 25 and the relative position amount in the reference image 61. A movement command for the robot 1 is generated so that the workpiece 91 is placed at the target position. The command generation unit 34 of the present embodiment generates a movement command for operating the robot 1 so that the relative position amount in the image 62 captured by the camera 25 approaches the relative position amount in the reference image 61.

ステップ119において、指令生成部34は、カメラ25にて撮像した画像62における相対位置量と基準画像61における相対位置量との差である相対位置量の差を算出する。本実施の形態では、指令生成部34は、カメラ25にて撮像した画像62における相対位置量から基準画像61における相対位置量を減算した相対位置量の差を算出する。相対位置量の差は、それぞれのu軸およびv軸に関する値として[(u1m-u2m)-(u1b-u2b), (v1m-v2m)-(v1b-v2b)]にて表すことができる。このように、本実施の形態では、u軸に関する相対位置量の差と、v軸に関する相対位置量の差とを算出する。 In step 119, the command generating unit 34 calculates a difference in relative position amount, which is the difference between the relative position amount in the image 62 captured by the camera 25 and the relative position amount in the reference image 61. In the present embodiment, the command generation unit 34 calculates the difference in relative position amount by subtracting the relative position amount in the reference image 61 from the relative position amount in the image 62 captured by the camera 25. The difference in relative position amounts can be expressed as [(u1m-u2m)-(u1b-u2b), (v1m-v2m)-(v1b-v2b)] as values regarding the respective u-axis and v-axis. In this manner, in this embodiment, the difference in relative position amounts regarding the u-axis and the difference in relative position amounts regarding the v-axis are calculated.

次に、ステップ120において、指令生成部34は、相対位置量の差が予め定められた判定範囲内か否かを判定する。判定範囲は、予め定められて記憶部42に記憶されている。例えば、u軸に関する値の判定範囲と、v軸に関する値の判定範囲とを予め設定することができる。第2のワーク91が第1のワーク81に対して目標の位置に近づくほど、相対位置量の差は零に近づく。u軸に関する値が判定範囲内であり、かつ、v軸に対応する値が判定範囲内である場合に、相対位置量の差が判定範囲内であると判定することができる。すなわち、指令生成部34は、ワーク81に対するワーク91の位置合わせが完了していると判定することができる。 Next, in step 120, the command generation unit 34 determines whether the difference in relative position amounts is within a predetermined determination range. The determination range is determined in advance and stored in the storage unit 42. For example, a determination range for values related to the u-axis and a determination range for values related to the v-axis can be set in advance. The closer the second workpiece 91 is to the target position with respect to the first workpiece 81, the closer the difference in relative position amount becomes to zero. When the value related to the u-axis is within the determination range and the value corresponding to the v-axis is within the determination range, it can be determined that the difference in relative position amount is within the determination range. That is, the command generation unit 34 can determine that the alignment of the workpiece 91 with respect to the workpiece 81 is completed.

一方で、u軸に関する値およびv軸に関する値のうち、少なくとも一方が判定範囲を逸脱する場合に、指令生成部34は、相対位置量の差は判定範囲を逸脱していると判定することができる。すなわち、指令生成部34は、ワーク81に対してワーク91が所望の位置に到達していないと判定することができる。 On the other hand, if at least one of the values related to the u-axis and the value related to the v-axis deviates from the determination range, the command generation unit 34 may determine that the difference in relative position amounts is outside the determination range. can. That is, the command generation unit 34 can determine that the workpiece 91 has not reached the desired position relative to the workpiece 81.

ステップ120において、相対位置量の差が判定範囲内である場合には、この制御を終了する。ステップ120において、相対位置量の差が判定範囲を逸脱する場合には、制御は、ステップ121に移行する。 In step 120, if the difference in relative position amount is within the determination range, this control is ended. In step 120, if the difference in relative position amount deviates from the determination range, control proceeds to step 121.

ステップ121において、指令生成部34は、相対位置量の差に基づいて、ロボット1の駆動方法を設定する。指令生成部34は、基準座標系51におけるロボット1の位置の移動方向および移動量を設定する。本実施の形態では、相対位置量の差に対するロボットの位置の移動方向が予め定められている。スクリーン座標系52のu軸の正の値または負の値に対してロボット1の位置の移動方向が、基準座標系51にて定められている。例えば、u軸に関する相対位置量の差が正の値である場合に、基準座標系51のX軸、Y軸、およびZ軸の座標値を用いて(1,1,0)の移動方向が予め定められている。また、v軸に関する相対位置の差が正の値である場合に、基準座標系51のX軸、Y軸、およびZ軸の座標値を用いて(0,0,1)の移動方向が予め定められている。 In step 121, the command generation unit 34 sets a driving method for the robot 1 based on the difference in relative position amount. The command generation unit 34 sets the movement direction and movement amount of the position of the robot 1 in the reference coordinate system 51. In this embodiment, the moving direction of the robot's position with respect to the difference in relative position amount is determined in advance. The moving direction of the position of the robot 1 is determined in the reference coordinate system 51 with respect to the positive or negative value of the u-axis of the screen coordinate system 52. For example, when the difference in relative position amount with respect to the u-axis is a positive value, the moving direction of (1, 1, 0) is determined using the coordinate values of the X-axis, Y-axis, and Z-axis of the reference coordinate system 51. predetermined. Further, when the difference in relative position with respect to the v-axis is a positive value, the moving direction of (0, 0, 1) is determined in advance using the coordinate values of the X-axis, Y-axis, and Z-axis of the reference coordinate system 51. It is determined.

更に、相対位置量の差に対するロボット1の位置の移動量の算出方法が予め定められている。例えば、u軸に対応する方向におけるロボット1の位置の移動量は、u軸に関する値((u1m-u2m)-(u1b-u2b))に、予め定められた係数を乗じた値を採用することができる。また、v軸に対応する方向におけるロボット1の位置の移動量は、v軸に関する値((v1m-v2m)-(v1b-v2b))に、予め定められた係数を乗じた値を採用することができる。このように、スクリーン座標系52の各軸に対応する方向において、ロボット1の位置の移動量を算出することができる。 Furthermore, a method for calculating the amount of movement of the position of the robot 1 with respect to the difference in relative position amount is determined in advance. For example, the amount of movement of the position of the robot 1 in the direction corresponding to the u-axis may be determined by multiplying the value related to the u-axis ((u1m-u2m)-(u1b-u2b)) by a predetermined coefficient. Can be done. Furthermore, the amount of movement of the position of the robot 1 in the direction corresponding to the v-axis should be determined by multiplying the value related to the v-axis ((v1m-v2m)-(v1b-v2b)) by a predetermined coefficient. Can be done. In this way, the amount of movement of the position of the robot 1 in the direction corresponding to each axis of the screen coordinate system 52 can be calculated.

本実施の形態では、u軸に関する相対位置量の差に基づいて基準座標系51におけるX軸方向の移動量、Y軸方向における移動量、およびZ軸方向の移動量を算出している。また、v軸に関する相対位置量の差に基づいて、基準座標系51におけるX軸方向の移動量、Y軸方向における移動量、およびZ軸方向の移動量を算出している。このために、基準座標系51において、一つの軸に対して2つの移動量(u軸に関する移動量およびv軸に関する移動量)が算出される場合がある。この場合には、2つの移動量が算出される軸の方向にはロボット1の位置を移動しなくても構わない。または、それぞれの移動量に係数を乗じて最終的な移動量を算出しても構わない。または、いずれか一方の移動量を採用しても構わない。 In this embodiment, the amount of movement in the X-axis direction, the amount of movement in the Y-axis direction, and the amount of movement in the Z-axis direction in the reference coordinate system 51 are calculated based on the difference in relative position amount with respect to the u-axis. Furthermore, the amount of movement in the X-axis direction, the amount of movement in the Y-axis direction, and the amount of movement in the Z-axis direction in the reference coordinate system 51 are calculated based on the difference in the relative position amount with respect to the v-axis. For this reason, in the reference coordinate system 51, two movement amounts (a movement amount regarding the u-axis and a movement amount regarding the v-axis) may be calculated for one axis. In this case, the position of the robot 1 does not need to be moved in the direction of the axis for which the two movement amounts are calculated. Alternatively, the final movement amount may be calculated by multiplying each movement amount by a coefficient. Alternatively, either one of the moving amounts may be adopted.

次に、ステップ122において、ロボット1の位置の移動方向および移動量に基づいて、ロボット1を駆動する。指令生成部34は、ロボット1の位置の移動方向および移動量に基づいて、ロボット1を駆動する移動指令を生成する。指令生成部34は、移動指令を動作制御部43に送出する。動作制御部43は、移動指令に基づいてロボットの位置を変更する。 Next, in step 122, the robot 1 is driven based on the moving direction and moving amount of the robot 1's position. The command generation unit 34 generates a movement command for driving the robot 1 based on the movement direction and movement amount of the robot 1 position. The command generation unit 34 sends a movement command to the operation control unit 43. The motion control unit 43 changes the position of the robot based on the movement command.

次に、制御は、ステップ115に移行する。第1の制御では、相対位置量の差が判定範囲内になるまで、ステップ115からステップ122を繰り返す制御を実施する。第1の制御では、1回の制御にてワークの位置合わせが完了しなくても、ステップ115からステップ122を繰り返すことにより、徐々にワークの位置を所望の位置に近づけることができる。 Control then passes to step 115. In the first control, steps 115 to 122 are repeated until the difference in relative position amounts falls within the determination range. In the first control, even if the positioning of the workpiece is not completed in one control, by repeating steps 115 to 122, the position of the workpiece can be gradually brought closer to the desired position.

本実施の形態の制御では、基準座標系に対する視覚センサ座標系のキャリブレーションを行う必要がない。または、ワークの位置合わせを行うために、予めヤコビアン行列を求める必要は無い。このために、簡易な方法にてワークの位置合わせを行うことができる。 In the control of this embodiment, there is no need to calibrate the visual sensor coordinate system with respect to the reference coordinate system. Alternatively, in order to align the workpiece, it is not necessary to obtain the Jacobian matrix in advance. For this reason, it is possible to align the workpieces using a simple method.

本実施の形態の第1の制御では、コンベヤ75が第1のワーク81を搬送している期間中に、第2のワーク91の位置合わせを実施している。特徴量検出部32による第1の特徴量および第2の特徴量を検出する制御、算出部33による相対位置量を出する制御、および指令生成部34による移動指令を算出する制御を繰り返している。この制御により、コンベヤ75にて移動するワーク81の位置に対してワーク91を把持するロボット1の位置を追従する制御を実施することができる。 In the first control of the present embodiment, the second workpiece 91 is aligned while the conveyor 75 is conveying the first workpiece 81. By repeating the control by the feature quantity detection unit 32 to detect the first feature quantity and the second feature quantity, the control by the calculation unit 33 to calculate the relative position amount, and the control by the command generation unit 34 to calculate the movement command. There is. With this control, it is possible to control the position of the robot 1 that grips the workpiece 91 to follow the position of the workpiece 81 moving on the conveyor 75.

なお、本実施の形態におけるカメラ25は支持部材17を介してハンド2に支持されている。ハンド2は第2のワーク91を把持している。このために、第1のワーク81に対して第2のワーク91の位置合わせを行っている期間中に、カメラ25に対するワーク1の相対的な位置および姿勢は一定である。図5、図7、および図8を参照して、第1のワーク81に対する第2のワーク91の相対的な位置が変化しても、カメラ25にて撮像される画像62,63におけるワーク91および突出部92の位置は一定になる。この結果、カメラ25にて撮像した画像における第2の特徴部位の設定点P2の位置は一定になる。 Note that the camera 25 in this embodiment is supported by the hand 2 via the support member 17. The hand 2 is gripping a second workpiece 91. For this reason, while the second work 91 is being aligned with the first work 81, the relative position and posture of the work 91 with respect to the camera 25 are constant. With reference to FIGS. 5, 7, and 8, even if the relative position of the second work 91 with respect to the first work 81 changes, the work 91 in the images 62 and 63 captured by the camera 25 And the position of the protrusion 92 becomes constant. As a result, the position of the set point P2 of the second characteristic region in the image captured by the camera 25 becomes constant.

図6を参照して、前述の制御においては、カメラ25にて第1のワーク81および第2のワーク91を撮像するたびに、第2のワーク91における第2の特徴部位を検出し、第2の特徴量を検出している。一方で、第2の特徴量である設定点P2の座標値は一定であるために、記憶部42は、カメラ25にて1回目に撮像された画像から取得された第2の特徴量を記憶しておくことができる。ステップ115からステップ117において、カメラ25にて2回目以降に撮像した画像については、特徴量検出部32は、記憶部42から第2の特徴量を取得することができる。特徴量検出部32は、第1の特徴部位の検出および第1の特徴量の検出を実施すれば良い。この制御を実施することにより、カメラにて2回目以降に撮像された画像から相対位置量を算出する制御を簡略化することができる。2回目以降のカメラにて撮像された画像の処理の時間が短くなる。 Referring to FIG. 6, in the above-described control, each time the camera 25 images the first workpiece 81 and the second workpiece 91, a second characteristic part of the second workpiece 91 is detected, 2 features are detected. On the other hand, since the coordinate values of the set point P2, which is the second feature amount, are constant, the storage unit 42 stores the second feature amount obtained from the image captured the first time by the camera 25. You can keep it. In steps 115 to 117, the feature amount detection section 32 can acquire the second feature amount from the storage section 42 for images captured by the camera 25 for the second time and thereafter. The feature amount detection unit 32 may detect the first feature portion and the first feature amount. By implementing this control, it is possible to simplify the control for calculating the relative position amount from images captured by the camera from the second time onward. The time required to process images captured by the camera from the second time onwards is shortened.

ところで、本実施の形態においては、コンベヤ75による第1のワーク81の移動方向および移動速度が予め定められている。ロボット制御装置4は、コンベヤ75によるワーク81の移動に合わせてロボット1の位置を変更するフィードフォワード制御を実施することができる。本実施の形態では、一定の移動速度にてワーク81が移動する。 By the way, in this embodiment, the moving direction and moving speed of the first workpiece 81 by the conveyor 75 are determined in advance. The robot control device 4 can perform feedforward control to change the position of the robot 1 in accordance with the movement of the workpiece 81 by the conveyor 75. In this embodiment, the workpiece 81 moves at a constant moving speed.

指令生成部34は、コンベヤ75にて移動する第1のワーク81の位置に対してロボット1の位置が追従するロボット1の位置の移動方向および移動速度を算出する。例えば、指令生成部34は、ロボット1のツール先端点がワーク81の移動方向に移動するように移動方向を算出する。指令生成部34は、ロボット1のツール先端点がワーク81の移動方向と同じ方向に、ワーク81と同一の移動速度にて移動する移動量を算出することができる。そして、指令生成部34は、コンベヤ75の搬送に基づくロボット1の位置の移動方向および移動量の制御に加えて、前述の相対位置量の差に基づいて算出される移動方向および移動量の制御を実施することができる。 The command generation unit 34 calculates the moving direction and moving speed of the position of the robot 1 that follows the position of the first workpiece 81 moving on the conveyor 75. For example, the command generation unit 34 calculates the moving direction so that the tool tip point of the robot 1 moves in the moving direction of the workpiece 81. The command generating unit 34 can calculate the amount of movement by which the tool tip point of the robot 1 moves in the same direction as the movement direction of the workpiece 81 and at the same movement speed as the workpiece 81. In addition to controlling the moving direction and moving amount of the position of the robot 1 based on the conveyance of the conveyor 75, the command generating unit 34 controls the moving direction and moving amount calculated based on the difference in relative position amount. can be carried out.

この制御を行うことにより、コンベヤ75による第1のワーク81の移動に関するロボット1の位置および姿勢の変更は、フィードフォワード制御にて実施することができる。相対位置量の差に基づく制御では、第1のワーク81に対する第2のワーク91の相対的な位置のずれを修正すれば良いために、短時間で第1のワーク81に対する第2のワーク91の位置合わせを行うことができる。 By performing this control, changes in the position and posture of the robot 1 regarding the movement of the first workpiece 81 by the conveyor 75 can be performed by feedforward control. In control based on the difference in relative position amount, since it is only necessary to correct the relative positional deviation of the second workpiece 91 with respect to the first workpiece 81, the second workpiece 91 with respect to the first workpiece 81 can be adjusted in a short time. can be aligned.

図9に、本実施の形態における第2のロボット装置のハンド、第1のワーク、および第2のワークの拡大斜視図を示す。第1のロボット装置5においては、1つのカメラ25によりロボット1の位置を調整しているが、この形態に限られない。ロボット装置は、2個以上のカメラを用いてロボット1の位置を調整することができる。 FIG. 9 shows an enlarged perspective view of the hand, first workpiece, and second workpiece of the second robot device in this embodiment. In the first robot device 5, the position of the robot 1 is adjusted using one camera 25, but the configuration is not limited to this. The robot device can adjust the position of the robot 1 using two or more cameras.

第2のロボット装置8では、ハンド2に支持部材18が固定されている。支持部材18は、上側に延びる部分18aと、下側に延びる部分18bと有する。上側に延びる部分18aには、第1のロボット装置5と同様に、第1の視覚センサとしてカメラ25が固定されている。カメラ25は、撮像範囲25aにて画像を撮像する。下側に延びる部分18bには、第2の視覚センサとしてのカメラ26が固定されている。カメラ26は、第1のワーク81および第2のワーク91を撮像する。特に、カメラ26は、第2のワーク91が第1のワーク81に接近した時の画像を撮像する。カメラ26は、第1のワーク81の突出部83と、第2のワーク91の突出部93とを撮像できる位置に配置されている。下側に延びる部分18bは、ワーク81,91の側方から突出部83,93を撮像できるようにカメラ26を支持している。カメラ26は、撮像範囲26aにて画像を撮像する。本実施の形態のカメラ26は、2次元カメラである。 In the second robot device 8, a support member 18 is fixed to the hand 2. The support member 18 has an upwardly extending portion 18a and a downwardly extending portion 18b. Similar to the first robot device 5, a camera 25 is fixed to the upwardly extending portion 18a as a first visual sensor. The camera 25 captures an image in an imaging range 25a. A camera 26 as a second visual sensor is fixed to the downwardly extending portion 18b. The camera 26 images the first work 81 and the second work 91. In particular, the camera 26 captures an image when the second work 91 approaches the first work 81. The camera 26 is placed at a position where it can image the protrusion 83 of the first work 81 and the protrusion 93 of the second work 91. The portion 18b extending downward supports the camera 26 so as to be able to image the protrusions 83, 93 from the sides of the works 81, 91. The camera 26 captures an image in an imaging range 26a. Camera 26 in this embodiment is a two-dimensional camera.

2台のカメラ25,26は、光軸が互いに異なる方向に延びるように配置されている。本実施の形態では、カメラ26の光軸がカメラ25の光軸に対してほぼ直する方向に延びるようにカメラ26が配置されている。第2のロボット装置8では、2台のカメラ25,26にて撮像した画像に基づいて、第2の制御を実施する。第2の制御では、カメラ25,26にて撮像した画像を用いて、ワーク81に対するワーク91の位置を調整する。 The two cameras 25 and 26 are arranged so that their optical axes extend in different directions. In this embodiment, the camera 26 is arranged such that the optical axis of the camera 26 extends in a direction substantially perpendicular to the optical axis of the camera 25. The second robot device 8 performs second control based on images captured by the two cameras 25 and 26. In the second control, the position of the workpiece 91 relative to the workpiece 81 is adjusted using images captured by the cameras 25 and 26.

第2の制御では、第1の制御によりカメラ25の画像に基づいて移動指令を生成する。また、第1の制御と同様の方法により、カメラ26の画像に基づいて移動指令を生成する。本実施の形態では、カメラ26にて撮像された画像にて第1のワーク81の位置を検出するための第3の特徴部位と、第2のワーク91の位置を検出するための第4の特徴部位とが予め定められている。 In the second control, a movement command is generated based on the image of the camera 25 by the first control. Furthermore, a movement command is generated based on the image of the camera 26 using a method similar to the first control. In the present embodiment, a third feature part is used to detect the position of the first workpiece 81 in an image captured by the camera 26, and a fourth feature part is used to detect the position of the second workpiece 91. The characteristic parts are determined in advance.

第3の特徴部位は、第1の特徴部位と異なる部分である。第3の特徴部位としては、例えば、第1のワーク81の突出部83の側面を設定することができる。第3の特徴部位には第1のワーク81の位置を定めるための第3の設定点P3を設定することができる。第4の特徴部位は、第2の特徴部位と異なる部分である。第4の特徴部位としては、例えば、第2のワーク91の突出部93の側面を設定することができる。第4の特徴部位には第2のワーク91の位置を定めるための第4の設定点P4を設定することができる。 The third characteristic part is a different part from the first characteristic part. As the third characteristic part, for example, the side surface of the protrusion 83 of the first workpiece 81 can be set. A third set point P3 for determining the position of the first workpiece 81 can be set at the third characteristic portion. The fourth characteristic part is a different part from the second characteristic part. As the fourth characteristic part, for example, the side surface of the protruding part 93 of the second workpiece 91 can be set. A fourth set point P4 for determining the position of the second workpiece 91 can be set at the fourth characteristic part.

特徴量検出部32は、カメラ26にて撮像された画像において、第3の特徴部位の位置に関する第3の特徴量と、第4の特徴部位の位置に関する第4の特徴量を検出する。カメラ26にて撮像された画像において、設定点P3のスクリーン座標系52の座標値が第3の特徴量になる。また、設定点P4のスクリーン座標系52の座標値が第4の特徴量になる。算出部33は、第3の特徴量と第4の特徴量との差を相対位置量として算出する。 The feature amount detection unit 32 detects a third feature amount related to the position of the third feature part and a fourth feature amount related to the position of the fourth feature part in the image captured by the camera 26. In the image captured by the camera 26, the coordinate value of the set point P3 in the screen coordinate system 52 becomes the third feature amount. Further, the coordinate value of the setting point P4 in the screen coordinate system 52 becomes the fourth feature quantity. The calculation unit 33 calculates the difference between the third feature amount and the fourth feature amount as a relative position amount.

また、第1のワーク81に対して目標の位置に第2のワーク91が配置されているときのカメラ26に関する基準画像は予め作成されている。また、基準画像における第3の特徴量と第4の特徴量との差である相対位置量は定められている。基準画像における相対位置量は、予め算出することができる。 Further, a reference image regarding the camera 26 when the second work 91 is placed at a target position with respect to the first work 81 is created in advance. Furthermore, a relative position amount, which is the difference between the third feature amount and the fourth feature amount in the reference image, is determined. The relative position amount in the reference image can be calculated in advance.

指令生成部34は、カメラ26にて撮像した画像における相対位置量と、第3の特徴部位および第4の特徴部位の画像を含む基準画像における相対位置量とに基づいて、相対位置量の差を算出する。そして、指令生成部34は、相対位置量の差に基づいて、第1のワーク81に対して第2のワーク91が目標の位置に配置されるようにロボット1を動作させる移動指令を生成する。指令生成部34は、第2のカメラ26にて撮像した画像における相対位置量が基準画像における相対位置量に近づくように、ロボット1を動作させる移動指令を生成する。 The command generation unit 34 calculates the difference in the relative position amount based on the relative position amount in the image captured by the camera 26 and the relative position amount in the reference image including the images of the third characteristic region and the fourth characteristic region. Calculate. Then, the command generating unit 34 generates a movement command to operate the robot 1 so that the second work 91 is placed at the target position with respect to the first work 81 based on the difference in relative position amount. . The command generation unit 34 generates a movement command for operating the robot 1 so that the relative position amount in the image captured by the second camera 26 approaches the relative position amount in the reference image.

指令生成部34は、カメラ25の画像から生成された移動指令と、カメラ26の画像から生成された移動指令とに基づいて、動作制御部43に送出する最終的な移動指令を生成することができる。例えば、指令生成部34は、カメラ25の画像に基づく移動指令およびカメラ26の画像に基づく移動指令のうち、一方の移動指令にてロボット1を駆動した後に、他方の移動指令にてロボット1を駆動することができる。 The command generation unit 34 can generate a final movement command to be sent to the operation control unit 43 based on the movement command generated from the image of the camera 25 and the movement command generated from the image of the camera 26. can. For example, after driving the robot 1 with one of the movement commands based on the image of the camera 25 and the movement command based on the image of the camera 26, the command generation unit 34 drives the robot 1 with the other movement command. Can be driven.

または、カメラ25の画像に基づく移動指令と、カメラ26の画像に基づく移動指令とを合成しても構わない。例えば、カメラ25の画像のu軸に対応するロボット1の位置の移動方向と、カメラ26の画像のu軸に対応するロボット1の位置の移動方向とが一致する場合には、ロボット1の移動量の平均値を算出しても構わない。このようなロボット1の位置を調整する制御は、カメラ25の画像に基づく相対位置量の差が判定範囲内になり、更に、カメラ26の画像に基づく相対位置量の差が判定範囲内になるまで、繰り返して実施することができる。 Alternatively, the movement command based on the image of the camera 25 and the movement command based on the image of the camera 26 may be combined. For example, if the direction of movement of the position of the robot 1 corresponding to the u-axis of the image of the camera 25 and the direction of movement of the position of the robot 1 corresponding to the u-axis of the image of the camera 26 match, the movement of the robot 1 It is also possible to calculate the average value of the amounts. Such control for adjusting the position of the robot 1 is such that the difference in the relative position amount based on the image of the camera 25 is within the determination range, and furthermore, the difference in the relative position amount based on the image of the camera 26 is within the determination range. It can be carried out repeatedly until.

第2のロボット装置8では、それぞれのカメラ25,26が互いに異なる特徴部位を撮像して位置の制御を行っている。このために、1台のカメラを用いて位置の調整を行う制御よりも精度よくワーク91の位置の調整を行うことができる。また、ステレオ計測等を行うことなく複数のカメラの画像に基づいてワークの位置の調整を行うことができる。更に、3次元カメラを用いなくても、複数の2次元カメラを用いることによりワークの位置の調整を行うことができる。 In the second robot device 8, the respective cameras 25 and 26 take images of different characteristic parts to control the position. For this reason, the position of the workpiece 91 can be adjusted more accurately than control that adjusts the position using one camera. Further, the position of the workpiece can be adjusted based on images from a plurality of cameras without performing stereo measurements or the like. Furthermore, the position of the workpiece can be adjusted by using a plurality of two-dimensional cameras without using a three-dimensional camera.

なお、第1のカメラ25にて撮像される画像における設定点P2の位置および第2のカメラ26の画像における設定点P4の位置は変化しない。このために、第1の制御と同様に始めに検出した第2の特徴量および第4の特徴量を記憶部42に記憶することができる。そして、2回目以降の制御では、記憶部42に記憶した第2の特徴量および第4の特徴量を取得して、それぞれの画像における相対位置量を算出しても構わない。 Note that the position of the set point P2 in the image taken by the first camera 25 and the position of the set point P4 in the image taken by the second camera 26 do not change. For this reason, similarly to the first control, the first detected second feature amount and fourth feature amount can be stored in the storage unit 42. Then, in the second and subsequent control, the second feature amount and the fourth feature amount stored in the storage unit 42 may be acquired, and the relative position amount in each image may be calculated.

ところで、第2のロボット装置8においては、複数のカメラ25,26が配置されている。このようなロボット装置8の制御装置では、ワーク91の位置の調整を行う他に、ワーク91の姿勢の修正することができる。次に、ワーク91の姿勢の修正について説明する。 By the way, in the second robot device 8, a plurality of cameras 25 and 26 are arranged. In addition to adjusting the position of the workpiece 91, the control device for the robot apparatus 8 can also correct the posture of the workpiece 91. Next, correction of the posture of the workpiece 91 will be explained.

図10に、本実施の形態における第2のロボット装置におけるハンド、第1のワーク、および第2のワークの他の拡大斜視図を示す。第1の制御および第2の制御では、第1のワーク81に対する第2のワーク91の相対的な姿勢は、第2のワーク91の位置を調整する制御を実施する前に調整されている。一方で、第1のワーク81に対する第2のワーク91の姿勢がずれている場合がある。 FIG. 10 shows another enlarged perspective view of the hand, the first workpiece, and the second workpiece in the second robot device in this embodiment. In the first control and the second control, the relative posture of the second work 91 with respect to the first work 81 is adjusted before the control for adjusting the position of the second work 91 is executed. On the other hand, the posture of the second work 91 with respect to the first work 81 may be deviated.

ワーク91が目標の姿勢になった時には、ピン92aとピン93aとが並ぶ方向が、穴部82aと穴部83aとが並ぶ方向と平行になる。図10に示す例では、ワーク91の姿勢は、目標の姿勢から矢印106に示すように僅かに回転している。ワーク91は、基準座標系51のX軸の周りに、Y軸からZ軸に向かう方向に僅かに回転している。ワーク91は、フランジ16の回転軸の周りに目標の姿勢から僅かに回転している。この結果、ワーク91の突出部92は、ワーク81の突出部82に対して、矢印107に示すように、Y軸の負側の方向に位置がずれている。また、ワーク91の突出部93は、ワーク81の突出部83に対して、矢印108に示すように、Y軸の正側の方向に位置がずれている。 When the workpiece 91 is in the target posture, the direction in which the pins 92a and 93a are lined up becomes parallel to the direction in which the holes 82a and 83a are lined up. In the example shown in FIG. 10, the posture of the workpiece 91 is slightly rotated from the target posture as shown by an arrow 106. The workpiece 91 is slightly rotated around the X-axis of the reference coordinate system 51 in a direction from the Y-axis toward the Z-axis. The workpiece 91 is slightly rotated from the target posture around the rotation axis of the flange 16. As a result, the protruding portion 92 of the workpiece 91 is displaced from the protruding portion 82 of the workpiece 81 in the negative direction of the Y-axis, as shown by an arrow 107. Furthermore, the protrusion 93 of the work 91 is shifted in position from the protrusion 83 of the work 81 in the positive direction of the Y-axis, as shown by an arrow 108.

本実施の形態における複数のカメラ25,26は、第2のワーク91において、互いに離れて配置された部分を撮像するように形成されている。第1のカメラ25は、第2のワーク91の予め定められた方向における一方の側に配置された部分としての突出部92を撮像するように配置されている。また、第2のカメラ26は、第2のワーク91の予め定められた方向における他方の側に配置された部分としての突出部93を撮像するように配置されている。ここでの予め定められた方向とは、ピン92aとピン93aとが並ぶ方向に相当する。 The plurality of cameras 25 and 26 in this embodiment are formed to image portions of the second workpiece 91 that are spaced apart from each other. The first camera 25 is arranged to take an image of the protrusion 92 as a portion disposed on one side of the second work 91 in a predetermined direction. Further, the second camera 26 is arranged to take an image of the protrusion 93 as a portion arranged on the other side of the second work 91 in a predetermined direction. The predetermined direction here corresponds to the direction in which the pins 92a and 93a are lined up.

図11に、第1のワークに対する第2のワークの姿勢がずれている時に、第1のカメラにて撮像した画像を示す。図10、図11、および基準画像である図5を参照して、画像66におけるワーク81に対するワーク91の相対的な位置は、基準画像61におけるワーク81に対するワーク91の相対的な位置と異なる。ワーク91の突出部92は、ワーク81の突出部82に対して、矢印107に示す向きにずれている。また、突出部92に固定されたピン92aの延びる方向と突出部82に形成された穴部82aの延びる方向とは平行にならずに、互いに異なる向きに向いている。 FIG. 11 shows an image captured by the first camera when the posture of the second workpiece is deviated from the first workpiece. 10, FIG. 11, and FIG. 5, which is a reference image, the relative position of workpiece 91 with respect to workpiece 81 in image 66 is different from the relative position of workpiece 91 with respect to workpiece 81 in reference image 61. The protrusion 92 of the work 91 is offset from the protrusion 82 of the work 81 in the direction shown by an arrow 107. Further, the direction in which the pin 92a fixed to the protrusion 92 extends and the direction in which the hole 82a formed in the protrusion 82 extends are not parallel to each other but are oriented in different directions.

図12に、第1のワークに対する第2のワークの姿勢が目標の姿勢である時に、第2のカメラにて撮像された画像を示す。画像67では、突出部93に固定されたピン93aの延びる方向と、突出部83に形成された穴部83aの延びる方向とが平行になっている。このために、ワーク81に対するワーク91の位置合わせを実施することにより、ピン93aを、穴部83aの内部に挿入することができる。 FIG. 12 shows an image captured by the second camera when the posture of the second workpiece relative to the first workpiece is the target posture. In the image 67, the direction in which the pin 93a fixed to the protrusion 93 extends is parallel to the direction in which the hole 83a formed in the protrusion 83 extends. For this purpose, by aligning the work 91 with respect to the work 81, the pin 93a can be inserted into the hole 83a.

図13に、第1のワークに対する第2のワークの姿勢がずれている時に、第2のカメラにて撮像した画像を示す。画像68では、ワーク81に対して矢印108に示すようにワーク91が僅かに回転している。図10、図12、および図13を参照して、画像68における突出部83に対する突出部93の相対的な位置は、矢印108に示すようにずれている。また、ピン93aの延びる方向は、穴部83aの延びる方向とは平行にならない。このために、ピン93aの先端が穴部83aの先端の真上に配置されても、ピン93aを穴部83aの内部に挿入することはできない。本実施の形態の第3の制御では、第1のワーク81に対する第2のワーク91の相対的な姿勢を修正する制御を実施する。 FIG. 13 shows an image captured by the second camera when the posture of the second workpiece is deviated from the first workpiece. In the image 68, the workpiece 91 is slightly rotated with respect to the workpiece 81 as shown by an arrow 108. Referring to FIGS. 10, 12, and 13, the relative position of protrusion 93 with respect to protrusion 83 in image 68 is shifted as shown by arrow 108. Further, the direction in which the pin 93a extends is not parallel to the direction in which the hole 83a extends. For this reason, even if the tip of the pin 93a is placed directly above the tip of the hole 83a, the pin 93a cannot be inserted into the hole 83a. In the third control of the present embodiment, control is performed to correct the relative posture of the second work 91 with respect to the first work 81.

図14に、本実施の形態の第2のロボット装置における第3の制御のフローチャートを示す。第3の制御においては、第2の制御に加えてワーク91の姿勢を修正する制御を実施する。 FIG. 14 shows a flowchart of the third control in the second robot device of this embodiment. In the third control, in addition to the second control, control for correcting the posture of the workpiece 91 is implemented.

ステップ131からステップ138は、前述の第2の制御と同様である。ステップ131において、第1のカメラ25および第2のカメラ26は、画像を撮像する。ステップ132において、特徴量検出部32は、第1のカメラ25にて撮像した画像における第1の特徴部位および第2の特徴部位を検出する。ステップ133において、特徴量検出部32は、第2のカメラ26にて撮像した画像における第3の特徴部位および第4の特徴部位を検出する。 Steps 131 to 138 are similar to the second control described above. In step 131, the first camera 25 and the second camera 26 capture images. In step 132, the feature detecting unit 32 detects a first feature region and a second feature region in the image captured by the first camera 25. In step 133, the feature detection unit 32 detects the third feature region and the fourth feature region in the image captured by the second camera 26.

ステップ134においては、特徴量検出部32は、第1の特徴部位の位置に関する第1の特徴量、第2の特徴部位の位置に関する第2の特徴量、第3の特徴部位の位置に関する第3の特徴量、および第4の特徴部位の位置に関する第4の特徴量を検出する。図11を参照して、特徴量検出部32は、第1のカメラ25にて撮像された画像66において、第1の特徴量として設定点P1のスクリーン座標系52の座標値を検出する。また、特徴量検出部32は、第2の特徴量として、設定点P2のスクリーン座標系52の座標値を検出する。図13を参照して、特徴量検出部32は、画像68において、第3の特徴量として設定点P3のスクリーン座標系52の座標値を検出する。特徴量検出部32は、第4の特徴量として、設定点P4のスクリーン座標系52の座標値を検出する。 In step 134, the feature detection unit 32 detects a first feature related to the position of the first feature, a second feature related to the position of the second feature, and a third feature related to the position of the third feature. , and a fourth feature related to the position of the fourth feature part. Referring to FIG. 11, the feature detection unit 32 detects the coordinate value of the set point P1 in the screen coordinate system 52 as the first feature in the image 66 captured by the first camera 25. Further, the feature detection unit 32 detects the coordinate value of the set point P2 in the screen coordinate system 52 as the second feature. Referring to FIG. 13, the feature detection unit 32 detects the coordinate value of the set point P3 in the screen coordinate system 52 as the third feature in the image 68. The feature detection unit 32 detects the coordinate value of the set point P4 in the screen coordinate system 52 as the fourth feature.

図14を参照して、ステップ135において、画像処理部31の算出部33は、第1の特徴量および第2の特徴量に基づいて相対位置量を算出する。ステップ136において、算出部33は、第3の特徴量および第4の特徴量に基づいて相対位置量を算出する。算出部33は、それぞれのカメラ25,26にて撮像された画像66,68における相対位置量を算出する。 Referring to FIG. 14, in step 135, the calculation unit 33 of the image processing unit 31 calculates the relative position amount based on the first feature amount and the second feature amount. In step 136, the calculation unit 33 calculates the relative position amount based on the third feature amount and the fourth feature amount. The calculation unit 33 calculates the relative position amounts in the images 66 and 68 captured by the cameras 25 and 26, respectively.

次に、ステップ137において、画像処理部31の指令生成部34は、それぞれのカメラ25,26にて撮像された画像66,68について、画像66,68における相対位置量と基準画像における相対位置量との差である相対位置量の差を算出する。ステップ138において、指令生成部34は、それぞれの画像66,68について、相対位置量の差に基づいて、ロボット1の移動指令を生成する。相対位置量の差は、スクリーン座標系52におけるu軸およびv軸に関する値として算出される。指令生成部34は、相対位置量の差に基づいて、ロボット1の移動指令を生成する。 Next, in step 137, the command generation unit 34 of the image processing unit 31 calculates the relative position amount in the images 66, 68 and the relative position amount in the reference image for the images 66, 68 captured by the respective cameras 25, 26. The difference in relative position amount is calculated. In step 138, the command generation unit 34 generates a movement command for the robot 1 based on the difference in relative position amount for each of the images 66 and 68. The difference in relative position amount is calculated as a value regarding the u-axis and the v-axis in the screen coordinate system 52. The command generation unit 34 generates a movement command for the robot 1 based on the difference in relative position amount.

指令生成部34は、カメラ25にて撮像した画像66に基づいて、ロボット1の位置の移動方向および移動量を基準座標系51にて算出する。また、指令生成部34は、カメラ26にて撮像された画像68に基づいて、ロボット1の位置の移動方向および移動量を基準座標系51にて算出する。すなわち、指令生成部34は、基準座標系51の座標軸の方向に沿った移動量を、それぞれの基準座標系51の座標軸ごとに算出する。 The command generation unit 34 calculates the movement direction and movement amount of the position of the robot 1 in the reference coordinate system 51 based on the image 66 captured by the camera 25. Further, the command generation unit 34 calculates the movement direction and movement amount of the position of the robot 1 in the reference coordinate system 51 based on the image 68 captured by the camera 26 . That is, the command generation unit 34 calculates the amount of movement along the direction of the coordinate axes of the reference coordinate system 51 for each coordinate axis of the reference coordinate system 51.

次に、ステップ139において、指令生成部34は、第1のカメラ25の画像から生成された移動指令と、第2のカメラ26の画像から生成された移動指令とに基づいて、第1のワーク81に対する第2のワーク91の姿勢が、予め定められた判定範囲内であるか否かを判定する。 Next, in step 139, the command generation unit 34 moves the first workpiece based on the movement command generated from the image of the first camera 25 and the movement command generated from the image of the second camera 26. It is determined whether the posture of the second workpiece 91 with respect to the second workpiece 81 is within a predetermined determination range.

本実施の形態においては、指令生成部34は、基準座標系51の予め定められた座標軸におけるロボット1の位置の移動方向を取得する。図10を参照して、ここでの例では基準座標系51の座標軸のうちY軸が予め選定されている。指令生成部34は、第1のカメラ25の画像66から生成された移動指令のうちY軸の移動指令と、第2のカメラ26の画像68から生成された移動指令のうちY軸の移動指令とを取得する。 In the present embodiment, the command generation unit 34 obtains the movement direction of the position of the robot 1 on predetermined coordinate axes of the reference coordinate system 51. Referring to FIG. 10, in this example, the Y axis is selected in advance among the coordinate axes of reference coordinate system 51. The command generation unit 34 generates a Y-axis movement command among the movement commands generated from the image 66 of the first camera 25 and a Y-axis movement command among the movement commands generated from the image 68 of the second camera 26. and get.

指令生成部34は、2台のカメラ25,26にて撮像された画像66,68から取得されたY軸の移動方向が同じ方向である場合に、第1のワーク81に対する第2のワーク91の姿勢が、予め定められた判定範囲内であると判定する。一方で、指令生成部34は、Y軸の移動方向が互いに異なる場合に、第1のワーク81に対する第2のワーク91の姿勢が判定範囲を逸脱していると判定する。 The command generation unit 34 moves the second workpiece 91 to the first workpiece 81 when the moving directions of the Y-axis obtained from the images 66 and 68 captured by the two cameras 25 and 26 are the same direction. It is determined that the posture of is within a predetermined determination range. On the other hand, if the moving directions of the Y-axis are different from each other, the command generation unit 34 determines that the posture of the second work 91 with respect to the first work 81 is outside the determination range.

図10から図13に示す例においては、第1のカメラ25にて撮像された画像に基づく移動指令では、ロボット1が矢印107と反対側に移動する指令が生成される。また、第2のカメラ26にて撮像された画像に基づく移動指令では、ロボット1が矢印108と反対側に移動する指令が生成される。このため、ステップ139においては、指令生成部34は、2つカメラにて撮像された画像に基づくY軸の移動方向は、互いに異なると判定する。この場合に、制御は、ステップ140に移行する。 In the example shown in FIGS. 10 to 13, the movement command based on the image captured by the first camera 25 generates a command for the robot 1 to move in the opposite direction to the arrow 107. Further, in the movement command based on the image captured by the second camera 26, a command for the robot 1 to move in the opposite direction to the arrow 108 is generated. Therefore, in step 139, the command generation unit 34 determines that the moving directions of the Y-axis based on the images captured by the two cameras are different from each other. In this case, control transfers to step 140.

なお、本実施の形態においては、基準座標系の予め定められた座標軸において、ロボットの位置を移動すべき方向が同じ方向である場合に判定範囲内であると判定しているが、この形態に限られない。予め定められた座標軸における移動方向が互いに異なる場合であっても、移動量が微小であれば判定範囲内であると判定しても構わない。 Note that in this embodiment, the robot is determined to be within the determination range if the directions in which the robot should move are in the same direction on the predetermined coordinate axes of the reference coordinate system. Not limited. Even if the directions of movement in the predetermined coordinate axes are different from each other, it may be determined that the amount of movement is within the determination range as long as the amount of movement is minute.

ステップ140において、指令生成部34は、ロボット1の姿勢の修正方法を設定する。指令生成部34は、第1のワーク81に対して第2のワーク91が傾いている方向と反対側にワーク91を回転させる移動指令を生成する。図10を参照して、本実施の形態では基準座標系51のX軸の周りにZ軸からY軸に向かう方向にワーク91を回転させる制御を実施する。ワーク91の回転量である姿勢修正量θは、予め定めておくことができる。 In step 140, the command generation unit 34 sets a method for correcting the posture of the robot 1. The command generation unit 34 generates a movement command to rotate the workpiece 91 in a direction opposite to the direction in which the second workpiece 91 is tilted with respect to the first workpiece 81. Referring to FIG. 10, in this embodiment, control is performed to rotate workpiece 91 around the X-axis of reference coordinate system 51 in a direction from the Z-axis toward the Y-axis. The posture correction amount θ, which is the amount of rotation of the workpiece 91, can be determined in advance.

ステップ141において、指令生成部34は、ロボット1の姿勢の修正方法に基づく移動指令を、動作制御部43に送出する。動作制御部43は、指令生成部34から受信した移動指令に基づいてロボットの姿勢を修正する。 In step 141, the command generation unit 34 sends a movement command based on the method for correcting the posture of the robot 1 to the motion control unit 43. The motion control unit 43 corrects the posture of the robot based on the movement command received from the command generation unit 34.

次に、ステップ142において、画像処理部31は、スクリーン座標系52の座標軸に対する基準座標系51のロボット1の位置の移動方向を補正する。相対位置量の差はスクリーン座標系52のu軸およびv軸に関する値にて算出される。スクリーン座標系52のu軸およびv軸に対応する基準座標系51におけるロボット1の位置の移動方向は、予め定められている。ロボット1の姿勢を修正すると、それぞれのカメラ25,26にて撮像される画像のu軸およびv軸に対応する基準座標系51における移動方向も変化する。すなわち、基準座標系のX軸、Y軸およびZ軸の座標値にて表されるロボット1の位置の移動方向が変化する。 Next, in step 142, the image processing unit 31 corrects the movement direction of the position of the robot 1 in the reference coordinate system 51 with respect to the coordinate axes of the screen coordinate system 52. The difference in relative position amounts is calculated using values related to the u-axis and v-axis of the screen coordinate system 52. The direction of movement of the position of the robot 1 in the reference coordinate system 51 corresponding to the u-axis and v-axis of the screen coordinate system 52 is determined in advance. When the posture of the robot 1 is corrected, the moving direction in the reference coordinate system 51 corresponding to the u-axis and v-axis of the images captured by the respective cameras 25 and 26 also changes. That is, the moving direction of the position of the robot 1, which is represented by the coordinate values of the X-axis, Y-axis, and Z-axis of the reference coordinate system, changes.

画像処理部31は、ロボット1の姿勢の修正量に基づいて、スクリーン座標系52の座標軸に対応するロボット1の位置の移動方向を修正する。例えば、ロボット1の姿勢の修正量に基づいて算出される変換行列を、ロボット1の位置の移動方向を示す基準座標系51のX軸、Y軸、およびZ軸の座標値に乗じることにより、ロボット1の位置の移動方向を修正することができる。 The image processing unit 31 corrects the moving direction of the position of the robot 1 corresponding to the coordinate axes of the screen coordinate system 52 based on the amount of correction of the posture of the robot 1. For example, by multiplying the coordinate values of the X-axis, Y-axis, and Z-axis of the reference coordinate system 51 indicating the moving direction of the robot 1's position by a transformation matrix calculated based on the amount of correction of the posture of the robot 1, The moving direction of the position of the robot 1 can be corrected.

ステップ142の後に、制御は、ステップ131に戻る。そして、ステップ131からステップ139における制御を繰り返す。ステップ139において、基準座標系51の予め定められた座標軸における移動方向が互いに異なる場合には、再びステップ140,141,142の制御を実施する。 After step 142, control returns to step 131. Then, the control in steps 131 to 139 is repeated. In step 139, if the moving directions in the predetermined coordinate axes of the reference coordinate system 51 are different from each other, the control in steps 140, 141, and 142 is performed again.

ステップ140において、ロボット1の姿勢の修正方法を設定する。前回の姿勢修正量θにてロボット1の姿勢を修正することにより、第1のワーク81に対して第2のワーク91の姿勢がずれる方向が逆になる場合ある。この場合には、前回の姿勢の修正と反対方向にロボット1の姿勢を修正する。更に、前回の修正量よりも減らした修正量を採用する。例えば、前回の修正量の半分の修正量(-θ/2)にて姿勢を変更する制御を実施する。一方で、前回の姿勢修正量θにてロボット1の姿勢を修正しても、第1のワーク81に対して第2のワーク91の姿勢がずれる方向が前回の制御における方向と同一の場合がある。この場合に、前回と同じ方向および同じ姿勢修正量θにて姿勢を修正する。この後に、再びステップ131からステップ139の制御を繰り返すことができる。 In step 140, a method for correcting the posture of the robot 1 is set. By correcting the posture of the robot 1 using the previous posture correction amount θ, the direction in which the posture of the second work 91 deviates from that of the first work 81 may be reversed. In this case, the posture of the robot 1 is corrected in the opposite direction to the previous correction of the posture. Furthermore, a correction amount that is smaller than the previous correction amount is adopted. For example, control is performed to change the posture with a correction amount (-θ/2) that is half of the previous correction amount. On the other hand, even if the posture of the robot 1 is corrected using the previous posture correction amount θ, the direction in which the posture of the second workpiece 91 deviates relative to the first workpiece 81 may be the same as the direction in the previous control. be. In this case, the posture is corrected in the same direction and with the same posture correction amount θ as the previous time. After this, the control from step 131 to step 139 can be repeated again.

このように、前回の制御における姿勢の修正により、姿勢がずれる方向が逆転した場合には、ロボットの姿勢を反対方向に修正するとともに修正量を減らす制御を実施することができる。この制御により、第1のワーク81に対する第2のワーク91の姿勢のずれを徐々に修正することができる。第1のカメラ25および第2のカメラ26にて撮像した画像において、第1のワーク81に対する第2のワーク91のずれる方向が同じになるまでロボット1の姿勢を修正することができる。 In this way, if the direction of the posture shift is reversed due to the posture correction in the previous control, control can be performed to correct the robot's posture in the opposite direction and reduce the amount of correction. Through this control, the deviation in the posture of the second work 91 with respect to the first work 81 can be gradually corrected. In the images taken by the first camera 25 and the second camera 26, the posture of the robot 1 can be corrected until the direction of displacement of the second work 91 with respect to the first work 81 becomes the same.

なお、ステップ139において、第1のワークに対する第2のワークの姿勢が判定範囲を逸脱する場合には、任意の制御を実施することができる。例えば、ロボット装置を停止しても構わない。また、ステップ140において、指令生成部34は、任意の制御にてロボット1の姿勢の修正方法を設定することができる。例えば、2台のカメラ25,26にて撮像された画像から算出されたY軸方向の移動量に基づいて、ワーク81の姿勢修正量を算出しても構わない。 Note that in step 139, if the posture of the second workpiece with respect to the first workpiece deviates from the determination range, arbitrary control can be performed. For example, the robot device may be stopped. Further, in step 140, the command generation unit 34 can set a method for correcting the posture of the robot 1 using arbitrary control. For example, the amount of posture correction of the workpiece 81 may be calculated based on the amount of movement in the Y-axis direction calculated from images captured by the two cameras 25 and 26.

ステップ139において、第1のカメラ25にて撮像された画像に基づく移動方向と第2のカメラ26にて撮像された画像に基づく移動方向とが同じである場合には、制御はステップ143に移行する。 In step 139, if the moving direction based on the image captured by the first camera 25 and the moving direction based on the image captured by the second camera 26 are the same, the control moves to step 143. do.

ステップ143からステップ145においては、第2の制御と同様に、ロボット1の位置の判定および修正を行う。ステップ143においては、第1のカメラ25にて撮像された画像に基づく相対位置量の差と、第2のカメラ26にて撮像された画像に基づく相対位置量の差とが予め定められた判定範囲内であるか否かを判定する。ステップ143において、少なくとも一方の相対位置量の差が判定範囲を逸脱する場合には、制御は、ステップ144に移行する。 In steps 143 to 145, the position of the robot 1 is determined and corrected similarly to the second control. In step 143, a predetermined determination is made as to whether the difference in relative position amount based on the image taken by the first camera 25 and the difference in relative position amount based on the image taken by the second camera 26 is determined in advance. Determine whether it is within the range. In step 143, if the difference in at least one relative position amount deviates from the determination range, control proceeds to step 144.

ステップ144において、指令生成部34は、それぞれの画像に基づく移動指令に基づいて、最終的なロボットの移動指令を生成する。そして、ステップ145において、動作制御部43は、最終的なロボットの移動指令に基づいてロボット1を駆動する。この後に、制御はステップ131に移行する。 In step 144, the command generation unit 34 generates a final robot movement command based on the movement command based on each image. Then, in step 145, the motion control unit 43 drives the robot 1 based on the final robot movement command. After this, control passes to step 131.

ステップ143において、2つの画像における相対位置量の差が判定範囲内である場合には、第1のワーク81に対する第2のワーク91の位置および姿勢が、目標の位置および目標の姿勢であると判定することができる。そして、この制御を終了することができる。 In step 143, if the difference in relative position amount between the two images is within the determination range, it is determined that the position and orientation of the second workpiece 91 with respect to the first workpiece 81 are the target position and target orientation. can be determined. This control can then be ended.

上記以外の第2のロボット装置8の構成、作用、および効果は、第1のロボット装置5と同様であるので、ここでは説明を繰り返さない。 The configuration, operation, and effects of the second robot device 8 other than those described above are the same as those of the first robot device 5, so the description will not be repeated here.

図15に、本実施の形態における第3のロボット装置のハンド、第1のワーク、および第2のワークの拡大斜視図を示す。第3のロボット装置9では、ハンド2に支持部材19が固定されている。支持部材19は、上側に延びる部分19aと、下側に延びる部分19bと有する。上側に延びる部分19aは、第2のロボット装置8と同様に、第1の視覚センサとしてカメラ25が固定されている。下側に延びる部分19bには、第2の視覚センサとしてのカメラ26が固定されている。 FIG. 15 shows an enlarged perspective view of the hand, first workpiece, and second workpiece of the third robot device in this embodiment. In the third robot device 9, a support member 19 is fixed to the hand 2. The support member 19 has an upwardly extending portion 19a and a downwardly extending portion 19b. Similar to the second robot device 8, a camera 25 is fixed to the upwardly extending portion 19a as a first visual sensor. A camera 26 as a second visual sensor is fixed to the downwardly extending portion 19b.

第3のロボット装置9のカメラ26の向きは、第2のロボット装置8のカメラ26の向きと異なる。支持部材19の下側に延びる部分19bは、カメラ26の撮像範囲26aがカメラ25の撮像範囲25aと重なるように、カメラ26を支持している。第3のロボット装置9のカメラ26は、カメラ25が撮像する部分と同一の部分を撮像するように配置されている。カメラ26は、ワーク81の突出部82と、ワーク91の突出部92とを撮像できるように配置されている。 The direction of the camera 26 of the third robot device 9 is different from the direction of the camera 26 of the second robot device 8. The downwardly extending portion 19b of the support member 19 supports the camera 26 such that the imaging range 26a of the camera 26 overlaps the imaging range 25a of the camera 25. The camera 26 of the third robot device 9 is arranged so as to image the same portion as the camera 25 images. The camera 26 is arranged so that it can image the protrusion 82 of the work 81 and the protrusion 92 of the work 91.

第3のロボット装置9においては、ワーク81に対してワーク91の位置を合わせるために、第4の制御を実施する。第4の制御では、第2のロボット装置8の第2の制御と同様に、第3の特徴部位および第4の特徴部位を設定して、複数のカメラ25,26の画像に基づいて、ロボット1の位置の調整を行う。本実施の形態では、突出部82の側面が第3の特徴部位に設定されている。また、突出部92の側面が第4の特徴部位に設定されている。第3のロボット装置9においては、第3の特徴部位は、第1の特徴部位と同じであっても異なっていても構わない。また、第4の特徴部位は、第2の特徴部位と同じであっても異なっていても構わない。 In the third robot device 9, a fourth control is performed in order to align the position of the workpiece 91 with respect to the workpiece 81. In the fourth control, similarly to the second control of the second robot device 8, the third characteristic part and the fourth characteristic part are set, and the robot is controlled based on the images of the plurality of cameras 25 and 26. Adjust position 1. In this embodiment, the side surface of the protrusion 82 is set as the third characteristic part. Further, the side surface of the protrusion 92 is set as the fourth characteristic part. In the third robot device 9, the third characteristic part may be the same as or different from the first characteristic part. Moreover, the fourth characteristic part may be the same as or different from the second characteristic part.

その他の第3のロボット装置9の構成、作用、および効果は、第2のロボット装置8と同様であるので、ここでは説明を繰り返さない。 The other configurations, operations, and effects of the third robot device 9 are similar to those of the second robot device 8, so the description will not be repeated here.

第2のロボット装置8の制御装置および第3のロボット装置9の制御装置は、2台のカメラを備えるが、この形態に限られない。ロボット装置の制御装置は、3台以上のカメラを備えていても構わない。制御装置は、それぞれのカメラにて互いに異なる特徴部位を撮像し、それぞれのカメラにて撮像した画像に基づいてワークの位置および姿勢の制御を実施しても構わない。 Although the control device of the second robot device 8 and the control device of the third robot device 9 include two cameras, the configuration is not limited to this. The control device of the robot device may include three or more cameras. The control device may take images of different characteristic parts with the respective cameras, and control the position and posture of the workpiece based on the images taken with the respective cameras.

図16に、本実施の形態における第4のロボット装置のハンド、第1のワーク、および第2のワークの拡大斜視図を示す。第4のロボット装置10は、第1のカメラ25および第2のカメラ26に加えて第3のカメラ28を備える。第4のロボット装置10は、ハンド2に支持された支持部材20を有する。支持部材20は、カメラ25を支持し、上側に延びる部分20aと、カメラ26を支持し、下側に延びる部分20bとを有する。また、支持部材20は、カメラ28を支持し、側方の延びる部分20cを有する。カメラ28は、撮像範囲28aを有する。カメラ28は、カメラ25の光軸の方向およびカメラ26の光軸の方向とは異なる方向に、光軸が延びるように配置されている。 FIG. 16 shows an enlarged perspective view of the hand, first workpiece, and second workpiece of the fourth robot device in this embodiment. The fourth robot device 10 includes a third camera 28 in addition to the first camera 25 and the second camera 26 . The fourth robot device 10 has a support member 20 supported by the hand 2. The support member 20 has a portion 20a that supports the camera 25 and extends upward, and a portion 20b that supports the camera 26 and extends downward. Further, the support member 20 supports the camera 28 and has a laterally extending portion 20c. The camera 28 has an imaging range 28a. The camera 28 is arranged so that its optical axis extends in a direction different from the optical axis direction of the camera 25 and the optical axis direction of the camera 26.

第4のロボット装置10においては、ワーク81に対してワーク91の位置および姿勢を合わせるための第5の制御を実施する。第5の制御では、カメラ28にて撮像される画像を処理するために、第1のワーク81に第5の特徴部位が設定されている。また、第2のワーク91に第6の特徴部位が設定されている。例えば、ワーク81の突出部83の側面が第5の特徴部位に設定され、ワーク91の突出部93の側面が第6の特徴部位に設定されている。 In the fourth robot device 10, a fifth control is performed to match the position and orientation of the workpiece 91 with respect to the workpiece 81. In the fifth control, a fifth characteristic part is set on the first workpiece 81 in order to process the image captured by the camera 28. Further, a sixth characteristic part is set in the second workpiece 91. For example, the side surface of the protrusion 83 of the workpiece 81 is set as the fifth characteristic part, and the side surface of the protrusion part 93 of the workpiece 91 is set as the sixth characteristic part.

カメラ28にて撮像された画像についても、前述の第1の制御と同様の制御を実施することができる。カメラ28は、第5の特徴部位および第6の特徴部位を撮像可能な位置に配置されている。第5の特徴部位および第6の特徴部位には、特徴部位の位置を定めるための第5の設定点および第6の設定点が設定されている。特徴量検出部32は、スクリーン座標系52における設定点の位置に基づいて第5の特徴部位に対応する第5の特徴量および第6の特徴部位に対応する第6の特徴量を検出することができる。カメラ28に関する基準画像は予め作成されている。そして、基準画像における第5の特徴量および第6の特徴量は予め算出することができる。また、基準画像における相対位置量は予め算出することができる。 The same control as the above-described first control can also be performed on the image captured by the camera 28. The camera 28 is arranged at a position where it can image the fifth characteristic region and the sixth characteristic region. A fifth set point and a sixth set point for determining the position of the characteristic part are set in the fifth characteristic part and the sixth characteristic part. The feature quantity detection unit 32 detects a fifth feature quantity corresponding to the fifth feature part and a sixth feature quantity corresponding to the sixth feature part based on the position of the set point in the screen coordinate system 52. Can be done. A reference image regarding the camera 28 is created in advance. The fifth feature amount and the sixth feature amount in the reference image can be calculated in advance. Further, the relative position amount in the reference image can be calculated in advance.

第5の制御においては、前述の第3の制御と同様の制御を実施することができる。第5の制御においては、3台のカメラにて、第1のワーク81に対する第2のワーク91の位置および姿勢を調整する。ワーク81に対するワーク91の位置を調整する制御では、3台のカメラ25,26,28にて取得される画像に基づいて第1のワーク81に対する第2のワーク91の位置のずれを検出することができる。このために、2台のカメラにて位置の調整を行う場合よりも精度よく位置の調整を行うことができる。 In the fifth control, control similar to the third control described above can be implemented. In the fifth control, the position and orientation of the second work 91 with respect to the first work 81 are adjusted using three cameras. In the control for adjusting the position of the workpiece 91 with respect to the workpiece 81, a shift in the position of the second workpiece 91 with respect to the first workpiece 81 is detected based on images acquired by the three cameras 25, 26, and 28. Can be done. For this reason, the position can be adjusted more accurately than when adjusting the position using two cameras.

また、ワーク81に対するワーク91の姿勢を修正する制御では、カメラ25にて撮像される画像およびカメラ28にて撮像される画像に基づいて、基準座標系51のY軸の周りにずれているワーク91の姿勢を修正することができる。この様に、カメラの台数を増やすことにより、姿勢のずれを修正する方向を増やすことができる。 In addition, in the control for correcting the posture of the workpiece 91 with respect to the workpiece 81, based on the image taken by the camera 25 and the image taken by the camera 28, the workpiece is shifted around the Y axis of the reference coordinate system 51. 91 postures can be corrected. In this way, by increasing the number of cameras, it is possible to increase the directions in which posture deviations are corrected.

その他の第4のロボット装置の構成、作用、および効果は、第1のロボット装置5、第2のロボット装置8、および第3のロボット装置9と同様であるので、ここでは説明を繰り返さない。 The other configurations, operations, and effects of the fourth robot device are the same as those of the first robot device 5, second robot device 8, and third robot device 9, so the description will not be repeated here.

前述の第1のロボット装置5、第2のロボット装置8、第3のロボット装置9、および第4のロボット装置10においては、カメラ25,26,28がハンド2に固定されて、ハンド2と共に移動するが、この形態に限られない。カメラは、設置面等に固定されていても構わない。すなわち、ロボット1の位置および姿勢が変化してもカメラの位置および姿勢は変化しないようにカメラが固定されていても構わない。 In the first robot device 5, the second robot device 8, the third robot device 9, and the fourth robot device 10 described above, the cameras 25, 26, and 28 are fixed to the hand 2, and the cameras 25, 26, and 28 are fixed to the hand 2 and Although it moves, it is not limited to this form. The camera may be fixed to an installation surface or the like. That is, the camera may be fixed so that the position and orientation of the camera do not change even if the position and orientation of the robot 1 change.

図17に、本実施の形態における第5のロボット装置の概略図を示す。第5のロボット装置6は、第1の部材としてのケース87の内部に、第2の部材としてのワーク97を配置する作業を実施する。ケース87は、第1のワークに相当し、ワーク97は、第2のワークに相当する。第5のロボット装置6は、ロボット1に取り付けられたハンド7を有する。ハンド7は吸着によりワーク97を把持するように形成されている。第5のロボット装置6は、ケース87を搬送する搬送機としてのコンベヤ75を備える。 FIG. 17 shows a schematic diagram of the fifth robot device in this embodiment. The fifth robot device 6 performs a work of arranging a workpiece 97 as a second member inside a case 87 as a first member. Case 87 corresponds to the first work, and work 97 corresponds to the second work. The fifth robot device 6 has a hand 7 attached to the robot 1. The hand 7 is formed to grip the workpiece 97 by suction. The fifth robot device 6 includes a conveyor 75 as a conveyor that conveys the case 87.

第5のロボット装置6は、設置面に架台71を介して固定された視覚センサとしてのカメラ27を有する。カメラ27は、ロボット1が位置および姿勢が変化しても不動である。カメラ27は、ロボット1がワーク97の位置の調整を行っている期間中に、ワーク97およびケース87を撮像できるように、コンベヤ75から十分に離れた位置に配置されている。 The fifth robot device 6 has a camera 27 as a visual sensor fixed to the installation surface via a pedestal 71. The camera 27 does not move even if the position and posture of the robot 1 change. The camera 27 is placed at a sufficient distance from the conveyor 75 so that it can image the work 97 and the case 87 while the robot 1 is adjusting the position of the work 97.

図18に、第5のロボット装置にてワークをケースに収容しているときの側面図を示す。ケース87は、矢印105に示すように、コンベヤ75にて搬送されている。ケース87は、ワーク97の形状に対応して形成された複数の壁部87aを有する。第5のロボット装置6は、壁部87aに囲まれる領域にワーク97を収容する。図18に示す例では、壁部87aにて囲まれる領域に対してワーク97の位置が合っている。このために、矢印104に示すように、ワーク97を下降することにより、ワーク97をケース87に収容することができる。 FIG. 18 shows a side view of the fifth robot device when the workpiece is accommodated in the case. Case 87 is being conveyed by conveyor 75 as shown by arrow 105. The case 87 has a plurality of walls 87a formed to correspond to the shape of the workpiece 97. The fifth robot device 6 accommodates a workpiece 97 in an area surrounded by a wall portion 87a. In the example shown in FIG. 18, the workpiece 97 is aligned with the area surrounded by the wall portion 87a. For this reason, the work 97 can be accommodated in the case 87 by lowering the work 97 as shown by the arrow 104.

図19に、第5のロボット装置にてワークをケースに収容しているときの他の側面図を示す。図19に示す例では、壁部87aに囲まれる領域に対してワーク97の位置がずれている。第5のロボット装置6では、第6の制御を実施する。第6の制御では、壁部87aにて囲まれる領域の真上にワーク97が配置されるようにロボット1の位置を調整する。ケース87に対するワーク97の姿勢は、予め調整されている。第6の制御においては、第1の制御と同様の制御により、ケース87の位置に対するワーク97の位置のずれを修正する。図18に示すようにケース87に対するワーク97の位置が合っている状態に対応する基準画像は、予め作成されている。 FIG. 19 shows another side view of the fifth robot device when the workpiece is housed in the case. In the example shown in FIG. 19, the position of the workpiece 97 is shifted from the area surrounded by the wall portion 87a. The fifth robot device 6 implements the sixth control. In the sixth control, the position of the robot 1 is adjusted so that the workpiece 97 is placed directly above the area surrounded by the wall portion 87a. The attitude of the workpiece 97 with respect to the case 87 is adjusted in advance. In the sixth control, the shift in the position of the workpiece 97 with respect to the position of the case 87 is corrected by the same control as the first control. As shown in FIG. 18, a reference image corresponding to a state where the workpiece 97 is aligned with the case 87 is created in advance.

図20に、カメラにて撮像された画像を示す。図20の画像では、壁部87aに囲まれる領域に対してワーク97の位置がずれている。第6の制御では、例えば、壁部87aの側面を第1の特徴部位に設定することができる。壁部87aの側面の角に第1の設定点P1を設定することができる。また、ワーク97の側面を第2の特徴部位に設定することができる。ワーク97の側面の角に、第2の設定点P2を設定することができる。 FIG. 20 shows an image captured by the camera. In the image of FIG. 20, the position of the workpiece 97 is shifted with respect to the area surrounded by the wall portion 87a. In the sixth control, for example, the side surface of the wall portion 87a can be set as the first characteristic part. A first set point P1 can be set at a corner of the side surface of the wall portion 87a. Further, the side surface of the workpiece 97 can be set as the second characteristic part. A second set point P2 can be set at a side corner of the workpiece 97.

図3および図20を参照して、特徴量検出部32は、第1の特徴部位の位置に関する第1の特徴量と、第2の特徴部位の位置に関する第2の特徴量とを検出する。算出部33は、第1の特徴量と第2の特徴量とに基づいて相対位置量を算出する。指令生成部34は、カメラ27にて撮像した画像65における相対位置量と、基準画像における相対位置量とに基づいて、ロボット1を動作させる移動指令を生成することができる。 Referring to FIG. 3 and FIG. 20, feature amount detection unit 32 detects a first feature amount related to the position of the first feature part and a second feature amount related to the position of the second feature part. The calculation unit 33 calculates the relative position amount based on the first feature amount and the second feature amount. The command generation unit 34 can generate a movement command for operating the robot 1 based on the relative position amount in the image 65 captured by the camera 27 and the relative position amount in the reference image.

カメラが固定されているロボット装置においても、第1の制御と同様の制御により、ロボットの位置の制御を実施することができる。また、設置面等に固定されている複数のカメラを用いて、第2の制御、第3の制御、または第4の制御と同様の制御を実施することができる。 Even in a robot device in which a camera is fixed, the position of the robot can be controlled by the same control as the first control. Furthermore, control similar to the second control, third control, or fourth control can be performed using a plurality of cameras fixed to an installation surface or the like.

その他の第5のロボット装置6の構成、作用および効果については、第1のロボット装置5、第2のロボット装置8、第3のロボット装置9、および第4のロボット装置10と同様であるので、ここでは説明を繰り返さない。 The other configurations, functions, and effects of the fifth robot device 6 are the same as those of the first robot device 5, the second robot device 8, the third robot device 9, and the fourth robot device 10. , I will not repeat the explanation here.

上記の実施の形態における視覚センサは、2次元カメラであるが、この形態に限られない。視覚センサは、画像に含まれる部材の3次元の位置が検出可能な3次元カメラであっても構わない。視覚センサとして3次元カメラを用いることにより、ベース画像を準備しなくても基準座標系における第1の部材の位置および第2の部材の位置を検出することができる。 Although the visual sensor in the above embodiment is a two-dimensional camera, it is not limited to this form. The visual sensor may be a three-dimensional camera that can detect the three-dimensional position of a member included in an image. By using a three-dimensional camera as a visual sensor, the position of the first member and the position of the second member in the reference coordinate system can be detected without preparing a base image.

上記の実施の形態では、製品を組み立てる作業を行うロボット装置およびケースにワークを挿入するロボット装置を取り上げているが、この形態に限られない。任意の作業を行うロボット装置に本実施の形態の制御装置を適用することができる。例えば、ワークをケースから取り出すロボット装置、スポット溶接を行うロボット装置、または接着剤を塗布するロボット装置などに本実施の形態の制御装置を適用することができる。 In the embodiments described above, a robot device that assembles a product and a robot device that inserts a workpiece into a case are used, but the present invention is not limited to this embodiment. The control device of this embodiment can be applied to a robot device that performs any work. For example, the control device of this embodiment can be applied to a robot device that takes out a workpiece from a case, a robot device that performs spot welding, a robot device that applies adhesive, and the like.

上記の実施の形態の第1の部材および第2の部材は、ワークまたはケースであるが、この形態に限られない。第1の部材は、ロボット装置が作業を行う任意の部材を採用することができる。また、第2の部材はロボットが駆動することにより移動する任意の部材を採用することができる。特に、第2の部材は、ロボットに取り付けられる作業ツールであっても構わない。例えば、スポット溶接を行うロボット装置では、ロボットに作業ツールとしてスポット溶接ガンが取り付けられる。この場合に、第2の部材は、スポット溶接ガンである。スポット溶接ガンにおいて、カメラにて撮像された画像にて検出が可能な部分を第2の特徴部位または第4の特徴部位に設定することができる。 Although the first member and the second member in the above embodiment are a workpiece or a case, they are not limited to this form. The first member can be any member that is operated by the robot device. Furthermore, the second member may be any member that moves when driven by a robot. In particular, the second member may be a working tool attached to the robot. For example, in a robot device that performs spot welding, a spot welding gun is attached to the robot as a work tool. In this case, the second member is a spot welding gun. In the spot welding gun, a portion that can be detected in an image captured by a camera can be set as a second characteristic region or a fourth characteristic region.

上記の実施の形態では、特徴部位は、ワークまたはケースの表面に設定しているが、この形態に限られない。特徴部位は、ロボットの構成部材、ハンドの構成部材、または、搬送機の構成部材に設定されていても構わない。例えば、第1の制御から第4の制御において、ハンドに対するワークの把持のずれが無い場合がある。または、ハンドに対するワークの把持のずれに対応してロボットの位置が調整されている場合がある。これらの場合には、カメラの撮像範囲にハンドが配置される場合に、第2の特徴部位、第4の特徴部位、および第6の特徴部位をハンドに設定しても構わない。 In the embodiments described above, the characteristic parts are set on the surface of the work or the case, but the present invention is not limited to this form. The characteristic part may be set in a component of the robot, a component of the hand, or a component of the transport machine. For example, in the first control to the fourth control, there may be no deviation in gripping the workpiece with respect to the hand. Alternatively, the position of the robot may be adjusted in response to a deviation in gripping the workpiece with respect to the hand. In these cases, when the hand is placed in the imaging range of the camera, the second characteristic part, the fourth characteristic part, and the sixth characteristic part may be set on the hand.

上述のそれぞれの制御においては、機能および作用が変更されない範囲において適宜ステップの順序を変更することができる。 In each of the above-mentioned controls, the order of steps can be changed as appropriate as long as the function and operation are not changed.

上記の実施の形態は、適宜組み合わせることができる。上述のそれぞれの図において、同一または相等する部分には同一の符号を付している。なお、上記の実施の形態は例示であり発明を限定するものではない。また、実施の形態においては、特許請求の範囲に示される実施の形態の変更が含まれている。 The above embodiments can be combined as appropriate. In each of the above-mentioned figures, the same or equivalent parts are given the same reference numerals. Note that the above-described embodiments are illustrative and do not limit the invention. Furthermore, the embodiments include modifications of the embodiments shown in the claims.

1 ロボット
2,7 ハンド
4 ロボット制御装置
5,6,8,9,10 ロボット装置
25,26,27,28 カメラ
31 画像処理部
32 特徴量検出部
33 算出部
34 指令生成部
43 動作制御部
61 基準画像
62,63,65,66,67,68 画像
75 コンベヤ
81 ワーク
82,83 突出部
87 ケース
87a 壁部
91 ワーク
92,93 突出部
97 ワーク
1 Robot 2, 7 Hand 4 Robot control device 5, 6, 8, 9, 10 Robot device 25, 26, 27, 28 Camera 31 Image processing section 32 Feature amount detection section 33 Calculation section 34 Command generation section 43 Operation control section 61 Reference image 62, 63, 65, 66, 67, 68 Image 75 Conveyor 81 Work 82, 83 Projection 87 Case 87a Wall 91 Work 92, 93 Projection 97 Work

Claims (6)

視覚センサにて撮像された第1の部材および第2の部材の画像に基づいて、第1の部材の位置を検出するための第1の特徴部位の位置に関する第1の特徴量と、第2の部材の位置を検出するための第2の特徴部位の位置に関する第2の特徴量とを検出する特徴量検出部と、
第1の特徴量と第2の特徴量とに基づいて相対位置量算出する算出部と、
第1の部材に対して第2の部材が目標の位置に配置されているときの第1の特徴部位および第2の特徴部位の画像を含む基準画像における相対位置量を取得し、前記視覚センサにて撮像した画像における相対位置量と基準画像における相対位置量とに基づいて、第1の部材に対して第2の部材が目標の位置に配置されるようにロボットを動作させる移動指令を生成する指令生成部と、を備える制御装置。
a first feature amount related to the position of the first feature part for detecting the position of the first member based on images of the first member and the second member captured by the visual sensor; a second feature amount related to the position of the second feature part for detecting the position of the member ;
a calculation unit that calculates a relative position amount based on the first feature amount and the second feature amount;
A relative position amount in a reference image including images of the first characteristic region and the second characteristic region when the second member is arranged at a target position with respect to the first member is acquired, and the visual sensor Generate a movement command to operate the robot so that the second member is placed at the target position with respect to the first member, based on the relative position amount in the image captured by and the relative position amount in the reference image. A control device comprising: a command generation unit for generating a command ;
前記指令生成部は、前記視覚センサにて撮像した画像における相対位置量と基準画像における相対位置量との差である相対位置量の差を算出し、
相対位置量の差に対するロボットの位置の移動方向が予め定められており、
相対位置量の差に対するロボットの位置の移動量の算出方法が予め定められており、
前記指令生成部は、相対位置量の差に基づいてロボットの位置の移動方向および移動量を設定し、ロボットの位置の移動方向および移動量に基づいて移動指令を生成する、請求項1に記載の制御装置。
The command generation unit calculates a difference in relative position amount, which is a difference between a relative position amount in the image captured by the visual sensor and a relative position amount in the reference image,
The direction of movement of the robot's position relative to the difference in relative position amount is determined in advance,
A method for calculating the amount of movement of the robot's position with respect to the difference in relative position amount is predetermined,
2. The command generation unit sets a moving direction and a moving amount of the robot's position based on a difference in relative position amounts, and generates a moving command based on the moving direction and moving amount of the robot's position. control device.
ロボットにより第1の部材に対する第2の部材の相対的な位置を合わせるロボット装置は、第1の部材を搬送する搬送機を含み、
前記搬送機が第1の部材を搬送している期間中に、前記特徴量検出部による第1の特徴量および第2の特徴量を検出する制御、前記算出部による相対位置量を出する制御、および前記指令生成部による移動指令を生成する制御を繰り返して実施する、請求項1または2に記載の制御装置。
A robot device that adjusts the relative position of a second member with respect to a first member by a robot includes a conveyor that conveys the first member,
Control of detecting a first feature amount and a second feature amount by the feature amount detection unit, and calculation of a relative position amount by the calculation unit, during a period when the conveyance machine is transporting the first member. The control device according to claim 1 or 2, wherein the control and the control of generating the movement command by the command generation unit are repeatedly executed.
前記搬送機による第1の部材の移動方向および移動速度が予め定められており、
前記指令生成部は、前記搬送機にて移動する第1の部材の位置に対してロボットの位置が追従するロボットの位置の移動方向および移動量に基づいて移動指令を生成する、請求項3に記載の制御装置。
The moving direction and moving speed of the first member by the conveyor are predetermined,
4. The command generation unit generates a movement command based on a movement direction and movement amount of a robot position that the robot position follows with respect to a position of the first member moved by the carrier. Control device as described.
ロボットを駆動する指令をロボットに送出する動作制御部を備え、
前記視覚センサは第1の視覚センサを構成し
前記特徴量検出部は、第2の視覚センサにて撮像された第1の部材および第2の部材の画像に基づいて第1の部材の位置を検出するための第3の特徴部位の位置に関する第3の特徴量と、第2の部材の位置を検出するための第4の特徴部位の位置に関する第4の特徴量とを検出し、
前記算出部は、第3の特徴量と第4の特徴量との差を相対位置量として算出し、
前記指令生成部は、
第1の部材に対して第2の部材が目標の位置に配置されているときの第3の特徴部位および第4の特徴部位の画像を含む基準画像における相対位置量を取得し、
前記第2の視覚センサにて撮像した画像における相対位置量と、第3の特徴部位および第4の特徴部位の画像を含む基準画像における相対位置量とに基づいて、第1の部材に対して第2の部材が目標の位置に配置されるようにロボットを動作させる移動指令を生成し、前記第1の視覚センサの画像から生成された移動指令と、前記第2の視覚センサの画像から生成された移動指令とに基づいて、前記動作制御部に送出する移動指令を生成する、請求項1から4のいずれか一項に記載の制御装置。
Equipped with an operation control unit that sends commands to drive the robot to the robot,
the visual sensor constitutes a first visual sensor ;
The feature quantity detection unit detects the position of a third characteristic part for detecting the position of the first member based on the images of the first member and the second member captured by the second visual sensor. detecting a third feature amount related to the position of the second member and a fourth feature amount related to the position of the fourth feature part for detecting the position of the second member ,
The calculation unit calculates the difference between the third feature amount and the fourth feature amount as a relative position amount,
The command generation unit includes:
Obtaining a relative position amount in a reference image including images of a third characteristic part and a fourth characteristic part when the second member is arranged at a target position with respect to the first member,
with respect to the first member based on the relative position amount in the image captured by the second visual sensor and the relative position amount in the reference image including images of the third characteristic region and the fourth characteristic region. Generate a movement command to operate the robot so that the second member is placed at the target position, and generate from the movement command generated from the image of the first visual sensor and the image of the second visual sensor. The control device according to any one of claims 1 to 4, wherein the control device generates a movement command to be sent to the operation control unit based on the movement command issued.
前記第1の視覚センサは、第2の部材の予め定められた方向における一方の側に配置された部分を撮像するように配置されており、
前記第2の視覚センサは、第2の部材の予め定められた方向における他方の側に配置された部分を撮像するように配置されており、
前記第1の視覚センサの画像から生成された移動指令と、前記第2の視覚センサの画像から生成された移動指令とに基づいて、第1の部材に対する第2の部材の姿勢が予め定められた判定範囲内であるか否かを判定する、請求項5に記載の制御装置。
The first visual sensor is arranged to image a portion of the second member arranged on one side in a predetermined direction,
The second visual sensor is arranged to image a portion of the second member arranged on the other side in a predetermined direction,
The posture of the second member relative to the first member is determined in advance based on a movement command generated from an image of the first visual sensor and a movement command generated from an image of the second visual sensor. 6. The control device according to claim 5, wherein the control device determines whether or not it is within a determined determination range.
JP2019219104A 2019-08-01 2019-12-03 Control device for robot equipment that controls the position of the robot Active JP7384653B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US16/923,485 US11679508B2 (en) 2019-08-01 2020-07-08 Robot device controller for controlling position of robot
DE102020119704.7A DE102020119704A1 (en) 2019-08-01 2020-07-27 CONTROL DEVICE OF A ROBOTIC DEVICE CONTROLLING THE POSITION OF A ROBOT
CN202010745050.8A CN112297004A (en) 2019-08-01 2020-07-29 Control device for robot device for controlling position of robot
US18/138,927 US20230256615A1 (en) 2019-08-01 2023-04-25 Robot device controller for controlling position of robot

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019142418 2019-08-01
JP2019142418 2019-08-01

Publications (2)

Publication Number Publication Date
JP2021024075A JP2021024075A (en) 2021-02-22
JP7384653B2 true JP7384653B2 (en) 2023-11-21

Family

ID=74662748

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019219104A Active JP7384653B2 (en) 2019-08-01 2019-12-03 Control device for robot equipment that controls the position of the robot

Country Status (1)

Country Link
JP (1) JP7384653B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2024006326A (en) * 2022-07-01 2024-01-17 三菱重工航空エンジン株式会社 Robot, robot control device, robot control method, and program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018167334A (en) 2017-03-29 2018-11-01 セイコーエプソン株式会社 Teaching device and teaching method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018167334A (en) 2017-03-29 2018-11-01 セイコーエプソン株式会社 Teaching device and teaching method

Also Published As

Publication number Publication date
JP2021024075A (en) 2021-02-22

Similar Documents

Publication Publication Date Title
CN108453701B (en) Method for controlling robot, method for teaching robot, and robot system
US20230256615A1 (en) Robot device controller for controlling position of robot
US9517563B2 (en) Robot system using visual feedback
US9050728B2 (en) Apparatus and method for measuring tool center point position of robot
JP7306937B2 (en) A control device for a robot device that adjusts the position of a member supported by a robot
JP3946711B2 (en) Robot system
CN113001535B (en) Automatic correction system and method for robot workpiece coordinate system
EP3542969B1 (en) Working-position correcting method and working robot
JP4289619B2 (en) Tool position correction method for articulated robots
JP2015136770A (en) Data creation system of visual sensor, and detection simulation system
US7957834B2 (en) Method for calculating rotation center point and axis of rotation, method for generating program, method for moving manipulator and positioning device, and robotic system
KR20080088165A (en) Robot calibration method
JP7384653B2 (en) Control device for robot equipment that controls the position of the robot
JP6912529B2 (en) How to correct the visual guidance robot arm
WO2022075303A1 (en) Robot system
JPH09222913A (en) Teaching position correcting device for robot
CN113905859B (en) Robot control system and robot control method
JP2021049606A (en) Controller for controlling robot of robot device
CN112549052B (en) Control device for robot device for adjusting position of robot-supported component
WO2023013739A1 (en) Robot control device, robot control system, and robot control method
WO2023135764A1 (en) Robot device provided with three-dimensional sensor and method for controlling robot device
CN117584115A (en) Control method and robot system
JP2017074637A (en) Tool center point estimation method and tool center point estimation device
JPH06206186A (en) Calibration of handling precision of horizontal articulated type robot equipped with visual sensor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220517

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230322

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230509

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230620

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20231010

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231109

R150 Certificate of patent or registration of utility model

Ref document number: 7384653

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150