JP2010112731A - Joining method of coordinate of robot - Google Patents

Joining method of coordinate of robot Download PDF

Info

Publication number
JP2010112731A
JP2010112731A JP2008283178A JP2008283178A JP2010112731A JP 2010112731 A JP2010112731 A JP 2010112731A JP 2008283178 A JP2008283178 A JP 2008283178A JP 2008283178 A JP2008283178 A JP 2008283178A JP 2010112731 A JP2010112731 A JP 2010112731A
Authority
JP
Japan
Prior art keywords
axis
camera
coordinates
marker
origin
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.)
Granted
Application number
JP2008283178A
Other languages
Japanese (ja)
Other versions
JP5093058B2 (en
Inventor
Takeshi Ueyama
剛 植山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2008283178A priority Critical patent/JP5093058B2/en
Publication of JP2010112731A publication Critical patent/JP2010112731A/en
Application granted granted Critical
Publication of JP5093058B2 publication Critical patent/JP5093058B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Manipulator (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method acquiring the relation between flange coordinate F and camera coordinate C with a camera in a visual inspecting device which is constituted by attaching the camera to the flange at the distal end of a robot arm. <P>SOLUTION: The moving vector of a camera 12 on picked-up images is acquired when moving a flange 11 along the XYZ axis of the flange coordinate F. The inclination of the camera coordinate C with respect to the flange coordinate F is operated based on this. The position of the camera coordinate C on the flange coordinate F is acquired by a photograph screen of a marker M when the flange 11 is rotated around the Zc axis of the camera coordinate C and a photograph screen of the marker M when the flange 11 is rotated around a straight line, passing through the origin of the flange coordinate F, parallel to the Zc axis of the camera coordinate C. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、手先部にカメラを取り付けたロボットにおいて、手先部の座標に対するカメラの座標の位置と傾きを求めるロボットの座標の結合方法に関する。   The present invention relates to a robot coordinate combining method for obtaining a position and an inclination of a camera coordinate relative to a coordinate of a hand part in a robot having a camera attached to the hand part.

工場の製造ラインにおいて、例えば組立の最終行程に、ロボットとカメラを組み合わせて構成した視覚検査装置を設置し、カメラにてワークの所望箇所を撮影し、その撮影画像をディスプレイに表示して視覚検査をすることが行われている。この視覚検査装置は、ロボットの手先部にカメラを取り付け、手先部を予め設定された位置に移動させてカメラによる撮影画像を取得するものである。この視覚検査装置において、手先部の移動位置を設定するためには、予め、ロボットの手先部の座標とカメラの座標との関係を求めておく必要がある。
特許文献1では、3次元カメラを用いてこのロボットの手先部の座標とカメラの座標との関係を求めている。
特開平10−63317号公報
In the factory production line, for example, a visual inspection device composed of a combination of a robot and a camera is installed in the final process of assembly, and a desired part of the workpiece is photographed with the camera, and the photographed image is displayed on a display for visual inspection. Has been done. This visual inspection apparatus attaches a camera to a hand portion of a robot and moves the hand portion to a preset position to acquire a photographed image by the camera. In this visual inspection apparatus, in order to set the movement position of the hand portion, it is necessary to obtain the relationship between the coordinates of the hand portion of the robot and the coordinates of the camera in advance.
In Patent Document 1, a three-dimensional camera is used to obtain the relationship between the coordinates of the robot's hand and the coordinates of the camera.
Japanese Patent Laid-Open No. 10-63317

しかしながら、3次元カメラは高価である。視覚検査装置で使用されるカメラは、通常、2次元カメラであるから、2次元カメラで手先部の座標とカメラの座標との関係を求めることができれば、大変に便利である。このため、手先部に取り付けられた2次元カメラを利用して手先部の座標とカメラの座標との関係を求める方法の出現が強く要望されている。   However, 3D cameras are expensive. Since the camera used in the visual inspection apparatus is usually a two-dimensional camera, it is very convenient if the relationship between the coordinates of the hand portion and the coordinates of the camera can be obtained with the two-dimensional camera. For this reason, there is a strong demand for the appearance of a method for obtaining the relationship between the coordinates of the hand portion and the coordinates of the camera using a two-dimensional camera attached to the hand portion.

そこで、本発明の目的は、手先部に取り付けられた2次元のカメラによって手先部の座標とカメラの座標との関係を求めることができるロボットの座標の結合方法を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a robot coordinate combining method capable of obtaining the relationship between the coordinates of the hand portion and the coordinates of the camera by a two-dimensional camera attached to the hand portion.

上記の目的を達成するために、本発明では、手先部を、当該手先部の座標の各軸Xf,Yf,Zfと平行にそれぞれ所望距離移動させてその移動の前後に、定位置に設けられたマーカを撮影し、その撮影画像を用いて手先部の座標に対するカメラの座標の傾きを求める。次に、カメラの座標の各軸Xc,Yc,Zcのうちレンズの光軸をZc軸とし、手先部をカメラの座標のXc軸および/またはYc軸と平行に所望量移動させてその移動前後で前記マーカを撮影し、この撮影画像によりカメラの1画素あたりのカメラの移動量を演算し、カメラの座標の前記Zc軸が手先部の座標の原点を通ると仮定して当該Zc軸を中心にして手先部を所望量だけ回転させてその回転開始から回転終了までのうちから少なくとも3位置で前記マーカを撮影し、これら撮影画像と1画素の長さからカメラの座標のZc軸と手先部の座標の原点を通るカメラの座標のZc軸と平行な軸との離間距離を求める。更に、カメラのXc軸,Yc軸を含む平面が手先部の座標の原点を通ると仮定し、手先部をカメラの座標のXc軸またはYc軸と平行に所望量移動させてその移動前後に前記マーカを撮影し、この撮影画像と1画素当たりのカメラの移動量とレンズの焦点距離から手先部とマーカとの間の距離を演算し、カメラの座標のXc軸とYc軸を含む平面が手先部の座標の原点を通ると仮定して手先部をカメラの座標のXc軸またはYc軸を中心に所望角度回転させてその回転前後にマーカを撮影し、この撮影画像と1画素1画素の長さから回転前後のマーカの相対的移動距離を求め、その移動距離と回転角から、手先部の座標の原点を通る回転中心軸からマーカまでの距離を演算し、回転中心軸とマーカとの距離からカメラの座標の原点とマーカまでの距離を差し引いて、手先部の座標の原点からカメラの座標の原点までの距離を求めるので、手先部に取り付けられたカメラによってロボットの手先部の座標に対するカメラの座標の位置と傾きとを求めることができる。   In order to achieve the above object, in the present invention, the hand portion is provided at a fixed position before and after the movement by moving the hand portion by a desired distance in parallel with the respective axes Xf, Yf, Zf of the coordinates of the hand portion. The captured marker is photographed, and the tilt of the camera coordinate relative to the hand coordinate is obtained using the photographed image. Next, of the camera coordinate axes Xc, Yc, and Zc, the optical axis of the lens is the Zc axis, and the hand is moved by a desired amount parallel to the Xc axis and / or Yc axis of the camera coordinates before and after the movement. The marker is photographed in this, and the amount of camera movement per pixel of the camera is calculated from the photographed image, and it is assumed that the Zc axis of the camera coordinates passes through the origin of the coordinates of the hand portion. Then, the hand part is rotated by a desired amount, and the marker is photographed at at least three positions from the start to the end of the rotation, and the Zc axis of the camera coordinates and the hand part are obtained from the taken image and the length of one pixel. The distance between the Zc axis and the axis parallel to the camera coordinate passing through the origin of the coordinate is obtained. Further, assuming that the plane including the Xc axis and Yc axis of the camera passes through the origin of the coordinates of the hand part, the hand part is moved by a desired amount in parallel with the Xc axis or Yc axis of the camera coordinates, and before and after the movement The marker is photographed, the distance between the hand part and the marker is calculated from this photographed image, the amount of movement of the camera per pixel and the focal length of the lens, and a plane including the Xc axis and the Yc axis of the camera coordinates is the hand side. Assuming that it passes through the origin of the coordinates of the part, the hand part is rotated by a desired angle around the Xc axis or Yc axis of the camera coordinates, and the marker is photographed before and after the rotation. Then, the relative movement distance of the marker before and after rotation is obtained, and the distance from the rotation center axis passing through the origin of the coordinates of the hand part to the marker is calculated from the movement distance and rotation angle, and the distance between the rotation center axis and the marker is calculated. To the origin of the camera coordinates and the marker The distance from the origin of the coordinates of the hand to the origin of the coordinates of the camera is obtained by subtracting the distance of the camera, and the position and inclination of the coordinates of the camera relative to the coordinates of the hand of the robot are obtained by the camera attached to the hand. be able to.

以下、本発明の一実施形態を図面に基づいて説明する。図1には、視覚検査装置が示されている。この視覚検査装置に用いられるロボット1は、ロボット本体2と、このロボット本体2を制御する制御装置3からなり、更に、ティーチングペンダント4および例えば液晶表示器を主体とする表示装置(表示手段)5を備えて構成されている。上記ティーチングペンダント4は、各種データを入力する入力手段およびロボット本体1を遠隔操作するための操作手段として機能するもので、各種の操作スイッチ4aおよび表示部4bを備えている。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 shows a visual inspection apparatus. A robot 1 used in this visual inspection apparatus includes a robot main body 2 and a control device 3 for controlling the robot main body 2, and further includes a teaching pendant 4 and a display device (display means) 5 mainly including a liquid crystal display, for example. It is configured with. The teaching pendant 4 functions as an input means for inputting various data and an operating means for remotely operating the robot body 1 and includes various operation switches 4a and a display unit 4b.

ロボット本体2は、例えば6軸の垂直多関節型のものとして構成され、ベース6と、このベース6に水平方向に旋回加納に支持されたショルダ部7と、このショルダ部7に上下方向に旋回可能に支持された下アーム8と、この下アーム8に上下方向に旋回可能に且つ回転(捻り動作)可能に支持された上アーム9と、この上アーム9に上下方向に旋回可能に支持された手首10と、この手首10に回転可能に支持されたフランジ11から構成されている。上記ショルダ部7、下アーム8、上アーム9、手首10およびフランジ11はロボットアームを構成するもので、アーム先端の手先部であるフランジ11には、カメラ12がステー12aを介して取り付けられている。
このロボット本体2を遠隔操作するティーチングペンダント4は、フランジ11を、後述するフランジ座標の各座標軸と平行に移動させたり、フランジ11を所望の姿勢に維持したまま移動(並進移動)させたりすることができるように構成されている。
The robot body 2 is configured, for example, as a six-axis vertical articulated type, and includes a base 6, a shoulder portion 7 that is supported by the base 6 in a swiveling manner in a horizontal direction, and a vertical turn on the shoulder portion 7. The lower arm 8 supported so as to be able to rotate, the upper arm 9 supported by the lower arm 8 so as to be rotatable in the vertical direction and capable of rotating (twisting), and supported by the upper arm 9 so as to be capable of rotating in the vertical direction. It comprises a wrist 10 and a flange 11 that is rotatably supported by the wrist 10. The shoulder portion 7, the lower arm 8, the upper arm 9, the wrist 10 and the flange 11 constitute a robot arm, and a camera 12 is attached to the flange 11 which is a tip portion of the arm tip via a stay 12a. Yes.
The teaching pendant 4 for remotely operating the robot body 2 moves the flange 11 in parallel with the coordinate axes of the flange coordinates described later, or moves (translates) while maintaining the flange 11 in a desired posture. It is configured to be able to.

一方、制御装置3は、図2に示すように、CPU13、駆動回路14、位置検出手段としての位置検出回路15を備えている。そして、CPU(制御手段)13には、ロボット1全体のシステムプログラムなどを記憶するROM(記憶手段)16、ティーチングペンダント4などによって作成されたロボット本体2の動作プログラムなどを記憶するRAM(記憶手段)17が接続されていると共に、ティーチングペンダント4、表示装置5、カメラ12が接続されている。   On the other hand, as shown in FIG. 2, the control device 3 includes a CPU 13, a drive circuit 14, and a position detection circuit 15 as position detection means. The CPU (control means) 13 includes a ROM (storage means) 16 for storing a system program for the entire robot 1, a RAM (storage means) for storing an operation program for the robot body 2 created by the teaching pendant 4, etc. ) 17 is connected, and the teaching pendant 4, the display device 5, and the camera 12 are connected.

上記位置検出回路15は、各関節、つまりショルダ部7、下アーム8、上アーム9、手首10およびフランジ11の相対位置を検出するためのもので、この位置検出回路15には、各関節の駆動モータ18に設けられた位置センサとしてのロータリエンコーダ19が接続されている。なお、図2には、駆動モータ18およびロータリエンコーダ19は、1個ずつしか図示していないが、実際には、各関節に対して一対一の関係で複数設けられているものである。   The position detection circuit 15 is for detecting the relative position of each joint, that is, the shoulder portion 7, the lower arm 8, the upper arm 9, the wrist 10, and the flange 11. The position detection circuit 15 includes A rotary encoder 19 as a position sensor provided in the drive motor 18 is connected. In FIG. 2, only one drive motor 18 and one rotary encoder 19 are shown, but actually, a plurality of drive motors 18 and rotary encoders 19 are provided in a one-to-one relationship with respect to each joint.

そして、位置検出回路15は、ロータリエンコーダ19の検出信号によってベース6に対するショルダ部7の回転角度、ショルダ部7に対する下アーム8の旋回角度、下アーム8に対する上アーム9の旋回角度および捻り角度、上アーム9に対する手首10の旋回角度、手首10に対するフランジ11の回転角度を検出し、その動作角度情報はCPU13に与えられる。CPU13は、動作プログラムに基づいてショルダ部7、下アーム8、上アーム9、手首10およびフランジ11を動作させる際、位置検出回路15からの入力信号をフィードバック信号としてそれらの動作(駆動モータ18)を制御する。   Then, the position detection circuit 15 detects the rotation angle of the shoulder portion 7 with respect to the base 6 based on the detection signal of the rotary encoder 19, the turning angle of the lower arm 8 with respect to the shoulder portion 7, the turning angle and the twisting angle of the upper arm 9 with respect to the lower arm 8, The turning angle of the wrist 10 with respect to the upper arm 9 and the rotation angle of the flange 11 with respect to the wrist 10 are detected, and the operation angle information is given to the CPU 13. When the CPU 13 operates the shoulder unit 7, the lower arm 8, the upper arm 9, the wrist 10 and the flange 11 based on the operation program, the input signal from the position detection circuit 15 is used as a feedback signal for those operations (drive motor 18). To control.

ここで、ベース6、ショルダ部7、下アーム8、上アーム9、手首10およびフランジ11には、それぞれ三次元の座標が固定されている。このうち、不動のベース6の座標はロボット座標(図1にSで示す。)とされるもので、他の座標系は、ショルダ部7、下アーム8、上アーム9、手首10およびフランジ11の動作によってロボット座標S上の位置と姿勢(向き)が変化する。ロボット座標Sは、例えばベース6の底面とショルダ部7の旋回中心との交点を原点Pとし、Z軸を高さ方向(鉛直方向)の座標軸に定め、X軸およびY軸を水平面内における縦横2方向の座標軸に定めている。   Here, three-dimensional coordinates are fixed to the base 6, the shoulder portion 7, the lower arm 8, the upper arm 9, the wrist 10, and the flange 11, respectively. Among these, the coordinates of the stationary base 6 are the robot coordinates (indicated by S in FIG. 1), and the other coordinate systems are the shoulder portion 7, the lower arm 8, the upper arm 9, the wrist 10 and the flange 11. The position and orientation (orientation) on the robot coordinate S change due to the operation. For example, the robot coordinate S has an origin P at the intersection of the bottom surface of the base 6 and the turning center of the shoulder portion 7, the Z-axis is defined as a coordinate axis in the height direction (vertical direction), and the X-axis and Y-axis are vertically and horizontally in a horizontal plane. Two coordinate axes are defined.

そして、制御装置3(CPU13)は、位置検出回路15から入力されるショルダ部7、下アーム8、上アーム9、手首10およびフランジ11の各関節の位置検出情報と予めROM(アーム長記憶手段)16に記憶されているショルダ部7、下アーム8、上アーム9、手首10およびフランジ11のアーム長さ情報により、ショルダ部7、下アーム8、上アーム9、手首10およびフランジ11の各座標の原点位置と姿勢を、座標変換の演算機能によってロボット座標S上での位置と姿勢とに変換して認識することができるようになっている。   Then, the control device 3 (CPU 13) receives position detection information of each joint of the shoulder portion 7, the lower arm 8, the upper arm 9, the wrist 10 and the flange 11 input from the position detection circuit 15 and a ROM (arm length storage means) in advance. ) According to the arm length information of the shoulder portion 7, the lower arm 8, the upper arm 9, the wrist 10 and the flange 11 stored in 16, each of the shoulder portion 7, the lower arm 8, the upper arm 9, the wrist 10 and the flange 11 is stored. The coordinate origin position and orientation can be recognized by converting the position and orientation on the robot coordinate S by the coordinate conversion calculation function.

