Mechanical arm positioning method, mechanical arm positioning device and computer storage medium

By using compensation matrix and rotation compensation deviation in the robot arm positioning method, the problem of insufficient calibration accuracy of the robot arm rotation center is solved, the alignment grabbing accuracy of the robot arm is improved, and the grasping error is reduced.

CN119188745AActive Publication Date: 2024-12-27ZHEJIANG HUARAY TECH CO LTD

Patent Information

Application Number
CN202411370742.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-27
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

During the calibration of the rotation center of the robot arm, due to the camera's field of view limitation, the feature points are far away from the rotation center, which can only obtain small arcs in the image, and the fitting accuracy is poor, which leads to a large grasping error.

Method used

A method of positioning robot arm is proposed. By obtaining the initial end robot arm coordinates and rotation end image coordinates of multi-axis robot arm, using compensation matrix and rotation compensation deviation, establishing a solution equation, solving the compensation deviation to be solved, recalculating the calibration matrix, and improving The transformation relationship accuracy of the robotic arm coordinates and image coordinates.

Benefits of technology

Through this method, more accurate hand-eye calibration results are obtained, which improves the alignment grabbing accuracy of large angles of the robot for solving the rotation center in an indirect manner, and reduces the grab error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119188745A_ABST
    Figure CN119188745A_ABST
Patent Text Reader

Abstract

The invention provides a mechanical arm positioning method, a mechanical arm positioning device and a computer storage medium. The method comprises the steps that a first compensation matrix calibrated by a multi-axis mechanical arm is obtained; initial tail end mechanical arm coordinates of the multi-axis mechanical arm are obtained; a second mechanical arm of the multi-axis mechanical arm is controlled to rotate around a connecting point between the first mechanical arm and the second mechanical arm, and image coordinates of the rotating tail end after rotation are obtained; a rotating tail end mechanical arm coordinate corresponding to the rotating tail end image coordinate is obtained through the first compensation matrix and the to-be-solved compensation deviation; establishing a solving equation according to the coordinates of the rotary tail end mechanical arm and the initial tail end mechanical arm; solving the to-be-solved compensation deviation based on the solving equation to obtain a second compensation deviation; the calibration matrix is solved again according to the second compensation deviation, and a second compensation matrix is obtained; wherein the second compensation matrix is used for calculating the transformation relation between the mechanical arm coordinates and the image coordinates. And the large-angle alignment grabbing precision of the robot is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a robot arm positioning method, a robot arm positioning device and a computer storage medium. Background Art

[0002] Vision-guided robot alignment and grasping is one of the core tasks of automation and intelligence in industrial production. In the photovoltaic manufacturing industry, robot arm alignment is involved in many key links such as the grasping and sorting of solar panels, screen printing, and assembly of key components. In the lithium battery industry, robot arm alignment can be used in the assembly and packaging process of lithium battery cells, accurately grasping, stacking and positioning cells to ensure the accuracy and stability of assembly. In the 3C market, robot arm alignment and grasping technology is widely used in the assembly and testing of electronic products, the grasping and assembly of electronic components, such as the loading and welding of circuit boards, and the mounting of integrated circuits.

[0003] Hand-eye calibration is a key technology for the robot to achieve precise positioning and grasping. It mainly refers to calibrating the transformation relationship between the robot arm coordinate system and the visual sensor coordinate system, converting the object posture observed by the visual sensor to the robot arm coordinate system, and assisting the robot arm to complete the task.

[0004] In actual cases, when the rotation center of a robot arm needs to be calibrated, there are cases where the feature points are far away from the rotation center. Due to the limitation of the camera field of view, only a small arc can be obtained in the image, and the fitting accuracy of the rotation center is poor, resulting in a large grasping error. Summary of the invention

[0005] The present application provides a robot arm positioning method, a robot arm positioning device and a computer storage medium.

