TW202118607A - Computer device and method for determinig coordinates for mechanical arm - Google Patents

Computer device and method for determinig coordinates for mechanical arm Download PDF

Info

Publication number
TW202118607A
TW202118607A TW108140337A TW108140337A TW202118607A TW 202118607 A TW202118607 A TW 202118607A TW 108140337 A TW108140337 A TW 108140337A TW 108140337 A TW108140337 A TW 108140337A TW 202118607 A TW202118607 A TW 202118607A
Authority
TW
Taiwan
Prior art keywords
coordinates
position coordinates
jigs
position corresponding
jig
Prior art date
Application number
TW108140337A
Other languages
Chinese (zh)
Other versions
TWI709468B (en
Inventor
吳仲偉
謝東村
李智偉
李松泉
羅子欽
Original Assignee
群邁通訊股份有限公司
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 群邁通訊股份有限公司 filed Critical 群邁通訊股份有限公司
Priority to TW108140337A priority Critical patent/TWI709468B/en
Application granted granted Critical
Publication of TWI709468B publication Critical patent/TWI709468B/en
Publication of TW202118607A publication Critical patent/TW202118607A/en

Links

Images

Landscapes

  • Manipulator (AREA)

Abstract

The present disclosure provides a method of determining position coordinates for a mechanical arm. When position coordinates of a reference position of one fixture of a plurality of fixtures, position coordinates of a middle position of the one fixture, and position coordinates of a target position of the one fixture are obtained, position coordinates of a reference position of any other fixture of the plurality of fixtures, position coordinates of a middle position of the other fixture, and position coordinates of the target position of the other fixture can be determined. The position coordinates of the reference position of each fixture of the plurality of fixtures, position coordinates of the middle position of each fixture, and the position coordinates of the target position of each fixture are used to control the mechanical arm. By using the present disclosure, time for determining those position coordinates is shortened without changing existing fixtures. The invention also provides a computer device for determining the position coordinates for the mechanical arm.

Description

機械手臂座標確定方法、電腦裝置Method for determining coordinates of mechanical arm and computer device

本發明涉及車輛管理技術領域,具體涉及一種機械手臂座標確定方法、電腦裝置。The invention relates to the technical field of vehicle management, in particular to a method for determining the coordinates of a mechanical arm and a computer device.

工廠在使用機械手臂實施自動化生產時,通常是基於多個絕對座標點來控制機械手臂的。舉例而言,在控制機械手臂到達目標位置執行放或取的操作之前,通常需要控制機械手臂首先到達一個參考位置,然後控制機械手臂從參考位置到達一個中間位置,再控制機械手臂從中間位置到達目標位置執行放或取的操作。When factories use robotic arms to implement automated production, they usually control the robotic arms based on multiple absolute coordinate points. For example, before controlling the robot arm to reach the target position to perform the put or take operation, it is usually necessary to control the robot arm to reach a reference position first, then control the robot arm from the reference position to an intermediate position, and then control the robot arm to reach from the intermediate position The target position performs the put or fetch operation.

目前,這些操作點即參考位置,中間位置,以及目標位置分別所對應的絕對座標都要由人工作業的配合才能提取到。具體是由人工將機械手臂移動到每個操作點,然後由電腦裝置提取每個操作點所對應的絕對座標。然而,人工查找每個操作點的時間可能長達30分鐘之久,所花費的時間很長,間接影響工廠的生產效率。At present, the absolute coordinates corresponding to these operating points, namely the reference position, the intermediate position, and the target position, must be extracted by the cooperation of manual operations. Specifically, the mechanical arm is manually moved to each operating point, and then the absolute coordinates corresponding to each operating point are extracted by a computer device. However, the time to manually find each operating point may be as long as 30 minutes, which takes a long time and indirectly affects the production efficiency of the factory.

鑒於以上內容,有必要提出一種機械手臂座標確定方法、電腦裝置,能夠在無需更改現有治具及環境的前提下,縮短查找各個治具所對應的中間位置及目標位置的位置座標的時間, 同時提升了工廠自動化切線的靈活度。In view of the above, it is necessary to propose a method for determining the coordinates of a robotic arm and a computer device, which can shorten the time to find the position coordinates of the intermediate and target positions corresponding to each jig without changing the existing jig and environment, and at the same time Improve the flexibility of factory automation tangent.

本發明第一方面提供一種機械手臂座標確定方法,應用於電腦裝置,該方法包括:設置步驟,將設置有標記物的目標物件置於多個治具中的其中一個治具;第一拍攝步驟,控制所述機械手臂的攝像機拍攝一張包括了所述標記物的第一照片,並基於該拍攝得到的第一照片獲取所述標記物的第一位置座標;第一計算步驟,基於所述標記物的第一位置座標計算所述其中一個治具所對應的參考位置的位置座標;第一控制步驟,基於所述其中一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述其中一個治具所對應的參考位置;第一移動步驟,將所述機械手臂從所述其中一個治具所對應的參考位置移動到所述其中一個治具所對應的中間位置;第一讀取步驟,從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述中間位置的位置座標;第二移動步驟,將所述機械手臂從所述其中一個治具所對應的中間位置移動到所述其中一個治具所對應的目標位置;第二讀取步驟,從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述目標位置的位置座標,從而獲得了所述其中一個治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標;第三移動步驟,將設置有所述標記物的所述目標物件從所述其中一個治具移動到所述多個治具中的另一個治具上;第二拍攝步驟,控制所述攝像機拍攝一張包括了所述標記物的第二照片,並基於該拍攝得到的第二照片獲取所述標記物的第二位置座標;第二計算步驟,基於所述標記物的第二位置座標計算所述另一個治具所對應的參考位置的位置座標;第二控制步驟,基於所述另一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述另一個治具所對應的參考位置;第三計算步驟,基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的中間位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的中間位置的位置座標;以及基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的目標位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的目標位置的位置座標; 及確定步驟,當確定所述多個治具中的還有其他治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標尚未獲得時,觸發所述第三移動步驟。The first aspect of the present invention provides a method for determining the coordinates of a robotic arm, which is applied to a computer device, and the method includes: a setting step of placing a target object provided with a marker on one of a plurality of jigs; and a first shooting step , Controlling the camera of the robotic arm to take a first photo including the marker, and obtaining the first position coordinates of the marker based on the first photo obtained by the shooting; the first calculation step is based on the The first position coordinate of the marker calculates the position coordinate of the reference position corresponding to the one of the fixtures; the first control step, based on the position coordinate of the reference position corresponding to the one of the fixtures, controls the movement of the robot arm To the reference position corresponding to the one of the jigs; the first moving step is to move the robotic arm from the reference position corresponding to the one of the jigs to the intermediate position corresponding to the one of the jigs; A reading step is to read the position coordinates of the current position of the robot arm from the three-dimensional coordinate system where the robot arm is located, and use the read position coordinates as the intermediate position corresponding to one of the jigs The second moving step is to move the robotic arm from the intermediate position corresponding to one of the fixtures to the target position corresponding to one of the fixtures; the second reading step is to move the robot arm from the intermediate position corresponding to one of the fixtures; Read the position coordinates of the current position of the robotic arm in the three-dimensional coordinate system where the arm is located, and use the read position coordinates as the position coordinates of the target position corresponding to one of the jigs, thereby obtaining the The position coordinates of the reference position corresponding to one of the jigs, the position coordinates of the intermediate position, and the position coordinates of the target position; the third moving step is to move the target object provided with the marker from the one of the jigs Move to another jig of the plurality of jigs; in the second shooting step, control the camera to take a second photo including the marker, and obtain all the photos based on the second photo obtained by the shooting. The second position coordinates of the marker; the second calculation step, based on the second position coordinates of the marker, calculate the position coordinates of the reference position corresponding to the other jig; the second control step, based on the other The position coordinates of the reference position corresponding to the jig control the robot arm to move to the reference position corresponding to the other jig; the third calculation step is based on the position coordinates of the reference position corresponding to the other jig , And the relative relationship between the position coordinates of the intermediate position corresponding to one of the fixtures and the position coordinates of the reference position corresponding to one of the fixtures to calculate the position coordinates of the intermediate position corresponding to the other fixture; And based on the position coordinates of the reference position corresponding to the other jig, and the relative position between the position coordinates of the target position corresponding to one of the jigs and the position coordinates of the reference position corresponding to the one jig Relational calculation of the position coordinates of the target position corresponding to the other jig; and the determining step, when it is determined that among the plurality of jigs, there are the position coordinates of the reference positions and the position coordinates of the intermediate positions corresponding to other jigs. When the position coordinates of the target position have not been obtained, the third moving step is triggered.

優選地,所述第一計算步驟中,所述其中一個治具所對應的參考位置的位置座標的橫坐標和縱坐標與所述標記物的第一位置座標的橫坐標和縱坐標相同,所述其中一個治具所對應的參考位置的位置座標的豎座標等於所述標記物的第一位置座標的豎座標加上預設值d。Preferably, in the first calculation step, the abscissa and ordinate of the position coordinate of the reference position corresponding to one of the jigs are the same as the abscissa and ordinate of the first position coordinate of the marker, so The vertical coordinate of the position coordinate of the reference position corresponding to one of the jigs is equal to the vertical coordinate of the first position coordinate of the marker plus the preset value d.

優選地,所述第三計算步驟中,所述其中一個治具所對應的參考位置的位置座標為p0(X0 , Y0 , Z0 ),所述其中一個治具所對應的中間位置的位置座標為p1(X1 , Y1 , Z1 ),所述其中一個治具所對應的目標位置的位置座標p2(X2 , Y2 , Z2 ),以及所述另一個治具所對應的參考位置的位置座標為p0’(X0 ’, Y0 ’, Z0 ’),所述另一個治具所對應的中間位置的位置座標為p1’(X1 ’, Y1 ’, Z1 ’),其中,X1 ’= X0 ’+( X1 - X0 ),Y1 ’= Y0 ’,Z1 ’= Z0 ’;所述另一個治具所對應的目標位置的位置座標為p2’(X2 ’, Y2 ’, Z2 ’),其中,X2 ’= X0 ’+(X2 -X0 ),Y2 = Y0 ’,Z2 ’= Z0 ’。Preferably, in the third calculation step, the position coordinate of the reference position corresponding to one of the jigs is p0 (X 0 , Y 0 , Z 0 ), and the intermediate position corresponding to the one of the jigs is The position coordinate is p1 (X 1 , Y 1 , Z 1 ), the position coordinate p2 (X 2 , Y 2 , Z 2 ) of the target position corresponding to one of the fixtures, and the other fixture corresponds to The position coordinates of the reference position of the tool are p0' (X 0 ', Y 0 ', Z 0 '), and the position coordinates of the intermediate position corresponding to the other jig is p1' (X 1 ', Y 1 ', Z 1 '), where X 1 '= X 0 '+( X 1 -X 0 ), Y 1 '= Y 0 ', Z 1 '= Z 0 '; the target position corresponding to the other fixture The position coordinates are p2' (X 2 ', Y 2 ', Z 2 '), where X 2 '= X 0 '+(X 2 -X 0 ), Y 2 = Y 0 ', Z 2 '= Z 0 '.

優選地,該方法還包括步驟:根據所獲得的所述多個治具中的每個治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標,控制所述機械手臂從對應的治具上抓取目標物件,或者將目標物件放置於對應的治具上。Preferably, the method further includes the step of: controlling the obtained position coordinates of the reference position corresponding to each of the plurality of jigs, the position coordinates of the intermediate position, and the position coordinates of the target position. The robotic arm grabs the target object from the corresponding jig, or places the target object on the corresponding jig.