さて、ショルダ部7、下アーム8、上アーム9、手首10およびフランジ11のうち、フランジ11の座標は、図3に示すように、フランジ11の前端面(表面)の中心Pfを原点とし、フランジ11の先端面上で2つの座標軸、フランジ11の回転軸上で1つの座標軸が定められている。具体的には、原点Pfとフランジ11に偏心して形成されている小孔11aの中心を通る直線をY軸とし、この原点Pfを通りY軸と直交する直線をX軸、原点Pfを通りX,Yの両軸と直交する直線、つまりフランジ11の回転中心線と一致する直線をZ軸と定めている。   Now, among the shoulder portion 7, the lower arm 8, the upper arm 9, the wrist 10 and the flange 11, the coordinates of the flange 11 are as shown in FIG. 3, with the center Pf of the front end surface (surface) of the flange 11 as the origin, Two coordinate axes are defined on the front end surface of the flange 11 and one coordinate axis is defined on the rotation axis of the flange 11. Specifically, a straight line passing through the origin Pf and the center of the small hole 11a formed eccentric to the flange 11 is defined as the Y axis, a straight line passing through the origin Pf and orthogonal to the Y axis is defined as the X axis, and passing through the origin Pf , Y perpendicular to both axes, that is, a straight line that coincides with the rotation center line of the flange 11 is defined as the Z axis.

そして、ロボット1の位置と姿勢、即ち、フランジ11の位置と姿勢のうち、位置は、フランジ11の座標の原点Pfであるフランジ11の先端面の中心が占めるロボット座標S上の位置で示される。また、フランジ11の姿勢は、フランジ11の座標の原点PfからZ軸に沿って例えば負方向に伸びる単位長さ「1」のベクトルと、原点PfからX軸に沿って例えば正方向に伸びる単位長さ「1」のベクトルを定義し、フランジ11の座標をその原点Pfがロボット座標Sの原点Pに一致するように並進させたとき、そのロボット座標S上での両単位ベクトルで表される。   Of the position and posture of the robot 1, that is, the position and posture of the flange 11, the position is indicated by the position on the robot coordinate S occupied by the center of the front end surface of the flange 11, which is the origin Pf of the coordinates of the flange 11. . In addition, the posture of the flange 11 is a unit length “1” vector extending in the negative direction along the Z axis from the origin Pf of the coordinates of the flange 11 and a unit extending in the positive direction along the X axis from the origin Pf. When a vector of length “1” is defined and the coordinates of the flange 11 are translated so that the origin Pf coincides with the origin P of the robot coordinate S, it is represented by both unit vectors on the robot coordinate S. .

一方、カメラ12は、図4に示すように、固定焦点のレンズ20、このレンズ20から当該レンズ20の焦点距離Lだけ離れた位置に設置された撮像センサとしての2次元のCCD撮像画面21を備えている。CCD撮像画面21(以下、単に撮像画面21という)は、多数のCCDを縦横に整列配置してなるもので、1つのCCDが1画素を構成している。このカメラ12にも、三次元座標が設定されている。このカメラ12の座標の座標は、図4および図5に示すように、撮像画面21の中心点Pcを原点とし、この原点Pcを通って撮像画面21を上下方向に二分する直線をX軸、原点Pcを通って撮像画面21を左右方向に二分する直線をY軸、原点Pcとレンズ20の中心を通る直線(光軸に一致)をZ軸としている。   On the other hand, as shown in FIG. 4, the camera 12 has a fixed-focus lens 20 and a two-dimensional CCD imaging screen 21 as an imaging sensor installed at a position separated from the lens 20 by the focal length L of the lens 20. I have. The CCD imaging screen 21 (hereinafter simply referred to as the imaging screen 21) is formed by arranging a large number of CCDs vertically and horizontally, and one CCD constitutes one pixel. The camera 12 is also set with three-dimensional coordinates. As shown in FIGS. 4 and 5, the coordinates of the camera 12 are coordinated with an X axis representing a straight line that bisects the imaging screen 21 in the vertical direction through the origin Pc with the center point Pc of the imaging screen 21 as the origin. A straight line that bisects the imaging screen 21 in the left-right direction through the origin Pc is the Y axis, and a straight line that passes through the origin Pc and the center of the lens 20 (matches the optical axis) is the Z axis.