[0006] In order to solve the above technical problems, the present application proposes a robot arm positioning method, which is applied to a multi-axis robot arm, wherein the multi-axis robot arm at least includes a base, a first robot arm and a second robot arm, and the robot arm end of the second robot arm is used to grasp objects; the robot arm positioning method includes: obtaining a first compensation matrix for calibrating the multi-axis robot arm; obtaining the initial end robot arm coordinates of the multi-axis robot arm; controlling the second robot arm of the multi-axis robot arm to rotate around the connection point between the first robot arm and the second robot arm, and obtaining the image coordinates of the rotating end after rotation; using the first compensation matrix and the compensation deviation to be solved, obtaining the rotating end robot arm coordinates corresponding to the rotating end image coordinates; establishing a solution equation according to the rotating end robot arm coordinates and the initial end robot arm coordinates; solving the compensation deviation to be solved based on the solution equation to obtain a second compensation deviation; re-solving the calibration matrix according to the second compensation deviation to obtain a second compensation matrix; wherein the second compensation matrix is ​​used to calculate the transformation relationship between the robot arm coordinates and the image coordinates.

[0007] Among them, establishing the solution equation according to the coordinates of the rotating end robotic arm and the initial end robotic arm coordinates includes: establishing the solution equation according to the coordinates of the rotating end robotic arm, the initial end robotic arm coordinates and the compensation rotation angle; wherein the compensation rotation angle is the angle of rotation of the second robotic arm around the connection point.

[0008] Among them, the obtaining of the initial end manipulator coordinates of the multi-axis manipulator includes: obtaining the initial end manipulator coordinates and the initial rotation angle of the multi-axis manipulator; the establishing of solution equations according to the rotating end manipulator coordinates, the initial end manipulator coordinates and the compensation rotation angle includes: in response to the rotating end image coordinates being multiple, establishing a solution equation group according to the rotating end manipulator coordinates, the initial end manipulator coordinates, the initial rotation angle and the compensation rotation angle.

[0009] Wherein, the robot arm positioning method further includes: obtaining the number of times the second robot arm rotates around the connection point; and obtaining the compensated rotation angle using the number and pre-rotation compensation.

[0010] Among them, re-solving the calibration matrix according to the second compensation deviation to obtain the second compensation matrix includes: obtaining the calibration points and the first compensation deviation when calibrating the first compensation matrix; obtaining the final compensation deviation based on the first compensation deviation and the second compensation deviation; calculating the compensated calibration points of the calibration points using the final compensation deviation; and re-solving the calibration matrix using the compensated calibration points to obtain the second compensation matrix.

[0011] Among them, the robotic arm positioning method also includes: obtaining the calibration robotic arm coordinates and calibration image coordinates of several calibration points; fitting using the calibration robotic arm coordinates to obtain the fitting circle center coordinates; and generating the first compensation deviation using the calibration image coordinates and the fitting circle center.

[0012] Wherein, obtaining the calibration robot arm coordinates and calibration image coordinates of the calibration points includes: obtaining the calibration image coordinates of the end of the robot arm through visual recognition; and converting the calibration image coordinates into the calibration robot arm coordinates using a visual calibration matrix.

[0013] The rotation angle when acquiring the plurality of calibration points is determined according to the camera field of view.

[0014] In order to solve the above technical problems, the present application proposes a robotic arm positioning device, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above robotic arm positioning method.

[0015] In order to solve the above technical problems, the present application proposes a computer storage medium, which is used to store program data. When the program data is executed by a computer, it is used to implement the above-mentioned robot arm positioning method.

[0016] Different from the prior art, the beneficial effects of the present application are: obtaining the first compensation matrix of the multi-axis robot calibration; obtaining the initial end robot coordinates of the multi-axis robot; controlling the second robot of the multi-axis robot to rotate around the connection point between the first robot and the second robot to obtain the image coordinates of the rotating end after rotation; using the first compensation matrix and the compensation deviation to be solved, obtaining the rotating end robot coordinates corresponding to the rotating end image coordinates; establishing a solution equation according to the rotating end robot coordinates and the initial end robot coordinates; solving the compensation deviation to be solved based on the solution equation to obtain the second compensation deviation; re-solving the calibration matrix according to the second compensation deviation to obtain the second compensation matrix; wherein the second compensation matrix is ​​used to calculate the transformation relationship between the robot coordinates and the image coordinates. In the above manner, a more accurate hand-eye calibration result can be obtained, which is conducive to improving the robot's large-angle alignment and grasping accuracy when the rotation center is not solved accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 It is a flow chart of an embodiment of the robot arm positioning method provided by the present application;

[0019] Figure 2 is a schematic diagram of an embodiment of a robotic arm provided by the present application;