本發明第二方面提供一種電腦裝置,該電腦裝置包括儲存器和處理器,所述儲存器用於儲存多個模組,所述多個模組由所述處理器執行,所述多個模組包括:執行模組,用於控制機械手臂的攝像機拍攝一張包括了標記物的第一照片,並基於該拍攝得到的第一照片獲取所述標記物的第一位置座標,其中,所述標記物設置於目標物件上,該目標物件置於多個治具中的其中一個治具上;所述執行模組,還用於基於所述標記物的第一位置座標計算所述其中一個治具所對應的參考位置的位置座標;所述執行模組,還用於基於所述其中一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述其中一個治具所對應的參考位置;讀取模組,用於當所述機械手臂從所述其中一個治具所對應的參考位置移動到所述其中一個治具所對應的中間位置時,從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述中間位置的位置座標;所述讀取模組,還用於當所述機械手臂從所述其中一個治具所對應的中間位置移動到所述其中一個治具所對應的目標位置時,從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述目標位置的位置座標,從而獲得了所述其中一個治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標;所述執行模組,還用於當設置有所述標記物的所述目標物件從所述其中一個治具移動到所述多個治具中的另一個治具上時,控制所述攝像機拍攝一張包括了所述標記物的第二照片,並基於該拍攝得到的第二照片獲取所述標記物的第二位置座標;所述執行模組,還用於基於所述標記物的第二位置座標計算所述另一個治具所對應的參考位置的位置座標;所述執行模組,還用於基於所述另一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述另一個治具所對應的參考位置;所述執行模組,還用於基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的中間位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的中間位置的位置座標;以及基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的目標位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的目標位置的位置座標。A second aspect of the present invention provides a computer device, the computer device includes a memory and a processor, the memory is used to store a plurality of modules, the plurality of modules are executed by the processor, the plurality of modules It includes: an execution module, which is used to control a camera of a mechanical arm to take a first photo including a marker, and to obtain the first position coordinates of the marker based on the first photo obtained by the shooting, wherein the marker The object is set on the target object, and the target object is placed on one of the multiple jigs; the execution module is also used to calculate the one of the jigs based on the first position coordinates of the marker The position coordinates of the corresponding reference position; the execution module is also used to control the robot arm to move to the one corresponding to the one of the fixtures based on the position coordinates of the reference position corresponding to the one of the fixtures Reference position; reading module, used to move from the reference position corresponding to one of the jigs to the intermediate position corresponding to one of the jigs from the three-dimensional Read the position coordinates of the current position of the robotic arm in the coordinate system, and use the read position coordinates as the position coordinates of the intermediate position corresponding to one of the jigs; the reading module is also used When the robotic arm moves from the intermediate position corresponding to the one of the fixtures to the target position corresponding to the one of the fixtures, the robotic arm is read from the three-dimensional coordinate system where the robotic arm is located The position coordinates of the current position, the read position coordinates are used as the position coordinates of the target position corresponding to one of the fixtures, thereby obtaining the position coordinates of the reference position corresponding to one of the fixtures, The position coordinates of the intermediate position, and the position coordinates of the target position; the execution module is also used to move the target object provided with the marker from one of the jigs to the plurality of jigs When the other jig is installed, the camera is controlled to take a second photo that includes the marker, and the second position coordinates of the marker are obtained based on the second photo obtained by the shooting; the execution model The group is also used to calculate the position coordinates of the reference position corresponding to the another fixture based on the second position coordinates of the marker; the execution module is also used to calculate the position coordinates of the reference position corresponding to the another fixture based on the second position coordinates of the marker The position coordinates of the reference position control the robot arm to move to the reference position corresponding to the another jig; the execution module is also used to base the position coordinates of the reference position corresponding to the another jig, And the relative relationship between the position coordinates of the intermediate position corresponding to one of the fixtures and the position coordinates of the reference position corresponding to one of the fixtures to calculate the position coordinates of the intermediate position corresponding to the other fixture; and Based on the position coordinates of the reference position corresponding to the other jig, and the relative relationship between the position coordinates of the target position corresponding to the one jig and the position coordinates of the reference position corresponding to the one jig Calculate the position coordinates of the target position corresponding to the other jig.

優選地,所述其中一個治具所對應的參考位置的位置座標的橫坐標和縱坐標與所述標記物的第一位置座標的橫坐標和縱坐標相同,所述其中一個治具所對應的參考位置的位置座標的豎座標等於所述標記物的第一位置座標的豎座標加上預設值d。Preferably, the abscissa and ordinate of the position coordinate of the reference position corresponding to one of the jigs are the same as the abscissa and ordinate of the first position coordinate of the marker, and the one of the jigs corresponds to The vertical coordinate of the position coordinate of the reference position is equal to the vertical coordinate of the first position coordinate of the marker plus a preset value d.

優選地,所述其中一個治具所對應的參考位置的位置座標為p0(X0 , Y0 , Z0 ),所述其中一個治具所對應的中間位置的位置座標為p1(X1 , Y1 , Z1 ),所述其中一個治具所對應的目標位置的位置座標p2(X2 , Y2 , Z2 ),以及所述另一個治具所對應的參考位置的位置座標為p0’(X0 ’, Y0 ’, Z0 ’),所述另一個治具所對應的中間位置的位置座標為p1’(X1 ’, Y1 ’, Z1 ’),其中,X1 ’= X0 ’+( X1 - X0 ),Y1 ’= Y0 ’,Z1 ’= Z0 ’;所述另一個治具所對應的目標位置的位置座標為p2’(X2 ’, Y2 ’, Z2 ’),其中,X2 ’= X0 ’+(X2 -X0 ),Y2 = Y0 ’,Z2 ’= Z0 ’。Preferably, the position coordinate of the reference position corresponding to the one of the fixtures is p0(X 0 , Y 0 , Z 0 ), and the position coordinate of the intermediate position corresponding to the one of the fixtures is p1(X 1 , Y 1 , Z 1 ), the position coordinate p2 (X 2 , Y 2 , Z 2 ) of the target position corresponding to one of the fixtures, and the position coordinate of the reference position corresponding to the other fixture is p0 '(X 0 ', Y 0 ', Z 0 '), the position coordinates of the middle position corresponding to the other jig is p1' (X 1 ', Y 1 ', Z 1 '), where X 1 '= X 0 '+( X 1 -X 0 ), Y 1 '= Y 0 ', Z 1 '= Z 0 '; the position coordinate of the target position corresponding to the other fixture is p2' (X 2 ', Y 2 ', Z 2 '), where X 2 '= X 0 '+(X 2 -X 0 ), Y 2 = Y 0 ', Z 2 '= Z 0 '.

優選地,所述執行模組,還用於:根據所獲得的所述多個治具中的每個治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標,控制所述機械手臂從對應的治具上抓取目標物件,或者將目標物件放置於對應的治具上。Preferably, the execution module is further configured to: according to the obtained position coordinates of the reference position corresponding to each of the plurality of jigs, the position coordinates of the intermediate position, and the position coordinates of the target position , Control the robot arm to grab the target object from the corresponding jig, or place the target object on the corresponding jig.

本發明實施例中所述的機械手臂座標確定的方法、電腦裝置,通過將設置有標記物的目標物件置於多個治具中的其中一個治具;控制所述機械手臂的攝像機拍攝一張包括了所述標記物的第一照片,並基於該拍攝得到的第一照片獲取所述標記物的第一位置座標基於所述標記物的第一位置座標計算所述其中一個治具所對應的參考位置的位置座標;基於所述其中一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述其中一個治具所對應的參考位置;將所述機械手臂從所述其中一個治具所對應的參考位置移動到所述其中一個治具所對應的中間位置;從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述中間位置的位置座標;將所述機械手臂從所述其中一個治具所對應的中間位置移動到所述其中一個治具所對應的目標位置;從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述目標位置的位置座標,從而獲得了所述其中一個治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標;將設置有所述標記物的所述目標物件從所述其中一個治具移動到所述多個治具中的另一個治具上;控制所述攝像機拍攝一張包括了所述標記物的第二照片,並基於該拍攝得到的第二照片獲取所述標記物的第二位置座標;基於所述標記物的第二位置座標計算所述另一個治具所對應的參考位置的位置座標;基於所述另一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述另一個治具所對應的參考位置;基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的中間位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的中間位置的位置座標;以及基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的目標位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的目標位置的位置座標,可以在無需更改現有治具及環境的前提下,縮短查找各個治具所對應的中間位置及目標位置的位置座標的時間, 同時提升了工廠自動化切線的靈活度。The method and computer device for determining the coordinates of a robotic arm described in the embodiments of the present invention are achieved by placing a target object provided with a marker in one of a plurality of fixtures; controlling a camera of the robotic arm to take a picture The first photo of the marker is included, and the first position coordinates of the marker are acquired based on the first photo obtained by the shooting. The first position coordinates of the marker are calculated based on the first position coordinates of the marker. The position coordinates of the reference position; based on the position coordinates of the reference position corresponding to the one of the fixtures, control the robotic arm to move to the reference position corresponding to the one of the fixtures; move the robotic arm from the one The reference position corresponding to one jig is moved to the intermediate position corresponding to one of the jigs; the position coordinates of the current position of the robot arm are read from the three-dimensional coordinate system where the robot arm is located, and the read The position coordinates of is used as the position coordinates of the intermediate position corresponding to the one of the fixtures; the robot arm is moved from the intermediate position corresponding to the one of the fixtures to the target corresponding to the one of the fixtures Position; read the position coordinates of the current position of the robot arm from the three-dimensional coordinate system where the robot arm is located, and use the read position coordinates as the position coordinates of the target position corresponding to one of the jigs , Thereby obtaining the position coordinates of the reference position corresponding to the one of the fixtures, the position coordinates of the intermediate position, and the position coordinates of the target position; the target object provided with the marker is treated from the one of the The tool moves to another one of the plurality of tools; controls the camera to take a second photo that includes the marker, and obtains the image of the marker based on the captured second photo Second position coordinates; calculate the position coordinates of the reference position corresponding to the other jig based on the second position coordinates of the marker; control the position coordinates of the reference position corresponding to the other jig The robot arm moves to the reference position corresponding to the other jig; based on the position coordinates of the reference position corresponding to the other jig, and the position coordinates of the intermediate position corresponding to the one jig and the The relative relationship between the position coordinates of the reference position corresponding to one jig is calculated as the position coordinates of the intermediate position corresponding to the other jig; and based on the position coordinates of the reference position corresponding to the other jig, and The relative relationship between the position coordinates of the target position corresponding to one of the fixtures and the position coordinates of the reference position corresponding to one of the fixtures is calculated to calculate the position coordinates of the target position corresponding to the other fixture. Under the premise of changing the existing jig and environment, the time to find the position coordinates of the intermediate position and the target position corresponding to each jig is shortened, and the flexibility of factory automation tangent is improved.

為了能夠更清楚地理解本發明的上述目的、特徵和優點,下面結合附圖和具體實施例對本發明進行詳細描述。需要說明的是,在不衝突的情況下,本發明的實施例及實施例中的特徵可以相互組合。In order to be able to understand the above objectives, features and advantages of the present invention more clearly, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other if there is no conflict.

在下面的描述中闡述了很多具體細節以便於充分理解本發明,所描述的實施例僅僅是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都屬於本發明保護的範圍。In the following description, many specific details are explained in order to fully understand the present invention. The described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.

除非另有定義,本文所使用的所有的技術和科學術語與屬於本發明的技術領域的技術人員通常理解的含義相同。本文中在本發明的說明書中所使用的術語只是為了描述具體的實施例的目的,不是旨在於限制本發明。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the present invention.

圖1是本發明較佳實施例提供的機械手臂座標確定方法的應用環境圖。Fig. 1 is an application environment diagram of a method for determining coordinates of a robotic arm provided by a preferred embodiment of the present invention.

在本實施例中,所述機械手臂座標確定方法可以應用於由電腦裝置1、機械手臂2,以及多個治具31所構成的應用環境中。In this embodiment, the method for determining the coordinates of the robotic arm can be applied to an application environment composed of a computer device 1, a robotic arm 2, and a plurality of jigs 31.

本實施例中,所述多個治具31呈陣列佈置。所述多個治具31可以包括於一個外治具3中。當然,在其他實施例中,也可以有其他的佈置,如無需內置於該外治具3中。本實施例中,外治具3和治具31都是指作為協助控制位置或動作(或兩者)的一種模型工具。In this embodiment, the multiple jigs 31 are arranged in an array. The multiple jigs 31 may be included in one external jig 3. Of course, in other embodiments, other arrangements are also possible, for example, it does not need to be built into the external fixture 3. In this embodiment, both the external jig 3 and the jig 31 refer to a model tool that assists in controlling position or movement (or both).

本實施例中,電腦裝置1可以與所述機械手臂2建立無線通訊連接。例如,所述電腦裝置1可以通過無線路由器與機械手臂2建立通訊連接。In this embodiment, the computer device 1 can establish a wireless communication connection with the robotic arm 2. For example, the computer device 1 can establish a communication connection with the robotic arm 2 through a wireless router.

請同時參閱圖2所示,本實施例中,所述機械手臂2包括基座21、臂部22、夾具23,以及設置在所述夾具23所在位置處的攝像機24。所述臂部22與所述基座21連接,所述夾具23設置在所述臂部22的前端。本實施例中,當使用者將目標物件40放置於其中一個治具31上,所述電腦裝置1可以控制所述相機22對準放置了所述目標物件40的治具31進行拍照。本實施例中,所述目標物件40上設置了一個標記物(Marker)41。例如,該標記物41可以粘貼於所述目標物件40上。該標記物41可以為ArUco Markers。由此,當電腦裝置1獲取到了設置有所述標記物41的目標物件40的照片後,所述電腦裝置1可以獲得所述標記物41的位置座標。該標記物41的位置座標也即是該標記物在所述機械手臂2所在的三維坐標系中的座標。Please refer to FIG. 2 at the same time. In this embodiment, the robot arm 2 includes a base 21, an arm 22, a clamp 23, and a camera 24 set at the position of the clamp 23. The arm portion 22 is connected to the base 21, and the clamp 23 is provided at the front end of the arm portion 22. In this embodiment, when the user places the target object 40 on one of the jigs 31, the computer device 1 can control the camera 22 to aim at the jig 31 on which the target object 40 is placed to take pictures. In this embodiment, a marker 41 is provided on the target object 40. For example, the marker 41 can be pasted on the target object 40. The marker 41 may be ArUco Markers. Thus, when the computer device 1 obtains the photo of the target object 40 provided with the marker 41, the computer device 1 can obtain the position coordinates of the marker 41. The position coordinates of the marker 41 are also the coordinates of the marker in the three-dimensional coordinate system where the robotic arm 2 is located.

