JP6611888B2 - Robot device, control method of robot device, program, and recording medium - Google Patents

Robot device, control method of robot device, program, and recording medium Download PDF

Info

Publication number
JP6611888B2
JP6611888B2 JP2018185028A JP2018185028A JP6611888B2 JP 6611888 B2 JP6611888 B2 JP 6611888B2 JP 2018185028 A JP2018185028 A JP 2018185028A JP 2018185028 A JP2018185028 A JP 2018185028A JP 6611888 B2 JP6611888 B2 JP 6611888B2
Authority
JP
Japan
Prior art keywords
robot
calibration
robot arm
visual sensor
hand
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
JP2018185028A
Other languages
Japanese (ja)
Other versions
JP2018202608A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2018185028A priority Critical patent/JP6611888B2/en
Publication of JP2018202608A publication Critical patent/JP2018202608A/en
Application granted granted Critical
Publication of JP6611888B2 publication Critical patent/JP6611888B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、視覚センサを用いてロボットアームの位置姿勢を制御するロボット装置、ボット装置の制御方法、プログラムおよび記録媒体に関する。 The present invention is a robot device for controlling the position and orientation of the robot arm by using a visual sensor, the control method of the robot apparatus, a program, and a recording medium.

工業製品の生産現場で、ロボット装置が広く用いられるようになっている。この種のロボット装置において、ワークのピッキングや組立の作業を自動的に精度よく行うために、ロボットと視覚センサによる計測を組合せたシステム構成が知られている。ここでいう視覚センサとは、対象物の位置や姿勢を2次元的または3次元的に計測可能なセンサのことである。   Robot devices are widely used in industrial production sites. In this type of robot apparatus, in order to automatically and accurately perform work picking and assembly work, a system configuration is known that combines measurement with a robot and a visual sensor. The visual sensor here is a sensor that can measure the position and orientation of an object two-dimensionally or three-dimensionally.

この種の視覚センサとしては、カメラのような光学センサを含み、その光学センサで撮像した画像に対する画像認識などの画像処理を介して、対象物の位置や姿勢を2次元的または3次元的に計測する。例えば、一般的な単眼の工業用カメラ、特定の視差関係で3次元計測を行うカメラを複数配置したステレオカメラ、対象物にシート状のレーザ光やパターン光を投影する光学系とカメラを組み合わせた三次元計測センサなどが視覚センサとして用いられている。一般に、このようなロボット用途の視覚センサを表す言葉として「ビジョン」「ロボットビジョン」「カメラ」などの表現が用いられることがある。   This type of visual sensor includes an optical sensor such as a camera, and the position and orientation of an object are two-dimensionally or three-dimensionally determined through image processing such as image recognition for an image captured by the optical sensor. measure. For example, a general monocular industrial camera, a stereo camera in which a plurality of cameras that perform three-dimensional measurement in a specific parallax relationship are arranged, and an optical system that projects sheet-like laser light or pattern light onto an object and a camera are combined. A three-dimensional measurement sensor or the like is used as a visual sensor. In general, expressions such as “vision”, “robot vision”, and “camera” may be used as a term for such a visual sensor for robot use.

例えば、ワークのピッキングを行うロボット装置のロボットビジョンシステムでは、ワーク供給エリア(コンベアやトレイ・部品箱など)の上方に視覚センサを設置する構成が知られている。この視覚センサは、ロボットアームの動作とは独立してロボットアームの設置面に対して固定的な一定の位置関係を有する配置位置に配置され、ワーク供給エリアの比較的広い範囲(例えばその全体)を計測範囲として有する。   For example, in a robot vision system of a robot apparatus that picks a workpiece, a configuration in which a visual sensor is installed above a workpiece supply area (a conveyor, a tray, a component box, etc.) is known. This visual sensor is arranged at an arrangement position having a fixed and fixed positional relationship with respect to the installation surface of the robot arm independently of the operation of the robot arm, and a relatively wide range (for example, the whole) of the workpiece supply area. As a measurement range.

ピッキング動作においては、この視覚センサによって、まず、平置きや山積みされたワークの位置や姿勢を計測する。そして、その位置姿勢情報に基づいてロボットアームの動作を補正し、ロボットアーム先端に設けられたロボットハンド(グリッパや吸着パッドなど)をワーク上方からアプローチさせて部品を取得する。   In the picking operation, this visual sensor first measures the position and posture of a flat or piled work. Then, the movement of the robot arm is corrected based on the position and orientation information, and a robot hand (gripper, suction pad, etc.) provided at the tip of the robot arm is approached from above the workpiece to obtain a part.

このようなロボットビジョンシステムに作業を行わせるにあたっては、事前にロボットの座標系と視覚センサの座標系の関係を校正(キャリブレーション)により求めておくことが多い。視覚センサの計測値からロボットの動作目標値を得るために、視覚センサの座標系で得られた計測値を、ロボットアームの制御の基準となるロボット座標系の値に座標変換する必要があるためである。   In order to make such a robot vision system perform the work, the relationship between the coordinate system of the robot and the coordinate system of the visual sensor is often obtained in advance by calibration. In order to obtain the robot motion target value from the measurement value of the visual sensor, it is necessary to coordinate-transform the measurement value obtained in the coordinate system of the visual sensor into a value in the robot coordinate system that serves as a reference for controlling the robot arm. It is.

従来の代表的な校正方法として、インチングによる座標位置合わせがある。空間に固定されたワークやマーカーなどの3点以上の特徴点を視覚センサから計測しながら、その3点以上の特徴点にロボットアーム先端のツール頂点などの代表点の座標が一致するようにロボットアームを作業者がインチング操作し、位置決めする。そして、視覚センサの計測値とロボットアームを位置決めした時のロボットアームの位置姿勢から、ロボットの座標系と視覚センサの座標系の関係を表す校正値を求める。   As a conventional typical calibration method, there is coordinate alignment by inching. While measuring three or more feature points such as workpieces and markers fixed in space from the visual sensor, the robot coordinates so that the coordinates of representative points such as tool vertices at the tip of the robot arm coincide with the three or more feature points. The operator performs inching operation of the arm and positions it. Then, a calibration value representing the relationship between the coordinate system of the robot and the coordinate system of the visual sensor is obtained from the measured value of the visual sensor and the position and orientation of the robot arm when the robot arm is positioned.

また、ロボットアームの先端に校正用のマーカーを施したボードを取り付けて校正する方法も知られている(例えば下記の特許文献1)。この手法では、ロボットアームを複数の校正姿勢に位置決めするとともに、各々の校正姿勢において視覚センサからマーカーの計測値を取得し、校正値を算出する。   There is also known a method of performing calibration by attaching a board with a calibration marker to the tip of a robot arm (for example, Patent Document 1 below). In this method, the robot arm is positioned in a plurality of calibration postures, and the measurement value of the marker is acquired from the visual sensor in each calibration posture, and the calibration value is calculated.

特開2010−172986号公報JP 2010-172986 A

従来のインチングによる座標合わせの方法においては、作業者のインチング操作を介してロボットアームの位置姿勢を微調整する作業を要するため、自動化された作業に比べ座標合わせのために長い作業時間が必要になる、という問題があった。また、精度に関しても作業者の熟練度に依存するため、精度が安定しない問題があった。   The conventional method of coordinate alignment by inching requires a fine adjustment of the position and orientation of the robot arm through the operator's inching operation, and therefore requires a longer work time for coordinate alignment than automated operations. There was a problem of becoming. Moreover, since accuracy depends on the skill level of the operator, there is a problem that the accuracy is not stable.

また、特許文献1に記載されているような校正治具は、治具の特徴点(マーカー)間の位置関係を高精度に製作するか、または製作後に高精度に計測しておく必要があり、コストアップを招いていた。特に、工場内の複数の工程でロボットビジョンシステムを用いるような場合には、視覚センサの計測視野に応じて適切なサイズの治具を用いる必要があるため、高精度で高価な治具を複数用意しなければならず、影響が大きかった。   Further, the calibration jig as described in Patent Document 1 needs to manufacture the positional relationship between the feature points (markers) of the jig with high accuracy, or to measure with high accuracy after manufacturing. Incurred cost increase. In particular, when using a robot vision system in multiple processes in a factory, it is necessary to use a jig of an appropriate size according to the visual field of measurement of the visual sensor. It had to be prepared and the impact was great.

さらに、特許文献1のようにロボット先端に校正用のマーカーを付与する方法では、作業姿勢によってはロボットアームに付与したマーカーが視覚センサから隠れてしまう可能性があった。例えば、視覚センサの計測方向とロボットハンドのアプローチ方向が概同じである場合などにおいて、マーカーの隠れが生じる可能性がある。例えば、前述のような視覚センサ配置で上方から視覚センサでワークを計測して上方からピッキングを行う場合、ピッキング時の姿勢においてはロボット自身が視覚センサの視線を遮るため、視覚センサからロボット先端部を計測することができない。   Further, in the method of applying a calibration marker to the tip of the robot as in Patent Document 1, there is a possibility that the marker applied to the robot arm may be hidden from the visual sensor depending on the work posture. For example, the marker may be hidden when the measurement direction of the visual sensor and the approach direction of the robot hand are substantially the same. For example, when a workpiece is measured from above with a visual sensor arrangement as described above and picking is performed from above, the robot itself blocks the line of sight of the visual sensor during the picking posture. Cannot be measured.

そのため、やむを得ず校正時のロボット姿勢を実作業時とは大きく異なる姿勢にしてロボット先端部のマーカーを見えるようにしたり、マーカーの特徴点位置がロボット先端から大きく離れた位置になるように固定治具を設計したりする必要があった。しかし、ロボットの姿勢や視覚センサから計測するマーカーの特徴点位置をピッキング等の実作業時の条件と大きく変えた場合は、ロボットアームの動作誤差や視覚センサの計測誤差の影響が大きくなり、校正の精度が低下するという問題を生じる。一般的に、ロボットの絶対的な位置精度はロボットの繰返位置再現性に比べて低いため、実作業の姿勢に近い姿勢でかつ実作業時の動作範囲をなるべく広くカバーできるように、ロボットを動作させて校正を行うことが精度上望ましい。   Therefore, it is unavoidable to make the robot posture at the time of calibration significantly different from that at the time of actual work so that the marker at the tip of the robot can be seen, and the marker feature point position is far away from the robot tip. It was necessary to design. However, if the robot's posture or the position of the feature point of the marker measured from the visual sensor is greatly changed from the actual work conditions such as picking, the influence of the robot arm operation error and the visual sensor measurement error will increase and the calibration will This causes a problem that the accuracy of the lowering. In general, the absolute position accuracy of the robot is low compared to the repeatability of the robot's repeated position, so the robot should be installed in a posture that is close to the posture of the actual work and covers as wide a range as possible during actual work. It is desirable for accuracy to operate and perform calibration.

本発明の課題は、上記の問題に鑑み、作業者による微調整作業を必要とせずに低精度な治具でも高精度にロボットの座標系と視覚センサの座標系を校正することができるロボット装置を提供することを目的とする。また、本発明においては、視覚センサの計測方向とロボットハンドのアプローチ方向が概ね同方向であっても隠れの影響を受けずに高精度な校正が可能なロボットビジョンシステムを提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a robot apparatus capable of calibrating a robot coordinate system and a visual sensor coordinate system with high accuracy even with a low-precision jig without requiring fine adjustment work by an operator. The purpose is to provide. Another object of the present invention is to provide a robot vision system that can perform high-precision calibration without being affected by hiding even if the measurement direction of the visual sensor and the approach direction of the robot hand are substantially the same direction. To do.

以上の課題を解決するため、本発明においては、ロボットアームと、前記ロボットアームの基端部と所定の位置関係を有し、前記ロボットアームの可動範囲を含む計測範囲を計測する、前記ロボットアームに支持されていない第1の視覚センサと、前記ロボットアームに支持された第2の視覚センサと、前記ロボットアームの位置姿勢を制御する制御装置と、を備え、前記制御装置は、前記第1の視覚センサにより前記計測範囲に設けられた複数の特徴部を計測させて得た第1の計測データと、前記ロボットアームが複数の位置姿勢を取り、前記第2の視覚センサにより前記特徴部を計測させて得た第2の計測データと、前記ロボットアームの前記複数の位置姿勢の各々に対応する校正姿勢データと、を用いて、前記第1の視覚センサの計測値と前記ロボットアームに与える指令値とを関係づける校正を算出する構成を採用した。
To solve the above problems, the present invention, possess a robot arm, a proximal end and a predetermined positional relationship of the robot arm, measures the measurement range including the movable range of the robot arm, the robot arm A first visual sensor that is not supported by the robot arm , a second visual sensor supported by the robot arm , and a control device that controls the position and orientation of the robot arm. The first measurement data obtained by measuring a plurality of characteristic portions provided in the measurement range by the visual sensor, and the robot arm takes a plurality of positions and orientations, and the characteristic portion is detected by the second visual sensor. using the second measurement data obtained by measuring, with a calibration position data corresponding to each of the plurality of position and orientation of the robot arm, the measurement of the first visual sensor And adopting a configuration that calculates the calibration value that relates the command value to be given to the robot arm.

上記構成によれば、第1および第2の視覚センサの双方から基準マークを計測するようにしているので、ロボット先端をマーカーに厳密に微調整する必要が無く短時間で校正処理を行うことができる。また、校正値の算出においては第1および第2の視覚センサの計測値を用い、マーカーの座標値に関する設計寸法などの事前情報を用いないため、マーカー位置精度が低精度であっても高精度な校正が可能である。また、第1の視覚センサの計測方向とロボットハンドのアプローチ方向が概ね同じであっても隠れの影響を受けずに校正できるため、実作業時に近い姿勢かつ充分広い範囲でロボットを動作させて高精度に校正を行うことができる。   According to the above configuration, since the reference mark is measured from both the first and second visual sensors, the calibration process can be performed in a short time without the need for strictly fine-adjusting the tip of the robot to the marker. it can. In addition, the calibration value is calculated using the measurement values of the first and second visual sensors, and does not use prior information such as design dimensions related to the coordinate value of the marker. Calibration is possible. In addition, even if the measurement direction of the first visual sensor and the approach direction of the robot hand are almost the same, calibration can be performed without being affected by hiding, so the robot can be operated in a posture close to that during actual work and in a sufficiently wide range. Calibration can be performed with high accuracy.

本発明の実施例1のロボット装置の構成をピッキング動作時の状態で示した説明図である。It is explanatory drawing which showed the structure of the robot apparatus of Example 1 of this invention in the state at the time of picking operation | movement. 本発明の実施例1のロボット装置の構成を校正時の状態で示した説明図である。It is explanatory drawing which showed the structure of the robot apparatus of Example 1 of this invention in the state at the time of calibration. 本発明の基準部材の配置の一例を示した説明図である。It is explanatory drawing which showed an example of arrangement | positioning of the reference | standard member of this invention. 本発明の基準部材の配置の異なる一例を示した説明図である。It is explanatory drawing which showed an example from which arrangement | positioning of the reference | standard member of this invention differs. 本発明の実施例1における校正制御手順を示したフローチャート図である。It is the flowchart figure which showed the calibration control procedure in Example 1 of this invention. 本発明の実施例1における各座標系の関係を示した説明図である。It is explanatory drawing which showed the relationship of each coordinate system in Example 1 of this invention. 本発明の実施例2のロボット装置の構成を校正時の状態で示した説明図である。It is explanatory drawing which showed the structure of the robot apparatus of Example 2 of this invention in the state at the time of calibration. 本発明の実施例2における校正制御手順を示したフローチャート図である。It is the flowchart figure which showed the calibration control procedure in Example 2 of this invention. 本発明の実施例2における各座標系の関係を示した説明図である。It is explanatory drawing which showed the relationship of each coordinate system in Example 2 of this invention. 本発明の実施例3のロボット装置の構成を各座標系の関係とともに校正時の状態で示した説明図である。It is explanatory drawing which showed the structure of the robot apparatus of Example 3 of this invention with the state at the time of calibration with the relationship of each coordinate system. 本発明の実施例3における校正制御手順を示したフローチャート図である。It is the flowchart figure which showed the calibration control procedure in Example 3 of this invention.

以下、添付図面に示す実施例を参照して本発明を実施するための形態につき説明する。以下に示す実施例はあくまでも一例であり、例えば細部の構成については本発明の趣旨を逸脱しない範囲において当業者が適宜変更することができる。   DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described with reference to embodiments shown in the accompanying drawings. The following embodiment is merely an example, and for example, a detailed configuration can be appropriately changed by those skilled in the art without departing from the spirit of the present invention.

まず、本明細書における数式表現について説明する。以下の数式表現は、本実施例のみならず、後述の実施例についても通用する。   First, mathematical expressions in this specification will be described. The following mathematical expressions are applicable not only to this embodiment but also to embodiments described later.

(本明細書における数式表現の定義)
本明細書内では各要素の6自由度位置姿勢を表現するために3次元の座標系を用い、2つの座標系の相対姿勢を座標変換行列(同次変換行列)によって表現する。本明細書において、任意の座標系Aから任意の座標系Bに向かう相対位置姿勢を表す座標変換行列をの形式で記述する。また、その座標変換行列が表す相対姿勢のことを単純に『相対姿勢』のように記述することがある。ここで、は4×4の同次変換行列であって、回転行列rと並進ベクトルtを用いて以下のように定義される。
(Definition of mathematical expression in this specification)
In this specification, a three-dimensional coordinate system is used to express the 6-degree-of-freedom position and orientation of each element, and the relative orientation of the two coordinate systems is represented by a coordinate transformation matrix (homogeneous transformation matrix). In this specification, a coordinate transformation matrix representing a relative position and orientation from an arbitrary coordinate system A to an arbitrary coordinate system B is described in the form of A H B. Also, the relative posture represented by the coordinate transformation matrix may be simply described as “relative posture A H B ”. Here, A H B is a 4 × 4 homogeneous transformation matrix and is defined as follows using the rotation matrix r and the translation vector t.