なお、以下では、フランジ11の座標およびカメラ12の座標をそれぞれフランジ座標Fおよびカメラ座標Cと称し、これらフランジ座標Fおよびカメラ座標Cの座標軸を互いに区別するために、それぞれの座標軸を表すX,Y,Zに、fおよびcの添え字を付して示すこととする。   In the following, the coordinates of the flange 11 and the coordinates of the camera 12 are referred to as the flange coordinates F and the camera coordinates C, respectively, and in order to distinguish the coordinate axes of the flange coordinates F and the camera coordinates C from each other, X, Y and Z are indicated by subscripts f and c.

ところで、カメラ12の撮影ポイントを定めるには、フランジ座標Fに対するカメラ座標Cの関係を予め知っておかねばならない。つまり、カメラ12によりワークの撮影対象個所を撮影するには、カメラ12の光軸(Zc軸)がワークの撮影対象箇所を向き、且つ撮影対象箇所の全体がカメラ12の撮影視野内に入った状態でピントが合うように、フランジ11の位置と姿勢を定めなければならない。そのためには、図5に示すように、フランジ座標Fに対するカメラ座標Cの位置と傾き(姿勢)を知らねばならない。
前記制御装置3のROM16には、このフランジ座標Fに対するカメラ座標Cの位置と傾きを求めるためのプログラムが格納されている。以下、このプログラムによってフランジ座標Fに対するカメラ座標Cの位置と傾きの関係を求める方法について、図6に示すフローチャートおよび図7以降の図面を参照しながら説明する。
By the way, in order to determine the shooting point of the camera 12, it is necessary to know in advance the relationship of the camera coordinates C to the flange coordinates F. In other words, in order to photograph the part to be photographed of the workpiece by the camera 12, the optical axis (Zc axis) of the camera 12 faces the part to be photographed for the workpiece, and the whole part to be photographed is in the field of view of the camera 12. The position and posture of the flange 11 must be determined so as to be in focus in the state. For this purpose, as shown in FIG. 5, the position and inclination (posture) of the camera coordinates C with respect to the flange coordinates F must be known.
The ROM 16 of the control device 3 stores a program for obtaining the position and inclination of the camera coordinates C with respect to the flange coordinates F. Hereinafter, a method for obtaining the relationship between the position and inclination of the camera coordinate C with respect to the flange coordinate F by this program will be described with reference to the flowchart shown in FIG.

図7はロボット本体2をスケルトンで示すもので、併せて、視覚検査対象物であるワークWも示している。ワークWには、小さな点状のマーカMが付されている。このマーカMは、塗料により描いて形成しても良いし、ワークWに取り付けられた例えば小ねじの頭で代用しても良い。
まず、フランジ座標Fに対するカメラ座標Cの傾きを求める。そのために、ユーザは、ティーチングペンダント4を用いて、ロボット本体2のフランジ11を、フランジ座標FのXf軸と平行に、Yf軸と平行に、Zf軸と平行に、それぞれ所望の距離だけ移動させる。
FIG. 7 shows the robot body 2 with a skeleton, and also shows a workpiece W that is a visual inspection object. A small dot-like marker M is attached to the workpiece W. The marker M may be formed by drawing with a paint, or may be substituted by, for example, a head of a small screw attached to the workpiece W.
First, the inclination of the camera coordinate C with respect to the flange coordinate F is obtained. Therefore, the user uses the teaching pendant 4 to move the flange 11 of the robot body 2 by a desired distance in parallel with the Xf axis of the flange coordinates F, in parallel with the Yf axis, and in parallel with the Zf axis. .

このとき、マーカMにピントが合うように、移動によりマーカMが撮影視野から外れないように、且つ、カメラ12ひいてはフランジ11の姿勢が移動前後で変わらないようにして移動前と移動後の2回撮影する(図6のフローチャートのステップS1:第1の行程)。そして、CPU13は、フランジ11のXf軸、Yf軸、Zf軸と平行の移動距離を、それぞれロボット座標S上でのフランジ座標Fの移動前後の位置から求め、RAM17に記憶する。   At this time, in order to focus on the marker M, the marker M is not moved out of the field of view by the movement, and the camera 12 and thus the posture of the flange 11 are not changed before and after the movement. Images are taken once (step S1: first step in the flowchart of FIG. 6). Then, the CPU 13 calculates the movement distances of the flange 11 parallel to the Xf axis, the Yf axis, and the Zf axis from the positions before and after the movement of the flange coordinates F on the robot coordinates S, and stores them in the RAM 17.

このときのフランジ11の移動のさせ方は、一つの軸に平行に移動させた後、元の位置に戻してから次の軸に平行に移動させるようにしても良いし、一つの軸に平行に移動させた後、その位置から次の軸に平行に移動させるようにしても良い。
フランジ11が、Xf軸と平行に、Yf軸と平行に、Zf軸と平行に、それぞれ所望の距離だけ移動されると、その後、制御装置3のCPU13は、フランジ座標Fに対するカメラ座標Cの傾きを推定する(ステップS2)。
At this time, the flange 11 may be moved in parallel with one axis and then moved back in parallel to the next axis after returning to the original position. Then, it may be moved parallel to the next axis from that position.
When the flange 11 is moved by a desired distance in parallel to the Xf axis, parallel to the Yf axis, and parallel to the Zf axis, the CPU 13 of the control device 3 thereafter tilts the camera coordinates C with respect to the flange coordinates F. Is estimated (step S2).

このフランジ座標Fに対するカメラ座標Cの傾きを推定する方法を説明する前に、予備知識として、ロボット座標Sの原点PからワークWのマーカMまでのベクトル(第1ベクトル)、ロボット座標Sの原点Pからフランジ座標Fの原点Pfまでの変換行列(第2行列)、フランジ座標Fの原点PfからワークWのマーカMまでのベクトル(第3ベクトル)、フランジ座標Fの原点Pfからカメラ座標Cの原点Pcまでの変換行列(第4行列)、カメラ座標Cの原点PcからワークWのマーカMまでのベクトル(第5ベクトル)の関係について説明し、これらの関係を基にしてカメラ座標Cの傾きを求める式を導くこととする。   Before explaining the method of estimating the inclination of the camera coordinate C with respect to the flange coordinate F, as a prior knowledge, a vector (first vector) from the origin P of the robot coordinate S to the marker M of the workpiece W, the origin of the robot coordinate S A transformation matrix (second matrix) from P to the origin Pf of the flange coordinate F, a vector (third vector) from the origin Pf of the flange coordinate F to the marker M of the workpiece W, the origin Pf of the flange coordinate F to the camera coordinate C The relationship between the transformation matrix (fourth matrix) to the origin Pc and the vector (fifth vector) from the origin Pc of the camera coordinates C to the marker M of the workpiece W will be described, and the inclination of the camera coordinates C will be based on these relationships. Let us derive a formula to find

ロボット本体2が図7に実線で示す位置(以下、i位置という。)にあるとき、上記第1ベクトル〜第5ベクトルは次の(1)式の関係がある。   When the robot body 2 is at a position indicated by a solid line in FIG. 7 (hereinafter referred to as i position), the first vector to the fifth vector have the following relationship (1).

Figure 2010112731
Figure 2010112731

なお、第1ベクトル、第3ベクトルおよび第5ベクトルは、1行4列(第4要素は0)のベクトルで示される。第2行列および第4行列は、4行4列の行列で示される。
また、ロボット本体2が図7に破線で示す位置(以下、j位置という。)にあるとき、上記第1ベクトル〜第5ベクトルは次の(2)式の関係がある。
The first vector, the third vector, and the fifth vector are represented by vectors of 1 row and 4 columns (the fourth element is 0). The second matrix and the fourth matrix are shown as a 4 × 4 matrix.
Further, when the robot body 2 is at a position indicated by a broken line in FIG. 7 (hereinafter referred to as j position), the first vector to the fifth vector have the relationship of the following equation (2).

Figure 2010112731
Figure 2010112731

なお、第1ベクトルおよび第5ベクトルは、1行4列(第4要素は0)のベクトルで示される。第2行列、第3行列および第4行列は、4行4列の行列で示される。
そして、ロボット本体2をi位置からj位置に移動させたとき、フランジ11の移動ベクトルは、j位置における第3ベクトルトとi位置における第3ベクトルとの差分に等しいので、次の(3)式で表すことができる。同様に、ロボット本体2をi位置からj位置に動作させたとき、カメラ12の移動ベクトルは、j位置における第5ベクトルトとi位置における第5ベクトルとの差分に等しいので、次の(4)式で表すことができる。
The first vector and the fifth vector are represented by vectors of 1 row and 4 columns (the fourth element is 0). The second matrix, the third matrix, and the fourth matrix are shown as a 4 × 4 matrix.
When the robot body 2 is moved from the i position to the j position, the movement vector of the flange 11 is equal to the difference between the third vector at the j position and the third vector at the i position. Can be expressed as Similarly, when the robot body 2 is moved from the i position to the j position, the movement vector of the camera 12 is equal to the difference between the fifth vector at the j position and the fifth vector at the i position. It can be expressed by a formula.

Figure 2010112731
Figure 2010112731

なお、フランジ座標の移動ベクトルおよびカメラ座標の移動ベクトルは、1行4列(第4要素は0)のベクトルで示される。
ロボット本体2がi位置からj位置へ移動したと考えた場合、(2)式は、(1)式の第3ベクトルに(3)式の移動ベクトルを置換し、(1)式の第5ベクトルに(4)式の移動ベクトルを置換した場合に等しいから、次の(5)式が成り立つ。
Note that the movement vector of the flange coordinates and the movement vector of the camera coordinates are represented by vectors of one row and four columns (the fourth element is 0).
When it is considered that the robot body 2 has moved from the i position to the j position, the expression (2) replaces the movement vector of the expression (3) with the third vector of the expression (1), and the fifth expression of the expression (1) Since this is the same as the case where the movement vector of equation (4) is replaced with the vector, the following equation (5) is established.

Figure 2010112731
Figure 2010112731

この(5)式において、左辺と右辺を、共通のi位置での第2ベクトルで除すと、次の(6)式となる。   In the equation (5), when the left side and the right side are divided by the second vector at the common i position, the following equation (6) is obtained.