需要說明的是,ArUco marker是一個二進位平方標記,它由一個寬的黑邊和一個內部的二進位矩陣組成,內部的矩陣決定了ID。黑色的邊界有利於快速檢測到圖像,二進位編碼可以驗證ID,並且允許錯誤檢測和矯正技術的應用。ArUco Markers的大小決定了內部矩陣的大小。例如,一個4*4的ArUco Markers由16bits組成。It should be noted that ArUco marker is a binary square marker, which consists of a wide black border and an internal binary matrix, which determines the ID. The black border is conducive to the rapid detection of the image, the binary code can verify the ID, and allows the application of error detection and correction technology. The size of ArUco Markers determines the size of the internal matrix. For example, a 4*4 ArUco Markers consists of 16 bits.

具體地,電腦裝置1可以利用OpenCV的函式程式庫(ArUco Libray)基於所拍攝獲得的所述標記物41的照片來獲取所述標記物41的位置座標。需要說明的是,ArUco Libray是由科爾多瓦大學(西班牙)的Ava集團所研發。Specifically, the computer device 1 can use the OpenCV function library (ArUco Libray) to obtain the position coordinates of the marker 41 based on the photograph of the marker 41 obtained by shooting. It should be noted that ArUco Libray was developed by the Ava Group of the University of Cordoba (Spain).

本實施例中,所述目標物件40可以為所述機械手臂2需要從所述治具31上所夾取的物件或者是需要放置到該治具31上的物件。該目標物件40可以為任何產品例如主機板或其他產品。In this embodiment, the target object 40 may be an object that the robotic arm 2 needs to grip from the jig 31 or an object that needs to be placed on the jig 31. The target object 40 can be any product such as a motherboard or other products.

本實施例中,所述機械手臂2所在的三維坐標系可以是以所述基座21為原點,以該基座21所在的水平面為XOY平面,以及以豎直向上且垂直於該XOY平面所在方向為Z軸。In this embodiment, the three-dimensional coordinate system where the robot arm 2 is located may be based on the base 21 as the origin, the horizontal plane where the base 21 is located is the XOY plane, and the vertical direction is upward and perpendicular to the XOY plane. The direction is the Z axis.

圖3和圖4是本發明較佳實施例提供的機械手臂座標確定方法的流程圖。Figures 3 and 4 are flowcharts of a method for determining the coordinates of a robotic arm provided by a preferred embodiment of the present invention.

在本實施例中,所述機械手臂座標確定方法可以應用於電腦裝置中,對於需要進行機械手臂座標確定的電腦裝置,可以直接在電腦裝置上集成本發明的方法所提供的用於機械手臂座標確定的功能,或者以軟體開發套件(Software Development Kit,SDK)的形式運行在電腦裝置上。In this embodiment, the method for determining the coordinates of the robot arm can be applied to a computer device. For a computer device that needs to determine the coordinates of the robot arm, the computer device can directly integrate the coordinates for the robot arm provided by the method of the present invention. Certain functions may be run on the computer device in the form of a software development kit (SDK).

如圖3和圖4所示,所述機械手臂座標確定方法具體包括以下步驟,根據不同的需求,該流程圖中步驟的順序可以改變,某些步驟可以省略。As shown in FIG. 3 and FIG. 4, the method for determining the coordinates of the robot arm specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

步驟S1,由使用者將設置有所述標記物41的目標物件40放置於所述多個治具31中的其中一個治具31,並移動機械手臂2使得攝像機24能拍攝到置於該其中一個治具31上的該目標物件40上的標記物41。In step S1, the user places the target object 40 provided with the marker 41 on one of the plurality of jigs 31, and moves the robot arm 2 so that the camera 24 can take pictures of it. A marker 41 on the target object 40 on a jig 31.

較佳地,移動機械手臂2使得攝像機24能拍攝到所述多個治具31中的每個治具31。Preferably, the robot arm 2 is moved so that the camera 24 can photograph each of the multiple jigs 31.

步驟S2,電腦裝置1控制所述攝像機24拍攝一張包括了所述標記物41的第一照片,並基於該拍攝得到的第一照片獲取所述標記物41的第一位置座標。In step S2, the computer device 1 controls the camera 24 to take a first photo including the marker 41, and obtains the first position coordinates of the marker 41 based on the first photo obtained by the shooting.

如前面所述,該標記物41可以為ArUco Markers。由此,電腦裝置1可以利用OpenCV的函式程式庫(ArUco Libray)基於所拍攝獲得的所述標記物41的第一照片來獲取所述標記物41的第一位置座標。該標記物41的第一位置座標也即是該標記物41在所述機械手臂2所在的三維坐標系中的座標。As mentioned above, the marker 41 can be ArUco Markers. Thus, the computer device 1 can use the OpenCV function library (ArUco Libray) to obtain the first position coordinates of the marker 41 based on the first photo of the marker 41 obtained by shooting. The first position coordinate of the marker 41 is also the coordinate of the marker 41 in the three-dimensional coordinate system where the robot arm 2 is located.

步驟S3,電腦裝置1基於所述標記物41的第一位置座標計算所述其中一個治具31所對應的參考位置的位置座標。In step S3, the computer device 1 calculates the position coordinates of the reference position corresponding to one of the jigs 31 based on the first position coordinates of the marker 41.

需要說明的是,本實施例中所提及的任一治具31所對應的參考位置是指機械手臂2需要將目標物件40放置到該任一治具31上,或者需要從該任一治具31上夾取所述目標物件40的過程中,需要經過的一個位置點。It should be noted that the reference position corresponding to any jig 31 mentioned in this embodiment means that the robot arm 2 needs to place the target object 40 on the any jig 31, or needs to be treated from any jig 31. During the process of clamping the target object 40 on the tool 31, a position point that needs to be passed.

以所述標記物41的第一位置座標為(Xm1 , Ym1 , Zm1 )為例,所述其中一個治具31所對應的參考位置的位置座標可以是(Xm1 , Ym1 , Zm1 +d)。即所述其中一個治具31所對應的參考位置的位置座標的橫坐標和縱坐標與所述標記物41的第一位置座標的橫坐標和縱坐標相同,所述其中一個治具31所對應的參考位置的位置座標的豎座標等於所述標記物41的第一位置座標的豎座標加上預設值d。Taking the first position coordinates of the marker 41 as (X m1 , Y m1 , Z m1 ) as an example, the position coordinates of the reference position corresponding to one of the jigs 31 may be (X m1 , Y m1 , Z m1 + d). That is, the abscissa and ordinate of the position coordinate of the reference position corresponding to the one of the jigs 31 are the same as the abscissa and the ordinate of the first position coordinate of the marker 41, and the one of the jigs 31 corresponds to The vertical coordinate of the position coordinate of the reference position is equal to the vertical coordinate of the first position coordinate of the marker 41 plus the preset value d.

本實施例中,所述d的值是一個經驗值。例如d等於30cm、25cm,或其他值。d的值的大小可以根據運用環境以及操作經驗來預設。優選地,d等於30cm。In this embodiment, the value of d is an empirical value. For example, d is equal to 30cm, 25cm, or other values. The value of d can be preset according to the operating environment and operating experience. Preferably, d is equal to 30 cm.

步驟S4,電腦裝置1基於所述其中一個治具31所對應的參考位置的位置座標,控制所述機械手臂2移動到所述其中一個治具31所對應的參考位置。Step S4, the computer device 1 controls the robot arm 2 to move to the reference position corresponding to the one of the jigs 31 based on the position coordinates of the reference position corresponding to the one of the jigs 31.

步驟S5,由使用者將所述機械手臂2從所述其中一個治具31所對應的參考位置移動到所述其中一個治具31所對應的中間位置。In step S5, the user moves the robotic arm 2 from the reference position corresponding to one of the jigs 31 to the intermediate position corresponding to the one of the jigs 31.

需要說明的是,本實施例中所提及的任一治具31所對應的所述中間位置不同於該任一治具31所對應的所述參考位置。It should be noted that the intermediate position corresponding to any jig 31 mentioned in this embodiment is different from the reference position corresponding to any jig 31.

需要說明的是,本實施例中所提及的任一治具31所對應的中間位置可以定義為機械手臂2需要將目標物件40放置到該任一治具31上或者需要從該任一治具31夾取目標物件40的過程中所需要經過的一個位置點,該位置點介於所述參考位置和目標位置之間。It should be noted that the intermediate position corresponding to any jig 31 mentioned in this embodiment can be defined as that the robot arm 2 needs to place the target object 40 on the any jig 31 or needs to be treated from the any jig 31. A position point that the tool 31 needs to pass during the process of gripping the target object 40, and the position point is between the reference position and the target position.

在一個實施例中,所述其中一個治具31所對應的中間位置為所述其中一個治具31所對應的參考位置的正下方,且所述其中一個治具31所對應的中間位置距離所述其中一個治具31所對應的參考位置為預設值例如20cm。In one embodiment, the intermediate position corresponding to the one of the fixtures 31 is directly below the reference position corresponding to the one of the fixtures 31, and the distance from the intermediate position corresponding to the one of the fixtures 31 is The reference position corresponding to one of the jigs 31 is a preset value such as 20 cm.

步驟S6,電腦裝置1從所述機械手臂2所在的三維坐標系中讀取所述機械手臂2當前所在位置(也即是所述其中一個治具31所對應的所述中間位置)的位置座標,將該讀取的位置座標作為所述其中一個治具31所對應的所述中間位置的位置座標。Step S6, the computer device 1 reads the position coordinates of the current position of the robot arm 2 (that is, the intermediate position corresponding to one of the jigs 31) from the three-dimensional coordinate system where the robot arm 2 is located , Using the read position coordinates as the position coordinates of the intermediate position corresponding to one of the jigs 31.

步驟S7,由使用者將所述機械手臂2從所述其中一個治具31所對應的中間位置移動到所述其中一個治具31所對應的目標位置。Step S7, the user moves the robotic arm 2 from the intermediate position corresponding to one of the jigs 31 to the target position corresponding to the one of the jigs 31.

需要說明的是,本實施例中所提及的任一治具31所對應的目標位置可以定義為機械手臂2將目標物件40放置到該任一治具31上或者從該任一治具31夾取目標物件40時的位置點。換句話來講,所述任一治具31所對應的目標位置也即是指所述機械手臂2執行放的操作或者執行抓取的操作的位置點。It should be noted that the target position corresponding to any jig 31 mentioned in this embodiment can be defined as the robot arm 2 placing the target object 40 on the jig 31 or from the jig 31 The position point when the target object 40 is clamped. In other words, the target position corresponding to any one of the jigs 31 also refers to the position point at which the robot arm 2 performs the releasing operation or the grasping operation.

步驟S8,電腦裝置1從所述機械手臂2所在的三維坐標系中讀取所述機械手臂2當前所在位置(也即是所述其中一個治具31所對應的所述目標位置)的位置座標,將該讀取的位置座標作為所述其中一個治具31所對應的所述目標位置的位置座標,由此電腦裝置1獲得了所述其中一個治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標。Step S8, the computer device 1 reads the position coordinates of the current position of the robot arm 2 (that is, the target position corresponding to one of the jigs 31) from the three-dimensional coordinate system where the robot arm 2 is located , Using the read position coordinates as the position coordinates of the target position corresponding to the one of the fixtures 31, so that the computer device 1 obtains the position coordinates of the reference position corresponding to the one of the fixtures 31, The position coordinates of the middle position and the position coordinates of the target position.

步驟S9,由使用者將所述設置有所述標記物41的目標物件40從所述其中一個治具31移動到所述多個治具31中的另一個治具31上,以及移動機械手臂2使得攝像機24能拍攝到置於該另一個治具31上的所述目標物件40上的標記物41。Step S9, the user moves the target object 40 provided with the marker 41 from one of the jigs 31 to the other jig 31 of the plurality of jigs 31, and moves the robot arm 2 The camera 24 can capture the marker 41 on the target object 40 placed on the other jig 31.

步驟S10,電腦裝置1控制所述攝像機24拍攝一張包括了所述標記物41的第二照片,並基於該拍攝得到的第二照片獲取所述標記物41的第二位置座標。In step S10, the computer device 1 controls the camera 24 to take a second photo including the marker 41, and obtains the second position coordinates of the marker 41 based on the second photo obtained by the shooting.