[0020] Figure 3 The robot arm positioning method provided by this application Figure 1 Schematic diagram of the process of the sub-steps of step S17;

[0021] Figure 4 It is a schematic diagram of the principle of the robot arm rotation center compensation algorithm provided by this application;

[0022] Figure 5 It is a structural schematic diagram of an embodiment of a mechanical arm positioning device provided by the present application;

[0023] Figure 6It is a structural diagram of an embodiment of a computer storage medium provided by the present application.

[0024] Reference numerals: multi-axis robotic arm 10 , base 11 , first robotic arm 12 , connection point 13 , second robotic arm 14 . DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] The coordinate systems involved in this application include but are not limited to:

[0027] Base coordinate system: The coordinate system where the base of the robot is located, that is, the base coordinate system.

[0028] Robot arm end coordinate system: also called gripper or tool coordinate system or end coordinate system, the coordinate system where the robot arm flange is located.

[0029] Camera coordinate system: The origin is established at the optical center of the camera, the z-axis of the coordinate system is perpendicular to the sensor, and the x and y axes are parallel to the long and short sides of the sensor respectively.

[0030] Calibration plate coordinate system: also known as the world coordinate system, the origin is generally established at the upper left corner of the chessboard.

[0031] The robot positioning method of the present application is applied to a robot positioning device, wherein the robot positioning device of the present application can be a server, or a system in which a server and a local terminal cooperate with each other. Accordingly, the various parts of the robot positioning device, such as various units, subunits, modules, and submodules, can all be set in the server, or can be set in the server and the local terminal respectively.

[0032] Furthermore, the above-mentioned server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules, such as software or software modules used to provide distributed servers, or it can be implemented as a single software or software module, which is not specifically limited here. In some possible implementations, the robot arm positioning method of the embodiment of the present application can be implemented by a processor calling computer-readable instructions stored in a memory.

[0033] The robot arm positioning method of the present application is applied to a multi-axis robot arm 10, which includes at least a base 11, a first robot arm 12 and a second robot arm 14, wherein the robot arm end of the second robot arm is used to grasp objects, and the first robot arm 12 and the second robot arm are connected via a connection point 13.

[0034] See also Figure 1-Figure 2 , Figure 1 is a flow chart of an embodiment of the robot arm positioning method provided by the present application, Figure 2 It is a schematic diagram of an embodiment of the robotic arm provided in the present application.

[0035] like Figure 1 As shown, the specific steps are as follows:

[0036] Step S11: Obtain a first compensation matrix for multi-axis robot calibration.

[0037] In the embodiment of the present application, the multi-axis robotic arm 10 grabs the calibration object, and the robotic arm of the robot carries the calibration object and moves to N preset points within the field of view of the camera, while recording the coordinates of the robotic arm when it moves to N points.

[0038] In an embodiment of the present application, N>4, and in other embodiments of the present application, N=9.

[0039] In the embodiment of the present application, in order to improve the accuracy of N-point calibration, the number of N can be appropriately increased, such as increased to sixteen points. The more points there are, the higher the accuracy of the calibration matrix.

[0040] In the embodiment of the present application, the camera exposure and focus are adjusted so that the features of the calibration object are clearly captured. The robot triggers the camera to take pictures during the movement, and in each picture taken, the template matching algorithm is used to roughly locate the position of the calibration object. Then, tools such as calipers, circle finders, and angle finders are used to obtain the precise sub-pixel image coordinates of the calibration object features. Each robot arm position and the corresponding sub-pixel image coordinates of the calibration object are recorded.

[0041] The first compensation matrix is ​​the compensation of the connection point 13 relative to the base 11 .

[0042] Specifically, the present application calibrates the conversion relationship between multiple coordinate systems involved in the present application through the robotic arm hand-eye calibration technology, wherein the robotic arm hand-eye calibration mainly includes two situations:

[0043] (Left, EyeToHand) Eye outside the hand: The camera is fixed outside the robotic arm, and the target is the transformation matrix between the camera coordinate system and the base coordinate system.

[0044] (Right, EyeInHand) Eye in Hand: Here the camera is installed on the end effector, so the relative position relationship between the camera and the end effector will not change, and the transformation matrix between the camera and the end of the robotic arm is calibrated; if it is installed at other joints of the robotic arm, then the transformation matrix between the camera and the joint needs to be calibrated Then, through the two transformation matrices between the joints and base, and between the base and the end of the robot arm, the position to be grasped "seen" by the camera is converted to the end effector coordinate system.