Figure 2010112731
Figure 2010112731

上記ステップS1において、フランジ11を、フランジ座標FのXf軸、Yf軸、Zf軸と平行に、それぞれ所望の距離移動させた状態は、図7において、フランジ11をi位置からj位置に移動させた場合に相当する。このときのフランジ11がフランジ座標FのXf軸、Yf軸、Zf軸と平行に移動した距離をそれぞれΔx、Δy、Δzとして、i位置からj位置までの各座標軸方向への移動ベクトルをi位置のフランジ座標Fを基準にして表すと、次の(7)〜(9)式で表される。   In step S1, the flange 11 is moved to a desired distance in parallel with the Xf axis, Yf axis, and Zf axis of the flange coordinate F. In FIG. 7, the flange 11 is moved from the i position to the j position. It corresponds to the case. At this time, the distance that the flange 11 moved in parallel with the Xf axis, Yf axis, and Zf axis of the flange coordinate F is Δx, Δy, and Δz, respectively, and the movement vector in the direction of each coordinate axis from the i position to the j position is the i position. Is expressed by the following equations (7) to (9).

Figure 2010112731
Figure 2010112731

また、フランジ11を、フランジ座標FのXf軸、Yf軸、Zf軸と平行に所望の距離移動させたとき、その移動によるカメラ座標Cの移動ベクトルを、i位置のときのカメラ座標Cを基準にして当該カメラ座標CのXc軸、Yc軸、Zc軸と平行な移動ベクトルに分解して表すと、次の(10)〜(12)式になる。   Further, when the flange 11 is moved by a desired distance parallel to the Xf axis, Yf axis, and Zf axis of the flange coordinate F, the movement vector of the camera coordinate C by the movement is used as a reference with respect to the camera coordinate C at the i position. If the movement coordinates parallel to the Xc axis, Yc axis, and Zc axis of the camera coordinate C are decomposed and expressed, the following equations (10) to (12) are obtained.

Figure 2010112731
Figure 2010112731

一方、フランジ座標Fのi位置からj位置までの移動ベクトルを、(7)〜(9)式を用いて表すと、次の(13)式となる。   On the other hand, when the movement vector from the i position to the j position of the flange coordinate F is expressed using the expressions (7) to (9), the following expression (13) is obtained.

Figure 2010112731
Figure 2010112731

前記(6)式の左辺は、(13)式のフランジ座標Fのi位置からj位置までの移動ベクトルに等しいので、(6)式は、次の(14)式のように表すことができる。   Since the left side of the equation (6) is equal to the movement vector from the i position to the j position of the flange coordinate F in the equation (13), the equation (6) can be expressed as the following equation (14). .

Figure 2010112731
Figure 2010112731

そして、(14)式の右辺を、前記(10)〜(13)式を用いて示すと、次の(15)式となる。従って、(14)式は、(16)式のように表すことができる。   And if the right side of (14) type | formula is shown using the said (10)-(13) type | formula, it will become the following (15) type | formula. Therefore, equation (14) can be expressed as equation (16).

Figure 2010112731
Figure 2010112731

ところで、フランジ座標Fに対するカメラ座標Cの傾きを求めるには、カメラ座標Cの原点Pcがフランジ座標Fの原点Pfに一致している(オフセットが0)と仮定して回転成分のみを考えれば良いので、前記(16)式は、次の(17)式となる。   By the way, in order to obtain the inclination of the camera coordinate C with respect to the flange coordinate F, it is only necessary to consider the rotation component on the assumption that the origin Pc of the camera coordinate C coincides with the origin Pf of the flange coordinate F (offset is 0). Therefore, the equation (16) becomes the following equation (17).

Figure 2010112731
Figure 2010112731

なお、括弧内のΔpcx、Δpcy、Δpczは、1行3列のベクトルで示される。
さて、フランジ11をXf軸、Yf軸、Zf軸の各方向に移動させたときのカメラ12のカメラ座標C上での移動ベクトルは、Xc軸方向成分とYc軸方向成分とZc軸方向成分で表すことができる。このうち、Xc軸方向成分とYc軸方向成分は、カメラ12の撮像画面21に写された移動前のマーカMの映像位置から移動後のマーカMの映像位置までのXc軸方向成分とYc軸方向成分から得ることができる。
Note that Δpcx, Δpcy, Δpcz in parentheses are indicated by vectors of 1 row and 3 columns.
Now, the movement vector on the camera coordinate C of the camera 12 when the flange 11 is moved in each of the Xf axis, Yf axis, and Zf axis directions is an Xc axis direction component, a Yc axis direction component, and a Zc axis direction component. Can be represented. Among these, the Xc-axis direction component and the Yc-axis direction component are the Xc-axis direction component from the image position of the marker M before movement and the image position of the marker M after movement, which are captured on the imaging screen 21 of the camera 12, and the Yc axis. It can be obtained from the direction component.

例えば、図8に示すように、フランジ11をXf軸方向に移動させたとき、移動前のマーカMの映像位置がIxaで示す位置で、移動後のマーカMの映像位置がIxbであったとすると、その移動ベクトルは、IxaからIxbに至る矢印で示される。ちなみに、撮像画面21上ではマーカMは、カメラ12の実際の移動方向とは上下左右逆になって現れるので、移動ベクトルは、撮像画面12上のベクトルとは上下左右が逆のベクトルに変換する必要がある。なお、移動後の位置でマーカMのピントに合っておらず、ぼやけて撮像された場合には、そのぼやけている範囲の中央点をマーカMの映像位置とする。同様に、マーカMにピントが合っていても、大きく撮影されている場合には、そのマークMの画像の図形中心を映像位置とする。   For example, as shown in FIG. 8, when the flange 11 is moved in the Xf-axis direction, the image position of the marker M before the movement is the position indicated by Ixa, and the image position of the marker M after the movement is Ixb. The movement vector is indicated by an arrow from Ixa to Ixb. Incidentally, the marker M appears on the imaging screen 21 upside down and left and right with respect to the actual movement direction of the camera 12, so the movement vector is converted into a vector that is upside down and left and right opposite to the vector on the imaging screen 12. There is a need. In addition, when the marker M is not in focus at the moved position and the image is blurred, the center point of the blurred range is set as the video position of the marker M. Similarly, even when the marker M is in focus, if the image is enlarged, the graphic center of the image of the mark M is set as the video position.

この移動ベクトルのXc軸方向成分とYc軸方向成分の長さは、IxaとIxbを結ぶ直線を斜辺とする直角三角形を描き、その直角三角形のXc軸と平行な辺およびYc軸と平行な辺の長さで示される。そして、各辺の長さは、各辺が通る画素(縦横同じ長さの正方形)の数によって得ることができる。ここでは、フランジ座標Fに対するカメラ座標Cの傾きだけを求めようとしているので、実際のXc軸方向およびYc軸方向の移動量を求める必要はなく、向きさえ分かれば良い。このため、移動ベクトルのXc軸方向成分とYc軸方向成分の相対的な長さが分かれば良いので、Xc軸方向成分とYc軸方向成分の大きさを画素数で表すことにする。フランジ11をYf軸方向およびZf軸方向に移動させたときのカメラ12カメラ座標C上でのXc軸、Yc軸、Zc軸の各方向の移動ベクトルのXc軸方向成分とYc軸方向成分の大きさも、同様にして撮影画像から求めることができる。   The length of the Xc-axis direction component and the Yc-axis direction component of this movement vector is to draw a right triangle whose hypotenuse is a straight line connecting Ixa and Ixb, and a side parallel to the Xc axis and a side parallel to the Yc axis. Indicated by the length of The length of each side can be obtained by the number of pixels (squares having the same length and width) that each side passes through. Here, since only the inclination of the camera coordinates C with respect to the flange coordinates F is to be obtained, it is not necessary to obtain the actual movement amounts in the Xc-axis direction and the Yc-axis direction, and it is only necessary to know the direction. For this reason, since it is sufficient to know the relative lengths of the Xc-axis direction component and the Yc-axis direction component of the movement vector, the magnitudes of the Xc-axis direction component and the Yc-axis direction component are expressed by the number of pixels. When the flange 11 is moved in the Yf-axis direction and the Zf-axis direction, the magnitudes of the Xc-axis direction component and the Yc-axis direction component of the movement vector in the Xc-axis, Yc-axis, and Zc-axis directions on the camera coordinate C on the camera 12 Similarly, it can be obtained from the photographed image.

しかしながら、撮影画像から移動ベクトルを検出する方法では、カメラ12の撮影画面21が2次元であるから、移動ベクトルのZc軸方向成分を取得することができない。
そこで、(17)式の回転行列の逆行列をとると、次の(18)式のようになる。
However, in the method of detecting the movement vector from the captured image, the Zc-axis direction component of the movement vector cannot be acquired because the shooting screen 21 of the camera 12 is two-dimensional.
Therefore, taking the inverse matrix of the rotation matrix of equation (17), the following equation (18) is obtained.

Figure 2010112731
Figure 2010112731

更に、(18)式のフランジ11の移動ベクトルの逆行列をとると、次の(19)式のようになる。   Further, when the inverse matrix of the movement vector of the flange 11 in the equation (18) is taken, the following equation (19) is obtained.

Figure 2010112731
Figure 2010112731

この(19)式の右辺は、カメラ12のカメラ座標C上での移動ベクトルであるから、(19)式は、更に次の(20)式となる。   Since the right side of the equation (19) is a movement vector of the camera 12 on the camera coordinates C, the equation (19) further becomes the following equation (20).

Figure 2010112731
Figure 2010112731

ここで、ax,ay,azは、前述のフランジ11をXf軸と平行に移動させたときのカメラ12のカメラ座標C上での移動ベクトルをXc軸方向、Yc軸方向、Zc軸方向に分解したときの各成分を示す。bx,by,bzは、前述のフランジ11をYf軸と平行に移動させたときのカメラ12のカメラ座標C上での移動ベクトルをXc軸方向、Yc軸方向、Zc軸方向に分解したときの各成分を示す。cx,cy,czは、前述のフランジ11をZf軸と平行に移動させたときのカメラ12のカメラ座標C上での移動ベクトルをXc軸方向、Yc軸方向、Zc軸方向に分解したときの各成分を示す。   Here, ax, ay, and az are decomposed into the Xc axis direction, the Yc axis direction, and the Zc axis direction of the movement vector on the camera coordinate C of the camera 12 when the flange 11 is moved in parallel with the Xf axis. Each component is shown. bx, by, and bz are obtained when the movement vector on the camera coordinate C of the camera 12 when the flange 11 is moved in parallel with the Yf axis is decomposed in the Xc axis direction, the Yc axis direction, and the Zc axis direction. Each component is shown. cx, cy, and cz are obtained when the moving vector on the camera coordinate C of the camera 12 when the flange 11 is moved in parallel with the Zf axis is decomposed in the Xc axis direction, the Yc axis direction, and the Zc axis direction. Each component is shown.