同樣地,電腦裝置1可以利用OpenCV的函式程式庫(ArUco Libray)基於所拍攝獲得的所述標記物41的第二照片來獲取所述標記物41的第二位置座標。該標記物41的第二位置座標也即是該標記物41在所述機械手臂2所在的三維坐標系中的座標。Similarly, the computer device 1 can use the OpenCV library (ArUco Libray) to obtain the second position coordinates of the marker 41 based on the second photo of the marker 41 obtained by shooting. The second position coordinate of the marker 41 is also the coordinate of the marker 41 in the three-dimensional coordinate system where the robot arm 2 is located.

步驟S11,電腦裝置1基於所述標記物41的第二位置座標計算所述另一個治具31所對應的參考位置的位置座標。In step S11, the computer device 1 calculates the position coordinates of the reference position corresponding to the another jig 31 based on the second position coordinates of the marker 41.

以所述標記物41的第二位置座標為(Xm2 , Ym2 , Zm2 )為例,所述另一個治具31所對應的參考位置的位置座標可以是(Xm2 , Ym2 , Zm2 +d)。即所述另一個治具31所對應的參考位置的位置座標的橫坐標和縱坐標與所述標記物41的第二位置座標的橫坐標和縱坐標相同,所述另一個治具31所對應的參考位置的位置座標的豎座標等於所述標記物41的第二位置座標的豎座標加上預設值d。Taking the second position coordinates of the marker 41 as (X m2 , Y m2 , Z m2 ) as an example, the position coordinates of the reference position corresponding to the other jig 31 may be (X m2 , Y m2 , Z m2 m2 +d). That is, the abscissa and ordinate of the position coordinate of the reference position corresponding to the other jig 31 are the same as the abscissa and ordinate of the second position coordinate of the marker 41, and the other jig 31 corresponds to The vertical coordinate of the position coordinate of the reference position is equal to the vertical coordinate of the second position coordinate of the marker 41 plus the preset value d.

如前面所述,本實施例中,所述d的值是一個經驗值。例如d等於30cm、25cm,或其他值。d的值的大小可以根據運用環境以及操作經驗來預設。優選地,d等於30cm。As mentioned above, in this embodiment, the value of d is an empirical value. For example, d is equal to 30cm, 25cm, or other values. The value of d can be preset according to the operating environment and operating experience. Preferably, d is equal to 30 cm.

步驟S12,電腦裝置1基於所述另一個治具31所對應的參考位置的位置座標,控制所述機械手臂2移動到所述另一個治具31所對應的參考位置。In step S12, the computer device 1 controls the robot arm 2 to move to the reference position corresponding to the other jig 31 based on the position coordinates of the reference position corresponding to the other jig 31.

步驟S13,電腦裝置1基於所述另一個治具31所對應的參考位置的位置座標,及所述其中一個治具31所對應的中間位置的位置座標與該其中一個治具31所對應的參考位置的位置座標之間的相對關係計算該另一個治具31所對應的中間位置的位置座標;以及基於所述另一個治具31所對應的參考位置的位置座標,及所述其中一個治具31所對應的目標位置的位置座標與該其中一個治具31所對應的參考位置的位置座標之間的相對關係計算該另一個治具31所對應的目標位置的位置座標。Step S13, the computer device 1 is based on the position coordinates of the reference position corresponding to the other jig 31, and the position coordinates of the intermediate position corresponding to the one jig 31 and the reference corresponding to the one jig 31 The relative relationship between the position coordinates of the position is calculated based on the position coordinates of the intermediate position corresponding to the other jig 31; and the position coordinates based on the reference position corresponding to the other jig 31, and the one of the jigs The relative relationship between the position coordinates of the target position corresponding to 31 and the position coordinates of the reference position corresponding to one of the jigs 31 is calculated to calculate the position coordinates of the target position corresponding to the other jig 31.

具體地,假設所述其中一個治具31所對應的參考位置的位置座標為p0(X0 , Y0 , Z0 ),所述其中一個治具31所對應的中間位置的位置座標為 p1(X1 , Y1 , Z1 ),所述其中一個治具31所對應的目標位置的位置座標p2(X2 , Y2 , Z2 ),以及所述另一個治具31所對應的參考位置的位置座標為 p0’(X0 ’, Y0 ’, Z0 ’),則所述另一個治具31所對應的中間位置的位置座標為p1’(X1 ’, Y1 ’, Z1 ’),其中,X1 ’= X0 ’+(X1 - X0 ),Y1 ’= Y0 ’,Z1 ’= Z0 ’;所述另一個治具31所對應的目標位置的位置座標為p2’(X2 ’, Y2 ’, Z2 ’),其中,X2 ’= X0 ’+(X2 -X0 ),Y2 = Y0 ’,Z2 ’= Z0 ’。Specifically, it is assumed that the position coordinate of the reference position corresponding to one of the jigs 31 is p0 (X 0 , Y 0 , Z 0 ), and the position coordinate of the intermediate position corresponding to the one of the jigs 31 is p1 ( X 1 , Y 1 , Z 1 ), the position coordinates p2 (X 2 , Y 2 , Z 2 ) of the target position corresponding to one of the fixtures 31, and the reference position corresponding to the other fixture 31 Is p0'(X 0 ', Y 0 ', Z 0 '), then the position coordinates of the middle position corresponding to the other jig 31 is p1'(X 1 ', Y 1 ', Z 1 '), where X 1 '= X 0 '+(X 1 -X 0 ), Y 1 '= Y 0 ', Z 1 '= Z 0 '; the target position corresponding to the other jig 31 The position coordinate is p2' (X 2 ', Y 2 ', Z 2 '), where X 2 '= X 0 '+(X 2 -X 0 ), Y 2 = Y 0 ', Z 2 '= Z 0 '.

舉例而言,假設p0(X0 , Y0 , Z0 )為(1, 0, 0),p1(X1 , Y1 , Z1 )為(3, 0, 0),p2(X2 , Y2 , Z2 )為(6, 0, 0),p0’(X0 ’, Y0 ’, Z0 ’)為 (4, 5, 6),則可以計算得到X1 ’=6,X2 ’=9,即可計算得到p1’為(6, 5, 6),p2’(9, 5, 6)。For example, suppose p0 (X 0 , Y 0 , Z 0 ) is (1, 0, 0), p1 (X 1 , Y 1 , Z 1 ) is (3, 0, 0), p2 (X 2 , Y 2 , Z 2 ) is (6, 0, 0), p0' (X 0 ', Y 0 ', Z 0 ') is (4, 5, 6), then X 1 '=6, X 2 '=9, you can calculate p1' as (6, 5, 6) and p2' (9, 5, 6).

步驟S14,電腦裝置1判斷是否已經獲得了所述多個治具31中的每個治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標。In step S14, the computer device 1 determines whether the position coordinates of the reference position, the position coordinates of the intermediate position, and the position coordinates of the target position corresponding to each of the plurality of jigs 31 have been obtained.

若還有其他治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標尚未獲得,則回到步驟S9,根據步驟S9-S13獲取其他治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標。If the position coordinates of the reference position, the position coordinates of the intermediate position, and the position coordinates of the target position corresponding to other jigs 31 have not yet been obtained, return to step S9, and obtain the corresponding positions of other jigs 31 according to steps S9-S13 The position coordinates of the reference position, the position coordinates of the intermediate position, and the position coordinates of the target position.

在一個實施例中,若已經獲得了所述多個治具31中的每個治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標,可以結束流程或者還可以進一步包括步驟S15。In an embodiment, if the position coordinates of the reference position, the position coordinates of the intermediate position, and the position coordinates of the target position corresponding to each of the plurality of jigs 31 have been obtained, the process can be ended or It may further include step S15.

步驟S15,電腦裝置1根據所獲得的所述多個治具31中的每個治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標,控制所述機械手臂2從對應的治具31上抓取目標物件40,或者將目標物件40放置於對應的治具31上。In step S15, the computer device 1 controls the machine according to the obtained position coordinates of the reference position corresponding to each of the plurality of jigs 31, the position coordinates of the intermediate position, and the position coordinates of the target position. The arm 2 grabs the target object 40 from the corresponding jig 31 or places the target object 40 on the corresponding jig 31.

舉例而言,假設某個治具F所對應的參考位置p0’的位置座標為(4, 5, 6)、中間位置p1’的位置座標為(6, 5, 6),以及目標位置p2’的位置座標為(9, 5, 6),當需要控制所述機械手臂2從所述治具F上抓取目標物件T時,則首先基於所述治具F所對應的參考位置p0’的位置座標(4, 5, 6),控制所述機械手臂2移動到所述該參考位置p0’,然後基於所述治具F所對應的中間位置p1’的位置座標為(6, 5, 6),控制所述機械手臂2從所述該參考位置p0’移動到所述該中間位置p1’,接著基於所述治具F所對應的目標位置p2’的位置座標(9, 5, 6),控制所述機械手臂2從所述中間位置p1’移動到所述該目標位置p2’,然後在該目標位置p2’,控制所述機械手臂2執行抓取的操作從所述治具31上抓取目標物件40。For example, suppose that the position coordinates of the reference position p0' corresponding to a certain fixture F is (4, 5, 6), the position coordinates of the intermediate position p1' are (6, 5, 6), and the target position p2' The position coordinates of is (9, 5, 6). When it is necessary to control the robotic arm 2 to grab the target object T from the fixture F, it is first based on the reference position p0' corresponding to the fixture F The position coordinates (4, 5, 6) are used to control the robot arm 2 to move to the reference position p0', and then the position coordinates based on the intermediate position p1' corresponding to the fixture F are (6, 5, 6) ), controlling the robot arm 2 to move from the reference position p0' to the intermediate position p1', and then based on the position coordinates of the target position p2' corresponding to the fixture F (9, 5, 6) , Control the robotic arm 2 to move from the intermediate position p1' to the target position p2', and then at the target position p2', control the robotic arm 2 to perform a grasping operation from the jig 31 Grab the target object 40.

根據上述記載可知,本發明實施例的所述機械手臂座標確定方法,在獲得了任意一個治具31所對應的參考位置的位置座標,中間位置的位置座標,以及目標位置的位置座標後,僅需人工查找其他治具31的參考位置的位置座標即可獲得其他治具31的中間位置的位置座標以及目標位置的位置座標。利用本發明,無需更改現有治具及環境,縮短查找各個治具31所對應的中間位置的位置座標以及目標位置的位置座標的時間, 同時提升了工廠自動化切線的靈活度。According to the above description, the method for determining the coordinates of the robot arm in the embodiment of the present invention only obtains the position coordinates of the reference position corresponding to any jig 31, the position coordinates of the intermediate position, and the position coordinates of the target position. It is necessary to manually search for the position coordinates of the reference position of the other jig 31 to obtain the position coordinates of the intermediate position of the other jig 31 and the position coordinates of the target position. By using the present invention, there is no need to modify the existing jigs and environment, shorten the time to find the position coordinates of the intermediate position and the target position corresponding to each jig 31, and at the same time improve the flexibility of factory automation tangent.

上述圖3和 圖4詳細介紹了本發明的機械手臂座標確定方法,下面結合圖5和圖6,分別對實現所述機械手臂座標確定方法的軟體裝置的功能模組以及實現所述機械手臂座標確定方法的硬體裝置架構進行介紹。The above-mentioned figures 3 and 4 describe the method for determining the coordinates of the robot arm of the present invention in detail. With reference to FIGS. 5 and 6, respectively, the functional modules of the software device for realizing the method for determining the coordinates of the robot arm and the realization of the coordinates of the robot The hardware device architecture of the determination method is introduced.

應該瞭解,所述實施例僅為說明之用,在專利申請範圍上並不受此結構的限制。It should be understood that the embodiments are only for illustrative purposes, and are not limited by this structure in the scope of the patent application.

參閱圖5所示,是本發明較佳實施例提供的機械手臂座標確定系統30的功能模組圖。Referring to FIG. 5, it is a functional module diagram of a robot arm coordinate determination system 30 provided by a preferred embodiment of the present invention.

在一些實施例中,所述機械手臂座標確定系統30運行於電腦裝置中。所述機械手臂座標確定系統30可以包括多個由程式碼段所組成的功能模組。所述機械手臂座標確定系統30中的各個程式段的電腦程式代碼可以儲存於電腦裝置的儲存器中,並由所述電腦裝置的至少一個處理器所執行,以實現機械手臂座標確定(詳見對圖3和 圖4描述)。In some embodiments, the robot arm coordinate determination system 30 runs in a computer device. The robot arm coordinate determination system 30 may include multiple functional modules composed of code segments. The computer program codes of each program segment in the robot arm coordinate determination system 30 can be stored in the memory of the computer device and executed by at least one processor of the computer device to realize the robot arm coordinate determination (see Description of Figure 3 and Figure 4).