Figure 0006611888
ここで、rは3次元の回転を表す3×3の回転行列であり、tは3×1の3次元の並進ベクトルである。座標変換行列の性質として、任意の座標系A,B,Cに対して、下記の関係が成立する。
Figure 0006611888
Here, r is a 3 × 3 rotation matrix representing a three-dimensional rotation, and t is a 3 × 1 three-dimensional translation vector. As a property of the coordinate transformation matrix, the following relationship is established for arbitrary coordinate systems A, B, and C.

Figure 0006611888
すなわち、座標系Aに対する座標系Bの相対姿勢と座標系Bに対する座標系Cの相対姿勢から、行列の掛け算により座標系Aに対する座標系Cの相対姿勢を求めることができる。
Figure 0006611888
That is, the relative orientation B H C coordinate system C for the relative orientation A H B and the coordinate system B of the coordinate system B with respect to the coordinate system A, obtains the relative position A H B of the coordinate system C with respect to the coordinate system A by matrix multiplication be able to.

また、座標系Bに対する座標系Aの相対姿勢を求めるためには、下記のように逆行列を計算すればよい。 In addition, in order to obtain the relative posture B H A of the coordinate system A with respect to the coordinate system B, an inverse matrix may be calculated as follows.

Figure 0006611888
また三次元空間上の任意の点Pを座標系Aから見た座標値の同次ベクトルをPと表現する。その座標値を(X,Y,Z)とすると同次ベクトルPは
Figure 0006611888
Also the homogeneous vector coordinate values viewed arbitrary point P on the three-dimensional space from the coordinate system A is expressed as A P. The coordinate values (X, Y, Z) when the homogeneous vector A P is

Figure 0006611888
のように表わされる。
点PをB座標系から見た座標値Pに変換するためには以下のように相対姿勢(同次変換行列)を左から掛けることにより、座標変換することができる。
Figure 0006611888
It is expressed as
By multiplying the relative posture B H A (homogeneous transformation matrix) from the left as shown below in order to convert the point P in the coordinate value B P as viewed from the B coordinate system, it is possible to coordinate transformation.

Figure 0006611888
Figure 0006611888

次に、本実施例1で用いられるロボット装置のハードウェア的な構成および、校正手順につき説明する。図1は、本発明の本実施例に係るロボット装置のハードウェア構成の一例を示している。図1はロボットビジョンシステム(以下、ロボットシステムと記載)10の構成をピッキング作業時の状態で示している。また、図2は、本発明の本実施例に係るロボットシステム10の校正時のシステム構成図である。   Next, the hardware configuration of the robot apparatus used in the first embodiment and the calibration procedure will be described. FIG. 1 shows an example of a hardware configuration of a robot apparatus according to this embodiment of the present invention. FIG. 1 shows a configuration of a robot vision system (hereinafter referred to as a robot system) 10 in a picking operation state. FIG. 2 is a system configuration diagram at the time of calibration of the robot system 10 according to the embodiment of the present invention.

図1ないし図2に示すように、ロボットシステム10は、ロボットアーム1、およびロボットアーム1の手先に固定されたロボットハンド2と、固定カメラ3(第1の視覚センサ)と、制御装置4と、ワーク配置エリア5と、架台9を備えている。また、校正時には、さらに手先カメラ7(第2の視覚センサ)とマーカー8(基準部材)を用いる(図2)。   As shown in FIGS. 1 and 2, the robot system 10 includes a robot arm 1, a robot hand 2 fixed to the hand of the robot arm 1, a fixed camera 3 (first visual sensor), a control device 4, and the like. A work placement area 5 and a gantry 9 are provided. At the time of calibration, a hand camera 7 (second visual sensor) and a marker 8 (reference member) are further used (FIG. 2).

固定カメラ3は、架台9の設置面に配置した支持脚上のマウントや雲台上に設置される。あるいは、架台9を配置する室内の天井から吊り下げたマウントなどに配置してもよい。いずれにしても、固定カメラ3は、これらの適当な固定カメラ支持部を介して、ロボットアーム1の動作とは独立してロボットアーム1を支持する架台9の設置面に対して固定的な一定の位置関係を有する配置位置に配置される。   The fixed camera 3 is installed on a mount on a support leg or a pan head arranged on the installation surface of the gantry 9. Or you may arrange | position to the mount etc. which hung from the indoor ceiling which arrange | positions the mount frame 9. FIG. In any case, the fixed camera 3 is fixed and fixed to the installation surface of the gantry 9 that supports the robot arm 1 independently of the operation of the robot arm 1 through these appropriate fixed camera support portions. It arrange | positions at the arrangement | positioning position which has the positional relationship.

ワーク配置エリア5は、固定カメラ3や手先カメラ7の計測対象となるワーク6ないしマーカー8が配置される計測領域を構成する。当然ながら、この計測領域は、ロボットアーム1の可動範囲を含み、また、ロボットアーム1を支持する架台9の設置面に対して固定的な一定の位置関係を有する。   The work placement area 5 constitutes a measurement area in which the work 6 or the marker 8 to be measured by the fixed camera 3 or the hand camera 7 is placed. Naturally, this measurement area includes the movable range of the robot arm 1 and has a fixed and fixed positional relationship with respect to the installation surface of the gantry 9 that supports the robot arm 1.

制御装置4はロボットシステム10全体の動作を制御する制御手段であって、演算を行うCPU41と、ROM42およびRAM43から成るメモリ部と、外部と通信を行うインターフェース(I/F)部44を有している。これらの各ブロックは制御装置内部の通信に用いられるバス45を介して相互に接続される。   The control device 4 is a control means for controlling the operation of the entire robot system 10, and includes a CPU 41 that performs calculation, a memory unit that includes a ROM 42 and a RAM 43, and an interface (I / F) unit 44 that communicates with the outside. ing. These blocks are connected to each other via a bus 45 used for communication inside the control device.

後述の校正処理において生成される手先カメラ7の計測に必要な校正姿勢データ、最終的な校正値(校正関数)を格納するためのメモリ領域は、例えばROM42やRAM43に配置する。例えば、この校正姿勢データや校正値(校正関数)を格納するROM42の領域は、好ましくはEEPROMのような書き換え可能なROMデバイスから構成する。あるいは、校正姿勢データ、校正値(校正関数)を格納する領域は、適当な電源で主電源が遮断された状態でも記憶内容がバックアップされたRAM43の領域に配置するようにしてもよい。このような構成により、一度生成した校正姿勢データや校正値(校正関数)を主電源の遮断を狭んでも利用できるようになる。この種の校正姿勢データや校正値(校正関数)は、ある程度のスパンを通して、固定的にメモリに格納しておく運用となるはずであるから、その格納領域は上記のように不揮発性を有するメモリとするのが好ましい。これらのデータの格納には、ROM42や、RAM43の不揮発領域の他、もちろんHDDやSSDなどの外部記憶デバイスを用いてもよい。   A memory area for storing calibration posture data and a final calibration value (calibration function) necessary for the measurement of the hand camera 7 generated in the calibration process described later is arranged in the ROM 42 or the RAM 43, for example. For example, the area of the ROM 42 for storing the calibration posture data and the calibration value (calibration function) is preferably composed of a rewritable ROM device such as an EEPROM. Alternatively, the area for storing the calibration attitude data and the calibration value (calibration function) may be arranged in the area of the RAM 43 where the stored contents are backed up even when the main power supply is shut off with an appropriate power supply. With such a configuration, the calibration posture data and the calibration value (calibration function) generated once can be used even if the shut-off of the main power supply is narrowed. This kind of calibration attitude data and calibration value (calibration function) should be stored in a fixed memory over a certain span, so the storage area is a non-volatile memory as described above. Is preferable. For storing these data, an external storage device such as an HDD or an SSD may be used in addition to the non-volatile areas of the ROM 42 and the RAM 43.

図1では、CPU41の制御機能を411〜414の各部によって示してある。これらの制御部や演算部は、あたかもハードウェアブロックであるかのごとく図示してあるが、実際には、例えばCPU41がROM42に記憶されたプログラムを読み込み、実行することによって実現される。これらの制御部および演算部は、ロボット制御部411と、校正演算部412と、視覚センサ制御部413と、特徴位置演算部414である。   In FIG. 1, the control functions of the CPU 41 are indicated by the units 411 to 414. Although these control units and calculation units are illustrated as if they were hardware blocks, in reality, for example, the CPU 41 is realized by reading and executing a program stored in the ROM 42. These control units and calculation units are a robot control unit 411, a calibration calculation unit 412, a visual sensor control unit 413, and a feature position calculation unit 414.

なお、本実施例では、ロボット制御部411、校正演算部412、視覚センサ制御部413および特徴位置演算部414を一台の制御装置4の内部に備える場合を例として説明する。しかしながら、これらの各ブロックについては、別個に設けられた複数の制御装置を組み合わせることによって同等の機能を実現しても構わない。   In the present embodiment, a case where the robot control unit 411, the calibration calculation unit 412, the visual sensor control unit 413, and the feature position calculation unit 414 are provided inside one control device 4 will be described as an example. However, for each of these blocks, an equivalent function may be realized by combining a plurality of separately provided control devices.

ロボットアーム1は架台9に固定された例えば6軸垂直多関節のロボットアームであり、制御装置4のインターフェース部44に電気的に接続されている。ロボットアーム1は、ロボット制御部411の指令値によって位置姿勢を制御され、先端部を6自由度に動作させることができる。ロボットアーム1の基端部には、架台9に対するロボットアーム1の取付位置姿勢を代表する座標系としてロボット座標系Rが設定されている。ロボット制御部411は、インターフェース部44を介してロボットアーム1およびロボットハンド2と通信し、これらの動作を制御する。   The robot arm 1 is, for example, a 6-axis vertical articulated robot arm fixed to the gantry 9 and is electrically connected to the interface unit 44 of the control device 4. The robot arm 1 is controlled in position and orientation by the command value of the robot control unit 411, and can move the tip portion with six degrees of freedom. A robot coordinate system R is set at the base end of the robot arm 1 as a coordinate system representing the attachment position and orientation of the robot arm 1 with respect to the gantry 9. The robot control unit 411 communicates with the robot arm 1 and the robot hand 2 via the interface unit 44, and controls these operations.

図1、図2では、インターフェース部44は簡略化のため1つのブロックで示してあるが、実際には外部と通信するためのいくつかの異なる通信方式のインターフェース部によって構成することができる。例えば、インターフェース部44は、後述の固定カメラ3や手先カメラ7との入出力にも用いられるが、これらカメラとの通信方式は、ロボットアーム1との通信で用いられる通信方式と異なっていて構わない。さらに、図1、図2では、インターフェース部44にはネットワーク50が接続されている。CPU41は、インターフェース部44〜ネットワーク50を介して生産工程を管理するサーバや、プラント中の他のロボット装置と通信することができる。   In FIG. 1 and FIG. 2, the interface unit 44 is shown as one block for the sake of brevity. However, in practice, the interface unit 44 may be configured by interface units of several different communication methods for communicating with the outside. For example, the interface unit 44 is also used for input / output with the fixed camera 3 and the hand camera 7 described later, but the communication method with these cameras may be different from the communication method used for communication with the robot arm 1. Absent. Further, in FIGS. 1 and 2, a network 50 is connected to the interface unit 44. The CPU 41 can communicate with a server that manages the production process and other robot apparatuses in the plant via the interface unit 44 to the network 50.

ROM42は、例えばCPU41が実行するプログラムを格納するためのプログラムメモリ、いわゆるコンピュータ読み取り可能な記録媒体として用いられる。このようなプログラムメモリはROM42に限らず他の記憶デバイスから構成することができる。CPU41が実行するプログラムを格納するための記憶デバイスとしては、固定式あるいは着脱式のHDDやSSDのような外部記憶装置、着脱式の各種フラッシュメモリや光ディスクを用いることができる(いずれも不図示)。特に着脱式の記憶デバイスは、CPU41の制御プログラムを導入、ないし供給し、または更新する目的で用いることができる。あるいは、本実施例のロボットシステム10制御プログラムは、インターフェース部44に接続されたネットワーク50を介してダウンロードし、上述の各種プログラムメモリに導入、供給(あるいは更新)することもできる。   The ROM 42 is used as a program memory for storing a program executed by the CPU 41, for example, a so-called computer-readable recording medium. Such a program memory is not limited to the ROM 42 and can be composed of other storage devices. As a storage device for storing a program executed by the CPU 41, a fixed or removable external storage device such as an HDD or SSD, various removable flash memories or optical disks can be used (all not shown). . In particular, the removable storage device can be used for the purpose of introducing, supplying, or updating the control program of the CPU 41. Alternatively, the control program for the robot system 10 according to the present embodiment can be downloaded via the network 50 connected to the interface unit 44, and can be introduced and supplied (or updated) to the various program memories described above.

さらに、インターフェース部44には、ロボットアーム1の動作を教示するための教示装置としてティーチングペンダント(不図示)が接続される。周知のように、ティーチングペンダント(TP)は、各種ファンクションキーとディスプレイなどを有し、手動操作によってロボットアーム1を動作させ例えば複数の教示点を順次、教示することによりロボットアーム1の位置姿勢をプログラムすることができる。下記の校正処理においては、複数のマーカー8を手先カメラ7で計測できる位置姿勢をロボットアーム1に教示するために用いられる。   Further, a teaching pendant (not shown) is connected to the interface unit 44 as a teaching device for teaching the operation of the robot arm 1. As is well known, the teaching pendant (TP) has various function keys, a display, etc., and moves the robot arm 1 by manual operation to, for example, sequentially teach a plurality of teaching points, thereby changing the position and orientation of the robot arm 1. Can be programmed. The following calibration process is used to teach the robot arm 1 the position and orientation at which the plurality of markers 8 can be measured by the hand camera 7.

また、インターフェース部44には、不図示のディスプレイ(LCDパネルなどを用いた表示装置)が接続される。このディスプレイは、後述の校正処理において、例えばティーチングペンダントを用いた教示操作中、固定カメラ3ないし手先カメラ7の撮影した画像を表示するのに用いることができる。   The interface unit 44 is connected to a display (display device using an LCD panel or the like) (not shown). This display can be used to display an image captured by the fixed camera 3 or the hand camera 7 during a teaching operation using a teaching pendant, for example, in a calibration process described later.

ロボットハンド2は、ワーク6を把持するためにロボットアーム1の先端部に設けられている。このロボットハンド2もインターフェース部44を介して制御装置4に接続されている。ロボットハンド2は制御装置4のロボット制御部411によって制御され、フィンガー21の開閉によってワーク6を把持およびリリースする動作を行うことができる。また、ロボットハンド2は、後述する手先カメラ7を再現性良く取り付けるための手先カメラ取付部22を備えている。なお、本実施例においてはフィンガー21の開閉によってワーク6を把持するロボットハンド2を例示しているが、ワーク6に対して作用を行うエンドエフェクタであれば他の構成のものを用いて構わない。例えば、真空吸着によってワーク6を取得する吸着パッドや、磁力を用いてワーク6を取得する電磁石ツールなどをロボットハンド2の代わりに用いてもよい。ロボットハンド2の掌部には、ロボットハンド2の位置姿勢を表す手先座標系Tが設定されている。   The robot hand 2 is provided at the tip of the robot arm 1 for gripping the workpiece 6. The robot hand 2 is also connected to the control device 4 via the interface unit 44. The robot hand 2 is controlled by the robot controller 411 of the control device 4 and can perform an operation of gripping and releasing the workpiece 6 by opening and closing the fingers 21. The robot hand 2 includes a hand camera mounting portion 22 for mounting a hand camera 7 described later with good reproducibility. In the present embodiment, the robot hand 2 that grips the workpiece 6 by opening and closing the fingers 21 is illustrated. However, any other end effector that acts on the workpiece 6 may be used. . For example, a suction pad that acquires the workpiece 6 by vacuum suction, an electromagnet tool that acquires the workpiece 6 using magnetic force, or the like may be used instead of the robot hand 2. A hand coordinate system T representing the position and orientation of the robot hand 2 is set in the palm of the robot hand 2.

ロボットアーム1は、制御装置4のロボット制御部411から出力される指令値に基づき各関節を駆動して、ロボットハンド2の位置姿勢を調整するようになっている。ロボット制御部411は、ロボット座標系Rを基準とする手先座標系Tの相対位置姿勢の目標値に対して、ロボットアーム1の各関節の取るべき角度目標値を算出する(逆運動学計算)。そして、ロボットアーム1の各関節に設けられた不図示のエンコーダが出力する現在角度が角度目標値に一致するようにサーボ制御を行う。また、ロボット制御部411は、エンコーダから各関節の現在角度情報を取得し、ロボット座標系Rに対する手先座標系Tの現在の相対位置姿勢を算出することができる。   The robot arm 1 adjusts the position and orientation of the robot hand 2 by driving each joint based on a command value output from the robot control unit 411 of the control device 4. The robot control unit 411 calculates an angle target value to be taken by each joint of the robot arm 1 with respect to a target value of the relative position and orientation of the hand coordinate system T with respect to the robot coordinate system R (inverse kinematic calculation). . Then, servo control is performed so that the current angle output from an encoder (not shown) provided at each joint of the robot arm 1 matches the angle target value. In addition, the robot control unit 411 can acquire current angle information of each joint from the encoder and calculate the current relative position and orientation of the hand coordinate system T with respect to the robot coordinate system R.