ただし、前述したように、az,bz,czは、未知である。しかし、(20)式の中辺の逆行列式は、フランジ11をXf軸、Yf軸、Zf軸に平行に移動させたときの移動量であるから、CPU13はROM16が記憶する逆行列式解法プログラムによって当該逆行列式を解くことができる。また、az,bz,czは、次の(21)〜(24)式に示された条件を満たすので、(20)式を解くこと、つまりフランジ座標Fに対するカメラ座標Cの傾きを求めることができる(第3の行程)。   However, as described above, az, bz, and cz are unknown. However, since the inverse determinant of the middle side of the equation (20) is the amount of movement when the flange 11 is moved in parallel to the Xf axis, the Yf axis, and the Zf axis, the CPU 13 solves the inverse matrix equation stored in the ROM 16. The inverse determinant can be solved by a program. Since az, bz, and cz satisfy the conditions shown in the following equations (21) to (24), solving the equation (20), that is, obtaining the inclination of the camera coordinates C with respect to the flange coordinates F. Yes (third step).

Figure 2010112731
Figure 2010112731

なお、(21)式は4列4行の同時変換行列のうち3列3行の回転行列の成分であり、回転行列の成分の各ベクトルの大きさ(ノルム)は1になるという条件に基づくものである。(22)〜(24)式は、移動ベクトルのXc軸、Yc軸、Zc軸の各方向の成分は互いに直交しているので、その内積は0という条件に基づくものである。
以上のことから、CPU13は、フランジ11がXf軸、Yf軸、Zf軸に平行に移動されると、フランジ座標Fに対するカメラ座標Cの傾きを求めるために、各軸との平行移動について、その移動ベクトルのXc軸方向成分とYc軸方向成分を画素数として求める。次に、CPU13は、(20)式を解くことによってフランジ座標Fに対するカメラ座標Cの傾きを求める(推定する)。
Equation (21) is based on the condition that the rotation matrix component of 3 columns and 3 rows of the simultaneous conversion matrix of 4 columns and 4 rows is 1, and the magnitude (norm) of each vector of the rotation matrix components is 1. Is. In the equations (22) to (24), the components of the movement vector in the Xc axis, Yc axis, and Zc axis directions are orthogonal to each other, and therefore the inner product is based on the condition that it is zero.
From the above, when the flange 11 is moved in parallel to the Xf axis, the Yf axis, and the Zf axis, the CPU 13 determines the inclination of the camera coordinates C with respect to the flange coordinates F. The Xc-axis direction component and the Yc-axis direction component of the movement vector are obtained as the number of pixels. Next, the CPU 13 obtains (estimates) the inclination of the camera coordinates C with respect to the flange coordinates F by solving the equation (20).

このようにして、フランジ座標Fに対するカメラ座標Cの傾きが求められると、次に、ユーザは、ティーチングペンダント4を用いて、ロボット本体2のフランジ11を、カメラ座標CのXc軸およびYc軸のうちの少なくとも一方、この実施形態では、Xc軸およびYc軸にそれぞれ平行に、それぞれ所望の距離だけ移動させる。このとき、カメラ12の姿勢が移動前後で変わらないように、マーカMがカメラ12の撮影視野内に入る状態にして、当該マーカMを、撮像画面21により移動前と移動後の2回撮影する(ステップS3:第4の行程)。   When the inclination of the camera coordinate C with respect to the flange coordinate F is obtained in this way, the user then uses the teaching pendant 4 to move the flange 11 of the robot body 2 along the Xc axis and the Yc axis of the camera coordinate C. At least one of them, in this embodiment, each is moved by a desired distance in parallel to the Xc axis and the Yc axis. At this time, the marker M is in a photographing field of view of the camera 12 so that the posture of the camera 12 does not change before and after the movement, and the marker M is photographed twice before and after the movement by the imaging screen 21. (Step S3: 4th process).

すると、CPU13は、フランジ11のXc軸、Yc軸に沿う移動距離を、ロボット座標S上でのフランジ座標Fの移動前後の位置から求め(移動距離演算手段)、RAM17に記憶する。次に、CPU13は、カメラ座標CのXc軸と平行な移動、Yc軸と平行な移動のそれぞれについて、カメラ12の撮像画面21に写された移動前のマーカMの映像位置と移動後の映像位置の間のXc軸方向の画素数とYc軸方向の画素数をカウントする。図9は、フランジ11がYc軸方向に移動した場合の撮像画面21でのマーカMの移動前後の映像位置を例示している。そして、CPU13は、求めたXc,Yc軸方向の移動距離を、Xc,Yc軸方向の画素数で除して、1画素あたりの移動距離を演算する(ステップS4:第5の行程)。この1画素当たりの移動量は、マーカMとカメラ12との間がマーカMにピントが正確に合う距離だけ離れている状態の下でのものである。
なお、1画素当たりの移動距離を演算するには、フランジ11をXc軸方向とYc軸方向のうちの一方の方向にだけ移動させることで求める(推定する)ことができる。Xc軸方向とYc軸方向の2方向について1画素当たりの移動距離を求めた場合には、その平均をとることによってより正確な1画素当たりの移動量を求めることができる。
Then, the CPU 13 obtains the movement distance of the flange 11 along the Xc axis and the Yc axis from the position before and after the movement of the flange coordinate F on the robot coordinate S (movement distance calculation means) and stores it in the RAM 17. Next, for each of the movement parallel to the Xc axis of the camera coordinates C and the movement parallel to the Yc axis, the CPU 13 displays the image position of the marker M before the movement and the image after the movement, which are captured on the imaging screen 21 of the camera 12. The number of pixels in the Xc-axis direction and the number of pixels in the Yc-axis direction between the positions are counted. FIG. 9 illustrates image positions before and after the movement of the marker M on the imaging screen 21 when the flange 11 moves in the Yc axis direction. Then, the CPU 13 calculates the movement distance per pixel by dividing the obtained movement distance in the Xc and Yc axis directions by the number of pixels in the Xc and Yc axis directions (step S4: fifth step). The amount of movement per pixel is under the condition that the marker M and the camera 12 are separated by a distance that allows the marker M to be accurately focused.
In order to calculate the movement distance per pixel, it can be obtained (estimated) by moving the flange 11 only in one of the Xc axis direction and the Yc axis direction. When the movement distance per pixel is obtained in the two directions of the Xc axis direction and the Yc axis direction, a more accurate movement amount per pixel can be obtained by taking the average.

次に、ユーザは、カメラ12のZc軸がフランジ座標Fの原点Pfを通ると仮定し、ティーチングペンダント4を操作して仮定のZc軸を中心にフランジ11を所望の角度だけ回転させる。上記仮定のZc軸を図5にZcfで示す。このZcf軸を中心とする回転操作は、カメラ12の姿勢が変わらないように、カメラ12の撮影視野内にマーカMが入り、且つマーカMにピントが合った状態にして行い、回転前後を含む回転中に、少なくとも3回撮影する(ステップS5:第6の行程)。図10(a)、(b)、(c)は回転開始時、回転途中の所望の時に1回、回転終了時の合計3回撮影したときのマーカMの映像位置を例示している。   Next, assuming that the Zc axis of the camera 12 passes through the origin Pf of the flange coordinate F, the user operates the teaching pendant 4 to rotate the flange 11 about the assumed Zc axis by a desired angle. The hypothetical Zc axis is indicated by Zcf in FIG. This rotation operation about the Zcf axis is performed with the marker M in the shooting field of view of the camera 12 and in focus with the marker M so that the posture of the camera 12 does not change, including before and after rotation. During the rotation, photographing is performed at least three times (step S5: sixth step). FIGS. 10A, 10B, and 10C illustrate the image position of the marker M when photographing is performed once at a desired time during the rotation, once at a desired time during the rotation, and a total of three times at the end of the rotation.

続いて、CPU13は、この3点のマーカMの映像位置P1〜P3を相互に結んだ直線を少なくとも2本演算し、この2本の直線の中点を通る直交直線L1,L2を演算し、この2本の直交直線L1,L2の交点を演算する。そして、CPU13は、2本の直交直線の交点を回転中心Tcと決定する(第7の行程)。次に、CPU13は、回転中心Tcとカメラ座標Cの原点Pcとの距離と方向を求める(ステップS6)。   Subsequently, the CPU 13 calculates at least two straight lines connecting the video positions P1 to P3 of the three markers M, and calculates orthogonal straight lines L1 and L2 passing through the midpoints of the two straight lines. The intersection of these two orthogonal straight lines L1 and L2 is calculated. And CPU13 determines the intersection of two orthogonal straight lines as the rotation center Tc (7th process). Next, the CPU 13 obtains the distance and direction between the rotation center Tc and the origin Pc of the camera coordinates C (step S6).

つまり、回転中心Tcは、フランジ座標Fの原点Pfを通る直線であってカメラ座標CのZc軸と平行な直線(Zcf軸)上にあるから、撮像画面21上において回転中心Tcの位置からカメラ座標Cの原点PcまでのベクトルV1を求める。そして、回転中心Tcと原点Pcまでの距離を、上記ベクトルV1のXc軸方向成分およびYc軸方向成分についての画素数を求め、これら2軸方向成分の画素数に1画素当たりの距離を乗じてXc軸方向成分およびYc軸方向成分の長さを求め、更に、Xc軸方向成分およびYc軸方向成分の長さから、カメラ座標Cの原点Pcと回転中心Tcとの間の距離を求める。以上により、フランジ座標Fの原点Pfを通るカメラ座標CのZc軸と平行な直線(Zcf軸)、ひいてはフランジ座標Fの原点Pfからカメラ座標CのZc軸までの方向と距離が求まることとなる(第8の行程)。このフランジ座標Fの原点Pfからカメラ座標CのZc軸までの方向と距離を示すベクトルを、図5にV2で表した。   In other words, the rotation center Tc is a straight line passing through the origin Pf of the flange coordinate F and is on a straight line (Zcf axis) parallel to the Zc axis of the camera coordinate C. Therefore, the camera is detected from the position of the rotation center Tc on the imaging screen 21. A vector V1 up to the origin Pc of the coordinate C is obtained. Then, the distance between the rotation center Tc and the origin Pc is obtained as the number of pixels for the Xc-axis direction component and the Yc-axis direction component of the vector V1, and the number of pixels of these two-axis direction components is multiplied by the distance per pixel. The lengths of the Xc-axis direction component and the Yc-axis direction component are obtained, and further, the distance between the origin Pc of the camera coordinates C and the rotation center Tc is obtained from the lengths of the Xc-axis direction component and the Yc-axis direction component. As described above, the straight line (Zcf axis) parallel to the Zc axis of the camera coordinate C passing through the origin Pf of the flange coordinate F, and the direction and distance from the origin Pf of the flange coordinate F to the Zc axis of the camera coordinate C are obtained. (Eighth process). A vector indicating the direction and distance from the origin Pf of the flange coordinate F to the Zc axis of the camera coordinate C is represented by V2 in FIG.