本實施例中,所述機械手臂座標確定系統30根據其所執行的功能,可以被劃分為多個功能模組。所述功能模組可以包括:執行模組301、讀取模組302。本發明所稱的模組是指一種能夠被至少一個處理器所執行並且能夠完成固定功能的一系列電腦程式段,其儲存在儲存器中。在本實施例中,關於各模組的功能將在後續的實施例中詳述。In this embodiment, the robot arm coordinate determination system 30 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an execution module 301 and a reading module 302. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

在本實施例中,首先由使用者將設置有所述標記物41的目標物件40放置於所述多個治具31中的其中一個治具31,並移動機械手臂2使得攝像機24能拍攝到置於該其中一個治具31上的該目標物件40上的標記物41。In this embodiment, the user first places the target object 40 provided with the marker 41 on one of the plurality of jigs 31, and moves the mechanical arm 2 so that the camera 24 can take pictures The marker 41 on the target object 40 placed on one of the jigs 31.

較佳地,移動機械手臂2使得攝像機24能拍攝到所述多個治具31中的每個治具31。Preferably, the robot arm 2 is moved so that the camera 24 can photograph each of the multiple jigs 31.

執行模組301控制所述攝像機24拍攝一張包括了所述標記物41的第一照片,並基於該拍攝得到的第一照片獲取所述標記物41的第一位置座標。The execution module 301 controls the camera 24 to take a first photo including the marker 41, and obtains the first position coordinates of the marker 41 based on the first photo obtained by the shooting.

如前面所述,該標記物41可以為ArUco Markers。由此,執行模組301可以利用OpenCV的函式程式庫(ArUco Libray)基於所拍攝獲得的所述標記物41的第一照片來獲取所述標記物41的第一位置座標。該標記物41的第一位置座標也即是該標記物41在所述機械手臂2所在的三維坐標系中的座標。As mentioned above, the marker 41 can be ArUco Markers. Thus, the execution module 301 can use the OpenCV function library (ArUco Libray) to obtain the first position coordinates of the marker 41 based on the first photo of the marker 41 obtained by shooting. The first position coordinate of the marker 41 is also the coordinate of the marker 41 in the three-dimensional coordinate system where the robot arm 2 is located.

執行模組301基於所述標記物41的第一位置座標計算所述其中一個治具31所對應的參考位置的位置座標。The execution module 301 calculates the position coordinates of the reference position corresponding to one of the jigs 31 based on the first position coordinates of the marker 41.

需要說明的是,本實施例中所提及的任一治具31所對應的參考位置是指機械手臂2需要將目標物件40放置到該任一治具31上,或者需要從該任一治具31上夾取所述目標物件40的過程中,需要經過的一個位置點。It should be noted that the reference position corresponding to any jig 31 mentioned in this embodiment means that the robot arm 2 needs to place the target object 40 on the any jig 31, or needs to be treated from any jig 31. During the process of clamping the target object 40 on the tool 31, a position point that needs to be passed.

以所述標記物41的第一位置座標為(Xm1 , Ym1 , Zm1 )為例,所述其中一個治具31所對應的參考位置的位置座標可以是(Xm1 , Ym1 , Zm1 +d)。即所述其中一個治具31所對應的參考位置的位置座標的橫坐標和縱坐標與所述標記物41的第一位置座標的橫坐標和縱坐標相同,所述其中一個治具31所對應的參考位置的位置座標的豎座標等於所述標記物41的第一位置座標的豎座標加上預設值d。Taking the first position coordinates of the marker 41 as (X m1 , Y m1 , Z m1 ) as an example, the position coordinates of the reference position corresponding to one of the jigs 31 may be (X m1 , Y m1 , Z m1 + d). That is, the abscissa and ordinate of the position coordinate of the reference position corresponding to one of the jigs 31 are the same as the abscissa and ordinate of the first position coordinate of the marker 41, and the one of the jigs 31 corresponds to The vertical coordinate of the position coordinate of the reference position is equal to the vertical coordinate of the first position coordinate of the marker 41 plus the preset value d.

本實施例中,所述d的值是一個經驗值。例如d等於30cm、25cm,或其他值。d的值的大小可以根據運用環境以及操作經驗來預設。優選地,d等於30cm。In this embodiment, the value of d is an empirical value. For example, d is equal to 30cm, 25cm, or other values. The value of d can be preset according to the operating environment and operating experience. Preferably, d is equal to 30 cm.

執行模組301基於所述其中一個治具31所對應的參考位置的位置座標,控制所述機械手臂2移動到所述其中一個治具31所對應的參考位置。The execution module 301 controls the robot arm 2 to move to the reference position corresponding to the one of the fixtures 31 based on the position coordinates of the reference position corresponding to the one of the fixtures 31.

由用戶將所述機械手臂2從所述其中一個治具31所對應的參考位置移動到所述其中一個治具31所對應的中間位置。The user moves the mechanical arm 2 from the reference position corresponding to one of the jigs 31 to the intermediate position corresponding to the one of the jigs 31.

需要說明的是,本實施例中所提及的任一治具31所對應的所述中間位置不同於該任一治具31所對應的所述參考位置。It should be noted that the intermediate position corresponding to any jig 31 mentioned in this embodiment is different from the reference position corresponding to any jig 31.

需要說明的是,本實施例中所提及的任一治具31所對應的中間位置可以定義為機械手臂2需要將目標物件40放置到該任一治具31上或者需要從該任一治具31夾取目標物件40的過程中所需要經過的一個位置點,該位置點介於所述參考位置和目標位置之間。It should be noted that the intermediate position corresponding to any jig 31 mentioned in this embodiment can be defined as that the robot arm 2 needs to place the target object 40 on the any jig 31 or needs to be treated from the any jig 31. A position point that the tool 31 needs to pass during the process of gripping the target object 40, and the position point is between the reference position and the target position.

在一個實施例中,所述其中一個治具31所對應的中間位置為所述其中一個治具31所對應的參考位置的正下方,且所述其中一個治具31所對應的中間位置距離所述其中一個治具31所對應的參考位置為預設值例如20cm。In one embodiment, the intermediate position corresponding to the one of the fixtures 31 is directly below the reference position corresponding to the one of the fixtures 31, and the distance from the intermediate position corresponding to the one of the fixtures 31 is The reference position corresponding to one of the jigs 31 is a preset value such as 20 cm.

讀取模組302從所述機械手臂2所在的三維坐標系中讀取所述機械手臂2當前所在位置(也即是所述其中一個治具31所對應的所述中間位置)的位置座標,將該讀取的位置座標作為所述其中一個治具31所對應的所述中間位置的位置座標。The reading module 302 reads the position coordinates of the current position of the robot arm 2 (that is, the intermediate position corresponding to one of the jigs 31) from the three-dimensional coordinate system where the robot arm 2 is located, The read position coordinates are used as the position coordinates of the intermediate position corresponding to one of the jigs 31.

由用戶將所述機械手臂2從所述其中一個治具31所對應的中間位置移動到所述其中一個治具31所對應的目標位置。The user moves the robotic arm 2 from the intermediate position corresponding to one of the jigs 31 to the target position corresponding to the one of the jigs 31.

需要說明的是,本實施例中所提及的任一治具31所對應的目標位置可以定義為機械手臂2將目標物件40放置到該任一治具31上或者從該任一治具31夾取目標物件40時的位置點。換句話來講,所述任一治具31所對應的目標位置也即是指所述機械手臂2執行放的操作或者執行抓取的操作的位置點。It should be noted that the target position corresponding to any jig 31 mentioned in this embodiment can be defined as the robot arm 2 placing the target object 40 on the jig 31 or from the jig 31 The position point when the target object 40 is clamped. In other words, the target position corresponding to any one of the jigs 31 also refers to the position point at which the robot arm 2 performs the releasing operation or the grasping operation.

讀取模組302從所述機械手臂2所在的三維坐標系中讀取所述機械手臂2當前所在位置(也即是所述其中一個治具31所對應的所述目標位置)的位置座標,將該讀取的位置座標作為所述其中一個治具31所對應的所述目標位置的位置座標,由此電腦裝置1獲得了所述其中一個治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標。The reading module 302 reads the position coordinates of the current position of the robot arm 2 (that is, the target position corresponding to one of the jigs 31) from the three-dimensional coordinate system where the robot arm 2 is located, Using the read position coordinates as the position coordinates of the target position corresponding to one of the fixtures 31, the computer device 1 obtains the position coordinates and the middle of the reference position corresponding to the one fixture 31 The location coordinates of the location, and the location coordinates of the target location.

由使用者將所述設置有所述標記物41的目標物件40從所述其中一個治具31移動到所述多個治具31中的另一個治具31上,以及移動機械手臂2使得攝像機24能拍攝到置於該另一個治具31上的所述目標物件40上的標記物41。The user moves the target object 40 provided with the marker 41 from one of the jigs 31 to the other jig 31 of the plurality of jigs 31, and moves the robot arm 2 so that the camera 24 can photograph the marker 41 on the target object 40 placed on the other jig 31.

執行模組301控制所述攝像機24拍攝一張包括了所述標記物41的第二照片,並基於該拍攝得到的第二照片獲取所述標記物41的第二位置座標。The execution module 301 controls the camera 24 to take a second photo including the marker 41, and obtains the second position coordinates of the marker 41 based on the second photo obtained by the shooting.

同樣地,執行模組301可以利用OpenCV的函式程式庫(ArUco Libray)基於所拍攝獲得的所述標記物41的第二照片來獲取所述標記物41的第二位置座標。該標記物41的第二位置座標也即是該標記物41在所述機械手臂2所在的三維坐標系中的座標。Similarly, the execution module 301 can use the OpenCV function library (ArUco Libray) to obtain the second position coordinates of the marker 41 based on the second photo of the marker 41 obtained by shooting. The second position coordinate of the marker 41 is also the coordinate of the marker 41 in the three-dimensional coordinate system where the robot arm 2 is located.

執行模組301基於所述標記物41的第二位置座標計算所述另一個治具31所對應的參考位置的位置座標。The execution module 301 calculates the position coordinates of the reference position corresponding to the another jig 31 based on the second position coordinates of the marker 41.

以所述標記物41的第二位置座標為(Xm2 , Ym2 , Zm2 )為例,所述另一個治具31所對應的參考位置的位置座標可以是(Xm2 , Ym2 , Zm2 +d)。即所述另一個治具31所對應的參考位置的位置座標的橫坐標和縱坐標與所述標記物41的第二位置座標的橫坐標和縱坐標相同,所述另一個治具31所對應的參考位置的位置座標的豎座標等於所述標記物41的第二位置座標的豎座標加上預設值d。Taking the second position coordinates of the marker 41 as (X m2 , Y m2 , Z m2 ) as an example, the position coordinates of the reference position corresponding to the other jig 31 may be (X m2 , Y m2 , Z m2 m2 +d). That is, the abscissa and ordinate of the position coordinate of the reference position corresponding to the other jig 31 are the same as the abscissa and ordinate of the second position coordinate of the marker 41, and the other jig 31 corresponds to The vertical coordinate of the position coordinate of the reference position is equal to the vertical coordinate of the second position coordinate of the marker 41 plus the preset value d.

如前面所述,本實施例中,所述d的值是一個經驗值。例如d等於30cm、25cm,或其他值。d的值的大小可以根據運用環境以及操作經驗來預設。優選地,d等於30cm。As mentioned above, in this embodiment, the value of d is an empirical value. For example, d is equal to 30cm, 25cm, or other values. The value of d can be preset according to the operating environment and operating experience. Preferably, d is equal to 30 cm.

執行模組301基於所述另一個治具31所對應的參考位置的位置座標,控制所述機械手臂2移動到所述另一個治具31所對應的參考位置。The execution module 301 controls the robot arm 2 to move to the reference position corresponding to the other jig 31 based on the position coordinates of the reference position corresponding to the other jig 31.

執行模組301基於所述另一個治具31所對應的參考位置的位置座標,及所述其中一個治具31所對應的中間位置的位置座標與該其中一個治具31所對應的參考位置的位置座標之間的相對關係計算該另一個治具31所對應的中間位置的位置座標;以及基於所述另一個治具31所對應的參考位置的位置座標,及所述其中一個治具31所對應的目標位置的位置座標與該其中一個治具31所對應的參考位置的位置座標之間的相對關係計算該另一個治具31所對應的目標位置的位置座標。The execution module 301 is based on the position coordinates of the reference position corresponding to the other jig 31, and the position coordinates of the intermediate position corresponding to the one jig 31 and the reference position corresponding to the one jig 31 The relative relationship between the position coordinates calculates the position coordinates of the intermediate position corresponding to the other jig 31; and the position coordinates based on the reference position corresponding to the other jig 31, and the position of the one jig 31 The relative relationship between the position coordinates of the corresponding target position and the position coordinates of the reference position corresponding to one of the jigs 31 is calculated to calculate the position coordinates of the target position corresponding to the other jig 31.