ワーク配置エリア5は、ピッキング時にワーク6を配置するためのエリアである。ワーク6の供給、という観点から考えると、ワーク配置エリアは上述のワーク供給エリアと考えてもよい。供給すべきワーク6は、図1のようにワーク配置エリアの上面にバラバラな向きに平置きされる。なお、本実施例においては平置きの場合について例示するが、ワーク6は専用のトレイに1個ずつ仕切られて供給されてもよいし、ワーク6が箱やトレイに山積みされた状態で供給されてもよい。   The work placement area 5 is an area for placing the work 6 during picking. From the viewpoint of supplying the workpiece 6, the workpiece arrangement area may be considered as the above-described workpiece supply area. The work 6 to be supplied is laid flat on the upper surface of the work placement area in different directions as shown in FIG. In the present embodiment, the case of flat placement is illustrated, but the workpieces 6 may be supplied by being partitioned one by one on a dedicated tray, or the workpieces 6 are supplied in a state of being piled up on boxes or trays. May be.

図1、図2において、本実施例の固定カメラ3は、例えばワーク6やマーカー8を3次元的に計測可能なステレオカメラから構成される。固定カメラ3の撮影距離や光学系の焦点距離は、ワーク配置エリア5内でワーク6が存在し得る範囲全域を計測できるよう、定められる。   1 and 2, the fixed camera 3 of this embodiment is composed of a stereo camera capable of measuring a workpiece 6 and a marker 8 three-dimensionally, for example. The shooting distance of the fixed camera 3 and the focal length of the optical system are determined so that the entire range in which the workpiece 6 can exist in the workpiece placement area 5 can be measured.

固定カメラ3はインターフェース部44を介して制御装置4に接続されており、視覚センサ制御部413からの指令を受けてワーク配置エリア5を撮影し、画像データを制御装置4に送信する。特徴位置演算部414は、固定カメラ3の撮像した画像データに対して画像処理を行い、ワーク6のエッジや角などの特徴部位を認識するとともに、ステレオ法のアルゴリズムを用いてワーク6の位置または位置姿勢を三次元的に算出する。固定カメラ3からの3次元計測を行うにあたって必要な、ステレオ画像上の2次元座標値と3次元の座標を対応づけるためのカメラ校正パラメータは、固定カメラ3単体で事前に校正されており、ROM42に記憶されているものとする。   The fixed camera 3 is connected to the control device 4 via the interface unit 44, receives a command from the visual sensor control unit 413, photographs the work placement area 5, and transmits image data to the control device 4. The feature position calculation unit 414 performs image processing on the image data captured by the fixed camera 3 to recognize feature parts such as edges and corners of the work 6 and uses the stereo algorithm to detect the position of the work 6 or The position and orientation are calculated three-dimensionally. The camera calibration parameters for associating the two-dimensional coordinate values on the stereo image with the three-dimensional coordinates necessary for performing the three-dimensional measurement from the fixed camera 3 are calibrated in advance by the fixed camera 3 alone. It is assumed that it is stored in

より具体的には、例えばステレオカメラを構成するカメラそれぞれについて2次元の画像座標と3次元の視線ベクトルを対応づけるためのカメラ内部パラメータと、カメラ間の相対位置姿勢を表すカメラ相対位置姿勢パラメータを事前に校正しておく。ステレオカメラの校正方法に関しては種々の方法が公知であるのでここでは詳述しない。例えば、ステレオカメラを構成する複数のカメラのうちの一台のレンズ主点位置に、固定カメラ3の位置姿勢を代表する固定カメラ座標系Fが仮想的に設定されている。固定カメラ3から上述のように計測を行った際の計測値は、固定カメラ座標系Fを基準として表現された座標値または座標変換行列の形で出力されるものとする。   More specifically, for example, a camera internal parameter for associating a two-dimensional image coordinate and a three-dimensional line-of-sight vector for each camera constituting a stereo camera, and a camera relative position and orientation parameter representing a relative position and orientation between the cameras. Calibrate in advance. Various methods for calibrating a stereo camera are known and will not be described in detail here. For example, a fixed camera coordinate system F representing the position and orientation of the fixed camera 3 is virtually set at one lens principal point position among a plurality of cameras constituting the stereo camera. It is assumed that the measurement value when the measurement is performed from the fixed camera 3 as described above is output in the form of a coordinate value or a coordinate transformation matrix expressed using the fixed camera coordinate system F as a reference.

手先カメラ7は、ロボットシステム10の校正時にロボットアーム1の手先カメラ取付部22に取り付けられる着脱可能なステレオカメラである。手先カメラ取付部22を介してロボットハンド2に機械的に支持されるとともに、ロボットアーム1の体内に設けた不図示の配線によってインターフェース部44に電気的に接続され、制御装置4と互いに通信できるよう構成されている。手先カメラ7は固定カメラ3と同様に、視覚センサ制御部413からの撮像指令によって撮像を行い、画像データを制御装置4に送信する。   The hand camera 7 is a detachable stereo camera that is attached to the hand camera mounting portion 22 of the robot arm 1 when the robot system 10 is calibrated. It is mechanically supported by the robot hand 2 via the hand camera mounting portion 22 and is electrically connected to the interface portion 44 by a wiring (not shown) provided in the body of the robot arm 1 so that it can communicate with the control device 4. It is configured as follows. Similar to the fixed camera 3, the hand camera 7 captures an image according to an imaging command from the visual sensor control unit 413 and transmits image data to the control device 4.

手先カメラ7に関しても、ステレオ画像上の2次元座標値と3次元の座標を対応づけるために必要なカメラ校正パラメータは事前に求められており、ROM42に予め記憶されている。特徴位置演算部414は、手先カメラ7が計測した画像データに対しても固定カメラ3の場合と同様に、画像処理を行って対象物の特徴部位を認識し、特徴部の位置または位置姿勢を3次元的に算出することが出来る。手先カメラ7に対しても、例えばステレオカメラを構成する複数のカメラのうちの一台のレンズ主点位置に、手先カメラ7の位置姿勢を代表する手先カメラ座標系Vが仮想的に設定されている。手先カメラ7の画像データに基づいて演算された位置または位置姿勢の計測値は、手先カメラ座標系Vを基準にした値として出力される。   Regarding the hand camera 7, camera calibration parameters necessary for associating the two-dimensional coordinate values on the stereo image with the three-dimensional coordinates are obtained in advance and stored in the ROM 42 in advance. The feature position calculation unit 414 also performs image processing on the image data measured by the hand camera 7 as in the case of the fixed camera 3, recognizes the feature part of the target object, and determines the position or position and orientation of the feature part. It can be calculated three-dimensionally. For the hand camera 7, for example, a hand camera coordinate system V representative of the position and orientation of the hand camera 7 is virtually set at the lens principal point position of one of a plurality of cameras constituting the stereo camera. Yes. The measured value of the position or position / orientation calculated based on the image data of the hand camera 7 is output as a value based on the hand camera coordinate system V.

マーカー8はロボットシステム10の校正時にワーク配置エリア5に取り付けられる基準部材であって、固定カメラ3および手先カメラ7から計測可能な特徴部として、円形のマーク81が黒色で印刷されている。本実施例では、マーカー8の印刷精度や加工精度、ワーク配置エリア5に対する設置の精度は、後述する校正の際にマーク81が固定カメラ3および手先カメラ7の視野内に入れば良く、高精度の加工や位置調整を必要としない。例えば、図示しないメネジ部をワーク配置エリア5の上面に設けておき、ネジ固定する、といった手法によりマーカー8を装着することができる。   The marker 8 is a reference member that is attached to the workpiece placement area 5 when the robot system 10 is calibrated, and a circular mark 81 is printed in black as a feature that can be measured from the fixed camera 3 and the hand camera 7. In the present embodiment, the printing accuracy and processing accuracy of the marker 8 and the installation accuracy with respect to the workpiece placement area 5 are sufficient if the mark 81 is within the field of view of the fixed camera 3 and the hand camera 7 during calibration, which will be described later. No processing or position adjustment is required. For example, the marker 8 can be mounted by a method in which a female screw portion (not shown) is provided on the upper surface of the work placement area 5 and fixed with screws.

マーカー8は、実際にワーク6をピッキングする際にワーク6の特徴部が存在し得る範囲およびロボットハンド2がワーク6をピッキングする際に取りうる手先位置の動作範囲を極力広くカバーするように配置することが望ましい。その理由としては、ピッキング精度の向上にある。例えば、第一に、固定カメラ3にはカメラ校正の誤差があるため、被計測部位の座標に応じた系統的な誤差が存在する。第二には、ロボットアーム1にも、ロボットアーム1の製作誤差や自重による撓み、熱膨張等による誤差が存在するため、位置姿勢に応じた系統的な誤差を持っている。   The marker 8 is arranged so as to cover as much as possible the range in which the features of the workpiece 6 can exist when actually picking the workpiece 6 and the movement range of the hand position that the robot hand 2 can take when picking the workpiece 6 It is desirable to do. The reason is to improve picking accuracy. For example, first, since the fixed camera 3 has an error in camera calibration, there is a systematic error corresponding to the coordinates of the measurement site. Secondly, the robot arm 1 also has a systematic error corresponding to the position and orientation because the manufacturing error of the robot arm 1, the error due to its own weight, the error due to thermal expansion, and the like exist.

上記の誤差の影響により、ロボット座標系Rと固定カメラ座標系Fの関係を厳密に一致させることはできない。特に狭い領域にマーカー8を設置して校正した場合には、座標系の角度ずれが大きくなり、校正を行った領域外にてピッキング作業を行う場合には、比較的大きい誤差を発生することになる。従って、上記の理由により、校正範囲は、ワーク6を実際にピッキングする際にワーク6の特徴点が取りうる範囲およびロボットアーム1が取りうる範囲を極力広くカバーすることが望ましい。また、校正を行う際のロボットアーム1の姿勢は、実際にワーク6をピッキングする際の姿勢と極力近い姿勢であることが望ましい。   Due to the influence of the above error, the relationship between the robot coordinate system R and the fixed camera coordinate system F cannot be exactly matched. In particular, when the marker 8 is installed and calibrated in a narrow area, the angular deviation of the coordinate system becomes large, and when picking work is performed outside the calibrated area, a relatively large error is generated. Become. Therefore, for the reason described above, it is desirable that the calibration range covers the range that can be taken by the characteristic points of the workpiece 6 and the range that can be taken by the robot arm 1 as much as possible when the workpiece 6 is actually picked. Further, it is desirable that the posture of the robot arm 1 at the time of calibration is as close as possible to the posture at which the workpiece 6 is actually picked.

図3は、マーカー8の配置範囲が、ロボットアーム1ないしロボットハンド2の可動範囲との関係において満たすべき設計条件を例示している。例えば、同図に示すように、ワーク配置エリア5を上面から見た際にマーク81の特徴点(例えばその円の中心)群を囲う最小の多角形が、ロボットハンド2がワーク6を把持する際の把持中心61を包含するように定めることが望ましい。   FIG. 3 exemplifies design conditions that the arrangement range of the marker 8 should satisfy in relation to the movable range of the robot arm 1 or the robot hand 2. For example, as shown in the figure, when the work placement area 5 is viewed from the top, the minimum polygon surrounding the group of feature points (for example, the center of the circle) of the mark 81 holds the work 6 by the robot hand 2. It is desirable to determine so as to include the gripping center 61 at the time.

ここで「把持中心」には、ロボットハンドやワークの形状によって種々の定義が考えられるが、例えば「ロボットハンド2がワーク6を取得する際に、ロボットハンド2が設計上ワーク6に当接する点群を包含する最小球体の中心」と定義することができる。本実施例のロボットシステム10においては、把持時にフィンガー21とワーク6が接触する2つの接触面の対称中心が把持中心61である。   Here, various definitions can be considered for the “grip center” depending on the shape of the robot hand and the workpiece. For example, “when the robot hand 2 acquires the workpiece 6, the robot hand 2 comes into contact with the workpiece 6 by design. It can be defined as “the center of the smallest sphere that encompasses the group”. In the robot system 10 of the present embodiment, the center of symmetry of the two contact surfaces where the finger 21 and the workpiece 6 come into contact during gripping is the gripping center 61.