このようにして、フランジ座標Fに対するカメラ座標Cの傾きと、フランジ座標Fの原点Pfからカメラ座標CのZc軸がどの方向にどれだけ離れた位置を通っているかが求められる。そして、カメラ座標Cの原点Pcは、Zc軸が通る直線上にあるのであるが、フランジ座標Fの原点Pfの原点からどれだけ離れた位置にあるのかが求まっていない。以下で、そのZc軸が通る直線上のどこにカメラ座標Cの原点Pcがあるかを求める。   In this way, the inclination of the camera coordinate C with respect to the flange coordinate F and the distance in which direction the Zc axis of the camera coordinate C passes from the origin Pf of the flange coordinate F are obtained. The origin Pc of the camera coordinates C is on a straight line passing through the Zc axis, but it is not yet determined how far away from the origin of the origin Pf of the flange coordinates F. In the following, it is determined where the origin Pc of the camera coordinates C is on the straight line through which the Zc axis passes.

即ち、ユーザは、カメラ座標CのXc軸とYc軸を含む平面がフランジ座標Fの原点Pfを通ると仮定し、カメラ座標CのXc軸またはYc軸と平行に、ここでは、Xc軸と平行に所望の距離Gだけ移動させる(ステップS7:第9の行程)。このときも、カメラ12の姿勢が移動前後で変わらないように、マーカMがカメラ12の撮影視野内に入り、且つマーカMにピントが合った状態にして、当該マーカMを移動前と移動後の2回撮影する。   That is, the user assumes that a plane including the Xc axis and the Yc axis of the camera coordinate C passes through the origin Pf of the flange coordinate F, and is parallel to the Xc axis or the Yc axis of the camera coordinate C, here, parallel to the Xc axis. Is moved by a desired distance G (step S7: ninth stroke). Also at this time, the marker M is in the imaging field of view of the camera 12 and is in focus so that the posture of the camera 12 does not change before and after the movement, and the marker M is moved before and after the movement. Take two shots.

すると、CPU13は、ロボット座標S上で移動前後のフランジ座標Fの位置からフランジ11の移動距離Gを演算すると共に、カメラ12の撮像画面21に写された移動前のマーカMの映像位置と移動後の映像位置との間のXc軸方向の画素数をカウントする。そして、CPU13は、画素数に1画素の長さを乗じて移動前後のマーカMの撮像画面21上での移動距離を演算する(ステップS4)。なお、1画素の長さは、予めROM16に記憶されている(画素長記憶手段)。そして、CPU13は、Xc軸と平行のフランジ11の移動距離Gと、撮像画面21上での移動距離gと、カメラ12のレンズ20の焦点距離Lとにより、カメラ座標Cの原点PcからマーカMまでの距離Dを演算する(第10の行程)。   Then, the CPU 13 calculates the movement distance G of the flange 11 from the position of the flange coordinate F before and after the movement on the robot coordinate S, and the image position and movement of the marker M before the movement, which is captured on the imaging screen 21 of the camera 12. The number of pixels in the Xc-axis direction between the subsequent video positions is counted. Then, the CPU 13 calculates the movement distance on the imaging screen 21 of the marker M before and after movement by multiplying the number of pixels by the length of one pixel (step S4). The length of one pixel is stored in advance in the ROM 16 (pixel length storage means). Then, the CPU 13 determines from the origin Pc of the camera coordinates C to the marker M based on the moving distance G of the flange 11 parallel to the Xc axis, the moving distance g on the imaging screen 21, and the focal length L of the lens 20 of the camera 12. Distance D is calculated (tenth step).

ここで、図11に示すように、レンズ20の中心をOとし、マーカMの移動前の位置をP1、移動後の位置をP2、撮像画面21上でのマーカMの移動前の映像位置をI1、移動後の映像位置をI2とすると、三角形O,P1,P2と三角形O,I1,I2とは相似形である。また、レンズ21の中心Oと撮像画面21までの距離はレンズ20の焦点距離Lに等しいので、レンズ21の中心OからP1とP2とを結ぶ直線までの距離dは、L・G/gとなる。そして、P1とP2とを結ぶ直線から撮像画面21の中心、つまりカメラ座標Cの原点Pcまでの距離は、d+Lであるから、D=(L・G/g)+Lとなる。   Here, as shown in FIG. 11, the center of the lens 20 is O, the position of the marker M before the movement is P1, the position after the movement is P2, and the image position of the marker M on the imaging screen 21 before the movement is the image position. If I1 and the image position after movement are I2, the triangles O, P1, P2 and the triangles O, I1, I2 are similar. Further, since the distance from the center O of the lens 21 to the imaging screen 21 is equal to the focal length L of the lens 20, the distance d from the center O of the lens 21 to the straight line connecting P1 and P2 is L · G / g. Become. Since the distance from the straight line connecting P1 and P2 to the center of the imaging screen 21, that is, the origin Pc of the camera coordinates C is d + L, D = (L · G / g) + L.

次に、ユーザは、カメラ座標CのXc軸とYc軸を含む平面がフランジ座標Fの原点Pfを通ると仮定し、この仮定した位置でのカメラ座標CのXc軸またはYc軸、例えばXc軸を中心に所望の角度θだけ回転させる。このときも、カメラ12の姿勢が移動前後で変わらないように、マーカMがカメラ12の撮影視野内に入り、且つマーカMにピントが合う状態にして、当該マーカMを、撮像画面21により回転前と回転後の2回撮影する(第11の行程)。
すると、CPU13は、撮像画面21上において、図12に示すように回転前のマーカMの映像位置I3と回転後のマーカMの映像位置I4との撮像画面21上での距離mを求める。この距離mは、I3とI4との間のYc軸方向の画素数をカウントし、この画素数に1画素当たりの長さを乗じることによって算出することができる。
Next, the user assumes that a plane including the Xc axis and the Yc axis of the camera coordinate C passes through the origin Pf of the flange coordinate F, and the Xc axis or Yc axis of the camera coordinate C at this assumed position, for example, the Xc axis. Is rotated by a desired angle θ. Also at this time, the marker M is in the imaging field of view of the camera 12 and in focus, and the marker M is rotated by the imaging screen 21 so that the posture of the camera 12 does not change before and after the movement. Take two shots before and after rotation (11th step).
Then, the CPU 13 obtains a distance m on the imaging screen 21 between the video position I3 of the marker M before rotation and the video position I4 of the marker M after rotation on the imaging screen 21, as shown in FIG. This distance m can be calculated by counting the number of pixels in the Yc-axis direction between I3 and I4 and multiplying this number of pixels by the length per pixel.

次いで、CPU13は、距離nと回転角θとから、距離nの2位置を生じさせるためのカメラ12に対するマーカMの相対的な移動距離Nを演算する。このNは、図11に示すように、Gの長さがgの長さとなって撮像画面21上に撮影されるから、N=n・G/gとなる。続いて、CPU13は、フランジ座標Fの原点Pfを通る直線であってカメラ座標CのXc軸と平行な軸(回転中心にしたXcf軸)からマーカMまでの距離Qを演算する(ステップS10:第12の行程)。このQは、Q=N/tanθで求めることができる。     Next, the CPU 13 calculates a relative movement distance N of the marker M with respect to the camera 12 for generating two positions of the distance n from the distance n and the rotation angle θ. As shown in FIG. 11, N is taken on the imaging screen 21 with the length of G being g, so N = n · G / g. Subsequently, the CPU 13 calculates a distance Q from the straight line passing through the origin Pf of the flange coordinate F and parallel to the Xc axis of the camera coordinate C (Xcf axis with the rotation center) to the marker M (step S10: 12th process). This Q can be obtained by Q = N / tan θ.

そして、CPU13は、回転中心軸Xcf軸からカメラ座標CのXc軸およびYc軸を含む平面までの距離Rを演算する(ステップS11:第13行程)。このRは、R=Q−Dで求めることができる。
カメラ座標Cの原点Pcは、Zc軸と、Xc軸およびYc軸を含む平面との交点であり、カメラ座標CのZc軸はフランジ座標Fの原点Pfから図5のベクトルV2で示された点を通っているのである。このことから、カメラ座標Cの原点Pcは、フランジ座標Fの原点PfからベクトルV2で示された点を通るZc軸と、フランジ座標の原点Pfを通るXc軸と平行なXcf軸を中心に半径がRの円筒面との交点がカメラ座標Cの原点Pcとなる。この場合、Zc軸と、Xcf軸を中心とする半径Rの円筒面との交点は2つあるが、そのうちのフランジ座標FのXf軸およびYf軸を含む平面よりもマーカM側の交点をカメラ座標Cの原点Pcとする。そして、CPU13は、求められたカメラ座標Cの原点Pcとフランジ座標Fの原点Pfとの間の距離を演算する。
Then, the CPU 13 calculates a distance R from the rotation center axis Xcf axis to a plane including the Xc axis and the Yc axis of the camera coordinates C (step S11: 13th step). This R can be obtained by R = Q−D.
The origin Pc of the camera coordinate C is an intersection of the Zc axis and a plane including the Xc axis and the Yc axis, and the Zc axis of the camera coordinate C is a point indicated by the vector V2 in FIG. 5 from the origin Pf of the flange coordinate F. It is going through. From this, the origin Pc of the camera coordinate C has a radius centered on the Zcf axis passing through the point indicated by the vector V2 from the origin Pf of the flange coordinate F and the Xcf axis parallel to the Xc axis passing through the origin Pf of the flange coordinate. Is the origin Pc of the camera coordinates C. In this case, there are two intersections between the Zc axis and the cylindrical surface with the radius R centered on the Xcf axis, but the intersection on the marker M side of the plane including the Xf axis and the Yf axis of the flange coordinates F is the camera. The origin is Pc of the coordinate C. Then, the CPU 13 calculates the distance between the obtained origin Pc of the camera coordinates C and the origin Pf of the flange coordinates F.