[0045] It can be seen that hand-eye calibration is used to calibrate the transformation matrix between two coordinate systems whose relative position relationship will not change: when the eye is outside the hand, the relative relationship between the camera and the base remains unchanged; when the eye is on the hand, the relative relationship between the camera and the end of the robotic arm remains unchanged.

[0046] In an embodiment of the present application, the robotic arm positioning device can use the EyeToHand eye-out-of-hand calibration process to calibrate the relationship between the image coordinate system and the mechanical coordinate system.

[0047] The specific calibration method is as follows: the camera position is fixed, and the camera is photographed from top to bottom. The arm grabs the product (or calibration plate) and moves it so that the feature points appear in the field of view. The N-point calibration method is used to determine the relationship between the image coordinate system and the mechanical coordinate system.

[0048] The specific calibration process is as follows:

[0049] Step 1: The arm absorbs the calibration plate or other standard parts that are convenient for finding corner points. The movement of the arm drives the standard parts to move so that their points are evenly distributed in various areas within the field of view.

[0050] Step 2: The arm absorbs the calibration object and moves along the X-axis and Y-axis at a fixed distance Len, so that the reference point appears at different positions in the field of view. This stage uses a fixed movement method. The robot arm path generally has S-shaped and Z-shaped movement. The movement method can choose X-axis priority or Y-axis priority.

[0051] Step 3: Each time the robot moves, it triggers a photo shoot to obtain the correspondence between N pairs of image coordinates and robot coordinates. Currently N = 9, with the fifth point (baseX, baseY) as the center, the coordinate correspondence can be obtained:

[0052]

[0053]

[0054] Step 4: Obtain the transformation relationship from image coordinates to world coordinates through N-point calibration If the robot arm needs to rotate, jump to Step 5, otherwise Calibration is complete.

[0055] Step 5: The robotic arm rotates three / five angles with the fifth point (baseX, baseY) as the center, and obtains three coordinate points (imageX10, imageY10), (imageX11, imageY11), and (imageX12, imageY12) in the image.

[0056] Step 6: Obtained through Setp4 Matrix, convert the above image coordinates to world coordinates (worldX10, worldY10), (worldX11, worldY11), (worldX12, worldY12). Fit a circle through these three points and get the center (worldCX, worldCY). The real coordinates of the center in the robot coordinate system are (baseX, baseY). The offset between the solved coordinates and the real-world coordinates is (baseX-worldCX, baseY-worldCY), and all calibration points are corrected worldXi=worldXi+baseX–worldCX, worldYi=worldYi+worldCY.

[0057] Step 7: According to the conversion relationship between the image coordinates and the corrected world coordinates, N points are calibrated to obtain

[0058] Step8: End.

[0059] In an embodiment of the present application, the robotic arm positioning device can also use the EyeInHand eye-in-hand calibration process to calibrate the relationship between the image coordinate system and the mechanical coordinate system.

[0060] The specific calibration method is as follows: the camera is fixed to the robotic arm, the reference point is fixed, the mobile robotic arm drives the camera to move, and the reference point appears at different positions in the field of view to complete the nine-point calibration.

[0061] The specific calibration process is as follows:

[0062] Step 1: Place the calibration plate or other standard parts that are convenient for finding corner points in a fixed position and keep it still. The arm drives the camera to move so that the points are evenly distributed in various areas within the field of view.

[0063] Step 2: The arm carries the camera and moves along the X-axis and Y-axis at a fixed distance Len, so that the reference point appears at different positions in the field of view. This stage uses a fixed movement method. The robot arm path generally has S-shaped and Z-shaped movement. The movement method can choose X-axis priority or Y-axis priority.

[0064] Step 3: Each time the robot moves, it triggers a photo, and obtains the correspondence between N pairs of image coordinates and robot arm coordinates. Currently N=9, with the fifth point (baseX, baseY) as the center. One thing to note here is that unlike the eye-outside-hand solution, we want to simulate the situation where the camera does not move but the arm moves. Therefore, the coordinates of the actual movement of the arm must be negative, and the coordinate correspondence can be obtained:

[0065] Serial number Image Coordinates World Coordinates 1 (imageX1,imageY1) (baseX+Len,baseY+Len) 2 (imageX2,imageY2) (baseX,baseY+Len) 3 (imageX3,imageY3) (baseX-Len,baseY+Len) 4 (imageX4,imageY4) (baseX+Len,baseY) 5 (imageX5,imageY5) (baseX,baseY) 6 (imageX6,imageY6) (baseX-Len,baseY) 7 (imageX7,imageY7) (baseX+Len,baseY-Len) 8 (imageX8,imageY8) (baseX,baseY-Len) 9 (imageX9,imageY9) (baseX-Len,baseY-Len)

[0066] Step 4: Obtain the transformation relationship from image coordinates to world coordinates through N-point calibration If the robot arm needs to rotate, jump to Step 5, otherwise Calibration is complete.

[0067] Step 5: The robotic arm rotates three / five angles with the fifth point (baseX, baseY) as the center, and obtains three coordinate points (imageX10, imageY10), (imageX11, imageY11), and (imageX12, imageY12) in the image.

[0068] Step 6: Matrix obtained by Setp4 Convert the above image coordinates to world coordinates (worldX10, worldY10), (worldX11, worldY11), (worldX12, worldY12). Fit a circle through these three points and get the center (worldCX, worldCY). The real coordinates of the center in the robot coordinate system are (baseX, baseY). The offset between the solved coordinates and the real-world coordinates is (baseX-worldCX, baseY-worldCY), and all calibration points are corrected worldXi=worldXi+baseX-worldCX, worldYi=worldYi+worldCY.

[0069] Step 7: According to the conversion relationship between the image coordinates and the corrected world coordinates, N points are calibrated to obtain

[0070] Step8: End.

[0071] Step S12: Obtain the initial end arm coordinates of the multi-axis robot.

[0072] In one embodiment of the present application, a robot arm positioning device obtains the initial end robot arm coordinates and initial rotation angle of the multi-axis robot arm.

[0073] Step S13: Control the second robot arm of the multi-axis robot arm to rotate around the connection point between the first robot arm and the second robot arm, and obtain the image coordinates of the rotation end after rotation.

[0074] Step S14: using the first compensation matrix and the compensation deviation to be solved, obtaining the rotation end manipulator coordinates corresponding to the rotation end image coordinates.

[0075] like Figure 4 As shown, Figure 4 It is a schematic diagram of the principle of the robot arm rotation center compensation algorithm provided in this application.

[0076] The second robot arm 14 rotates around the connection point 13 between the first robot arm 12 and the second robot arm 14. Due to the rotation of the second robot arm 14, the position of the connection point 13 is offset, and (CX+Δx, CY+Δy) is used as the rotation center during calculation. As a result, the coordinates (x2, y2) obtained when solving the robot arm coordinates are deviated.

[0077] Assume that the actual rotation end manipulator coordinates are (x1, y1), the rotation end manipulator coordinates calculated by the deviation rotation center are (x2, y2), and the initial end manipulator coordinates are (x0, y 0), and the compensation deviation to be solved is (Δx, Δy).

[0078] Step S15: Establish a solution equation according to the coordinates of the rotating end manipulator and the initial end manipulator.

[0079] Among them, (x2, y2) is the coordinate of the rotating end manipulator with deviation. By calculating (x2, y 2) and (x0, y The compensation deviation of the robot arm can be calculated by the deviation between (x2, y2), that is, the compensation deviation to be solved can be inferred by using (x2, y2).

[0080] Specifically, the robot positioning device establishes a solution equation according to the rotation end robot coordinates, the initial end robot coordinates and the compensation rotation angle, wherein the compensation rotation angle is the angle at which the second robot rotates around the connection point.

[0081] In one embodiment of the present application, the X and Y coordinates of the robotic arm are kept stationary, the robotic arm is controlled to rotate K (K>0) points, the rotation step is θ, and the robotic arm positioning device obtains the number of times the second robotic arm rotates around the connection point; the compensation rotation angle is obtained using the number and the pre-rotation compensation.

[0082] When K=1, the robot positioning device establishes a solution equation according to the rotation end robot coordinates, the initial end robot coordinates and the compensation rotation angle, which is as follows:

[0083] X2-X1=X2-X0=[1-cosθ]*Δx+sinθ*ΔyY2-Y1=Y2-Y0=[1-cosθ]*Δy+sinθ*Δx

[0084] When K=1, X1, X2, Y1, Y2, θ are known, and the above equation forms a two-variable linear equation. Solving the two-variable linear equation can obtain the solution of (Δx, Δy).

[0085] When k>1, the robot positioning device obtains the initial end robot coordinates and initial rotation angle of the multi-axis robot; in response to the rotation end image coordinates being multiple, a set of equations to be solved is established according to the rotation end robot coordinates, the initial end robot coordinates, the initial rotation angle and the compensation rotation angle, as follows:

[0086]

[0087] Step S16: Solving the compensation deviation to be solved based on the solution equation to obtain a second compensation deviation.

[0088] The typical least squares problem of Ax = b can be solved by X = (A T A) -1 A T b Obtain the least squares solution of (Δx, Δy) and obtain the second compensation deviation.

[0089] Step S17: re-solve the calibration matrix according to the second compensation deviation to obtain the second compensation matrix.

[0090] The calibration matrix may be calculated using any matrix calculation method in the prior art.

[0091] The second compensation matrix is ​​used to calculate the transformation relationship between the robot arm coordinates and the image coordinates.

[0092] Through the above method, the first compensation matrix of the multi-axis robot calibration is obtained; the initial end robot coordinates of the multi-axis robot are obtained; the second robot of the multi-axis robot is controlled to rotate around the connection point between the first robot and the second robot to obtain the image coordinates of the rotating end after rotation; the rotating end robot coordinates corresponding to the rotating end image coordinates are obtained using the first compensation matrix and the compensation deviation to be solved; the solution equation is established according to the rotating end robot coordinates and the initial end robot coordinates; the compensation deviation to be solved is solved based on the solution equation to obtain the second compensation deviation; the calibration matrix is ​​re-solved according to the second compensation deviation to obtain the second compensation matrix; wherein the second compensation matrix is ​​used to calculate the transformation relationship between the robot coordinates and the image coordinates. Through the above method, a more accurate hand-eye calibration result can be obtained, which is conducive to improving the robot's large-angle alignment and grasping accuracy when the rotation center is not solved accurately.

[0093] Further, in an embodiment of the present application, the robot arm positioning device uses the first compensation deviation and the second compensation deviation to obtain the total deviation, and uses the total deviation to generate a compensation matrix to further position the robot arm. The present application proposes an embodiment as a sub-step of step S17 for obtaining the second compensation matrix. For details, please refer to Figure 3 .

[0094] like Figure 3 As shown, the specific steps are as follows:

[0095] Step S171: obtaining calibration points and first compensation deviations when calibrating the first compensation matrix.

[0096] Specifically, the robot positioning device obtains calibration robot coordinates and calibration image coordinates of a plurality of calibration points, uses the calibration robot coordinates to fit, obtains the coordinates of the fitting circle center, and uses the calibration image coordinates and the fitting circle center to generate a first compensation deviation.

[0097] The robot positioning device obtains the calibration image coordinates of the end of the robot through visual recognition, and converts the calibration image coordinates into calibration robot coordinates using a visual calibration matrix. The rotation angle when obtaining the plurality of calibration points is determined according to the camera field of view.

[0098] The robot arm rotates M points. While keeping the robot's X and Y coordinates fixed, the robot is controlled to grab the calibration object and rotate M points (M>2, generally 3 or 5) at the same position. The rotation angle is determined according to the camera's field of view. The standard is to rotate as large an angle as possible while the camera can see the feature points.

[0099] Among them, the calibrated image coordinates are the sub-pixel coordinates of the rotation point 13. The robotic arm positioning device uses the calibration matrix H0 to convert the sub-pixel coordinates of the M rotation points 13 to the robot physical coordinate system, and obtains the fitting center (Xf, Yf) through least squares fitting. The robotic arm coordinates are (Xr, Yr).

[0100] The first compensation deviation Dx1 = Xr-Xf, Dy1 = Yr-Yf is calculated in the robot coordinates by fitting the center of the circle and the robot coordinates.

[0101] Step S172: Based on the first compensation deviation and the second compensation deviation, a final compensation deviation is obtained.

[0102] The second compensation deviation is Dx2=Xr-Xf-Δx, and Dy2=Yr-Yf-Δy.

[0103] Step S173: Calculate the compensated calibration point of the calibration point using the final compensation deviation.

[0104] Step S174: re-solve the calibration matrix using the compensation calibration points to obtain a second compensation matrix.

[0105] The method of obtaining the compensation matrix using the compensation value may be any matrix calculation method in the prior art and will not be described in detail here.

[0106] Through the above method, the use of secondary compensation is beneficial to improving the robot's large-angle positioning and grasping accuracy when the rotation center is not solved accurately.

[0107] The reason why this application needs to calibrate the rotation center is that when the robot or machine axis absorbs the material, the axis and the product center are not consistent, so the position after the angle θ needs to be calculated through the rotation center. Including but not limited to the following three situations:

[0108] In the first category, the gripping center coincides with the rotation center, and of course there is no need to calibrate the rotation center at this time; in the second category, there is a mechanical deviation between the gripping center and the rotation center; in the third category, the gripping device and the gripping center are fixed by a connecting rod, and the gripping center and the gripping device obviously do not coincide. In theory, the second and third categories can be classified into one category, because during the rotation of the rigid connection, the radius between the gripping device and the gripping center is fixed.

[0109] Let’s review the calibration process. At each robot position, we obtain the mapping relationship between the physical coordinates of the axis and the features of the calibration block on the image. In other words, the grasping center on the image is incorrectly mapped to the rotation center in the robot coordinates, resulting in a dX, dY offset relative to the true grasping center.

[0110] In order to correct this offset, the rotation center needs to be calibrated. 1. First, rotate the fixture around its rotation center. At this time, the rotation center coordinates (X0, Y0) can be read by the robot; 2. Use the camera to shoot the calibration block and extract the features, and you can get a series of yellow feature points in the image coordinate system; 3. Transfer the feature points to the robot coordinate system. Remember that the theoretical points after the conversion should be yellow points, but because of the above offset problem, we can only get a series of red point coordinates; 4. Find the center of the red point coordinates (CX, CY); 5. It can be seen that dX = CX-X0, dY = CY-Y0; 6. By compensating dX and dY, the one-to-one correspondence between the rotation center in the image coordinate system and the mechanical coordinate system can be calculated.

[0111] In order to implement the robot arm positioning method of the above embodiment, the present application also provides a robot arm positioning device, for details, please refer to Figure 5 , Figure 5 It is a structural schematic diagram of an embodiment of a robotic arm positioning device provided in the present application.

[0112] like Figure 5 As shown, the robot arm positioning device 600 of this embodiment includes a processor 61 , a memory 62 , an input / output device 63 and a bus 64 .

[0113] The processor 61 , the memory 62 , and the input / output device 63 are respectively connected to the bus 64 . The memory 62 stores a computer program, and the processor 61 is used to execute the computer program to implement the target recognition method of the above embodiment.

[0114] In this embodiment, the processor 61 may also be referred to as a CPU (Central Processing Unit). The processor 61 may be an integrated circuit chip having the ability to process signals. The processor 61 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 61 may also be a GPU (Graphics Processing Unit), also known as a display core, a visual processor, or a display chip, which is a microprocessor that is specifically used for image computing on computers, workstations, game consoles, and some mobile devices (such as tablet computers, smart phones, etc.). The purpose of the GPU is to convert and drive the display information required by the computer system, and to provide a line scan signal to the display to control the correct display of the display. It is an important component that connects the display and the computer motherboard. As an important component of the computer host, the graphics card is responsible for outputting display graphics. The general-purpose processor may be a microprocessor or the processor 61 may also be any conventional processor, etc.

[0115] The present application also provides a computer storage medium, such as Figure 6 As shown, the computer storage medium 700 is used to store a computer program 71. When the computer program 71 is executed by a processor, it is used to implement the robot arm positioning method of the present application.

[0116] The methods involved in the embodiments of the present application, when implemented in the form of software functional units and sold or used as independent products, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the prior art that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.

[0117] The above description is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A robot arm positioning method, characterized in that: The robot arm positioning method is applied to a multi-axis robot arm, the multi-axis robot arm at least comprising a base, a first robot arm and a second robot arm, the robot arm end of the second robot arm is used to grasp an object; the robot arm positioning method comprises: Acquire a first compensation matrix for calibrating the multi-axis robotic arm; Obtaining the initial end manipulator coordinates of the multi-axis manipulator; Controlling the second mechanical arm of the multi-axis mechanical arm to rotate around a connection point between the first mechanical arm and the second mechanical arm, and acquiring image coordinates of a rotating end after rotation; Using the first compensation matrix and the compensation deviation to be solved, the coordinates of the rotating end mechanical arm corresponding to the rotating end image coordinates are obtained; Establishing a solution equation according to the rotation end manipulator coordinates and the initial end manipulator coordinates; Solving the compensation deviation to be solved based on the solution equation to obtain a second compensation deviation; Re-solving the calibration matrix according to the second compensation deviation to obtain a second compensation matrix; The second compensation matrix is ​​used to calculate the transformation relationship between the robot arm coordinates and the image coordinates.

2. The robot arm positioning method according to claim 1, characterized in that: The establishing of a solution equation according to the rotation end manipulator coordinates and the initial end manipulator coordinates includes: Establishing a solution equation according to the rotation end manipulator coordinates, the initial end manipulator coordinates and the compensation rotation angle; The compensation rotation angle is the angle at which the second robotic arm rotates around the connection point.

3. The robot arm positioning method according to claim 2, characterized in that: The obtaining of the initial end manipulator coordinates of the multi-axis manipulator comprises: Obtaining the initial end manipulator coordinates and initial rotation angle of the multi-axis manipulator; The establishing of a solution equation according to the rotation end manipulator coordinates, the initial end manipulator coordinates and the compensation rotation angle includes: In response to the number of the rotating end image coordinates being multiple, a set of equations to be solved is established according to the rotating end mechanical arm coordinates, the initial mechanical arm coordinates, the initial rotation angle, and the compensation rotation angle.

4. The robot arm positioning method according to claim 2 or 3, characterized in that: The robotic arm positioning method further includes: Obtaining the number of times the second mechanical arm rotates around the connection point; The compensated rotation angle is obtained by using the number and the pre-rotation compensation.

5. The robot arm positioning method according to claim 1, characterized in that: The re-solving the calibration matrix according to the second compensation deviation to obtain the second compensation matrix includes: Obtaining a calibration point and a first compensation deviation when calibrating the first compensation matrix; Based on the first compensation deviation and the second compensation deviation, obtaining a final compensation deviation; Calculating a compensated calibration point of the calibration point using the final compensation deviation; The calibration matrix is ​​re-solved using the compensation calibration points to obtain a second compensation matrix.

6. The robot arm positioning method according to claim 5, characterized in that: The robotic arm positioning method further includes: Obtaining calibration robot arm coordinates and calibration image coordinates of a number of calibration points; Using the calibrated robot arm coordinates to fit, the coordinates of the fitting circle center are obtained; The first compensation deviation is generated by using the calibration image coordinates and the fitting circle center.

7. The robot arm positioning method according to claim 6, characterized in that: The obtaining of calibration robot arm coordinates and calibration image coordinates of the plurality of calibration points comprises: Obtaining the calibration image coordinates of the end of the robotic arm through visual recognition; The calibration image coordinates are converted into the calibration robot arm coordinates using a visual calibration matrix.

8. The robot arm positioning method according to claim 6, characterized in that: The rotation angle when acquiring the plurality of calibration points is determined according to the camera field of view.

9. A mechanical arm positioning device, characterized in that: The robot arm positioning device includes a memory and a processor coupled to the memory; Wherein, the memory is used to store program data, and the processor is used to execute the program data to implement the robot arm positioning method as described in any one of claims 1 to 8.

10. A computer storage medium, characterized in that: The computer storage medium is used to store program data, and when the program data is executed by a computer, it is used to implement the robot arm positioning method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Automatic calibration method and system for mechanical arm tool coordinates and storage medium

    CN116423526A

  • Visual guidance precise operation method of mechanical arm, terminal and computer storage medium

    CN117754568A

  • Arm length parameter compensation method, apparatus, and device for scara robot, and non-volatile readable storage medium

    WO2024060569A1

  • Hand-eye calibration method and device for robot, robot, and computer storage medium

    WO2024193177A1

Cited By

  • Mainboard component assembling method and system, electronic equipment and storage medium

    CN120735046A

  • A mainboard component assembly method and system, electronic equipment and storage medium

    CN120735046B

  • Correction method and correction system applied to mechanical arm and mechanical arm

    CN122008243A