なお、図3において、各々の把持中心61の周囲に直交する矢印を2つ示してあるが、これらは各ワーク6をその姿勢で把持した際のロボットハンド2の手先座標系Tの2座標軸(X軸、Y軸)に相当する。   In FIG. 3, two arrows perpendicular to the periphery of each gripping center 61 are shown. These are two coordinate axes (in the hand coordinate system T of the robot hand 2 when gripping each workpiece 6 in its posture ( X axis, Y axis).

以上のようにして、本実施例においては、第1の視覚センサは計測範囲がワーク配置エリア5を含むよう配置される。また、複数のマーカー8は、その各特徴部を結ぶ多角形がワーク配置エリア5でワーク6を把持するロボットハンド2の把持中心61が取りうる範囲を含むよう配置される。   As described above, in the present embodiment, the first visual sensor is arranged such that the measurement range includes the work placement area 5. Further, the plurality of markers 8 are arranged so that the polygon connecting the respective characteristic portions includes a range that can be taken by the gripping center 61 of the robot hand 2 that grips the work 6 in the work placement area 5.

なお、マーカー8は図2および図3に記載するようにワーク配置エリア5の上面に校正時のみ一時的に設置してもよいし、図4に例示するようにワーク配置エリア5の外周部に、常に設置しておいてもよい。また例えば、ワーク6による擦れやキズの心配がない場合は、ワーク配置エリア5の上面にマーク81を印刷しておき、マーカー8としても構わない。   The marker 8 may be temporarily placed on the upper surface of the work placement area 5 as shown in FIGS. 2 and 3 only during calibration, or may be placed on the outer periphery of the work placement area 5 as illustrated in FIG. It may be always installed. Further, for example, when there is no concern about rubbing or scratching by the work 6, the mark 81 may be printed on the upper surface of the work placement area 5 and used as the marker 8.

ロボットシステム10にピッキング作業を行わせる場合、まず、固定カメラ3よりワーク6を計測して、ワーク6の特徴部の位置または位置姿勢を表す計測値を得る。次に、計測値に基づいて、ロボットハンド2でワーク6を取得するためのロボットアーム1の目標位置(指令値)を演算する。目標位置の演算結果に基づいてロボット制御部411がロボットアーム1を制御し、ロボットハンド2をワーク6に上方からアプローチさせる。このアプローチ動作が完了すると、ロボット制御部411はロボットハンド2のフィンガー21を制御して閉じ、ワーク6を把持させる。その後、再度ロボットアーム1およびロボットハンド2を制御してワーク6をワーク置き位置(図示しない)に搬送し、1つのワーク6に対するピッキング動作を完了する。上記の動作をワーク配置エリア5にワーク6が無くなるまで繰り返すことによって、ピッキング作業を実現する。   When the robot system 10 performs the picking operation, first, the workpiece 6 is measured by the fixed camera 3 to obtain a measurement value representing the position or position / orientation of the characteristic portion of the workpiece 6. Next, based on the measured value, the target position (command value) of the robot arm 1 for obtaining the workpiece 6 by the robot hand 2 is calculated. Based on the calculation result of the target position, the robot control unit 411 controls the robot arm 1 and causes the robot hand 2 to approach the workpiece 6 from above. When this approach operation is completed, the robot control unit 411 controls and closes the finger 21 of the robot hand 2 to grip the workpiece 6. Thereafter, the robot arm 1 and the robot hand 2 are controlled again to transport the workpiece 6 to a workpiece placement position (not shown), and the picking operation for one workpiece 6 is completed. By repeating the above operation until the work 6 is no longer in the work placement area 5, the picking work is realized.

なお、ロボットハンド2がワーク配置エリア5内のワーク6にアプローチしている際は、ワーク6がロボットアーム1およびロボットハンド2によって隠れるため、固定カメラ3からワーク6を計測することが出来ない。そのためピッキング作業を繰り返し行う際には、ロボットアーム1がワーク配置エリア5上空の外に存在するタイミングで固定カメラ3の撮影を行う必要がある。   When the robot hand 2 approaches the workpiece 6 in the workpiece placement area 5, the workpiece 6 cannot be measured from the fixed camera 3 because the workpiece 6 is hidden by the robot arm 1 and the robot hand 2. Therefore, when the picking operation is repeatedly performed, it is necessary to take an image of the fixed camera 3 at a timing when the robot arm 1 exists outside the work placement area 5.

上記のピッキング作業の流れの中で固定カメラ3からワーク6を計測した計測値に基づいてロボットアーム1の目標値を算出するためには、固定カメラ3の計測値とロボットアーム1の指令値の関係を予め求めた校正関数が必要である。なぜなら、固定カメラ3から計測した計測値は固定カメラ座標系Fを基準に表現された座標値または座標変換行列であるが、ロボットアーム1を制御するためにはロボット座標系Rを基準とした指令値が必要だからである。本実施例においては、ロボット座標系Rと固定カメラ座標系Fの相対位置姿勢を表す座標変換行列を校正関数とし、この座標変換行列を校正によって求める。 In order to calculate the target value of the robot arm 1 based on the measurement value obtained by measuring the workpiece 6 from the fixed camera 3 in the above-described picking work flow, the measurement value of the fixed camera 3 and the command value of the robot arm 1 are calculated. A calibration function whose relationship is obtained in advance is required. This is because the measurement value measured from the fixed camera 3 is a coordinate value or a coordinate transformation matrix expressed based on the fixed camera coordinate system F, but in order to control the robot arm 1, a command based on the robot coordinate system R is used. Because a value is necessary. In this embodiment, a coordinate transformation matrix R H F representing the relative position and orientation of the robot coordinate system R and the fixed camera coordinate system F is used as a calibration function, and this coordinate transformation matrix R H F is obtained by calibration.

以下、図5を参照しつつ本実施例における校正処理の流れについて説明する。図5はロボットシステム10に対して校正を実施する際の制御手順を示している。図5の制御手順は、CPU41の制御プログラムとして例えばROM42(ないし上述の他のプログラムメモリ)に格納しておくことができる。また、図6は本実施例の校正処理において用いられる各座標系、座標変換行列および座標値の関係を示している。   Hereinafter, the flow of the calibration process in the present embodiment will be described with reference to FIG. FIG. 5 shows a control procedure when the robot system 10 is calibrated. The control procedure of FIG. 5 can be stored in the ROM 42 (or other program memory described above) as a control program of the CPU 41, for example. FIG. 6 shows the relationship among each coordinate system, coordinate transformation matrix, and coordinate values used in the calibration process of this embodiment.

校正処理の大まかな流れとしては、校正準備段階のステップS11〜S13は主に作業者が行う準備作業のステップであり、ステップS15〜S18は自動プログラムによってロボットシステム10が実行することのできる校正自動実行のステップである。校正自動実行のステップS15〜S18では、まず、ステップS15にて座標値P[i](第1の計測データ)を固定カメラ3からの計測によって取得する。次にステップS16において、ステップS13でティーチングされた校正姿勢[i](校正姿勢データに相当する座標変換行列)を用いてロボットアーム1を制御する。そして、ステップS17において、座標値P[i](第2の計測データ)を手先カメラ7からの計測により取得する。そして、ステップS18において、目的の校正値(校正関数)として座標変換行列を算出する。即ち、上述のステップで既知となった座標値P[i]、校正姿勢[i]、座標値P[i]と、予め取得済みの座標変換行列を用いて、座標変換行列を算出する。以上が、校正の大まかな流れである。 As a rough flow of the calibration process, steps S11 to S13 in the calibration preparation stage are preparatory work steps mainly performed by an operator, and steps S15 to S18 are calibration automatic operations that can be executed by the robot system 10 by an automatic program. It is an execution step. In calibration automatic execution of steps S15 to S18, first, it acquires the measured coordinate values F P [i] (the first measurement data) from the fixed camera 3 at step S15. Next, in step S16, the robot arm 1 is controlled using the calibration posture R H T [i] (coordinate transformation matrix corresponding to the calibration posture data) taught in step S13. In step S <b> 17, the coordinate value V P [i] (second measurement data) is acquired by measurement from the hand camera 7. Then, in step S18, it calculates a coordinate transformation matrix R H F as the calibration value of the objective (calibration function). That is, the coordinate value F P became known in the above step [i], the calibration position R H T [i], and the coordinate value V P [i], using the previously acquired coordinate transformation matrix T H V, A coordinate transformation matrix R H F is calculated. The above is a rough flow of calibration.

なお、上記の第1の計測データは、第1の視覚センサ(固定カメラ3)から特徴部の少なくとも3点以上の座標値を計測した座標データである。また、第2の計測データは、マーク(特徴部)81のうち、校正姿勢データで示される複数の校正用の位置姿勢の各々に対して第2の視覚センサ(手先カメラ7)の計測領域内に含まれた特徴部を少なくとも1点以上ずつ計測した座標データであるものとする。   In addition, said 1st measurement data are the coordinate data which measured the coordinate value of at least 3 or more points of a characteristic part from the 1st visual sensor (fixed camera 3). The second measurement data is included in the measurement region of the second visual sensor (hand camera 7) for each of a plurality of calibration positions and postures indicated by the calibration posture data in the mark (feature portion) 81. Coordinate data obtained by measuring at least one feature point included in the.

以下、図5の校正の各ステップについて、より詳細に説明する。なお、以下では図5中のステップ番号は括弧書きの場合「S11」のように略記する(後述の実施例でも同様)。   Hereinafter, each step of calibration in FIG. 5 will be described in more detail. In the following, step numbers in FIG. 5 are abbreviated as “S11” in parentheses (the same applies to the examples described later).

まず、ロボットハンド2の手先カメラ取付部22に対して、手先カメラ7を取り付ける(S11)。ロボットハンド2および手先カメラ取付部22は、手先カメラ7をロボットハンド2(ないしロボットアーム1)に対して、所定の装着位置に再現性良く装着できるよう構成しておく。例えば、手先カメラ取付部22に不図示の突き当て部を設け、手先カメラ7を再現性良くネジ(不図示)等で固定できるよう構成しておく。   First, the hand camera 7 is attached to the hand camera attaching part 22 of the robot hand 2 (S11). The robot hand 2 and the hand camera mounting portion 22 are configured so that the hand camera 7 can be mounted on the robot hand 2 (or the robot arm 1) at a predetermined mounting position with good reproducibility. For example, an abutting portion (not shown) is provided on the hand camera mounting portion 22 so that the hand camera 7 can be fixed with a screw (not shown) or the like with good reproducibility.

なお、手先カメラ7を取り外さなくても周囲に干渉する心配が無い場合や、ロボットシステム10が行う別の作業において手先カメラ7を使用する場合は、手先カメラ7は常にロボットハンド2に取り付けておいてもよい。例えば、ワーク6をピッキングしてワーク置き位置に置いた後に、手先カメラ7を用いてワーク6を検査したい場合などは、手先カメラ7を常時取りつけておく。その場合は、特に手先カメラ7を設置する作業を行う必要はない。   Note that the hand camera 7 is always attached to the robot hand 2 when there is no fear of interference with the surroundings without removing the hand camera 7 or when the hand camera 7 is used in another work performed by the robot system 10. May be. For example, when the work 6 is to be inspected using the hand camera 7 after the work 6 is picked and placed at the work placement position, the hand camera 7 is always attached. In that case, it is not necessary to perform the work of installing the hand camera 7 in particular.

次に、マーカー8をワーク配置エリア5に配置する(S12)。設置の際の配置の要件は、例えば前述の図3に示した通りである。ワーク配置エリア5上に予め設けられたマーカー固定用のネジ穴等を用いて、N個のマーカー8を固定する。図4において例示したように、ワーク配置エリア5に常にマーカー8を取り付けておく場合は、この作業は不要である。   Next, the marker 8 is placed in the work placement area 5 (S12). The requirements for arrangement at the time of installation are, for example, as shown in FIG. The N markers 8 are fixed using a marker fixing screw hole or the like provided in advance on the work placement area 5. As illustrated in FIG. 4, this work is not necessary when the marker 8 is always attached to the work placement area 5.

次に、N個のマーカー8に対して、N個の校正姿勢[i](N=1,2,3,…,N)をティーチングする(S13)。ここで、i番目の校正姿勢[i]は、i番目のマーカー8を手先カメラ7から計測できるロボットアーム1の位置姿勢である。例えば、ピッキング作業時の姿勢を基準としてロボットアーム1をティーチングペンダント(不図示)を用いて手動操作し、ディスプレイ(不図示)で手先カメラ7の画像を確認しつつ各マーカー8を計測可能なロボットアーム1の位置姿勢を教示し、登録する。このティーチングは高精度に実施する必要はなく、1つのマーカー8については、少なくとも手先カメラ7の計測範囲にそのマーカー8が含まれていればよい。 Next, N calibration postures R H T [i] (N = 1, 2, 3,..., N) are taught to the N markers 8 (S13). Here, the i th calibration posture R H T [i] is the position and posture of the robot arm 1 that can measure the i th marker 8 from the hand camera 7. For example, a robot capable of manually operating the robot arm 1 using a teaching pendant (not shown) with the posture during picking as a reference, and measuring each marker 8 while checking the image of the hand camera 7 on a display (not shown). Teach and register the position and orientation of the arm 1. This teaching need not be performed with high accuracy, and it is sufficient that one marker 8 is included in at least the measurement range of the hand camera 7.

ステップS13のティーチング(教示)の結果、生成されたN個の校正姿勢[i]は、校正姿勢データとしてメモリ(ROM42またはRAM43)に格納される。この教示作業は一度だけ実施すればよく、例えばロボットアーム1や固定カメラ3を交換した後、再校正を行うような場合は、過去にティーチングした結果をそのまま用いてもよい。 N calibration postures R H T [i] generated as a result of teaching (teaching) in step S13 are stored in the memory (ROM 42 or RAM 43) as calibration posture data. For example, when the robot arm 1 or the fixed camera 3 is replaced and then recalibration is performed, the teaching result in the past may be used as it is.

次に、固定カメラ3からマーカー8を計測可能となるように、ロボットアーム1をワーク配置エリア5の上空から退避させる(S14)。   Next, the robot arm 1 is retracted from above the work placement area 5 so that the marker 8 can be measured from the fixed camera 3 (S14).

以上のようにして、作業者が行う準備段階が終了し、以降はロボットシステム10をプログラム動作させることによって自動で校正を行う。まず、固定カメラ3から各マーカー8上のマーク81の中心座標を計測する(S15)。より具体的には、視覚センサ制御部413から固定カメラ3に撮像指令を出し、固定カメラ3から撮像したステレオ画像データを取得する。取得したこのステレオ画像データの各々に対して特徴位置演算部414が公知の円抽出処理(マークが円形の場合)を行い、マーク81の中心点の画像座標を認識する。そして、このマーク81の3次元の座標値P[i](i=1,2,3,...,N)を固定視覚センサ計測データ(第1の計測データ)として算出する。即ち、認識したマーク81中心点をステレオ画像間で対応づけ、ROM42より読み出したカメラ校正パラメータを用いてステレオ法によってマーク81の3次元の座標値P[i](i=1,2,3,...,N)を算出する。ここで、Nはマーカー8の個数を表す正の整数であり、例えば図2および図3に示すようにマーカーが5個の場合はN=5である。また、iはマーカーの個体を区別するためのインデックス(通し番号)で、下記のステップS16、S17のループ制御では、このインデックスiがループを制御する変数として用いられる。 As described above, the preparation stage performed by the operator is completed. Thereafter, the robot system 10 is automatically calibrated by performing a program operation. First, the center coordinates of the mark 81 on each marker 8 are measured from the fixed camera 3 (S15). More specifically, an imaging command is issued from the visual sensor control unit 413 to the fixed camera 3, and stereo image data captured from the fixed camera 3 is acquired. The feature position calculation unit 414 performs a known circle extraction process (when the mark is circular) on each of the acquired stereo image data, and recognizes the image coordinates of the center point of the mark 81. The coordinate values F P [i] (i = 1,2,3, ..., N) of the three-dimensional mark 81 is calculated as a fixed visual sensor measurement data (first measurement data). That is, correspondence the recognized mark 81 center point between the stereo images, the coordinate values of the three-dimensional marks 81 by the stereo method using the camera calibration parameters read from the ROM42 F P [i] (i = 1,2,3 , ..., N). Here, N is a positive integer representing the number of markers 8, and for example, N = 5 when there are five markers as shown in FIGS. Further, i is an index (serial number) for distinguishing individual markers. In the loop control in steps S16 and S17 described below, this index i is used as a variable for controlling the loop.

その後、i番目の校正姿勢[i]にロボットアーム1を動作させて(S16)、手先カメラからマーカー8を計測する処理(S17)を、マーカー8の個数N回分だけ繰り返す。ここでは、ステップS13で生成したN個の校正姿勢[i]を格納した校正姿勢データをメモリから読み出して用いる。なお、ステップS16、S17を狭むように配置されたステップS101、S102は、上記のインデックスiを1からNまで順次インクリメントするための制御構造を、例えばC言語などにおける記述様式に準じて示したものである。実際のプログラムの実行時には、ステップS101の位置ではインデックスiが1に初期化される。また、ステップS102の位置ではステップS16、S17をN回実行済みか否かを判定し、N回実行済みでなければインデックスiをインクリメントしてステップS16にループし、N回実行済みであればステップS18に移行する。 Thereafter, the robot arm 1 is moved to the i-th calibration posture R H T [i] (S16), and the process of measuring the marker 8 from the hand camera (S17) is repeated for the number N of the markers 8. Here, the calibration attitude data storing the N calibration attitudes R H T [i] generated in step S13 is read from the memory and used. Steps S101 and S102 arranged so as to narrow down steps S16 and S17 show a control structure for sequentially incrementing the index i from 1 to N according to a description format in C language, for example. is there. When the actual program is executed, the index i is initialized to 1 at the position of step S101. Further, at the position of step S102, it is determined whether or not steps S16 and S17 have been executed N times. If not executed N times, the index i is incremented and looped to step S16. The process proceeds to S18.

i番目の校正姿勢[i]において、手先カメラ7からi番目のマーカー8を計測する処理に関しては、前述の固定カメラ3における計測の処理と同一である。ただし、手先カメラ7の計測可能な視野範囲は固定カメラ3の視野範囲に比べて一般に狭いため、本実施例においては、各校正姿勢[i]に対して一回に計測可能なマーカー8の個数は1つであるものとする。よって、i番目のマーカー8上のマーク81に対する一回の計測ごとに、手先カメラ座標系Vを基準とした計測された座標値P[i](手先視覚センサ計測データ)が算出される。ロボットアーム1の動作(S16)と、手先カメラ7からの計測(S17)をN回繰り返すことにより、N組のデータが取得される。 In the i-th calibration posture R H T [i], the process of measuring the i-th marker 8 from the hand camera 7 is the same as the measurement process in the fixed camera 3 described above. However, since the field-of-view range that can be measured by the hand camera 7 is generally narrower than the field-of-view range of the fixed camera 3, in this embodiment, a marker that can be measured at once for each calibration posture R H T [i]. It is assumed that the number of 8 is one. Thus, for each single measurement for the i-th mark 81 on the marker 8, it is measured relative to the hand camera coordinate system V coordinate value V P [i] (hand visual sensor measurement data) is calculated. By repeating the operation of the robot arm 1 (S16) and the measurement from the hand camera 7 (S17) N times, N sets of data are acquired.

最後に、上記の処理で取得したデータを用いて校正値算出処理を行う(S18)。以下、本実施例における校正処理の原理を数式を用いて説明する。以下の数式に対応する演算は、校正演算部412によって実行される。より具体的には、この校正演算部412の演算機能は、CPU41が対応する演算制御プログラムを実行することにより実現される。   Finally, a calibration value calculation process is performed using the data acquired in the above process (S18). Hereinafter, the principle of the calibration process in the present embodiment will be described using mathematical expressions. Calculations corresponding to the following formulas are executed by the calibration calculation unit 412. More specifically, the calculation function of the calibration calculation unit 412 is realized by the CPU 41 executing a corresponding calculation control program.

まず、ロボット座標系Rを基準としたマーク81の座標値P[i]を、未知の校正値である座標変換行列と固定カメラ3からマーカーを計測(S15)した座標値P[i]を用いて記述すると、次式のようになる。 First, the coordinate value R P [i] of the mark 81 with respect to the robot coordinate system R is used as the coordinate value F P obtained by measuring the marker from the coordinate transformation matrix R H F that is an unknown calibration value and the fixed camera 3 (S15). If it describes using [i], it will become like following Formula.

Figure 0006611888
Figure 0006611888

また、座標値P[i]を、ロボットアーム1を動作(S16)させた際の校正姿勢[i]と、手先カメラ7からマーク81を計測(S17)した座標値P[i]を用いて記述すると、 Also, the coordinate value R P [i] is calculated from the calibration posture R H T [i] when the robot arm 1 is operated (S16), and the coordinate value V P [ i],

Figure 0006611888
となる。
Figure 0006611888
It becomes.

ここで座標変換行列は、ロボットアーム1の手先座標系Tと、手先カメラ7の手先カメラ座標系Vを関係づける相対位置姿勢を表す校正データである。この座標変換行列は、ロボットアーム1の姿勢によって変化しない固定値の行列であるため、事前に求めておくことが可能である。本実施例においては座標変換行列は事前に求められており、ROM42に記憶されているものとする。 Here, the coordinate transformation matrix T H V is calibration data representing the relative position and orientation that relate the hand coordinate system T of the robot arm 1 and the hand camera coordinate system V of the hand camera 7. Since this coordinate transformation matrix T H V is a fixed value matrix that does not change depending on the posture of the robot arm 1, it can be obtained in advance. In the present embodiment, it is assumed that the coordinate transformation matrix T H V is obtained in advance and stored in the ROM 42.

なお、座標変換行列を算出する一般的な手法としては、手先カメラ7をロボットハンド2に固定した状態で公知のハンドアイキャリブレーション手法を用いることができる。また手先カメラ7を専用の治具に固定し、ロボットシステム10とは独立した状態で校正を行っておいてもよい。その場合は例えば、専用治具上に座標が既知な指標を設けておき、手先カメラ7から計測させることによって、手先カメラ取付部22に対する突き当て面などを基準として手先カメラ座標系Vの位置姿勢を校正しておくことができる。 As a general method of calculating the coordinate transformation matrix T H V, may be a known hand-eye calibration method while fixing the hand camera 7 to the robot hand 2. Alternatively, the hand camera 7 may be fixed to a dedicated jig and calibrated in a state independent of the robot system 10. In this case, for example, an index with a known coordinate is provided on a dedicated jig and measured from the hand camera 7 so that the position and orientation of the hand camera coordinate system V are based on the abutting surface with respect to the hand camera mounting portion 22. Can be calibrated.

ここで、式(6)と式(7)でP[i]が等しいので、両式から以下の等式が成り立つ。 Here, since R P [i] is equal in the equations (6) and (7), the following equations are established from both equations.

Figure 0006611888
上式(8)において、左辺ののみが未知の量(6自由度の座標変換行列)であって、その他のパラメータはすべてこれまでのステップにより既知の量である。実際のデータには誤差があるためN組全てのデータについて等式が厳密に成立する解は得られない。しかしながら、マーク81の座標データが同一直線上に無い3点以上あれば、N個の式を連立して最小二乗法で解くことにより目的の校正パラメータとして座標変換行列を算出することができる。
Figure 0006611888
In the above equation (8), only the left side of R H F is unknown quantities (coordinate transformation matrix 6 degrees of freedom), is a known quantity by step until all other parameters this. Since there is an error in the actual data, a solution in which the equations are strictly valid cannot be obtained for all N sets of data. However, if the coordinate data of the mark 81 is three or more points that are not on the same straight line, the coordinate transformation matrix R H F can be calculated as a target calibration parameter by simultaneously solving N equations using the least square method. it can.

Figure 0006611888
式(9)の最小二乗法を解くには、例えば同時変換行列としてのを3つの並進パラメータ(X,Y,Z)と3つの回転角度パラメータ(θ,φ,ψ)で記述し、式(9)左辺が最小となるようレーベンバーグ・マーカート法などを用い数値演算で求める。また、別の例としては、座標変換行列の回転行列部分を四元数(q1,q2,q3,q4)を用いて表し、四元数ベクトルの長さが1であるという制約条件のもとに、制約条件付きの最小二乗アルゴリズムを用いて解を算出してもよい。
Figure 0006611888
In order to solve the least square method of Equation (9), for example, R H F as a simultaneous conversion matrix is described by three translation parameters (X, Y, Z) and three rotation angle parameters (θ, φ, ψ). Equation (9) is obtained by numerical calculation using the Levenberg-Marquardt method or the like so that the left side is minimized. As another example, a constraint condition that the rotation matrix portion of the coordinate transformation matrix R H F is represented by using a quaternion (q1, q2, q3, q4), and the length of the quaternion vector is 1. The solution may be calculated using a least square algorithm with constraints.

以上の校正処理により、目的の校正値、すなわち、ロボット座標系Rと固定カメラ座標系Fの相対位置姿勢を表す座標変換行列を数値演算によって求めることができる。以上のようにして校正演算部412で算出した結果は校正パラメータファイルとしてROM42またはRAM43(あるいは他の記憶装置)に記憶させる。そして、前述のピッキング作業を行う場合は、記憶させた校正パラメータファイルを用いて固定カメラ3の計測した固定カメラ座標系Fの座標値を必要に応じてロボット座標系Rの座標値に変換することができる。 The calibration process described above, the calibration value of the objective, that is, to determine coordinates transformation matrix R H F representing the relative position and orientation of the fixed camera coordinate system F between the robot coordinate system R by numerical calculation. The result calculated by the calibration calculation unit 412 as described above is stored in the ROM 42 or RAM 43 (or other storage device) as a calibration parameter file. When the above-described picking operation is performed, the coordinate value of the fixed camera coordinate system F measured by the fixed camera 3 is converted into the coordinate value of the robot coordinate system R as necessary using the stored calibration parameter file. Can do.

例えば、固定カメラ3でワーク6の特定部位を計測し、上記座標変換行列を用いた座標変換を行い、ロボットアーム1およびロボットハンド2の位置姿勢を制御する指令値を生成することができる。そして、生成した指令値をロボット制御部411を介してロボットアーム1およびロボットハンド2に送信し、例えば該当の部位を把持して取り出すピッキング動作を行うことができる。 For example, a specific portion of the workpiece 6 is measured by the fixed camera 3 performs coordinate transformation using the coordinate transformation matrix R H F, to generate a command value for controlling the position and orientation of the robot arm 1 and the robot hand 2 it can. Then, the generated command value is transmitted to the robot arm 1 and the robot hand 2 via the robot control unit 411, and for example, a picking operation for grasping and taking out the corresponding part can be performed.

本実施例のロボットシステム10によれば、固定カメラ3と手先カメラ7の双方からマーク81を計測する構成としたことにより、ロボットアーム1の先端を厳密に微調整する必要がなく短時間で校正が可能である。また、校正値の算出においてはマーク81の座標値に関する設計寸法などの事前情報を用いないため、マーカー8自体の位置精度が低精度であっても高精度な校正が可能である。   According to the robot system 10 of the present embodiment, since the mark 81 is measured from both the fixed camera 3 and the hand camera 7, it is not necessary to finely adjust the tip of the robot arm 1 and calibrate in a short time. Is possible. In addition, in the calculation of the calibration value, prior information such as the design dimension relating to the coordinate value of the mark 81 is not used, so that high-precision calibration is possible even if the position accuracy of the marker 8 itself is low.

また、固定カメラ3が例えば上方から計測を行い、ロボットハンド2がワーク6に上方からアプローチする構成であっても、固定カメラ3のみを用いる校正方式とは異なり、ロボットハンド2やロボットアーム1による隠蔽の影響を受けずに済む利点がある。すなわち、手先カメラ7でマーク81を校正計測する時は、隠蔽の影響を受けず確実にマーク81を計測することができる。そのため、実作業時に近い姿勢で、かつ充分広い範囲でロボットアーム1を動作させて校正演算のための計測値を取得することができ、その結果、ロボットアーム1の動作誤差や固定カメラ3の計測誤差の影響を軽減し、高精度な校正処理を行うことができる。   Further, even if the fixed camera 3 performs measurement from above and the robot hand 2 approaches the workpiece 6 from above, unlike the calibration method using only the fixed camera 3, the robot hand 2 and the robot arm 1 are used. There is an advantage that it is not affected by concealment. That is, when the mark 81 is calibrated and measured by the hand camera 7, the mark 81 can be reliably measured without being affected by the concealment. Therefore, the robot arm 1 can be operated in a posture that is close to the actual work and in a sufficiently wide range, and the measurement value for the calibration calculation can be acquired. It is possible to reduce the influence of errors and perform highly accurate calibration processing.

次に、図7を参照して本発明の実施例2のロボットシステム10aの校正時のシステム構成について説明する。本実施例2は上記の実施例1に比べ、作業者が行う必要のある校正準備の作業負荷を低減することができる。   Next, a system configuration at the time of calibration of the robot system 10a according to the second embodiment of the present invention will be described with reference to FIG. Compared to the first embodiment, the second embodiment can reduce the work load for calibration preparation that the operator needs to perform.

本実施例2のロボットシステム10aは実施例1に係るロボットシステム10に対して、主として以下の3点が異なる。   The robot system 10a according to the second embodiment is mainly different from the robot system 10 according to the first embodiment in the following three points.

第一に、手先カメラ7の代わりの手先視覚センサとして、ロボットハンド2によって把持可能な手先カメラ7aを設けると共に、手先カメラ置き台71aを設けたこと。   First, a hand camera 7a that can be gripped by the robot hand 2 is provided as a hand visual sensor instead of the hand camera 7, and a hand camera stand 71a is provided.

第二に、校正の際に固定カメラ3および手先カメラ7aより計測される基準部材が、作業者によって自在に配置可能なマーカー8aとなっていること。   Second, the reference member measured by the fixed camera 3 and the hand camera 7a at the time of calibration is a marker 8a that can be freely arranged by the operator.

第三に、制御装置4のCPU41の機能として、作業者が任意に配置するマーカー8aの校正姿勢を演算する校正姿勢演算部415を設けたこと、である。   Third, as a function of the CPU 41 of the control device 4, a calibration posture calculation unit 415 for calculating the calibration posture of the marker 8a arbitrarily arranged by the operator is provided.

その他の構成要素はロボットシステム10と同等であり、ピッキング作業時のシステム構成もロボットシステム10と同等であるから、対応する部材には上記と同一の参照符号を用い、その詳細な説明は省略するものとする。なお、ROM42に予め記憶されるデータやプログラムは一部異なったものとなるが、その点については後述する。   Other components are the same as the robot system 10, and the system configuration at the time of picking work is also the same as the robot system 10. Therefore, the same reference numerals are used for corresponding members, and detailed description thereof is omitted. Shall. Note that some data and programs stored in advance in the ROM 42 are different, which will be described later.

本実施例の手先カメラ7aは、ロボットハンド2によって把持できる形状を有するステレオカメラである。ロボットハンド2は、フィンガー21の開閉動作によって手先カメラ7aを着脱できる。手先カメラ7aは、不図示の通信手段を用いて制御装置4と通信可能になっており、視覚センサ制御部413からの指令により画像を撮影し、画像データを制御装置4に送信することができる。この不図示の通信手段は、ロボットアーム1の体内または体外に配置された通信ケーブルなどにより構成できる。その場合、手先カメラ7aとロボットハンド2の接触部には、手先カメラ7aを精度よく把持するために位置決めピン等の位置決め機構や、通信を行うための電気接点を設けておくことができる。   The hand camera 7 a of this embodiment is a stereo camera having a shape that can be gripped by the robot hand 2. The robot hand 2 can attach and detach the hand camera 7 a by opening and closing the fingers 21. The hand camera 7 a can communicate with the control device 4 using a communication unit (not shown), can capture an image in response to a command from the visual sensor control unit 413, and can transmit image data to the control device 4. . The communication means (not shown) can be configured by a communication cable or the like disposed inside or outside the robot arm 1. In this case, a contact mechanism between the hand camera 7a and the robot hand 2 can be provided with a positioning mechanism such as a positioning pin and an electrical contact for communication in order to grip the hand camera 7a with high accuracy.

また、制御装置4に対する手先カメラ7aの計測データの入出力には、電磁波を用いた非接触の無線通信手段を用いることもできる。無線通信によるデータ転送は、例えば例えばIEEE802.11やIEEE802.15の無線ネットワーク規格を利用することができる。その場合、当該規格の無線ネットワークインターフェースは、インターフェース部44の一部として設ける他、ネットワーク50に接続された外部機器として配置することもできる。   Further, non-contact wireless communication means using electromagnetic waves can be used for inputting / outputting measurement data of the hand camera 7a to / from the control device 4. For example, IEEE802.11 and IEEE802.15 wireless network standards can be used for data transfer by wireless communication. In this case, the wireless network interface of the standard can be provided as a part of the interface unit 44, or can be arranged as an external device connected to the network 50.

手先カメラ置き台71aは、ロボットハンド2が手先カメラ7aを装着していない間に手先カメラ7aを支持しておくための台であって、ロボットアーム1の可動範囲内に設けられている。例えば、図7に示すように角穴形状を有する形状として、手先カメラ7aのレンズ部を避けて手先カメラ7aの本体部のみを支持可能な台であってもよい。   The hand camera stand 71 a is a base for supporting the hand camera 7 a while the robot hand 2 is not wearing the hand camera 7 a, and is provided within the movable range of the robot arm 1. For example, as shown in FIG. 7, a shape having a square hole shape may be a base that can support only the main body portion of the hand camera 7 a while avoiding the lens portion of the hand camera 7 a.

ロボットシステム10aは、手先カメラ置き台71aに手先カメラ7aが設置された状態で、ロボットアーム1およびロボットハンド2を制御することによって、手先カメラ7aを自動でロボットハンド2に装着させることができる。また逆に、手先カメラ7aを手先カメラ置き台71aに戻す動作も自動で行うことができる。手先カメラ置き台71aの位置をロボット座標系(R)に対して定位置に決めておけば、システムプログラムの一部として手先カメラ7aを装着し、あるいは手先カメラ置き台71aに戻す動作をプログラムしておくことができる。また、ロボットシステム10aの設置時などに、例えば不図示のティーチングペンダントを用いて管理者や作業者が手先カメラ7aを装着し、あるいは手先カメラ置き台71aに戻す動作を教示する運用であってもよい。   The robot system 10a can automatically attach the hand camera 7a to the robot hand 2 by controlling the robot arm 1 and the robot hand 2 with the hand camera 7a installed on the hand camera stand 71a. Conversely, the operation of returning the hand camera 7a to the hand camera mount 71a can also be performed automatically. If the position of the hand camera stand 71a is determined at a fixed position with respect to the robot coordinate system (R), the operation of mounting the hand camera 7a as a part of the system program or returning to the hand camera stand 71a is programmed. I can keep it. Further, when the robot system 10a is installed, for example, an operation in which an administrator or an operator uses the teaching pendant (not shown) to attach the hand camera 7a or to return the hand camera 7a to the hand camera stand 71a. Good.

本実施例では、マーカー8aは、設置を行う作業者によってワーク配置エリア5上に自在な位置・向きで設置可能になっている。マーカー8a上には、上記実施例1と同様に円形のマーク81aが印刷されている。マーカー8aは、後述する校正自動実行のステップでロボットアーム1を動作させる際に振動で位置がずれないことが望ましく、例えば粘着剤や磁力を用いてワーク配置エリア5に簡易的に固定する機構を採用してもよい。   In the present embodiment, the marker 8a can be installed in any position and orientation on the work placement area 5 by an operator who performs the installation. A circular mark 81a is printed on the marker 8a as in the first embodiment. It is desirable that the marker 8a is not displaced by vibration when the robot arm 1 is operated in a calibration automatic execution step described later. For example, a mechanism for simply fixing the marker 8a to the work placement area 5 using an adhesive or a magnetic force. It may be adopted.

校正姿勢演算部415は、CPU41の制御機能として設けられる。校正姿勢演算部415は、例えばROM42に記憶されたプログラムをCPU41が実行することによって実現できる。校正姿勢演算部415は、固定カメラ3で撮影し、特徴位置演算部414が算出したマーク81aの計測結果に基づいて校正姿勢を演算しロボット制御部411に校正姿勢を出力する。その処理内容の詳細については後述する。   The calibration posture calculation unit 415 is provided as a control function of the CPU 41. The calibration posture calculation unit 415 can be realized by the CPU 41 executing a program stored in the ROM 42, for example. The calibration posture calculation unit 415 shoots with the fixed camera 3, calculates the calibration posture based on the measurement result of the mark 81 a calculated by the feature position calculation unit 414, and outputs the calibration posture to the robot control unit 411. Details of the processing contents will be described later.

次に、ロボットシステム10aを用いた校正の流れについて、図8のフローチャートを参照しつつ説明する。図8の制御手順は、CPU41の制御プログラムとして例えばROM42(ないし上述の他のプログラムメモリ)に格納しておくことができる。また、図9は本実施例の校正処理において用いられる各座標系、座標変換行列および座標値の関係を示している。   Next, the flow of calibration using the robot system 10a will be described with reference to the flowchart of FIG. The control procedure of FIG. 8 can be stored in the ROM 42 (or other program memory described above) as a control program for the CPU 41, for example. FIG. 9 shows the relationship among each coordinate system, coordinate transformation matrix, and coordinate values used in the calibration process of this embodiment.

本実施例では、大まかな流れとしては、主に作業者が行う準備作業のステップはステップS21のみとなっており、ステップS22〜S29の校正自動実行処理は自動プログラムによってロボットシステム10aが実行することができる。ステップS22〜S29の校正自動実行処理はでは、主に以下の2点が実施例1と異なる。   In the present embodiment, as a general flow, the step of the preparatory work mainly performed by the operator is only step S21, and the automatic calibration execution process of steps S22 to S29 is executed by the robot system 10a by an automatic program. Can do. In the automatic calibration execution processing in steps S22 to S29, the following two points are mainly different from the first embodiment.

第一に、手先カメラ7aを自動制御でロボットハンド2が把持するようになっている(S22)点。第二に、固定カメラ3からの計測(S24)の結果と、校正初期値(S25にて取得)に基づき、手先カメラ7aの校正姿勢を自動で算出(S26)するようになっており、作業者によるティーチングが不要となっている点である。   First, the robot hand 2 grips the hand camera 7a by automatic control (S22). Secondly, the calibration posture of the hand camera 7a is automatically calculated (S26) based on the measurement (S24) result from the fixed camera 3 and the calibration initial value (obtained in S25). It is a point that teaching by a person becomes unnecessary.

以下、図8の各ステップについて、実施例1との相異点に重点を置いて詳細に説明する。   Hereinafter, each step of FIG. 8 will be described in detail with an emphasis on the differences from the first embodiment.

まず、作業者がマーカー8aをワーク配置エリア5に設置する(S21)。前述したようになるべく広い範囲に設置することが望ましいが、ワーク配置エリア5内の任意の位置に同一直線上にない3点以上であれば任意の個数を設置してよく、事前に配置位置を厳密に設計する必要はない。ロボットアーム1を駆動した場合のワーク配置エリア5の振動が十分に小さい場合は、ワーク配置エリア5にマーカー8aを単純に置くだけでもよいし、前述したように粘着剤や磁力によって仮固定を行ってもよい。   First, the worker installs the marker 8a in the work placement area 5 (S21). As described above, it is desirable to install in as wide a range as possible, but any number of three or more points that are not on the same straight line may be installed at any position in the work placement area 5, and the placement positions may be set in advance. There is no need to design strictly. When the vibration of the work placement area 5 when the robot arm 1 is driven is sufficiently small, the marker 8a may be simply placed in the work placement area 5 or temporarily fixed with an adhesive or magnetic force as described above. May be.

作業者がロボットシステム10aに対して行う準備作業は以上であり、次のステップからはROM42に予め記憶されたプログラムを実行することによって自動実行される校正処理である。校正用の自動プログラムが起動されると、ロボットシステム10aは、ロボットアーム1とロボットハンド2を制御し、手先カメラ置き台71aに支持された手先カメラ7aを把持して取得する(S22)。   The preparatory work performed by the operator for the robot system 10a is as described above. From the next step, calibration processing is automatically executed by executing a program stored in the ROM 42 in advance. When the automatic program for calibration is activated, the robot system 10a controls the robot arm 1 and the robot hand 2 to acquire the hand camera 7a supported by the hand camera mount 71a (S22).

次に、ロボットアーム1を制御して、固定カメラ3からワーク配置エリア5を計測するための固定カメラ3の視線をロボットアーム1およびロボットハンド2が遮らない位置までロボットアーム1を退避させる(S23)。なお、前述のステップS22の段階でロボットアーム1およびロボットハンド2が固定カメラ3に写り込まないような位置に手先カメラ置き台71aが設置されている場合は、特にこのステップでロボットアーム1を移動させる必要は無い。   Next, the robot arm 1 is controlled to retract the robot arm 1 to a position where the robot arm 1 and the robot hand 2 do not block the line of sight of the fixed camera 3 for measuring the workpiece placement area 5 from the fixed camera 3 (S23). ). When the hand camera stand 71a is installed at a position where the robot arm 1 and the robot hand 2 do not appear in the fixed camera 3 at the stage of step S22 described above, the robot arm 1 is moved especially at this step. There is no need to let them.