以上により、フランジ座標Fに対するカメラ座標Cの傾きと、フランジ座標F上でのカメラ座標Cの原点Pc位置とが求まるので、CPU13は、その傾きと位置をRAM17に記憶する(ステップS12:第14の行程)。
このように本実施形態によれば、フランジ11に取り付けられた2次元のカメラ12によってフランジ座標Fとカメラ座標Cとの関係を求めることができる。
As described above, since the inclination of the camera coordinates C with respect to the flange coordinates F and the origin Pc position of the camera coordinates C on the flange coordinates F are obtained, the CPU 13 stores the inclination and position in the RAM 17 (step S12: 14th). Process).
Thus, according to this embodiment, the relationship between the flange coordinates F and the camera coordinates C can be obtained by the two-dimensional camera 12 attached to the flange 11.

本発明の一実施形態を示すもので、視覚検査装置の斜視図1 is a perspective view of a visual inspection device according to an embodiment of the present invention. ロボットの制御構成を示すブロック図Block diagram showing the control configuration of the robot フランジ座標を示す斜視図Perspective view showing flange coordinates カメラの概略的な断面図Schematic cross section of camera フランジ座標とカメラ座標との関係を示す斜視図Perspective view showing relationship between flange coordinates and camera coordinates フランジ座標に対するカメラ座標の関係を求めるためのフローチャートFlow chart for determining the relationship of camera coordinates to flange coordinates ロボット本体のスケルトン図Robot body skeleton diagram 移動ベクトルを検出するための撮影画面を示す図The figure which shows the photography screen for detecting the movement vector 1画素当たりの移動量を検出するための撮影画面を示す図The figure which shows the imaging | photography screen for detecting the movement amount per pixel. Zf軸からのZc軸のずれを検出するための撮影画面を示す図The figure which shows the imaging | photography screen for detecting the shift | offset | difference of the Zc axis from the Zf axis. カメラとマーカとの距離を検出するための説明図Explanatory diagram for detecting the distance between the camera and the marker フランジ座標からのカメラ座標の離間距離を検出するための原理図Principle diagram for detecting the distance of the camera coordinates from the flange coordinates

符号の説明Explanation of symbols

図面中、2はロボット本体、3は制御装置、4はティーチングペンダント、11はフランジ(手先部)、12はカメラ、13はCPU、16はROM、20はレンズ、21はCCD撮像画面(撮像センサ)を示す。   In the drawings, 2 is a robot body, 3 is a control device, 4 is a teaching pendant, 11 is a flange (hand portion), 12 is a camera, 13 is a CPU, 16 is a ROM, 20 is a lens, and 21 is a CCD imaging screen (imaging sensor). ).

Claims (1)

手先部に、レンズおよび撮像センサを有したカメラを取り付けたロボットにおいて、
前記手先部の座標に対する前記カメラの座標の位置と傾きとを求める方法であって、
定位置に設けられたマーカが前記カメラの撮影視野内に入る状態で、前記手先部を、当該手先部の座標の各軸Xf,Yf,Zfと平行にそれぞれ所望距離移動させて各軸Xf,Yf,Zfについて平行移動の前後の前記カメラの撮影画像を取得する第1の行程と、
前記第1の行程で取得した撮影画像から、前記手先部の座標の各軸Xf,Yf,Zfについての前記平行移動により生じた前記マーカの移動ベクトルを求める第2の行程と、
前記第1の行程で移動した前記手先部の座標の各軸Xf,Yf,Zfについての平行移動距離と、前記第2の行程で得た前記マーカの前記移動ベクトルとから、前記手先部の座標に対する前記カメラの座標の各軸Xc,Yc,Zcの傾きを求める第3の行程と、
前記レンズの光軸を前記カメラの座標の各軸Xc,Yc,ZcのうちのZc軸とし、前記定位置に設けられた前記マーカが前記カメラの撮影視野内に入る状態で、前記手先部を、前記カメラの座標のXc軸および/またはYc軸と平行にそれぞれ所望量移動させて前記Xc軸および/またはYc軸についての平行移動の前後の撮影画像を取得する第4の行程と、
前記第4の行程で取得した前記マーカの撮影画像により、前記カメラの座標の前記Xc軸および/またはYc軸についての前記平行移動前の前記マーカの映像位置と前記平行移動後の前記マーカの映像位置との間の画素数を求め、この画素数と、前記カメラの座標の前記Xc軸および/またはYc軸についての前記平行移動の距離とから、1画素あたりの前記カメラの移動量を演算する第5の行程と、
前記定位置に設けられた前記マーカが前記カメラの撮影視野内に入る状態で、前記カメラの座標の前記Zc軸が前記手先部の座標の原点を通ると仮定して当該Zc軸を中心にして前記手先部を所望量だけ回転させ、その回転開始から回転終了までのうちから少なくとも3位置での撮影画像を取得する第6の行程と、
前記第6の行程で取得した前記少なくとも3位置での撮影画像から前記マーカの少なくとも3つの映像位置を得てこれらの映像位置から前記第6の行程での回転の実際の回転中心を求める第7の行程と、
前記第7の行程で求めた回転中心と前記カメラの座標の前記Xc軸およびYc軸との間の最小画素数を求め、この画素数と、前記第5の行程で求めた1画素当たりの移動量とから、前記カメラの座標の前記Zc軸に平行で前記手先部の座標の原点を通る軸から前記カメラの座標の前記Zc軸までの距離を求める第8の行程と、
前記カメラの前記Xc軸およびYc軸を含む平面が前記手先部の座標の原点を通ると仮定し、前記マーカが前記カメラの撮影視野内に入る状態で、前記手先部を前記カメラの座標の前記Xc軸またはYc軸と平行に所望量移動させて移動前後の撮影画像を取得する第9の行程と、
第9の行程で取得した撮影画像により、前記カメラの座標の前記Xc軸またはYc軸と平行に移動する前の前記マーカの映像位置と移動した後の前記マーカの映像位置との間の画素数を求め、この画素数と予め求められた1画素の長さとから前記撮影画像上での前記マーカの移動距離を演算し、この前記マーカの前記撮影画像上での移動距離と前記手先部の移動距離と前記カメラの前記レンズの焦点距離とから前記カメラの座標の原点から前記マーカまでの距離を演算する第10の行程と、
前記定位置に設けられた前記マーカが前記カメラの撮影視野内に入る状態で、前記カメラの座標の前記Xc軸およびYc軸を含む平面が前記手先部の座標の原点を通ると仮定して前記手先部を前記カメラの座標のXc軸またはYc軸を中心に所望角度回転させ、その回転前後の撮影画像を取得する第11の行程と、
前記第11の行程で取得した撮影画像により回転前の前記マーカの映像位置と回転後の前記マーカの映像位置との間の画素数を求め、この画素数と前記1画素の長さとから前記撮影画像上での前記マーカの移動距離を演算し、この撮影画像上での前記マーカの移動距離と前記第11行程における回転角度とにより、前記第11の行程の回転中心となった前記カメラの座標のXc軸またはYc軸と平行な軸であって前記手先部の座標の原点を通る軸から前記マーカまでの距離を演算する第12の行程と、
前記第11の行程の回転中心となった前記カメラの座標のXc軸またはYc軸と平行な軸であって前記手先部の座標の原点を通る軸と前記マーカとの間の距離から前記カメラの座標の原点と前記マーカとの間の距離を差し引いて、前記第11の行程の回転中心となった前記カメラの座標のXc軸またはYc軸と平行な軸であって前記手先部の座標の原点を通る軸から前記カメラの座標の原点までの距離を求める第13の行程と、
前記第8の行程で求めた前記カメラの座標の前記Zc軸に平行で前記手先部の座標の原点を通る前軸から前記カメラの座標の前記Zc軸までの距離と、前記第13の行程で求めた前記カメラの座標のXc軸またはYc軸と平行な軸であって前記手先部の座標の原点を通る軸から前記カメラの座標の原点までの距離とにより、前記手先部の座標上での前記カメラの座標の原点の位置を求める第14の行程と、
からなるロボットの座標の結合方法。
In a robot attached with a camera having a lens and an image sensor on the hand,
A method for determining the position and inclination of the coordinates of the camera relative to the coordinates of the hand portion,
With the marker provided at a fixed position within the field of view of the camera, the hand portion is moved by a desired distance in parallel with the axes Xf, Yf, Zf of the coordinates of the hand portion, and the axes Xf, A first step of acquiring captured images of the camera before and after parallel movement with respect to Yf and Zf;
A second step for obtaining a movement vector of the marker generated by the parallel movement with respect to each of the axes Xf, Yf, Zf of the coordinates of the hand from the photographed image acquired in the first step;
The coordinates of the hand portion are obtained from the parallel movement distance of the coordinates of the hand portion moved in the first stroke with respect to the respective axes Xf, Yf, Zf and the movement vector of the marker obtained in the second stroke. A third step of determining the inclination of each axis Xc, Yc, Zc of the camera coordinates with respect to
In the state where the optical axis of the lens is the Zc axis of the axes Xc, Yc, Zc of the camera coordinates, and the marker provided at the fixed position is within the photographing field of view of the camera, A fourth step of acquiring a photographed image before and after the translation about the Xc axis and / or the Yc axis by moving the camera coordinates by a desired amount in parallel with the Xc axis and / or the Yc axis, respectively.
Based on the captured image of the marker acquired in the fourth step, the image position of the marker before the translation about the Xc axis and / or the Yc axis of the coordinates of the camera and the image of the marker after the translation The number of pixels between the positions is obtained, and the amount of movement of the camera per pixel is calculated from the number of pixels and the distance of the translation about the Xc axis and / or Yc axis of the camera coordinates. The fifth step,
Assuming that the Zc axis of the camera coordinates passes through the origin of the coordinates of the hand portion in a state where the marker provided at the fixed position is within the photographing field of view of the camera, the Zc axis is set as the center. A sixth step of rotating the hand portion by a desired amount and acquiring captured images at at least three positions from the start to the end of the rotation;
The seventh position is obtained by obtaining at least three video positions of the marker from the captured images at the at least three positions acquired in the sixth stroke, and obtaining the actual rotation center of the rotation in the sixth stroke from these video positions. And the process of
The minimum number of pixels between the rotation center obtained in the seventh step and the Xc axis and Yc axis of the camera coordinates is obtained, and this number of pixels and the movement per pixel obtained in the fifth step And an eighth step for obtaining a distance from an axis parallel to the Zc axis of the camera coordinates and passing through an origin of the coordinates of the hand portion from the quantity to the Zc axis of the camera coordinates;
Assuming that the plane containing the Xc axis and Yc axis of the camera passes through the origin of the coordinates of the hand portion, the hand portion is moved to the position of the camera coordinate in a state where the marker is in the field of view of the camera. A ninth step of acquiring a photographed image before and after the movement by moving a desired amount parallel to the Xc axis or the Yc axis;
The number of pixels between the image position of the marker before moving in parallel with the Xc axis or the Yc axis of the camera coordinates and the image position of the marker after moving according to the captured image acquired in the ninth step And calculating the movement distance of the marker on the photographed image from the number of pixels and the length of one pixel obtained in advance, and the movement distance of the marker on the photographed image and the movement of the hand portion A tenth step of calculating the distance from the origin of the camera coordinates to the marker from the distance and the focal length of the lens of the camera;
Assuming that the plane including the Xc axis and Yc axis of the coordinates of the camera passes through the origin of the coordinates of the hand portion in a state where the marker provided at the fixed position falls within the field of view of the camera. An eleventh step of rotating the hand portion by a desired angle around the Xc axis or the Yc axis of the coordinates of the camera, and acquiring captured images before and after the rotation;
The number of pixels between the image position of the marker before rotation and the image position of the marker after rotation is obtained from the captured image acquired in the eleventh step, and the imaging is performed from the number of pixels and the length of the one pixel. The movement distance of the marker on the image is calculated, and the coordinates of the camera serving as the rotation center of the eleventh stroke are calculated based on the movement distance of the marker on the captured image and the rotation angle in the eleventh stroke. A twelfth step of calculating a distance from the axis that is parallel to the Xc axis or the Yc axis and passing through the origin of the coordinates of the hand portion to the marker;
From the distance between the marker and the axis that is parallel to the Xc axis or the Yc axis of the coordinates of the camera that becomes the rotation center of the eleventh stroke and passes through the origin of the coordinates of the hand portion, Subtracting the distance between the origin of the coordinates and the marker, the origin of the coordinates of the hand portion is an axis parallel to the Xc axis or the Yc axis of the camera coordinates serving as the rotation center of the eleventh stroke. A thirteenth step of obtaining a distance from an axis passing through the origin of the camera coordinates;
The distance from the front axis passing through the origin of the coordinates of the hand portion parallel to the Zc axis of the camera coordinates obtained in the eighth step to the Zc axis of the camera coordinates, and the thirteenth step According to the distance from the axis passing through the origin of the coordinates of the hand portion to the origin of the coordinates of the camera on the coordinate of the hand portion on the Xc axis or the Yc axis of the obtained camera coordinates A fourteenth step of obtaining the position of the origin of the camera coordinates;
A method for combining robot coordinates.
JP2008283178A 2008-11-04 2008-11-04 How to combine robot coordinates Expired - Fee Related JP5093058B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008283178A JP5093058B2 (en) 2008-11-04 2008-11-04 How to combine robot coordinates

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008283178A JP5093058B2 (en) 2008-11-04 2008-11-04 How to combine robot coordinates