具體地,假設所述其中一個治具31所對應的參考位置的位置座標為p0(X0 , Y0 , Z0 ),所述其中一個治具31所對應的中間位置的位置座標為 p1(X1 , Y1 , Z1 ),所述其中一個治具31所對應的目標位置的位置座標p2(X2 , Y2 , Z2 ),以及所述另一個治具31所對應的參考位置的位置座標為 p0’(X0 ’, Y0 ’, Z0 ’),則所述另一個治具31所對應的中間位置的位置座標為p1’(X1 ’, Y1 ’, Z1 ’),其中,X1 ’= X0 ’+( X1 - X0 ),Y1 ’= Y0 ’,Z1 ’= Z0 ’;所述另一個治具31所對應的目標位置的位置座標為p2’(X2 ’, Y2 ’, Z2 ’),其中,X2 ’= X0 ’+(X2 -X0 ),Y2 = Y0 ’,Z2 ’= Z0 ’。Specifically, it is assumed that the position coordinate of the reference position corresponding to one of the jigs 31 is p0 (X 0 , Y 0 , Z 0 ), and the position coordinate of the intermediate position corresponding to the one of the jigs 31 is p1 ( X 1 , Y 1 , Z 1 ), the position coordinates p2 (X 2 , Y 2 , Z 2 ) of the target position corresponding to one of the fixtures 31, and the reference position corresponding to the other fixture 31 Is p0'(X 0 ', Y 0 ', Z 0 '), then the position coordinates of the middle position corresponding to the other jig 31 is p1'(X 1 ', Y 1 ', Z 1 '), where X 1 '= X 0 '+( X 1 -X 0 ), Y 1 '= Y 0 ', Z 1 '= Z 0 '; the target position corresponding to the other jig 31 The position coordinate is p2' (X 2 ', Y 2 ', Z 2 '), where X 2 '= X 0 '+(X 2 -X 0 ), Y 2 = Y 0 ', Z 2 '= Z 0 '.

舉例而言,假設p0(X0 , Y0 , Z0 )為(1, 0, 0),p1(X1 , Y1 , Z1 )為(3, 0, 0),p2(X2 , Y2 , Z2 )為(6, 0, 0),p0’(X0 ’, Y0 ’, Z0 ’)為 (4, 5, 6),則可以計算得到X1 ’=6,X2 ’=9,即可計算得到p1’為(6, 5, 6),p2’(9, 5, 6)。For example, suppose p0 (X 0 , Y 0 , Z 0 ) is (1, 0, 0), p1 (X 1 , Y 1 , Z 1 ) is (3, 0, 0), p2 (X 2 , Y 2 , Z 2 ) is (6, 0, 0), p0' (X 0 ', Y 0 ', Z 0 ') is (4, 5, 6), then X 1 '=6, X 2 '=9, you can calculate p1' as (6, 5, 6) and p2' (9, 5, 6).

執行模組301判斷是否已經獲得了所述多個治具31中的每個治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標。The execution module 301 determines whether the position coordinates of the reference position, the position coordinates of the intermediate position, and the position coordinates of the target position corresponding to each of the plurality of jigs 31 have been obtained.

若還有其他治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標尚未獲得,則由用戶將所述設置有所述標記物41的目標物件40從所述其中一個治具31移動到所述多個治具31中的其他治具31上,以及移動機械手臂使得攝像機能拍攝到置於該其他治具31上的所述目標物件40上的標記物41,由此獲取其他治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標。If the position coordinates of the reference position, the position coordinates of the intermediate position, and the position coordinates of the target position corresponding to other jigs 31 have not yet been obtained, the user will remove the target object 40 provided with the marker 41 from the Said one of the jigs 31 is moved to the other jigs 31 of the plurality of jigs 31, and the robot arm is moved so that the camera can photograph the markers on the target object 40 placed on the other jigs 31 41. From this, the position coordinates of the reference position, the position coordinates of the intermediate position, and the position coordinates of the target position corresponding to the other jigs 31 are obtained.

在一個實施例中,若已經獲得了所述多個治具31中的每個治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標,執行模組301根據所獲得的所述多個治具31中的每個治具31所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標,控制所述機械手臂2從對應的治具31上抓取目標物件40,或者將目標物件40放置於對應的治具31上。In one embodiment, if the position coordinates of the reference position, the position coordinates of the intermediate position, and the position coordinates of the target position corresponding to each of the plurality of jigs 31 have been obtained, the module 301 is executed According to the obtained position coordinates of the reference position corresponding to each of the plurality of jigs 31, the position coordinates of the intermediate position, and the position coordinates of the target position, the robot arm 2 is controlled from the corresponding treatment Grasp the target object 40 on the tool 31 or place the target object 40 on the corresponding jig 31.

舉例而言,假設某個治具F所對應的參考位置p0’的位置座標為(4, 5, 6)、中間位置p1’的位置座標為(6, 5, 6),以及目標位置p2’的位置座標為(9, 5, 6),當需要控制所述機械手臂2從所述治具F上抓取目標物件T時,則首先基於所述治具F所對應的參考位置p0’的位置座標(4, 5, 6),控制所述機械手臂2移動到所述該參考位置p0’,然後基於所述治具F所對應的中間位置p1’的位置座標為(6, 5, 6),控制所述機械手臂2從所述該參考位置p0’移動到所述該中間位置p1’,接著基於所述治具F所對應的目標位置p2’的位置座標(9, 5, 6),控制所述機械手臂2從所述中間位置p1’移動到所述該目標位置p2’,然後在該目標位置p2’,控制所述機械手臂2執行抓取的操作從所述治具31上抓取目標物件40。For example, suppose that the position coordinates of the reference position p0' corresponding to a certain fixture F is (4, 5, 6), the position coordinates of the intermediate position p1' are (6, 5, 6), and the target position p2' The position coordinates of is (9, 5, 6). When it is necessary to control the robotic arm 2 to grab the target object T from the fixture F, it is first based on the reference position p0' corresponding to the fixture F The position coordinates (4, 5, 6) are used to control the robot arm 2 to move to the reference position p0', and then the position coordinates based on the intermediate position p1' corresponding to the fixture F are (6, 5, 6) ), controlling the robot arm 2 to move from the reference position p0' to the intermediate position p1', and then based on the position coordinates of the target position p2' corresponding to the fixture F (9, 5, 6) , Control the robotic arm 2 to move from the intermediate position p1' to the target position p2', and then at the target position p2', control the robotic arm 2 to perform a grasping operation from the jig 31 Grab the target object 40.

根據上述記載可知,本發明實施例的所述機械手臂座標確定方法,在獲得了任意一個治具31所對應的參考位置的位置座標,中間位置的位置座標,以及目標位置的位置座標後,僅需人工查找其他治具31的參考位置的位置座標即可獲得其他治具31的中間位置的位置座標以及目標位置的位置座標。利用本發明,無需更改現有治具及環境,縮短查找各個治具31所對應的中間位置的位置座標以及目標位置的位置座標的時間, 同時提升了工廠自動化切線的靈活度。According to the above description, the method for determining the coordinates of the robot arm in the embodiment of the present invention only obtains the position coordinates of the reference position corresponding to any jig 31, the position coordinates of the intermediate position, and the position coordinates of the target position. It is necessary to manually search for the position coordinates of the reference position of the other jig 31 to obtain the position coordinates of the intermediate position of the other jig 31 and the position coordinates of the target position. By using the present invention, there is no need to modify the existing jigs and environment, shorten the time to find the position coordinates of the intermediate position and the target position corresponding to each jig 31, and at the same time improve the flexibility of factory automation tangent.

參閱圖6所示,為本發明較佳實施例提供的電腦裝置的結構示意圖。Refer to FIG. 6, which is a schematic structural diagram of a computer device provided by a preferred embodiment of the present invention.

本發明的較佳實施例中,電腦裝置3包括互相之間電氣連接的儲存器31、至少一個處理器32。In a preferred embodiment of the present invention, the computer device 3 includes a storage 31 and at least one processor 32 that are electrically connected to each other.

本領域技術人員應該瞭解,圖1示出的電腦裝置3的結構並不構成本發明實施例的限定,所述電腦裝置3還可以包括比圖示更多或更少的其他硬體或者軟體,或者不同的部件佈置。例如,所述電腦裝置3還可以包括顯示幕等部件。Those skilled in the art should understand that the structure of the computer device 3 shown in FIG. 1 does not constitute a limitation of the embodiment of the present invention. The computer device 3 may also include more or less other hardware or software than shown in the figure. Or different component arrangements. For example, the computer device 3 may also include components such as a display screen.

在一些實施例中,所述電腦裝置3包括一種能夠按照事先設定或儲存的指令,自動進行數值計算和/或資訊處理的終端,其硬體包括但不限於微處理器、專用積體電路、可程式設計閘陣列、數文書處理器及嵌入式設備等。In some embodiments, the computer device 3 includes a terminal that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions. Its hardware includes but is not limited to a microprocessor, a dedicated integrated circuit, Programmable gate arrays, word processors and embedded devices, etc.

需要說明的是,所述電腦裝置3僅為舉例,其他現有的或今後可能出現的電子產品如可適應於本發明,也應包含在本發明的保護範圍以內,並以引用方式包含於此。It should be noted that the computer device 3 is only an example, and other existing or future electronic products that can be adapted to the present invention should also be included in the protection scope of the present invention and included here by reference.

在一些實施例中,所述儲存器31可以用於儲存電腦程式的程式碼和各種資料。例如,所述儲存器31可以用於儲存安裝在所述電腦裝置3中的機械手臂座標確定系統30,並在電腦裝置3的運行過程中實現高速、自動地完成程式或資料的存取。所述儲存器31可以是包括唯讀儲存器(Read-Only Memory,ROM)、可程式設計唯讀儲存器(Programmable Read-Only Memory,PROM)、可抹除可程式設計唯讀儲存器(Erasable Programmable Read-Only Memory,EPROM)、一次可程式設計唯讀儲存器(One-time Programmable Read-Only Memory,OTPROM)、電子抹除式可複寫唯讀儲存器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、唯讀光碟(Compact Disc Read-Only Memory,CD-ROM)或其他光碟儲存器、磁碟儲存器、磁帶儲存器、或者任何其他能夠用於攜帶或儲存資料的電腦可讀的儲存介質。In some embodiments, the storage 31 can be used to store program codes and various data of a computer program. For example, the storage 31 may be used to store the robot arm coordinate determination system 30 installed in the computer device 3, and realize high-speed and automatic program or data access during the operation of the computer device 3. The storage 31 may include a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable Read-Only Memory, PROM), and an erasable programmable read-only memory (Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electronically-Erasable Programmable Read-Only Memory (Electrically-Erasable Programmable Read-Only Memory, EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, magnetic disk storage, tape storage, or any other computer-readable storage medium that can be used to carry or store data .

在一些實施例中,所述至少一個處理器32可以由積體電路組成。例如,可以由單個封裝的積體電路所組成,也可以是由多個相同功能或不同功能封裝的積體電路所組成,包括一個或者多個中央處理器(Central Processing unit,CPU)、微處理器、數文書處理晶片、圖形處理器及各種控制晶片的組合等。所述至少一個處理器32是所述電腦裝置3的控制核心(Control Unit),利用各種介面和線路連接整個電腦裝置3的各個部件,通過運行或執行儲存在所述儲存器31內的程式或者模組,以及調用儲存在所述儲存器31內的資料,以執行電腦裝置3的各種功能和處理資料。In some embodiments, the at least one processor 32 may be composed of an integrated circuit. For example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple packaged integrated circuits with the same function or with different functions, including one or more central processing units (CPU), micro-processing Combinations of processors, digital word processing chips, graphics processors, and various control chips. The at least one processor 32 is the control core (Control Unit) of the computer device 3, which uses various interfaces and lines to connect the various components of the entire computer device 3, by running or executing programs stored in the storage 31 or Modules and call data stored in the storage 31 to perform various functions of the computer device 3 and process data.

儘管未示出,所述電腦裝置3還可以包括給各個部件供電的電源(比如電池),優選的,電源可以通過電源管理裝置與所述至少一個處理器32邏輯相連,從而通過電源管理裝置實現管理充電、放電、以及功耗管理等功能。電源還可以包括一個或一個以上的直流或交流電源、再充電裝置、電源故障檢測電路、電源轉換器或者逆變器、電源狀態指示器等任意元件。所述電腦裝置3還可以包括多種感測器、藍牙模組、Wi-Fi模組等,在此不再贅述。Although not shown, the computer device 3 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so as to be realized by the power management device. Manage functions such as charging, discharging, and power management. The power supply may also include one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power supply status indicators and other arbitrary components. The computer device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

應該瞭解,所述實施例僅為說明之用,在專利申請範圍上並不受此結構的限制。It should be understood that the embodiments are only for illustrative purposes, and are not limited by this structure in the scope of the patent application.

上述以軟體功能模組的形式實現的集成的單元,可以儲存在一個電腦可讀取儲存介質中。上述軟體功能模組包括若干指令,該若干指令用以使得一台電腦裝置(可以車載電腦等)或處理器(processor)執行本發明各個實施例所述方法的部分。The above-mentioned integrated unit realized in the form of a software function module can be stored in a computer readable storage medium. The above-mentioned software function module includes several instructions, which are used to make a computer device (can be a vehicle-mounted computer, etc.) or a processor execute part of the method described in each embodiment of the present invention.

在進一步的實施例中,結合圖5,所述至少一個處理器32可執行所述電腦裝置3的操作裝置以及安裝的各類應用程式(如機械手臂座標確定系統30)等。In a further embodiment, with reference to FIG. 5, the at least one processor 32 can execute the operating device of the computer device 3 and various installed applications (such as the robotic arm coordinate determination system 30).

所述儲存器31中儲存有電腦程式代碼,且所述至少一個處理器32可調用所述儲存器31中儲存的電腦程式代碼以執行相關的功能。例如,圖5中所述的各個模組是儲存在所述儲存器31中的電腦程式代碼,並由所述至少一個處理器32所執行,從而實現所述各個模組的功能如確定機械手臂的座標。The storage 31 stores computer program codes, and the at least one processor 32 can call the computer program codes stored in the storage 31 to perform related functions. For example, each module described in FIG. 5 is a computer program code stored in the memory 31 and executed by the at least one processor 32, so as to realize the function of each module, such as determining a mechanical arm The coordinates.

在本發明的一個實施例中,所述儲存器31儲存多個指令,所述多個指令被所述至少一個處理器32所執行以確定機械手臂的座標。In an embodiment of the present invention, the storage 31 stores a plurality of instructions, and the plurality of instructions are executed by the at least one processor 32 to determine the coordinates of the robotic arm.

具體地,所述至少一個處理器32執行上述多個指令以確定機械手臂的座標的方法,請結合圖3和圖4所示,在此不再贅述。Specifically, the method for the at least one processor 32 to execute the above-mentioned multiple instructions to determine the coordinates of the robotic arm is shown in conjunction with FIG. 3 and FIG. 4, and will not be repeated here.

在本發明所提供的幾個實施例中,應該理解到,所揭露的電腦可讀儲存介質,裝置和方法,可以通過其它的方式實現。例如,以上所描述的裝置實施例僅僅是示意性的,例如,所述模組的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式。In the several embodiments provided by the present invention, it should be understood that the disclosed computer-readable storage medium, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

所述作為分離部件說明的模組可以是或者也可以不是物理上分開的,作為模組顯示的部件可以是或者也可以不是物理單元,即可以位於一個地方,或者也可以分佈到多個網路單元上。可以根據實際的需要選擇其中的部分或者全部模組來實現本實施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple networks Unit. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.

另外,在本發明各個實施例中的各功能模組可以集成在一個處理單元中,也可以是各個單元單獨物理存在,也可以兩個或兩個以上單元集成在一個單元中。上述集成的單元既可以採用硬體的形式實現,也可以採用硬體加軟體功能模組的形式實現。In addition, the functional modules in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be realized either in the form of hardware, or in the form of hardware plus software functional modules.

對於本領域技術人員而言,顯然本發明不限於上述示範性實施例的細節,而且在不背離本發明的精神或基本特徵的情況下,能夠以其他的具體形式實現本發明。因此,無論從哪一點來看,均應將實施例看作是示範性的,而且是非限制性的,本發明的範圍由所附申請專利範圍第而不是上述說明限定,因此旨在將落在申請專利範圍第的等同要件的含義和範圍內的所有變化涵括在本發明內。不應將申請專利範圍第中的任何附圖標記視為限制所涉及的申請專利範圍第。此外,顯然“包括”一詞不排除其他單元或,單數不排除複數。裝置申請專利範圍第中陳述的多個單元或裝置也可以由一個單元或裝置通過軟體或者硬體來實現。第一,第二等詞語用來表示名稱,而並不表示任何特定的順序。For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended patent scope and not by the above description, so it is intended to fall within All changes within the meaning and scope of the equivalent elements in the scope of the patent application are included in the present invention. Any reference signs in the scope of the patent application shall not be regarded as limiting the scope of the patent application involved. In addition, it is obvious that the word "including" does not exclude other elements or the singular number does not exclude the plural number. The multiple units or devices stated in the device patent application scope can also be implemented by one unit or device through software or hardware. Words such as first and second are used to denote names, but do not denote any specific order.

最後應說明的是,以上實施例僅用以說明本發明的技術方案而非限制,儘管參照較佳實施例對本發明進行了詳細說明,本領域的普通技術人員應當理解,可以對本發明的技術方案進行修改或等同替換,而不脫離本發明技術方案的精神和範圍。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent replacements are made without departing from the spirit and scope of the technical solution of the present invention.

1:電腦裝置 2:機械手臂 3:外治具 31:治具 21:基座 22:臂部 23:夾具 24:攝像機 40:目標物件 41:標記物 30:機械手臂座標確定系統 301:執行模組 302:讀取模組 32:處理器 31:儲存器1: computer device 2: Robotic arm 3: External fixture 31: Fixture 21: Pedestal 22: Arm 23: Fixture 24: Camera 40: target object 41: Marker 30: Robotic arm coordinate determination system 301: Execution module 302: read module 32: processor 31: Storage

為了更清楚地說明本發明實施例或習知技術中的技術方案,下面將對實施例或習知技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本發明的實施例,對於本領域普通技術人員來講,在不付出創造性勞動的前提下,還可以根據提供的附圖獲得其他的附圖。 圖1是本發明較佳實施例提供的機械手臂座標確定方法的應用環境圖。 圖2示意機械手臂以及治具。 圖3和圖4是本發明較佳實施例提供的機械手臂座標確定方法的流程圖。 圖5是本發明較佳實施例提供的機械手臂座標確定系統的功能模組圖。 圖6是本發明較佳實施例提供的電腦裝置的架構圖。 如下具體實施方式將結合上述附圖進一步說明本發明。In order to more clearly describe the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are merely It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative work. Fig. 1 is an application environment diagram of a method for determining coordinates of a robotic arm provided by a preferred embodiment of the present invention. Figure 2 shows the robotic arm and fixture. Figures 3 and 4 are flowcharts of a method for determining the coordinates of a robotic arm provided by a preferred embodiment of the present invention. Fig. 5 is a functional module diagram of a system for determining the coordinates of a robotic arm provided by a preferred embodiment of the present invention. FIG. 6 is a structural diagram of a computer device provided by a preferred embodiment of the present invention. The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings.

無。no.

Claims (8)

一種機械手臂座標確定方法,應用於電腦裝置,其中,該方法包括: 設置步驟,將設置有標記物的目標物件置於多個治具中的其中一個治具; 第一拍攝步驟,控制所述機械手臂的攝像機拍攝一張包括了所述標記物的第一照片,並基於該拍攝得到的第一照片獲取所述標記物的第一位置座標; 第一計算步驟,基於所述標記物的第一位置座標計算所述其中一個治具所對應的參考位置的位置座標; 第一控制步驟,基於所述其中一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述其中一個治具所對應的參考位置; 第一移動步驟,將所述機械手臂從所述其中一個治具所對應的參考位置移動到所述其中一個治具所對應的中間位置; 第一讀取步驟,從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述中間位置的位置座標; 第二移動步驟,將所述機械手臂從所述其中一個治具所對應的中間位置移動到所述其中一個治具所對應的目標位置; 第二讀取步驟,從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述目標位置的位置座標,從而獲得了所述其中一個治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標; 第三移動步驟,將設置有所述標記物的所述目標物件從所述其中一個治具移動到所述多個治具中的另一個治具上; 第二拍攝步驟,控制所述攝像機拍攝一張包括了所述標記物的第二照片,並基於該拍攝得到的第二照片獲取所述標記物的第二位置座標; 第二計算步驟,基於所述標記物的第二位置座標計算所述另一個治具所對應的參考位置的位置座標; 第二控制步驟,基於所述另一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述另一個治具所對應的參考位置; 第三計算步驟,基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的中間位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的中間位置的位置座標;以及基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的目標位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的目標位置的位置座標; 及 確定步驟,當確定所述多個治具中的還有其他治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標尚未獲得時,觸發所述第三移動步驟。A method for determining the coordinates of a mechanical arm applied to a computer device, wherein the method includes: The setting step is to place the target object with the marker on one of the multiple jigs; In the first shooting step, controlling the camera of the robotic arm to take a first photo including the marker, and obtaining the first position coordinates of the marker based on the first photo obtained by the shooting; The first calculation step is to calculate the position coordinate of the reference position corresponding to one of the jigs based on the first position coordinate of the marker; The first control step is to control the robot arm to move to the reference position corresponding to the one of the fixtures based on the position coordinates of the reference position corresponding to the one of the fixtures; The first moving step is to move the robotic arm from the reference position corresponding to one of the jigs to the intermediate position corresponding to the one of the jigs; The first reading step is to read the position coordinates of the current position of the robot arm from the three-dimensional coordinate system where the robot arm is located, and use the read position coordinates as the middle corresponding to one of the jigs. The position coordinates of the position; The second moving step is to move the robotic arm from the intermediate position corresponding to one of the jigs to the target position corresponding to the one of the jigs; The second reading step is to read the position coordinates of the current position of the robot arm from the three-dimensional coordinate system where the robot arm is located, and use the read position coordinates as the target corresponding to one of the jigs The position coordinates of the position, thereby obtaining the position coordinates of the reference position corresponding to one of the jigs, the position coordinates of the intermediate position, and the position coordinates of the target position; The third moving step is to move the target object provided with the marker from one of the jigs to another jig of the plurality of jigs; The second photographing step is to control the camera to take a second photograph including the marker, and obtain the second position coordinates of the marker based on the second photograph obtained by the photographing; The second calculation step is to calculate the position coordinates of the reference position corresponding to the another jig based on the second position coordinates of the marker; The second control step is to control the robot arm to move to the reference position corresponding to the other jig based on the position coordinates of the reference position corresponding to the other jig; The third calculation step is based on the position coordinates of the reference position corresponding to the other jig, and the position coordinates of the intermediate position corresponding to one of the jigs and the position coordinates of the reference position corresponding to the one jig The relative relationship between calculating the position coordinates of the intermediate position corresponding to the other jig; and the position coordinates based on the reference position corresponding to the other jig, and the target position corresponding to the one jig The relative relationship between the position coordinates and the position coordinates of the reference position corresponding to the one of the fixtures is calculated to calculate the position coordinates of the target position corresponding to the other fixture; and In the determining step, when it is determined that the position coordinates of the reference position, the position coordinates of the intermediate position, and the position coordinates of the target position corresponding to other jigs among the plurality of jigs have not yet been obtained, the third moving step is triggered . 如申請專利範圍第1項所述的機械手臂座標確定方法,其中,所述第一計算步驟中,所述其中一個治具所對應的參考位置的位置座標的橫坐標和縱坐標與所述標記物的第一位置座標的橫坐標和縱坐標相同,所述其中一個治具所對應的參考位置的位置座標的豎座標等於所述標記物的第一位置座標的豎座標加上預設值d。The method for determining the coordinates of a robotic arm as described in item 1 of the scope of patent application, wherein, in the first calculation step, the abscissa and ordinate of the position coordinates of the reference position corresponding to the one of the jigs are the same as those of the mark The horizontal coordinate and the vertical coordinate of the first position coordinate of the object are the same, and the vertical coordinate of the position coordinate of the reference position corresponding to one of the fixtures is equal to the vertical coordinate of the first position coordinate of the marker plus the preset value d . 如申請專利範圍第1項所述的機械手臂座標確定方法,其中,所述第三計算步驟中,所述其中一個治具所對應的參考位置的位置座標為p0(X0 , Y0 , Z0 ),所述其中一個治具所對應的中間位置的位置座標為p1(X1 , Y1 , Z1 ),所述其中一個治具所對應的目標位置的位置座標p2(X2 , Y2 , Z2 ),以及所述另一個治具所對應的參考位置的位置座標為p0’(X0 ’, Y0 ’, Z0 ’),所述另一個治具所對應的中間位置的位置座標為p1’(X1 ’, Y1 ’, Z1 ’),其中,X1 ’= X0 ’+( X1 - X0 ),Y1 ’= Y0 ’,Z1 ’= Z0 ’;所述另一個治具所對應的目標位置的位置座標為p2’(X2 ’, Y2 ’, Z2 ’),其中,X2 ’= X0 ’+(X2 -X0 ),Y2 = Y0 ’,Z2 ’= Z0 ’。The method for determining the coordinates of a robotic arm as described in item 1 of the scope of patent application, wherein, in the third calculation step, the position coordinates of the reference position corresponding to one of the jigs are p0(X 0 , Y 0 , Z 0 ), the position coordinate of the intermediate position corresponding to one of the fixtures is p1 (X 1 , Y 1 , Z 1 ), and the position coordinate of the target position corresponding to one of the fixtures is p2 (X 2 , Y 2 , Z 2 ), and the position coordinates of the reference position corresponding to the other jig is p0' (X 0 ', Y 0 ', Z 0 '), the middle position of the other jig is The position coordinate is p1' (X 1 ', Y 1 ', Z 1 '), where X 1 '= X 0 '+( X 1 -X 0 ), Y 1 '= Y 0 ', Z 1 '= Z 0 '; the position coordinate of the target position corresponding to the other fixture is p2' (X 2 ', Y 2 ', Z 2 '), where X 2 '= X 0 '+(X 2 -X 0 ), Y 2 = Y 0 ', Z 2 '= Z 0 '. 如申請專利範圍第1項所述的機械手臂座標確定方法,其中,該方法還包括步驟: 根據所獲得的所述多個治具中的每個治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標,控制所述機械手臂從對應的治具上抓取目標物件,或者將目標物件放置於對應的治具上。The method for determining the coordinates of a robotic arm as described in item 1 of the scope of patent application, wherein the method further includes the steps: According to the obtained position coordinates of the reference position corresponding to each of the plurality of jigs, the position coordinates of the intermediate position, and the position coordinates of the target position, the robot arm is controlled to grasp the corresponding jig Take the target object, or place the target object on the corresponding fixture. 一種電腦裝置,其中,該電腦裝置包括儲存器和處理器,所述儲存器用於儲存多個模組,所述多個模組由所述處理器執行,所述多個模組包括: 執行模組,用於控制機械手臂的攝像機拍攝一張包括了標記物的第一照片,並基於該拍攝得到的第一照片獲取所述標記物的第一位置座標,其中,所述標記物設置於目標物件上,該目標物件置於多個治具中的其中一個治具上; 所述執行模組,還用於基於所述標記物的第一位置座標計算所述其中一個治具所對應的參考位置的位置座標; 所述執行模組,還用於基於所述其中一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述其中一個治具所對應的參考位置; 讀取模組,用於當所述機械手臂從所述其中一個治具所對應的參考位置移動到所述其中一個治具所對應的中間位置時,從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述中間位置的位置座標; 所述讀取模組,還用於當所述機械手臂從所述其中一個治具所對應的中間位置移動到所述其中一個治具所對應的目標位置時,從所述機械手臂所在的三維坐標系中讀取所述機械手臂當前所在位置的位置座標,將該讀取的位置座標作為所述其中一個治具所對應的所述目標位置的位置座標,從而獲得了所述其中一個治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標; 所述執行模組,還用於當設置有所述標記物的所述目標物件從所述其中一個治具移動到所述多個治具中的另一個治具上時,控制所述攝像機拍攝一張包括了所述標記物的第二照片,並基於該拍攝得到的第二照片獲取所述標記物的第二位置座標; 所述執行模組,還用於基於所述標記物的第二位置座標計算所述另一個治具所對應的參考位置的位置座標; 所述執行模組,還用於基於所述另一個治具所對應的參考位置的位置座標,控制所述機械手臂移動到所述另一個治具所對應的參考位置; 所述執行模組,還用於基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的中間位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的中間位置的位置座標;以及基於所述另一個治具所對應的參考位置的位置座標,及所述其中一個治具所對應的目標位置的位置座標與該其中一個治具所對應的參考位置的位置座標之間的相對關係計算該另一個治具所對應的目標位置的位置座標。A computer device, wherein the computer device includes a storage and a processor, the storage is used to store a plurality of modules, the plurality of modules are executed by the processor, and the plurality of modules include: The execution module is used to control the camera of the robot arm to take a first photo including the marker, and to obtain the first position coordinates of the marker based on the first photo obtained by the shooting, wherein the marker is set On the target object, the target object is placed on one of the multiple jigs; The execution module is further configured to calculate the position coordinate of the reference position corresponding to the one of the jigs based on the first position coordinate of the marker; The execution module is further configured to control the robot arm to move to the reference position corresponding to the one of the jigs based on the position coordinates of the reference position corresponding to the one of the jigs; The reading module is used to read from the three-dimensional coordinate system of the robot arm when the robot arm moves from the reference position corresponding to the one of the jigs to the intermediate position corresponding to the one of the jigs Read the position coordinates of the current position of the robotic arm, and use the read position coordinates as the position coordinates of the intermediate position corresponding to one of the jigs; The reading module is also used for when the robot arm moves from the intermediate position corresponding to one of the jigs to the target position corresponding to the one of the jigs, from the three-dimensional Read the position coordinates of the current position of the robot arm in the coordinate system, and use the read position coordinates as the position coordinates of the target position corresponding to one of the fixtures, thereby obtaining one of the fixtures The position coordinates of the corresponding reference position, the position coordinates of the intermediate position, and the position coordinates of the target position; The execution module is further configured to control the camera to shoot when the target object provided with the marker moves from one of the jigs to another jig of the plurality of jigs A second photo including the marker, and obtaining the second position coordinates of the marker based on the second photo obtained by the shooting; The execution module is further configured to calculate the position coordinates of the reference position corresponding to the another jig based on the second position coordinates of the marker; The execution module is further configured to control the robot arm to move to the reference position corresponding to the another jig based on the position coordinates of the reference position corresponding to the another jig; The execution module is further configured to be based on the position coordinates of the reference position corresponding to the other jig, and the position coordinates of the intermediate position corresponding to the one jig and the reference corresponding to the one jig The relative relationship between the position coordinates of the position calculates the position coordinates of the intermediate position corresponding to the other fixture; and the position coordinates based on the reference position corresponding to the other fixture, and the one corresponding to the fixture The relative relationship between the position coordinates of the target position and the position coordinates of the reference position corresponding to one of the fixtures is used to calculate the position coordinates of the target position corresponding to the other fixture. 如申請專利範圍第5項所述的電腦裝置,其中,所述其中一個治具所對應的參考位置的位置座標的橫坐標和縱坐標與所述標記物的第一位置座標的橫坐標和縱坐標相同,所述其中一個治具所對應的參考位置的位置座標的豎座標等於所述標記物的第一位置座標的豎座標加上預設值d。The computer device described in item 5 of the scope of patent application, wherein the abscissa and ordinate of the position coordinate of the reference position corresponding to one of the jigs and the abscissa and ordinate of the first position coordinate of the marker are If the coordinates are the same, the vertical coordinate of the position coordinate of the reference position corresponding to one of the jigs is equal to the vertical coordinate of the first position coordinate of the marker plus the preset value d. 如申請專利範圍第5項所述的電腦裝置,其中,所述其中一個治具所對應的參考位置的位置座標為p0(X0 , Y0 , Z0 ),所述其中一個治具所對應的中間位置的位置座標為p1(X1 , Y1 , Z1 ),所述其中一個治具所對應的目標位置的位置座標p2(X2 , Y2 , Z2 ),以及所述另一個治具所對應的參考位置的位置座標為p0’(X0 ’, Y0 ’, Z0 ’),所述另一個治具所對應的中間位置的位置座標為p1’(X1 ’, Y1 ’, Z1 ’),其中,X1 ’= X0 ’+( X1 - X0 ),Y1 ’= Y0 ’,Z1 ’= Z0 ’;所述另一個治具所對應的目標位置的位置座標為p2’(X2 ’, Y2 ’, Z2 ’),其中,X2 ’= X0 ’+(X2 -X0 ),Y2 = Y0 ’,Z2 ’= Z0 ’。The computer device described in item 5 of the scope of patent application, wherein the position coordinate of the reference position corresponding to one of the fixtures is p0 (X 0 , Y 0 , Z 0 ), and the one of the fixtures corresponds to The position coordinate of the middle position of the is p1 (X 1 , Y 1 , Z 1 ), the position coordinate of the target position corresponding to one of the fixtures is p2 (X 2 , Y 2 , Z 2 ), and the other The position coordinate of the reference position corresponding to the fixture is p0' (X 0 ', Y 0 ', Z 0 '), and the position coordinate of the intermediate position corresponding to the other fixture is p1' (X 1 ', Y 1 ', Z 1 '), where X 1 '= X 0 '+( X 1 -X 0 ), Y 1 '= Y 0 ', Z 1 '= Z 0 '; the other fixture corresponds to The position coordinate of the target position is p2' (X 2 ', Y 2 ', Z 2 '), where X 2 '= X 0 '+(X 2 -X 0 ), Y 2 = Y 0 ', Z 2 '= Z 0 '. 如申請專利範圍第5項所述的電腦裝置,其中,所述執行模組,還用於: 根據所獲得的所述多個治具中的每個治具所對應的參考位置的位置座標、中間位置的位置座標,以及目標位置的位置座標,控制所述機械手臂從對應的治具上抓取目標物件,或者將目標物件放置於對應的治具上。As the computer device described in item 5 of the scope of patent application, the execution module is also used for: According to the obtained position coordinates of the reference position corresponding to each of the plurality of jigs, the position coordinates of the intermediate position, and the position coordinates of the target position, the robot arm is controlled to grasp the corresponding jig Take the target object, or place the target object on the corresponding fixture.
TW108140337A 2019-11-06 2019-11-06 Computer device and method for determinig coordinates for mechanical arm TWI709468B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108140337A TWI709468B (en) 2019-11-06 2019-11-06 Computer device and method for determinig coordinates for mechanical arm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108140337A TWI709468B (en) 2019-11-06 2019-11-06 Computer device and method for determinig coordinates for mechanical arm

Publications (2)

Publication Number Publication Date
TWI709468B TWI709468B (en) 2020-11-11
TW202118607A true TW202118607A (en) 2021-05-16

Family

ID=74202305

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108140337A TWI709468B (en) 2019-11-06 2019-11-06 Computer device and method for determinig coordinates for mechanical arm

Country Status (1)

Country Link
TW (1) TWI709468B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI788875B (en) * 2021-06-10 2023-01-01 中華學校財團法人中華科技大學 UAV non-contact charging system and method using rotating magnetic field and aruco markers assisted positioning

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6415190B2 (en) * 2014-09-03 2018-10-31 キヤノン株式会社 ROBOT DEVICE, ROBOT CONTROL PROGRAM, RECORDING MEDIUM, AND ROBOT DEVICE CONTROL METHOD
TWI700166B (en) * 2017-09-20 2020-08-01 達明機器人股份有限公司 Teaching system and method of robot arm
TWI750310B (en) * 2018-01-29 2021-12-21 達明機器人股份有限公司 Method for copying process points of robot arm
TWI671606B (en) * 2018-11-22 2019-09-11 漢翔航空工業股份有限公司 Method of using an alternative path compensation system for manipulator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI788875B (en) * 2021-06-10 2023-01-01 中華學校財團法人中華科技大學 UAV non-contact charging system and method using rotating magnetic field and aruco markers assisted positioning

Also Published As

Publication number Publication date
TWI709468B (en) 2020-11-11

Similar Documents

Publication Publication Date Title
CN113119099A (en) Computer device and method for controlling mechanical arm to clamp and place object
CN109176521A (en) A kind of mechanical arm and its crawl control method and system
CN109032348B (en) Intelligent manufacturing method and equipment based on augmented reality
CN109807885A (en) A kind of vision calibration method of manipulator, device and intelligent terminal
CN111369625A (en) Positioning method, positioning device and storage medium
CN112621743B (en) Robot, hand-eye calibration method for fixing camera at tail end of robot and storage medium
JP2006154924A (en) Automated facility system
CN110722558B (en) Origin correction method and device for robot, controller and storage medium
TWI709468B (en) Computer device and method for determinig coordinates for mechanical arm
CN108416866A (en) Method and device for processing inspection tasks
US11951638B2 (en) Computer device and method for determining standard depth value of marker
CN112902961A (en) Calibration method, medium, calibration equipment and system based on machine vision positioning
CN112775955B (en) Mechanical arm coordinate determination method and computer device
CN112948927B (en) Building corner judging method, computer device and storage medium
CN109968237A (en) Mounting and positioning method and device of air conditioner
CN107492124B (en) Plane calibration device of fisheye camera
CN114119767A (en) Workpiece grabbing method and device based on camera calibration and control system
TWI730575B (en) Computer device and method for determining depth standard value of marker
CN113795358B (en) Coordinate system calibration method, device and computer readable medium
CN111179322A (en) Method and system for material measurement captured image calibration based on camera light source array
CN215701709U (en) Configurable hand-eye calibration device
CN115741666A (en) Robot hand-eye calibration method, robot and robot operation method
TWI723715B (en) Computer device and method for controlling mechanical arm to gripping and placing objects
CN113771042A (en) Vision-based method and system for clamping tool by mobile robot
CN116423525B (en) Automatic hand-eye calibration method and system and storage medium