次に、固定カメラ3からマーカー8a上の円形マーク81aを計測し、マーク81aの個数Nおよび座標値P[i](i=1,2,3,...,N)を取得する(S24)。視覚センサ制御部413が固定カメラ3に撮像指令を行ってステレオ画像を取得した後、特徴位置演算部414が画像処理を行ってマーク81aの個数Nと座標値P[i]を算出する。実施例1と比較して、マーク81aの個数Nが作業者の任意となっているため、このステップでは特徴位置演算部414は座標値P[i]だけではなく、マーク81aの個数Nも画像解析により求めることになる。このステップで画像データに対して円抽出処理を行って座標値P[i]を3次元的に算出する処理は実施例1と同様であり、また、その過程でマーク81aの個数Nを求めることも容易であるため、その詳細は省略する。 Next, a circular mark 81a is measured on the fixed camera 3 markers 8a, the number N and the coordinate values of the marks 81a F P [i] (i = 1,2,3, ..., N) to get ( S24). After the visual sensor controller 413 acquires the stereo image by performing an imaging command to the fixed camera 3, characterized position calculating unit 414 calculates the number N and the coordinate value F P [i] of the marks 81a performs image processing. Compared to Example 1, since the number N of the mark 81a has become any worker, not only the feature position calculating unit 414 coordinates F P [i] In this step, also the number N of the mark 81a It is obtained by image analysis. This step process of calculating a coordinate value F P [i] in three dimensions by performing a circular extraction processing on the image data are the same as in Example 1, also, obtains the number N of the mark 81a in the process Since it is easy, the details are omitted.

次に校正姿勢演算部415は、校正初期値F0を、ROM42より読み出すことによって取得する(S25)。ここで、校正初期値F0はロボット座標系Rと固定カメラ座標系Fの関係を表す座標変換行列の仮の値であって、予めROM42に設定ファイルとして記憶しておく。校正初期値F0としては、例えばロボットシステム10aを設計する際の設計値に基づいて、加工や組立の誤差が無い場合のロボット座標系Rと固定カメラ座標系Fの相対関係を表す値を入力しておけばよい。また、別の例として、校正作業を一度完了したロボットシステム10aに対して固定カメラ3やロボットアーム1を交換した後などには、前回校正時の校正結果を校正初期値F0として用いてもよい。 Next, the calibration posture calculation unit 415 acquires the calibration initial value R H F0 by reading it from the ROM 42 (S25). Here, the calibration initial value R H F0 is a provisional value of a coordinate transformation matrix representing the relationship between the robot coordinate system R and the fixed camera coordinate system F, and is stored in advance in the ROM 42 as a setting file. As the calibration initial value R H F0 , for example, a value representing a relative relationship between the robot coordinate system R and the fixed camera coordinate system F when there is no processing or assembly error based on a design value when designing the robot system 10a. Just enter it. As another example, after the fixed camera 3 or the robot arm 1 is exchanged with respect to the robot system 10a that has completed the calibration work, the calibration result at the previous calibration is used as the calibration initial value R H F0. Also good.

即ち、校正初期値F0は、ロボット座標系Rと第1の視覚センサ(固定カメラ3)の固定カメラ座標系Fの関係について予め設定された初期値データである。本実施例では、第1の視覚センサ(固定カメラ3)で計測した第1の計測データと、初期値データである校正初期値F0に基づき、校正姿勢データを算出する。 That is, the calibration initial value R H F0 is initial value data set in advance with respect to the relationship between the robot coordinate system R and the fixed camera coordinate system F of the first visual sensor (fixed camera 3). In the present embodiment, calibration posture data is calculated based on the first measurement data measured by the first visual sensor (fixed camera 3) and the calibration initial value R H F0 which is initial value data.

さらに校正姿勢演算部415は、ステップS24で取得したマーク81aの座標値P[i]とマーク個数N、およびステップS25で取得した校正初期値F0に基づき、N個の校正姿勢[i](i=1,2,3,...,N)を算出する(S26)。このN個の校正姿勢[i]は、手先カメラ7aからマーク81aを撮影可能なロボットアーム1の位置姿勢として算出される。 Further calibration orientation calculation unit 415, based on the calibration initial value R H F0 acquired coordinate values F P [i] and the mark number N of the acquired mark 81a, and at step S25 in step S24, N number of calibration position R H T [i] (i = 1, 2, 3,..., N) is calculated (S26). The N calibration postures R H T [i] are calculated as the position and posture of the robot arm 1 that can photograph the mark 81a from the hand camera 7a.

具体的な方法としては、例えば手先座標系Tに対する手先カメラ7aの計測視野を設計値より算出しておき、計測視野の中心付近の代表点Qを定め、手先カメラ座標系Vにおける座標値Q(図9参照)として予めROM42に情報を保存しておく。ここで、ステップS24において取得されたマーク81aの座標値P[i]と、ステップS25において取得された校正初期値F0を用いると、ロボット座標系Rにおけるマーク81aの中心点Pの座標値P[i]は、以下のように計算できる。 As a specific method, for example, the measurement visual field of the hand camera 7a with respect to the hand coordinate system T is calculated from the design value, the representative point Q near the center of the measurement visual field is determined, and the coordinate value T Q in the hand camera coordinate system V is determined. Information is stored in advance in the ROM 42 (see FIG. 9). Here, have been marked 81a coordinate value F P [i] of the obtained in step S24, the use of calibration initial value R H F0 obtained in step S25, the coordinates of the center point P of the mark 81a in the robot coordinate system R the value R P [i] can be calculated as follows.

Figure 0006611888
上式(10)の演算により、ロボット座標系Rにおけるマーク81aの中心点Pの座標値が分かるので、手先に設定された計測視野代表点Qの座標値が、マーク81aの中心点Pに一致するようにロボットアーム1を制御すればよい。任意の姿勢[i]をロボットアーム1に取らせた場合の、ロボット座標系Rに対する計測視野代表点Qの座標値Q[i]は以下のようになる。
Figure 0006611888
Since the coordinate value of the center point P of the mark 81a in the robot coordinate system R is known by the calculation of the above equation (10), the coordinate value of the measurement visual field representative point Q set at the hand matches the center point P of the mark 81a. The robot arm 1 may be controlled as described above. When the robot arm 1 is in an arbitrary posture R H T [i], the coordinate value R Q [i] of the measurement visual field representative point Q with respect to the robot coordinate system R is as follows.

Figure 0006611888
そして、計測視野代表点Qがマーク81aの中心点Pに一致するためには
Figure 0006611888
In order for the measurement visual field representative point Q to coincide with the center point P of the mark 81a,

Figure 0006611888
であればよいから、式(10)、式(11)、式(12)より
Figure 0006611888
From equation (10), equation (11), and equation (12)

Figure 0006611888
を満たすようにN個の校正姿勢[i]を定めればよい。なお、式(13)の制約だけでは校正姿勢は一意には定まらないので、実際に適用する際には例えば「ロボットハンド2の掌部が鉛直下向きになる」等の制約条件を付して校正姿勢が定まるアルゴリズムとして演算するとよい。その際のロボットアーム1やロボットハンド2の姿勢に関する制約条件は任意に設計し得る事項である。しかしながら、前述のように、実作業(ピッキング)時のロボットアーム1およびロボットハンド2の姿勢から乖離した姿勢にならないように定めることが精度の観点からは望ましい。校正姿勢演算部415は上記の演算を行い、N個の校正姿勢[i]をロボット制御部411に出力する。
Figure 0006611888
N calibration postures R H T [i] may be determined so as to satisfy the above. Note that the calibration posture is not uniquely determined only by the constraint of equation (13), so when actually applied, for example, calibration is performed with a constraint such as “the palm of the robot hand 2 is vertically downward”. It may be calculated as an algorithm that determines the posture. The constraint conditions regarding the posture of the robot arm 1 and the robot hand 2 at that time are matters that can be arbitrarily designed. However, as described above, it is desirable from the viewpoint of accuracy that the posture is not deviated from the postures of the robot arm 1 and the robot hand 2 during actual work (picking). The calibration posture calculation unit 415 performs the above calculation, and outputs N calibration postures R H T [i] to the robot control unit 411.

その後、手先カメラ7aによって第2の計測データを取得する。即ち、ステップS26において算出された校正姿勢[i]に基づいてロボット制御部411がロボットアーム1を制御して移動させ(S27)、手先カメラ7aからマーク81aの座標値P[i]を計測する(S28)する処理をN回分繰り返す。なお、ステップS27、S28を狭むように配置されたステップS201、S202は、上述の実施例1同様、インデックスiを1からNまで順次インクリメントするための制御構造を、例えばC言語などにおける記述様式に準じて示したものである。 Thereafter, second measurement data is acquired by the hand camera 7a. That is, the robot controller 411 controls and moves the robot arm 1 based on the calibration posture R H T [i] calculated in step S26 (S27), and the coordinate value V P [i of the mark 81a from the hand camera 7a. ] Is repeated N times (S28). Note that steps S201 and S202 arranged so as to narrow down steps S27 and S28 are similar to the first embodiment described above, and the control structure for sequentially incrementing the index i from 1 to N conforms to the description format in C language, for example. It is shown.

この際、ステップS26において算出された校正姿勢[i]は校正初期値F0が誤差を含んだ値であるため、各計測時に計測視野代表点Qはマーク81aに厳密には一致しない。しかし、手先カメラ7aの計測視野を校正初期値F0の誤差に対して十分広く設計しておけば、マーク81aが必ず手先カメラ7aの計測視野内に含まれることとなり、問題無く校正を行うことができる。 At this time, since the calibration posture R H T [i] calculated in step S26 is a value including an error in the calibration initial value R H F0 , the measurement visual field representative point Q exactly matches the mark 81a at each measurement. do not do. However, if the measurement visual field of the hand camera 7a is designed to be sufficiently wide with respect to the error of the calibration initial value R H F0 , the mark 81a is always included in the measurement visual field of the hand camera 7a, and calibration is performed without any problem. be able to.

そして、ステップS29において、目的の校正値(校正関数)として座標変換行列を算出する。即ち、固定カメラ3から計測したマーク座標値P[i]と、ステップS26で算出した校正姿勢[i]と、ステップS28で手先カメラ7aから計測したマーク81の座標値P[i]を用いて、座標変換行列を算出する。座標変換行列を算出する演算処理は第一の実施例と同様であるので説明は省略する。なお、レーベンバーグ・マーカート法などの初期値を必要とする繰り返し計算のアルゴリズムを用いて座標変換行列を算出する場合には、ステップS25で取得した校正初期値F0をここでも数値計算の初期値として利用できる。 In step S29, a coordinate transformation matrix R H F is calculated as a target calibration value (calibration function). That is, the mark coordinates F P [i] measured from fixed camera 3, a calibration position R H T [i] calculated in step S26, the coordinate value V P of the mark 81 measured from the hand camera 7a in step S28 [ i] is used to calculate the coordinate transformation matrix R H F. The calculation process for calculating the coordinate transformation matrix R H F is the same as that in the first embodiment, and a description thereof will be omitted. When the coordinate transformation matrix R H F is calculated using an iterative calculation algorithm that requires an initial value such as the Levenberg-Markert method, the calibration initial value R H F0 obtained in step S25 is again set to a numerical value. It can be used as an initial value for calculation.

上記の処理を実行することにより、ロボット座標系Rと固定カメラ座標系Fの関係を表す校正値として座標変換行列を算出できる。すなわち、固定カメラ3の計測値に基づいてロボットアーム1を高精度に位置決めするために必要な校正を行うことができる。 By executing the above processing, the coordinate transformation matrix R H F can be calculated as a calibration value representing the relationship between the robot coordinate system R and the fixed camera coordinate system F. That is, the calibration necessary for positioning the robot arm 1 with high accuracy can be performed based on the measurement value of the fixed camera 3.

本実施例においては、校正時にロボットアーム1を移動させる校正姿勢[i]を、校正初期値F0と固定カメラ3からマーク81aを計測した座標値P[i]に基づいて算出する構成とした。この特徴的な構成により、作業者は事前にマーカー8の配置を厳密に設計せずに自由に配置できるとともに、配置後にロボットアーム1に対するティーチングを行わなくともロボットシステム10aを自動で動作させて校正することができる。従って、作業者の装置立ち上げの作業負荷を大幅に削減することが出来る。また、同じ工場内でワーク供給エリアの大きさ異なる複数のロボットシステムを校正したい場合などにおいても、配置を変えるだけで同一のマーカーを容易に流用できるので、個別に校正用の治具を用意する必要がない。 In the present embodiment, during calibration the calibration position R H T to move [i] the robot arm 1, on the basis of the calibration initial value R H F0 coordinate values obtained by measuring the mark 81a from the fixed camera 3 F P [i] It was set as the structure to calculate. With this characteristic configuration, the operator can freely arrange the markers 8 without rigorously designing the markers 8 in advance, and calibrate by automatically operating the robot system 10a without teaching the robot arm 1 after the placement. can do. Accordingly, it is possible to greatly reduce the work load of the operator when starting up the apparatus. Also, even if you want to calibrate multiple robot systems with different workpiece supply areas in the same factory, you can easily use the same marker by changing the arrangement, so prepare calibration jigs individually. There is no need.

また、本実施例においては、ロボットハンド2の開閉動作によって手先カメラ7aを自動で着脱可能な構成とした。この特徴的な構成により、ロボットシステム10aを校正するにあたって作業者が手先カメラ7aを着脱する作業負荷を低減した。また、ピッキング作業時にワークと当接するロボットハンド2のフィンガー21によって手先カメラ7aを支持することにより、ロボットハンド2の加工誤差の影響を小さくし、高精度にピッキングのための校正を行うことが出来る。さらには、ロボットハンド2の掌部に手先カメラ7aの視点が配されることになり、ロボットハンド2の手首部等にカメラを設けた場合に比べて手先カメラ7aがマーカー8aにより正対する形で計測を実行することができ、高精度な校正を行うことができる。   In the present embodiment, the hand camera 7a can be automatically attached and detached by opening and closing the robot hand 2. This characteristic configuration reduces the work load for the operator to attach and detach the hand camera 7a when calibrating the robot system 10a. Further, by supporting the hand camera 7a by the finger 21 of the robot hand 2 that comes into contact with the workpiece during the picking operation, the influence of the processing error of the robot hand 2 can be reduced, and calibration for picking can be performed with high accuracy. . Furthermore, the viewpoint of the hand camera 7a is arranged on the palm of the robot hand 2, and the hand camera 7a is directly opposed to the marker 8a as compared with the case where a camera is provided on the wrist or the like of the robot hand 2. Measurement can be executed and high-precision calibration can be performed.

次に、本発明の実施例3について説明する。実施例1および2は固定視覚センサと、手先視覚センサをそれぞれ独立した別体の固定カメラ3と、手先カメラ7、7aによって構成した。これに対して、本実施例3では固定視覚センサ(ステレオカメラ3b)を着脱しロボットアーム1の手先に付け替え、一時的に手先視覚センサとして用いることにより、カメラの共通化を図ったものである。以下、実施例1および実施例2の相異点に重点を置き本実施例につき説明する。   Next, Embodiment 3 of the present invention will be described. In the first and second embodiments, the fixed visual sensor, the hand visual sensor are separately provided as separate fixed cameras 3, and the hand cameras 7 and 7a. In contrast, in the third embodiment, the camera is shared by attaching and detaching the fixed visual sensor (stereo camera 3b) to the hand of the robot arm 1 and temporarily using it as the hand visual sensor. . Hereinafter, this embodiment will be described with emphasis on the differences between the first embodiment and the second embodiment.

図10(a)、(b)に本実施例3に係るロボットシステム10bの装置構成、および本実施例で用いられる各座標系、座標値、および座標変換行列の関係を示す。なお、制御装置4に関しては上記実施例2と同様であるため、図示を省略している。   FIGS. 10A and 10B show the configuration of the robot system 10b according to the third embodiment, and the relationship between each coordinate system, coordinate values, and coordinate transformation matrix used in the present embodiment. Since the control device 4 is the same as that of the second embodiment, the illustration thereof is omitted.

図10(a)に示すように、視覚センサとしてはロボットシステム10bはステレオカメラ3bを1台のみ必要とする。このステレオカメラ3bはステレオカメラ取付部31bを有しており、通常時はステレオカメラ取付部31bを介して不図示の固定カメラ支持部材によって空間に固定に支持される(第1の配置位置)。ステレオカメラ3bはワーク配置エリア5に対向して配置されており、ワーク6やマーク81aを計測可能となっている。即ち、ステレオカメラ3bがロボットアーム1の動作とは独立してロボットアーム1を支持する架台9の設置面に対して固定的な位置関係を有する配置位置に配置される点は、これまでの実施例と同様である。   As shown in FIG. 10A, as a visual sensor, the robot system 10b requires only one stereo camera 3b. This stereo camera 3b has a stereo camera mounting portion 31b, and is normally fixedly supported in space by a fixed camera support member (not shown) via the stereo camera mounting portion 31b (first arrangement position). The stereo camera 3b is arranged facing the work placement area 5, and can measure the work 6 and the mark 81a. That is, the stereo camera 3b is arranged at an arrangement position having a fixed positional relationship with respect to the installation surface of the gantry 9 that supports the robot arm 1 independently of the operation of the robot arm 1. Similar to the example.

ステレオカメラ取付部31bは、例えば突き当て基準面や位置決めピン等の位置決め機構と、例えばネジなどの固定機構を有しており、固定カメラ支持部材に対して再現性良く着脱可能に構成される。   The stereo camera mounting portion 31b has a positioning mechanism such as an abutment reference surface and positioning pins and a fixing mechanism such as a screw, for example, and is configured to be detachable from the fixed camera support member with good reproducibility.

また、ステレオカメラ取付部31bは、ロボットハンド2に対しても取付可能な形状を有している。図10(b)に示すように、ロボットハンド2の先端にステレオカメラ3bを支持させることによって、一時的にステレオカメラ3bを手先カメラ(実施例2の7b)として用いることができる(第2の配置位置)。ステレオカメラ3bをロボットハンド2の先端の所定位置に位置決めするには例えばロボットハンド2による把持やネジ止めなどの手法を用いることができる。   In addition, the stereo camera mounting portion 31 b has a shape that can be mounted on the robot hand 2. As shown in FIG. 10B, by supporting the stereo camera 3b at the tip of the robot hand 2, the stereo camera 3b can be temporarily used as a hand camera (7b in the second embodiment) (second embodiment). Positions). In order to position the stereo camera 3b at a predetermined position at the tip of the robot hand 2, for example, a technique such as gripping or screwing with the robot hand 2 can be used.

本実施例における校正の流れについて、図11のフローチャートを参照しつつ説明する。   The calibration flow in the present embodiment will be described with reference to the flowchart of FIG.

まず、作業者がマーカー8をワーク配置エリア5に設置し(S31)、ロボットアーム1をワーク配置エリア5の上空から退避させる(S32)。次に、固定カメラとして空間に固定された状態のステレオカメラ3bで第1の計測データを取得する。即ち、ステレオカメラ3bによってマーカー8上のマーク81を計測し、その座標値P[i]およびマーク個数Nを計測する(S33)。ここまでの各ステップの内容は、これまでの実施例2と同様の処理で実施することができる。 First, the operator installs the marker 8 in the work placement area 5 (S31), and retracts the robot arm 1 from above the work placement area 5 (S32). Next, the first measurement data is acquired by the stereo camera 3b fixed in space as a fixed camera. That is, a mark 81 on the marker 8 is measured by the stereo camera 3b, to measure the coordinates F P [i] and the mark number N (S33). The contents of the steps so far can be implemented by the same processing as in the second embodiment.

次に、固定状態のステレオカメラ3bを、不図示の固定カメラ支持部材から取り外し、ロボットアーム1の先端に付け替える(S34)。そして以降のステップS35〜S39では、ステレオカメラ3bを上述の手先カメラ7bとして用い第2の計測データを取得し、上述の実施例2と同様の校正演算を行って目的の校正関数を求める。なお、これらステップS35〜S39、S301、S302の内容に関しては、それぞれ実施例2のステップS25〜S29、S201、S202と同様であるため、ここでは詳細な説明は省略する。   Next, the fixed stereo camera 3b is removed from a fixed camera support member (not shown) and replaced with the tip of the robot arm 1 (S34). In subsequent steps S35 to S39, the second measurement data is acquired using the stereo camera 3b as the above-mentioned hand camera 7b, and a calibration operation similar to that in the above-described second embodiment is performed to obtain a target calibration function. Note that the contents of these steps S35 to S39, S301, and S302 are the same as those of steps S25 to S29, S201, and S202 of the second embodiment, and thus detailed description thereof is omitted here.

以上のようにして校正処理が完了すると、目的の校正値、すなわち、ロボット座標系Rと固定カメラ座標系Fの相対位置姿勢を表す座標変換行列を校正パラメータファイルとして格納する。また、ステレオカメラ取付部31bを介して不図示の固定カメラ支持部に再度ステレオカメラ3bを取り付ける。その後のピッキングなどの実作業時には、校正パラメータファイルの校正値を用いて、必要に応じてステレオカメラ3bの計測した固定カメラ座標系Fの座標値をロボット座標系Rの座標値に変換することができる。 When the calibration process as described is completed above the calibration value of the objective, i.e., to store the coordinate transformation matrix R H F representing the relative position and orientation of the fixed camera coordinate system F between the robot coordinate system R as calibration parameter file. Further, the stereo camera 3b is attached again to the fixed camera support portion (not shown) via the stereo camera attachment portion 31b. In the subsequent actual work such as picking, the coordinate values of the fixed camera coordinate system F measured by the stereo camera 3b can be converted into the coordinate values of the robot coordinate system R as necessary using the calibration values in the calibration parameter file. it can.

上記のように、本実施例においては、通常時は、固定カメラとして用いるステレオカメラ3bを、一時的に校正用の手先カメラ7bとして用いることによって、校正のときだけのために用いる手先カメラを別途、用意する必要がなくなっている。すなわち、校正専用の手先カメラを用意する場合に比べて、安価にロボット装置の校正処理を実施することができる。   As described above, in this embodiment, normally, the stereo camera 3b used as a fixed camera is temporarily used as a calibration hand camera 7b, so that a hand camera used only for calibration is separately provided. No need to prepare. That is, the robot apparatus can be calibrated at a lower cost than when a hand camera dedicated to calibration is prepared.

以上、本発明の実施例1〜3について説明したが、上述の構成はいずれも例示に過ぎず、本発明の実施に際しては、本発明の趣旨を逸脱しない範囲において当業者の適宜変更が可能である。   As mentioned above, although Embodiment 1-3 of this invention was demonstrated, all the above-mentioned structures are only illustrations, In the case of implementation of this invention, a person skilled in the art can change suitably in the range which does not deviate from the meaning of this invention. is there.

例えば、ロボットアーム1として6軸垂直多関節のロボットアームについて例示したが、ロボットアームは7軸のロボットアームやパラレルリンク構造を有するもの、直動機構を有するものなど、各種のロボットアームを用いることができる。   For example, although a 6-axis vertical articulated robot arm has been illustrated as the robot arm 1, various types of robot arms such as a 7-axis robot arm, a parallel link structure, and a linear motion mechanism may be used. Can do.

また、例えば、手先カメラ7および7aは、ロボットハンド2の手首部または掌部に取り付ける構成について説明したが、ロボットハンドを一度取り外して手先視覚センサを交換的に取り付ける構成としてもよい。また、手先視覚センサをハンドに内蔵し、着脱しない構成としても構わない。   For example, the hand cameras 7 and 7a have been described as being attached to the wrist or palm of the robot hand 2. However, the hand visual sensor may be attached interchangeably by removing the robot hand once. Further, the hand vision sensor may be built in the hand and configured not to be attached or detached.

また例えば、固定視覚センサおよび手先視覚センサとしてステレオカメラを例示したが、使用できる視覚センサはこれに限らず、カメラ座標系からみた特徴点の座標値を計測できる各種視覚センサを用いることが出来る。例えば、スリット上のレーザ光や各種のパターン光を対象物に投光して三角法の原理に基づいて3次元計測を行うものや、TOF(Time Of Flight)法によって距離画像を得る視覚センサを用いてもよい。また、奥行き方向の情報を事前に公知の外部パラメータ校正手法を用いて校正した上で、通常の単眼カメラを用いることも可能である。   Further, for example, the stereo camera is exemplified as the fixed visual sensor and the hand visual sensor, but the visual sensor that can be used is not limited to this, and various visual sensors that can measure the coordinate values of the feature points viewed from the camera coordinate system can be used. For example, a laser sensor or various pattern lights on a slit are projected onto an object to perform three-dimensional measurement based on the principle of trigonometry, or a visual sensor that obtains a distance image by the TOF (Time Of Flight) method. It may be used. It is also possible to use a normal monocular camera after calibrating information in the depth direction using a known external parameter calibration method in advance.

また例えば、簡単のためにマーク81およびマーク81aは黒色の円形マークであるものとして説明したが、形状や色はそれに限らず、特徴部の座標を固定視覚センサおよび手先視覚センサから特定できるものであれば構わない。各種多角形や、黒色部と白色部を並べたチェッカーマークなど、さまざまなマークを用いることが出来る。   In addition, for example, the mark 81 and the mark 81a are described as black circular marks for the sake of simplicity. However, the shape and color are not limited thereto, and the coordinates of the feature portion can be specified from the fixed visual sensor and the hand visual sensor. It doesn't matter if it exists. Various marks such as various polygons and checker marks in which black portions and white portions are arranged can be used.

さらにマーカー8および8aは、特徴部の座標を視覚センサより計測できればよいので、ピッキングで対象とするワーク自体の特徴点をマーカー8および8aとして校正に用いてもよい。例えば図2に示したような直方体状ワーク6の各頂点をマーク81および81aの代わりに用いて、固定カメラ3からの計測と手先カメラ7または7aからの計測に用いて校正を行っても構わない。   Furthermore, since the markers 8 and 8a only need to be able to measure the coordinates of the feature portion with a visual sensor, the feature points of the workpiece itself to be picked may be used for calibration as the markers 8 and 8a. For example, the vertices of the rectangular parallelepiped workpiece 6 as shown in FIG. 2 may be used in place of the marks 81 and 81a for calibration from the fixed camera 3 and measurement from the hand camera 7 or 7a. Absent.

また複数の校正姿勢を取らせる際にロボットアーム1を自動プログラムにて制御する場合について例示して説明を行ったが、自動プログラムを実行せず、ティーチングペンダントを用いたインチング操作によって校正姿勢をとらせてもよい。その場合には校正を実施するたびに人手による操作が必要となるが、厳密な微調整は不要なので比較的短時間で実施できるとともに、本発明の精度面での効果は自動プログラムを用いた場合と同等に享受することができる。   Further, the case where the robot arm 1 is controlled by an automatic program when taking a plurality of calibration postures has been described as an example, but the automatic posture is not executed and the calibration posture is captured by an inching operation using a teaching pendant. It may be allowed. In that case, manual operation is required every time calibration is performed, but since strict fine adjustment is not necessary, it can be performed in a relatively short time, and the effect of the accuracy of the present invention is obtained when an automatic program is used. Can be enjoyed as well.

また、上述の各実施例においては、説明を簡単にするために手先座標系Tと手先カメラ座標系Vの関係は既知である例について説明した。しかし、座標変換行列が未知の場合であっても、座標変換行列と、目的の校正値である座標変換行列を同時に算出することも出来る。その場合は、式(9)においての2つの座標変換行列が未知数となる。各座標変換行列は6自由度を持つので、合計12のパラメータを求めることになるが、校正姿勢の数Nを充分に増やすことにより、式(9)の評価式が最小となるような12パラメータを最小二乗法によって求めることが出来る。 Further, in each of the above-described embodiments, for the sake of simplicity, the example in which the relationship between the hand coordinate system T and the hand camera coordinate system V is known has been described. However, even when the coordinate transformation matrix T H V is unknown, the coordinate transformation matrix T H V and the coordinate transformation matrix R H F that is the target calibration value can be calculated simultaneously. In that case, the two coordinate transformation matrices R H F and T H V in Equation (9) are unknowns. Since each coordinate transformation matrix has six degrees of freedom, a total of twelve parameters are obtained. However, by sufficiently increasing the number N of calibration postures, twelve parameters that minimize the evaluation formula of equation (9) Can be obtained by the method of least squares.

また、上述の各実施例においては、説明を簡単にするためにマーカー8や8aと校正姿勢の数が同一(N)である場合について説明した。本発明を適用するにあたって、例えば一つのマーカーに対して角度を変えた複数の校正姿勢から手先カメラによる計測を行うようにしてもよい。また一つの校正姿勢に対して複数のマーカーが手先カメラの視野に含まれるように配置し、手先カメラからの一度の計測で複数の座標値を取得するようにしてもよい。その場合は例えば、上記のインデックスiを校正姿勢用に関するインデックスjとマークに関するインデックスkに置き換えた上で、手先視覚センサからの計測を行ったjとkの組合せ1つごとに式(8)に相当する1つの等式を立てることができる。そして、実施例1〜実施例3と同様、取得したデータ数分の等式を連立して最小二乗解を求めることが出来る。   Further, in each of the above-described embodiments, the case where the number of calibration postures is the same (N) as the markers 8 and 8a has been described in order to simplify the description. In applying the present invention, for example, measurement by a hand camera may be performed from a plurality of calibration postures with different angles with respect to one marker. Further, a plurality of markers may be arranged so as to be included in the field of view of the hand camera for one calibration posture, and a plurality of coordinate values may be acquired by one measurement from the hand camera. In this case, for example, after replacing the above index i with the index j for the calibration posture and the index k for the mark, Equation (8) is obtained for each combination of j and k measured from the hand visual sensor. One equivalent equation can be established. Then, as in the first to third embodiments, the least squares solution can be obtained by simultaneous equations for the number of acquired data.

また、上述の各実施例においては、校正関数としてロボット座標系Rと固定カメラ座標系Fの関係を表す座標変換行列として定めた例について説明を行った。校正関数は、固定カメラ3の計測値とロボットアーム1の指令値の関係を表現できる関数であれば良く、座標変換行列以外の表現形式を用いても構わない。例えば、並進を表す3次元ベクトルと回転を表す3自由度のオイラー角によって校正関数を表現してもよい。また別の例としては、固定カメラ3の計測座標値と、ロボットアーム1の指令値の関係を直接的に多項式で表した関数を校正関数として用いてもよい。特にロボットアーム1の指令値と固定カメラ3の座標値を2次以上のM次多項式で表すような場合には、校正範囲外での誤差が校正を実施した範囲から離れるにつれてM次関数的に大きくなる。従って、この構成では本発明の実作業時に近い姿勢かつ充分広い範囲でロボットを動作させて校正を行える、という特徴によって、大きな校正精度の向上を期待できる。   Further, in each of the above-described embodiments, an example has been described in which the coordinate transformation matrix representing the relationship between the robot coordinate system R and the fixed camera coordinate system F is defined as the calibration function. The calibration function only needs to be a function that can express the relationship between the measurement value of the fixed camera 3 and the command value of the robot arm 1, and an expression form other than the coordinate transformation matrix may be used. For example, the calibration function may be expressed by a three-dimensional vector representing translation and a Euler angle having three degrees of freedom representing rotation. As another example, a function in which the relationship between the measurement coordinate value of the fixed camera 3 and the command value of the robot arm 1 is directly expressed by a polynomial may be used as the calibration function. In particular, when the command value of the robot arm 1 and the coordinate value of the fixed camera 3 are expressed by a second-order or higher order M-order polynomial, the error outside the calibration range becomes an M-order function as the error moves away from the calibration range. growing. Therefore, with this configuration, a great improvement in calibration accuracy can be expected due to the feature that calibration can be performed by operating the robot in a posture close to that during actual work and in a sufficiently wide range.

本発明のロボット校正動作は、例えば上記各実施例の計測制御動作を実現する校正制御を含むロボット制御プログラムを制御装置4のコンピュータ(例えばCPU41)がプログラムメモリ(例えばROM42)から読み出して実行することにより実現できる。この場合、記録媒体から読み出されたロボット制御プログラム自体が上述の実施例の機能を実現することになり、ロボット制御プログラムそれ自体、およびロボット制御プログラムを記録した記録媒体は本発明を構成することになる。   The robot calibration operation of the present invention is executed by, for example, a computer (for example, CPU 41) of the control device 4 reading out a robot control program including calibration control for realizing the measurement control operations of the above embodiments from a program memory (for example, ROM 42). Can be realized. In this case, the robot control program itself read from the recording medium realizes the functions of the above-described embodiments, and the robot control program itself and the recording medium recording the robot control program constitute the present invention. become.

また、上記実施例では、コンピュータ読み取り可能な記録媒体がROM42である場合について説明したが、本発明はこの構成に限定されるものではない。例えば、本発明を実現するプログラムは、コンピュータ読み取り可能な記録媒体であれば、いかなる記録媒体に記録されていてもよい。ロボット制御プログラムを装置に実装するための記録媒体としては、図1のROM42以外の不図示の外部記憶装置等を用いてもよい。例えば、コンピュータ読み取り可能な記録媒体としては、記録媒体として、フレキシブルディスク、ハードディスク、各種光ディスク、光磁気ディスク、磁気テープ、書き換え可能な不揮発性のメモリ(例えばUSBメモリ)、ROM等を用いることができる。また、上記実施例におけるロボット制御プログラムを、ファイルサーバなどに格納しておき、ネットワーク50を介してダウンロードしてCPU41により実行するようにしてもよい。ネットワーク50はいわゆるインターネットのような公共のネットワークの他、ロボット装置が設置される製造プラントやその運営組織(企業など)に閉じたいわゆるイントラネットのようなプライベートネットワークあってもよい。   In the above embodiment, the case where the computer-readable recording medium is the ROM 42 has been described. However, the present invention is not limited to this configuration. For example, the program for realizing the present invention may be recorded on any recording medium as long as it is a computer-readable recording medium. As a recording medium for mounting the robot control program on the apparatus, an external storage device (not shown) other than the ROM 42 in FIG. 1 may be used. For example, as a computer-readable recording medium, a flexible disk, a hard disk, various optical disks, a magneto-optical disk, a magnetic tape, a rewritable nonvolatile memory (for example, a USB memory), a ROM, or the like can be used as the recording medium. . The robot control program in the above embodiment may be stored in a file server or the like, downloaded via the network 50, and executed by the CPU 41. The network 50 may be a public network such as the Internet, or a private network such as a so-called intranet closed to a manufacturing plant where the robot apparatus is installed or an operating organization (such as a company).

また、本発明の実施の形態は、コンピュータが読み出したロボット制御プログラムのコードを実行することにより、上記実施例の機能が実現されるだけに限定されるものではない。例えば、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した実施例の機能が実現される場合も含まれる。   The embodiment of the present invention is not limited to the implementation of the functions of the above-described embodiments by executing the robot control program code read by the computer. For example, an OS (operating system) operating on a computer performs part or all of actual processing based on an instruction of the program code, and the functions of the above-described embodiments may be realized by the processing. included.

さらに、記録媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれてもよい。そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって上記実施例の機能が実現される場合も含まれる。   Furthermore, the program code read from the recording medium may be written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. This includes a case where the CPU of the function expansion board or function expansion unit performs part or all of the actual processing based on the instruction of the program code, and the functions of the above embodiments are realized by the processing.

また、上記実施例では、コンピュータがHDD等の記録媒体に記録されたロボット制御プログラムを実行することにより、画像処理を行う場合について説明したが、これに限定するものではない。ロボット制御プログラムに基づいて動作する制御部の一部または全部の機能がASICやFPGA等の専用LSIの形式で実装されていてもよい。   In the above-described embodiment, the case has been described in which image processing is performed by a computer executing a robot control program recorded on a recording medium such as an HDD. However, the present invention is not limited to this. Part or all of the functions of the control unit that operates based on the robot control program may be implemented in the form of a dedicated LSI such as an ASIC or FPGA.

1…ロボットアーム、2…ロボットハンド、3…固定カメラ、4…制御装置、6…ワーク、7、7a…手先カメラ、8…マーカー、10…ロボットシステム、41…CPU、42…ROM、43…RAM、44…インターフェース部、50…ネットワーク、81、81a…マーク、411…ロボット制御部、412…校正演算部、413…視覚センサ制御部、414…特徴位置演算部。   DESCRIPTION OF SYMBOLS 1 ... Robot arm, 2 ... Robot hand, 3 ... Fixed camera, 4 ... Control apparatus, 6 ... Work, 7, 7a ... Hand camera, 8 ... Marker, 10 ... Robot system, 41 ... CPU, 42 ... ROM, 43 ... RAM, 44 ... interface unit, 50 ... network, 81, 81a ... mark, 411 ... robot control unit, 412 ... calibration calculation unit, 413 ... visual sensor control unit, 414 ... feature position calculation unit.

Claims (10)

ロボットアームと、
前記ロボットアームの基端部と所定の位置関係を有し、前記ロボットアームの可動範囲を含む計測範囲を計測する、前記ロボットアームに支持されていない第1の視覚センサと、
前記ロボットアームに支持された第2の視覚センサと、
前記ロボットアームの位置姿勢を制御する制御装置と、を備え、
前記制御装置は、
前記第1の視覚センサにより前記計測範囲に設けられた複数の特徴部を計測させて得た第1の計測データと、
前記ロボットアームが複数の位置姿勢を取り、前記第2の視覚センサにより前記特徴部を計測させて得た第2の計測データと、
前記ロボットアームの前記複数の位置姿勢の各々に対応する校正姿勢データと、
を用いて、前記第1の視覚センサの計測値と前記ロボットアームに与える指令値とを関係づける校正を算出することを特徴とするロボット装置。
A robot arm,
Have a proximal end and a predetermined positional relationship of the robot arm, measures the measurement range including the movable range of the robot arm, the first visual sensor which is not supported by the robot arm,
A second visual sensor supported by the robot arm;
A control device for controlling the position and orientation of the robot arm,
The controller is
First measurement data obtained by measuring a plurality of characteristic portions provided in the measurement range by the first visual sensor;
Second measurement data obtained by the robot arm taking a plurality of positions and orientations and measuring the characteristic portion by the second visual sensor;
Calibration posture data corresponding to each of the plurality of positions and postures of the robot arm;
And calculating a calibration value that relates the measured value of the first visual sensor and the command value given to the robot arm.
請求項1に記載のロボット装置において、前記制御装置は、前記第1の視覚センサの計測値に基づき前記ロボットアームの位置姿勢を制御する際、算出した前記校正値を用いて前記ロボットアームに与える指令値を生成することを特徴とするロボット装置。2. The robot apparatus according to claim 1, wherein the control device gives the robot arm using the calculated calibration value when controlling the position and orientation of the robot arm based on the measurement value of the first visual sensor. 3. A robot apparatus that generates a command value. 請求項1または2に記載のロボット装置において、前記制御装置は、前記第1の計測データと、前記ロボットアームの座標系と前記第1の視覚センサの座標系の関係について予め設定された初期値データと、に基づいて前記校正姿勢データを算出し、算出した前記校正姿勢データに基づき前記ロボットアームが複数の位置姿勢を取り、前記第2の視覚センサにより前記特徴部を計測する制御を行うことを特徴とするロボット装置。 3. The robot apparatus according to claim 1 , wherein the control device sets an initial value set in advance with respect to the first measurement data and a relationship between a coordinate system of the robot arm and a coordinate system of the first visual sensor. The calibration posture data is calculated based on the data, and the robot arm takes a plurality of positions and postures based on the calculated calibration posture data, and performs control for measuring the characteristic portion by the second visual sensor. A robotic device characterized by 請求項1から3のいずれか1項にロボット装置において、前記第1の計測データは前記第1の視覚センサから前記特徴部の少なくとも3点以上の座標値を計測した座標データであり、前記第2の計測データは、前記特徴部のうち、前記複数の位置姿勢の各々に対して前記第2の視覚センサの計測領域の内部に含まれた前記特徴部を少なくとも1点以上ずつ計測した座標データであって、前記制御装置は前記第1の計測データと前記第2の計測データの座標データを対応づけることによって前記校正を算出する制御を行うことを特徴とするロボット装置。 4. The robot apparatus according to claim 1, wherein the first measurement data is coordinate data obtained by measuring coordinate values of at least three points of the feature portion from the first visual sensor, and The second measurement data is coordinate data obtained by measuring at least one point of the feature part included in the measurement region of the second visual sensor for each of the plurality of positions and orientations. And the said control apparatus performs control which calculates the said calibration value by matching the coordinate data of said 1st measurement data and said 2nd measurement data, The robot apparatus characterized by the above-mentioned. 請求項1から4のいずれか1項に記載のロボット装置において、前記制御装置は、前記第1の計測データ、前記校正姿勢データ、および前記第2の計測データに加え、さらに前記ロボットアームの手先座標系と前記第2の視覚センサの座標系とを関係づける校正データを用いて前記校正を算出する制御を行うことを特徴とするロボット装置。 5. The robot apparatus according to claim 1, wherein the controller further includes a hand of the robot arm in addition to the first measurement data, the calibration posture data, and the second measurement data. A robot apparatus which performs control for calculating the calibration value using calibration data relating a coordinate system and a coordinate system of the second visual sensor. 請求項4または5に記載のロボット装置において、前記ロボットアームに設けられワークに対して作業を行うロボットハンドと、前記ロボットアームを介して移動される前記ロボットハンドの可動範囲内に設けられ前記ワークが配置されるワーク配置エリアを有し、前記第1の視覚センサは前記計測範囲が前記ワーク配置エリアを含むよう配置されるとともに、複数の前記特徴部を結ぶ多角形が、前記ワーク配置エリアにおいて前記ワークを把持する前記ロボットハンドの把持中心が取りうる範囲を含むよう、複数の前記特徴部が配置されることを特徴とするロボット装置。 6. The robot apparatus according to claim 4 or 5 , wherein the robot arm is provided in the robot arm and performs work on the workpiece, and the workpiece provided in a movable range of the robot hand moved through the robot arm. The first visual sensor is arranged such that the measurement range includes the work placement area, and a polygon connecting a plurality of the characteristic portions is formed in the work placement area. A robot apparatus comprising a plurality of the characteristic portions arranged to include a range that can be taken by a gripping center of the robot hand that grips the workpiece. 請求項に記載のロボット装置において、前記ロボットハンドが前記第2の視覚センサを把持することを特徴とするロボット装置。 The robot apparatus according to claim 6 , wherein the robot hand grips the second visual sensor. ロボットアームと、前記ロボットアームの基端部に対して所定の位置関係を有、前記ロボットアームの可動範囲を含む計測範囲を計測する、前記ロボットアームに支持されていない第1の視覚センサと、前記ロボットアームに支持された第2の視覚センサと、前記ロボットアームの位置姿勢を制御する制御装置と、を備えたロボット装置の制御方法において、
前記制御装置が、前記第1の視覚センサにより前記計測範囲に設けられた複数の特徴部を計測させ第1の計測データを得る第1の計測工程と、
前記制御装置が、前記ロボットアームの複数の位置姿勢の各々に対応する校正姿勢データに基づき、前記ロボットアームが複数の位置姿勢を取り、前記第2の視覚センサにより前記特徴部を計測させて得た第2の計測データを得る第2の計測工程と、
前記制御装置が、前記第1の計測データ、前記校正姿勢データ、および前記第2の計測データを用いて前記第1の視覚センサの計測値と前記ロボットアームに与える指令値とを関係づける校正を算出する校正工程と、
を含むことを特徴とするロボット装置の制御方法。
And the robot arm, said to have a predetermined positional relationship with the base end portion of the robot arm, measures the measurement range including the movable range of the robot arm, the first visual sensor which is not supported by the robot arm In a control method of a robot apparatus, comprising: a second visual sensor supported by the robot arm; and a control device that controls a position and orientation of the robot arm.
A first measurement step in which the control device measures a plurality of characteristic portions provided in the measurement range by the first visual sensor to obtain first measurement data;
Based on the calibration posture data corresponding to each of the plurality of positions and orientations of the robot arm , the control device obtains a plurality of positions and orientations, and causes the second visual sensor to measure the characteristic portion. A second measurement step for obtaining second measurement data;
A calibration value that relates the measurement value of the first visual sensor and the command value to be given to the robot arm using the first measurement data, the calibration posture data, and the second measurement data by the control device. A calibration process for calculating
A control method for a robot apparatus, comprising:
請求項8に記載の制御方法をコンピュータに実行させるためのプログラム。A program for causing a computer to execute the control method according to claim 8. 請求項9に記載のプログラムを格納したコンピュータ読み取り可能な記録媒体。A computer-readable recording medium storing the program according to claim 9.
JP2018185028A 2018-09-28 2018-09-28 Robot device, control method of robot device, program, and recording medium Active JP6611888B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018185028A JP6611888B2 (en) 2018-09-28 2018-09-28 Robot device, control method of robot device, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018185028A JP6611888B2 (en) 2018-09-28 2018-09-28 Robot device, control method of robot device, program, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014178689A Division JP6415190B2 (en) 2014-09-03 2014-09-03 ROBOT DEVICE, ROBOT CONTROL PROGRAM, RECORDING MEDIUM, AND ROBOT DEVICE CONTROL METHOD

Publications (2)

Publication Number Publication Date
JP2018202608A JP2018202608A (en) 2018-12-27
JP6611888B2 true JP6611888B2 (en) 2019-11-27

Family

ID=64956116

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018185028A Active JP6611888B2 (en) 2018-09-28 2018-09-28 Robot device, control method of robot device, program, and recording medium

Country Status (1)

Country Link
JP (1) JP6611888B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020165989A1 (en) * 2019-02-14 2020-08-20 株式会社Fuji Multi-joint robot
JP7351667B2 (en) * 2019-08-01 2023-09-27 ファナック株式会社 Robot control system, control method, computer program, and control device that performs multi-point mating
JP7152614B2 (en) * 2019-09-24 2022-10-12 株式会社Fuji Angular transmission error measuring device
CN110509300B (en) * 2019-09-30 2024-04-09 河南埃尔森智能科技有限公司 Steel hoop processing and feeding control system and control method based on three-dimensional visual guidance
CN112669383B (en) * 2020-12-30 2023-04-07 上海新时达机器人有限公司 Tracking method and camera calibration method of assembly line tracking system
CN113843614A (en) * 2021-10-08 2021-12-28 北京工业大学 Multi-plane bolt assembling device based on mixed vision
CN113843797B (en) * 2021-10-08 2023-08-01 北京工业大学 Automatic disassembly method for part hexagonal bolt under non-structural environment based on single-binocular hybrid vision

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4226623B2 (en) * 2006-09-29 2009-02-18 ファナック株式会社 Work picking device
JP2010188439A (en) * 2009-02-16 2010-09-02 Mitsubishi Electric Corp Method and apparatus for calculating parameter
JP5725708B2 (en) * 2009-12-24 2015-05-27 キヤノン株式会社 Sensor position and orientation measurement method
CN102294695A (en) * 2010-06-25 2011-12-28 鸿富锦精密工业(深圳)有限公司 Robot calibration method and calibration system
JP6000579B2 (en) * 2012-03-09 2016-09-28 キヤノン株式会社 Information processing apparatus and information processing method
JP6021533B2 (en) * 2012-09-03 2016-11-09 キヤノン株式会社 Information processing system, apparatus, method, and program
JP6108860B2 (en) * 2013-02-14 2017-04-05 キヤノン株式会社 Robot system and control method of robot system

Also Published As

Publication number Publication date
JP2018202608A (en) 2018-12-27

Similar Documents

Publication Publication Date Title
JP6415190B2 (en) ROBOT DEVICE, ROBOT CONTROL PROGRAM, RECORDING MEDIUM, AND ROBOT DEVICE CONTROL METHOD
JP6611888B2 (en) Robot device, control method of robot device, program, and recording medium
JP7237483B2 (en) Robot system control method, control program, recording medium, control device, robot system, article manufacturing method
JP7207851B2 (en) Control method, robot system, article manufacturing method, program and recording medium
JP6964989B2 (en) Control methods, robot systems, article manufacturing methods, programs, and recording media
JP6429473B2 (en) Robot system, robot system calibration method, program, and computer-readable recording medium
US9517560B2 (en) Robot system and calibration method of the robot system
JP6108860B2 (en) Robot system and control method of robot system
CN106457562B (en) Method and robot system for calibration machine people
JP5670416B2 (en) Robot system display device
US9199378B2 (en) Calibration of a manipulator
US20160184996A1 (en) Robot, robot system, control apparatus, and control method
US11285609B2 (en) Working position correcting method and working robot
US20110320039A1 (en) Robot calibration system and calibrating method thereof
JP5618770B2 (en) Robot calibration apparatus and calibration method
JP6489776B2 (en) Coordinate system calibration method, robot system, program, and recording medium
JP6860843B2 (en) Robot system, robot control device, and robot control method
JP6900290B2 (en) Robot system
JPWO2018043525A1 (en) Robot system, robot system control apparatus, and robot system control method
US20180354137A1 (en) Robot System Calibration
JP2015089575A (en) Robot, control device, robot system and control method
CN114347013A (en) Method for assembling printed circuit board and FPC flexible cable and related equipment
KR102243694B1 (en) Method for restoring position information of robot
KR102225139B1 (en) Method for restoring positional information of robot
JP2013173191A (en) Robot apparatus, robot control apparatus, robot control method, and robot control program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181022

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181022

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: 20191001

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190930

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191029

R151 Written notification of patent or utility model registration

Ref document number: 6611888

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151