Publications (2)

Publication Number Publication Date
JP2010112731A true JP2010112731A (en) 2010-05-20
JP5093058B2 JP5093058B2 (en) 2012-12-05

Family

ID=42301408

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008283178A Expired - Fee Related JP5093058B2 (en) 2008-11-04 2008-11-04 How to combine robot coordinates

Country Status (1)

Country Link
JP (1) JP5093058B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012091280A (en) * 2010-10-27 2012-05-17 Mitsubishi Electric Corp Coordinate system calibration method and robot system
JP2012142809A (en) * 2010-12-28 2012-07-26 Techno Scope:Kk Image processing device, and image processing method
JPWO2013027251A1 (en) * 2011-08-19 2015-03-05 株式会社安川電機 Robot system, robot control apparatus, robot hand, and robot control method
JPWO2015129474A1 (en) * 2014-02-28 2017-03-30 ソニー株式会社 Robot arm apparatus, robot arm control method and program
CN109029296A (en) * 2018-08-29 2018-12-18 杭州厚谋创意设计有限公司 A kind of industry tracks parallelism detection robot
JP2019014030A (en) * 2017-07-11 2019-01-31 セイコーエプソン株式会社 Control device for robot, robot, robot system, and calibration method for camera
CN109990701A (en) * 2019-03-04 2019-07-09 华中科技大学 A kind of large complicated carved three-dimensional appearance robot traverse measurement system and method
CN112297671A (en) * 2020-10-22 2021-02-02 广州文冲船厂有限责任公司 Robot code printing method, device and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60151711A (en) * 1984-01-19 1985-08-09 Hitachi Ltd Calibration system for robot hand visual coordinate system
JPS6257892A (en) * 1985-09-04 1987-03-13 松下電器産業株式会社 Camera coordinate calibrating method of robot with visual sense
JPH02194302A (en) * 1989-01-23 1990-07-31 Omron Tateisi Electron Co Method for calibrating coordinate system of visual robot and displacement measuring instrument for coordinate calibration used for the method
JPH02198791A (en) * 1989-01-21 1990-08-07 Omron Tateisi Electron Co Method of calibrating coordinate system for visual sensing robot
JPH06190756A (en) * 1992-12-25 1994-07-12 Mitsubishi Electric Corp Setting method for coordinate system of robot with visual sensor
JPH08132373A (en) * 1994-11-08 1996-05-28 Fanuc Ltd Coordinate system coupling method in robot-sensor system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60151711A (en) * 1984-01-19 1985-08-09 Hitachi Ltd Calibration system for robot hand visual coordinate system
JPS6257892A (en) * 1985-09-04 1987-03-13 松下電器産業株式会社 Camera coordinate calibrating method of robot with visual sense
JPH02198791A (en) * 1989-01-21 1990-08-07 Omron Tateisi Electron Co Method of calibrating coordinate system for visual sensing robot
JPH02194302A (en) * 1989-01-23 1990-07-31 Omron Tateisi Electron Co Method for calibrating coordinate system of visual robot and displacement measuring instrument for coordinate calibration used for the method
JPH06190756A (en) * 1992-12-25 1994-07-12 Mitsubishi Electric Corp Setting method for coordinate system of robot with visual sensor
JPH08132373A (en) * 1994-11-08 1996-05-28 Fanuc Ltd Coordinate system coupling method in robot-sensor system

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012091280A (en) * 2010-10-27 2012-05-17 Mitsubishi Electric Corp Coordinate system calibration method and robot system
JP2012142809A (en) * 2010-12-28 2012-07-26 Techno Scope:Kk Image processing device, and image processing method
JPWO2013027251A1 (en) * 2011-08-19 2015-03-05 株式会社安川電機 Robot system, robot control apparatus, robot hand, and robot control method
JPWO2015129474A1 (en) * 2014-02-28 2017-03-30 ソニー株式会社 Robot arm apparatus, robot arm control method and program
US11633245B2 (en) 2014-02-28 2023-04-25 Sony Corporation Robot arm apparatus and robot arm control method
US10561469B2 (en) 2014-02-28 2020-02-18 Sony Corporation Robot arm apparatus and robot arm control method
JP2019014030A (en) * 2017-07-11 2019-01-31 セイコーエプソン株式会社 Control device for robot, robot, robot system, and calibration method for camera
JP7003462B2 (en) 2017-07-11 2022-01-20 セイコーエプソン株式会社 Robot control device, robot system, and camera calibration method
CN109029296B (en) * 2018-08-29 2020-10-30 泰州帕沃能源科技有限公司 Industrial track parallelism detection robot
CN109029296A (en) * 2018-08-29 2018-12-18 杭州厚谋创意设计有限公司 A kind of industry tracks parallelism detection robot
CN109990701B (en) * 2019-03-04 2020-07-10 华中科技大学 Mobile measurement system and method for large-scale complex curved surface three-dimensional shape robot
CN109990701A (en) * 2019-03-04 2019-07-09 华中科技大学 A kind of large complicated carved three-dimensional appearance robot traverse measurement system and method
CN112297671A (en) * 2020-10-22 2021-02-02 广州文冲船厂有限责任公司 Robot code printing method, device and system

Also Published As

Publication number Publication date
JP5093058B2 (en) 2012-12-05

Similar Documents

Publication Publication Date Title
JP5093058B2 (en) How to combine robot coordinates
US9679385B2 (en) Three-dimensional measurement apparatus and robot system
US20190392609A1 (en) 3 dimensional coordinates calculating apparatus, 3 dimensional coordinates calculating method, 3 dimensional distance measuring apparatus and 3 dimensional distance measuring method using images
US9672630B2 (en) Contour line measurement apparatus and robot system
US10008028B2 (en) 3D scanning apparatus including scanning sensor detachable from screen
JP5257335B2 (en) Method for displaying measurement effective area in three-dimensional visual sensor and three-dimensional visual sensor
JP6465789B2 (en) Program, apparatus and method for calculating internal parameters of depth camera
JP4508252B2 (en) Robot teaching device
WO2017146202A1 (en) Three-dimensional shape data and texture information generation system, photographing control program, and three-dimensional shape data and texture information generation method
JP5815761B2 (en) Visual sensor data creation system and detection simulation system
JP2009241247A (en) Stereo-image type detection movement device
JP7073850B2 (en) Input device and input method of input device
JP2009042162A (en) Calibration device and method therefor
JP2005074600A (en) Robot and robot moving method
JP2015090298A (en) Information processing apparatus, and information processing method
JP6969121B2 (en) Imaging system, image processing device and image processing program
JP2019049467A (en) Distance measurement system and distance measurement method
JP2009269134A (en) Simulation device in visual inspection apparatus
JP2000283720A (en) Method and device for inputting three-dimensional data
JP2017151026A (en) Three-dimensional information acquiring device, three-dimensional information acquiring method, and program
JP2008309595A (en) Object recognizing device and program used for it
WO2020130006A1 (en) Information projection system, control device, and information projection method
JP2009175012A (en) Measurement device and measurement method
JP4918675B2 (en) 3D coordinate measurement method
WO2021210456A1 (en) Device for obtaining position of visual sensor in control coordinate system of robot, robot system, method, and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110211

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120529

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120605

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120801

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120903

R150 Certificate of patent or registration of utility model

Ref document number: 5093058

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150928

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees