Robotic arm positioning method, robotic arm positioning device and computer storage medium
By using the compensation matrix and compensation deviation during the calibration process of the robotic arm, the calibration matrix is re-solved, which solves the problem of insufficient fitting accuracy of the rotation center and improves the positioning and grasping accuracy of the robotic arm, especially under large-angle rotation.
Patent Information
- Application Number
- CN202411370742.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-09-27
AI Technical Summary
During the calibration of the robotic arm, especially when the feature points are far from the rotation center, the limited field of view of the camera results in only a small arc segment being captured in the image, leading to poor fitting accuracy of the rotation center and a large grasping error.
By obtaining the initial end-effector coordinates and initial rotation angle of the multi-axis robotic arm, the second robotic arm is controlled to rotate around the connection point. Using the compensation matrix and compensation deviation, the calibration matrix is re-solved to obtain a more accurate transformation relationship between the robotic arm coordinates and the image coordinates, thereby improving the alignment and grasping accuracy of the rotation center.
This resulted in more accurate hand-eye calibration results, improved the robot's accuracy in large-angle alignment and grasping, and reduced grasping errors caused by inaccurate calculation of the rotation center.
Smart Images

Figure CN119188745B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to a robotic arm positioning method, a robotic arm positioning device, and a computer storage medium. Background Technology
[0002] Vision-guided robotic alignment and grasping is one of the core tasks of automation and intelligence in industrial production. In the photovoltaic manufacturing industry, robotic arm alignment is involved in several key stages, including the grasping and sorting of solar panels, screen printing, and assembly of critical components. In the lithium battery industry, robotic arm alignment can be used in the assembly and packaging of lithium battery cells, precisely grasping, stacking, and positioning the cells to ensure assembly accuracy and stability. In the 3C market, robotic arm alignment and grasping technology is widely used in the assembly and testing of electronic products, and the grasping and assembly of electronic components, such as the loading and soldering of circuit boards and the mounting of integrated circuits.
[0003] Hand-eye calibration is a key technology for robotic arms to achieve precise positioning and grasping. It mainly refers to the transformation relationship between the coordinate system of the robotic arm and the coordinate system of the vision sensor, converting the object pose observed by the vision sensor to the coordinate system of the robotic arm, thus assisting the robotic arm in completing the task.
[0004] In practical applications, when it is necessary to calibrate the rotation center of a robotic arm, there are cases where feature points are far from the rotation center. Due to the limitations of the camera's field of view, only a small arc segment can be obtained in the image, resulting in poor fitting accuracy of the rotation center and thus a large grasping error. Summary of the Invention
[0005] This application provides a robotic arm positioning method, a robotic arm positioning device, and a computer storage medium.
[0006] To address the aforementioned technical problems, this application proposes a robotic arm positioning method. This method is applied to a multi-axis robotic arm, which includes at least a base, a first robotic arm, and a second robotic arm. The end effector of the second robotic arm is used to grasp objects. The robotic arm positioning method includes: obtaining a first compensation matrix for the calibration of the multi-axis robotic arm; obtaining initial end effector coordinates of the multi-axis robotic arm; controlling the second robotic arm of the multi-axis robotic arm to rotate around the connection point between the first and second robotic arms, and obtaining the rotated end effector image coordinates; using the first compensation matrix and the compensation deviation to be solved, obtaining the rotated end effector coordinates corresponding to the rotated end effector image coordinates; establishing a solution equation based on the rotated end effector coordinates and the initial end effector coordinates; solving for the compensation deviation to be solved based on the solution equation to obtain a second compensation deviation; and resolving 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 robotic arm coordinates and the image coordinates.
[0007] The step of establishing a solution equation based on the coordinates of the rotating end-effector and the initial end-effector includes: establishing a solution equation based on the coordinates of the rotating end-effector, the initial end-effector, and the compensation rotation angle; wherein the compensation rotation angle is the angle by which the second robot arm rotates around the connection point.
[0008] The step of obtaining the initial end-effector coordinates of the multi-axis robotic arm includes: obtaining the initial end-effector coordinates and initial rotation angle of the multi-axis robotic arm; the step of establishing a solution equation according to the rotating end-effector coordinates, the initial end-effector coordinates, and the compensation rotation angle includes: in response to the presence of multiple rotating end-effector coordinates, establishing a solution equation set according to the rotating end-effector coordinates, the initial end-effector coordinates, the initial rotation angle, and the compensation rotation angle.
[0009] The robotic arm positioning method further includes: obtaining the number of times the second robotic arm rotates around the connection point; and obtaining the compensation rotation angle using the number of rotations and pre-rotation compensation.
[0010] The step of resolving the calibration matrix according to the second compensation deviation to obtain the second compensation matrix includes: obtaining the calibration point 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 compensation calibration point of the calibration point using the final compensation deviation; and resolving the calibration matrix using the compensation calibration point to obtain the second compensation matrix.
[0011] The robotic arm positioning method further includes: obtaining the calibration robotic arm coordinates and calibration image coordinates of several calibration points; fitting the calibration robotic arm coordinates to obtain the center coordinates of a fitted circle; and generating the first compensation deviation using the calibration image coordinates and the fitted circle center.
[0012] The step of 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 calibration points is determined based on the camera's field of view.
[0014] To address the aforementioned technical problems, this 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 aforementioned robotic arm positioning method.
[0015] To address the aforementioned technical problems, this application proposes a computer storage medium for storing program data, which, when executed by a computer, is used to implement the aforementioned robotic arm positioning method.
[0016] Unlike existing technologies, the advantages of this application are as follows: First, a first compensation matrix for the multi-axis robotic arm calibration is obtained; the initial end-effector coordinates of the multi-axis robotic arm are obtained; the second robotic arm of the multi-axis robotic arm is controlled to rotate around the connection point between the first and second robotic arms, and the rotated end-effector image coordinates are obtained; using the first compensation matrix and the compensation deviation to be solved, the rotated end-effector coordinates corresponding to the rotated end-effector image coordinates are obtained; a solution equation is established according to the rotated end-effector coordinates and the initial end-effector 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 robotic arm coordinates and the image coordinates. Through the above method, more accurate hand-eye calibration results can be obtained, which is beneficial for improving the robot's large-angle alignment and grasping accuracy when the rotation center is inaccurate. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating an embodiment of the robotic arm positioning method provided in this application;
[0019] Figure 2 This is a schematic diagram of an embodiment of the robotic arm provided in this application;
[0020] Figure 3 The robotic arm positioning method provided in this application Figure 1 A flowchart illustrating the sub-steps of step S17;
[0021] Figure 4 This is a schematic diagram illustrating the principle of the robotic arm rotation center compensation algorithm provided in this application;
[0022] Figure 5 This is a schematic diagram of an embodiment of the robotic arm positioning device provided in this application;
[0023] Figure 6This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application.
[0024] Reference numerals: Multi-axis robotic arm 10, base 11, first robotic arm 12, connection point 13, second robotic arm 14. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort 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 in which the robot arm base is located, i.e., the base coordinate system.
[0028] Robot arm end effector coordinate system: also known as gripper or tool coordinate system or end coordinate system, the coordinate system in which the robot arm flange is located.
[0029] Camera coordinate system: The origin is set at the camera's optical center, the z-axis of the coordinate system is perpendicular to the sensor, and the x and y axes are parallel to the sensor's long and short sides, respectively.
[0030] Calibration plate coordinate system: also known as the world coordinate system, the origin is generally set at the upper left corner of the chessboard.
[0031] The robotic arm positioning method of this application is applied to a robotic arm positioning device. This robotic arm positioning device can be a server or a system consisting of a server and a local terminal working together. Accordingly, all components of the robotic arm positioning device, such as units, subunits, modules, and submodules, can be housed entirely in the server, or separately in the server and the local terminal.
[0032] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed servers, or as a single software program or software module; no specific limitation is made here. In some possible implementations, the robotic arm positioning method of this application embodiment can be implemented by a processor calling computer-readable instructions stored in memory.
[0033] The robotic arm positioning method of this application is applied to a multi-axis robotic arm 10, which includes at least a base 11, a first robotic arm 12 and a second robotic arm 14. The end of the second robotic arm is used to grasp an object, and the first robotic arm 12 and the second robotic arm are connected by a connection point 13.
[0034] Please see Figure 1-Figure 2 , Figure 1 This is a flowchart illustrating an embodiment of the robotic arm positioning method provided in this application. Figure 2 This is a schematic diagram of one embodiment of the robotic arm provided in this application.
[0035] like Figure 1 As shown, the specific steps are as follows:
[0036] Step S11: Obtain the first compensation matrix for the multi-axis robotic arm calibration.
[0037] In this embodiment, the multi-axis robotic arm 10 grasps a calibration object and moves the robotic arm carrying the calibration object 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 this embodiment of the application, N>4; in other embodiments of the application, N=9.
[0039] In this embodiment of the application, in order to improve the accuracy of N-point calibration, the number of N can be appropriately increased, such as increasing it to sixteen points. The more points there are, the higher the accuracy of the calibration matrix.
[0040] In this embodiment, the camera exposure and focus are adjusted to ensure the calibration object's features are clearly captured. The robotic arm triggers the camera to take pictures during its movement. In each captured image, a template matching algorithm is used to coarsely locate the calibration object's position. Then, tools such as calipers, circle finders, and corner finders are used to obtain the precise sub-pixel image coordinates of the calibration object's features. The position of each robotic arm and the corresponding sub-pixel image coordinates of the calibration object are recorded.
[0041] The first compensation matrix is the compensation for connection point 13 relative to base 11.
[0042] Specifically, this application uses robotic arm hand-eye calibration technology to define the calibration transformation relationship between multiple coordinate systems involved in this application. The robotic arm hand-eye calibration mainly includes two scenarios:
[0043] (Left, EyeToHand) Eye outside the hand: The camera is fixed outside the robotic arm, and the transformation matrix between the camera coordinate system and the base coordinate system is solved.
[0044] (Right, EyeInHand) Eye in Hand: This refers to the camera being mounted on the end effector, so the relative positional relationship between the camera and the end effector remains unchanged. The transformation matrix between the camera and the robotic arm's end effector needs to be calibrated. If the camera is mounted on another joint of the robotic arm, then the transformation matrix between the camera and that joint needs to be calibrated. Then, by using two transformation matrices between the joints and the base of the robotic arm, and between the base and the end effector, the position to be grasped as seen by the camera is transformed into the coordinate system of the end effector.
[0045] As can be seen, hand-eye calibration is used to calibrate the transformation matrix between two coordinate systems whose relative positional relationship does 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 effector of the robotic arm remains unchanged.
[0046] In this embodiment, the robotic arm positioning device can use the EyeToHand eye-to-hand calibration process to calibrate the relationship between the image coordinate system and the machine coordinate system.
[0047] The specific calibration method is as follows: The camera position is fixed, and a top-down shooting method is used. The arm grasps the product (or calibration plate) and moves to make the feature points appear in the field of view. An N-point calibration method is used to determine the relationship between the image coordinate system and the machine coordinate system.
[0048] The specific calibration process is as follows:
[0049] Step 1: Use your arm to pick up the calibration plate or other standard parts that are easy to find corner points. Move your arm to move the standard parts so that the points are evenly distributed in various areas of the field of view.
[0050] Step 2: The arm picks up the calibration object and moves along the X and Y axes at a fixed distance, causing the reference point to appear at different positions in the field of view. This stage uses a fixed movement method; the robotic arm path typically has S-shaped and Z-shaped movements, and the movement mode can be selected as X-axis priority or Y-axis priority.
[0051] Step 3: Each time the robotic arm moves, it triggers a photo, obtaining N pairs of correspondences between image coordinates and robotic arm coordinates. Currently, N=9. Centered on the fifth point (baseX, baseY), the coordinate correspondences can be obtained as follows:
[0052]
[0053]
[0054] Step 4: Obtain the transformation relationship from image coordinates to world coordinates through N-point calibration. If the robotic arm needs to perform a rotation operation, skip to Step 5; otherwise, let... Calibration complete.
[0055] Step 5: The robotic arm rotates three or five angles around the fifth point (baseX, baseY) to obtain three coordinate points (imageX10, imageY10), (imageX11, imageY11), and (imageX12, imageY12) in the image.
[0056] Step 6: Obtained via Step 4 The matrix transforms the above image coordinates to world coordinates (worldX10, worldY10), (worldX11, worldY11), and (worldX12, worldY12). A circle is fitted using these three points to obtain the center (worldCX, worldCY). The true coordinates of this center in the robot arm's coordinate system are (baseX, baseY). Therefore... The offset between the coordinates and the real-world coordinates is calculated as (baseX-worldCX, baseY-worldCY). All calibration points are then corrected: worldXi = worldXi + baseX – worldCX, worldYi = worldYi + worldCY.
[0057] Step 7: Based on the transformation relationship between image coordinates and corrected world coordinates, obtain the results through N-point calibration.
[0058] Step 8: End.
[0059] In this embodiment of the application, the robotic arm positioning device can also use the EyeInHand eye-on-hand calibration process to calibrate the relationship between the image coordinate system and the machine coordinate system.
[0060] The specific calibration method is as follows: the camera is fixed on the robotic arm, the reference point is fixed, the robotic arm is moved to move the camera, and the reference point appears in different positions within 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 easy to find corner points in a fixed position and keep them still. Move the camera with the arm so that the points are evenly distributed in various areas of the field of view.
[0063] Step 2: The arm, carrying the camera, moves along the X and Y axes at a fixed distance, causing the reference point to appear at different positions in the field of view. This stage uses a fixed movement pattern; the robotic arm path typically involves S-shaped or Z-shaped movement, and the movement mode can be selected as X-axis priority or Y-axis priority.
[0064] Step 3: Each time the robotic arm moves, it triggers a photo, obtaining N pairs of correspondences between image coordinates and robotic arm coordinates. Currently, N=9, centered at the fifth point (baseX, baseY). Note that unlike the "eye-outside-hand" approach, we are simulating a situation where the camera remains stationary while the arm moves. Therefore, the actual coordinates of the arm's movement need to be negative to obtain the coordinate correspondences:
[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 robotic arm needs to perform a rotation operation, skip to Step 5; otherwise, let... Calibration complete.
[0067] Step 5: The robotic arm rotates three or five angles around the fifth point (baseX, baseY) to obtain three coordinate points (imageX10, imageY10), (imageX11, imageY11), and (imageX12, imageY12) in the image.
[0068] Step 6: The matrix obtained through Step 4 Transform the above image coordinates to world coordinates (worldX10, worldY10), (worldX11, worldY11), and (worldX12, worldY12). Fit a circle using these three points to obtain the center (worldCX, worldCY). The true coordinates of this center in the robot arm's coordinate system are (baseX, baseY). It can be seen that... The offset between the coordinates and the real-world coordinates is calculated as (baseX-worldCX, baseY-worldCY). All calibration points are then corrected: worldXi = worldXi + baseX - worldCX, worldYi = worldYi + worldCY.
[0069] Step 7: Based on the transformation relationship between image coordinates and corrected world coordinates, obtain the results through N-point calibration.
[0070] Step 8: End.
[0071] Step S12: Obtain the initial end effector coordinates of the multi-axis robotic arm.
[0072] In one embodiment of this application, the robotic arm positioning device obtains the initial end-effector coordinates and initial rotation angle of the multi-axis robotic arm.
[0073] Step S13: Control the second robotic arm of the multi-axis robotic arm to rotate around the connection point between the first and second robotic arms, and obtain the coordinates of the rotated end image.
[0074] Step S14: Using the first compensation matrix and the compensation deviation to be solved, obtain the coordinates of the rotating end-effector corresponding to the coordinates of the rotating end-effector image.
[0075] like Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the principle of the robotic arm rotation center compensation algorithm provided in this application.
[0076] The second robotic arm 14 rotates around the connection point 13 between the first robotic arm 12 and the second robotic arm 14. Due to the rotation of the second robotic arm 14, the position of the connection point 13 will be offset. In the calculation, (CX+Δx, CY+Δy) is taken as the center of rotation. This will result in the obtained coordinates (x2, y2) being biased when solving for the robotic arm coordinates.
[0077] Let the actual coordinates of the rotating end effector be (x1, y1), and the coordinates of the rotating end effector calculated from the offset rotation center be (x2, y2). Let the initial coordinates of the end effector be (x0, y1). y 0), the compensation deviation to be solved is (Δx, Δy).
[0078] Step S15: Establish the solution equations based on the coordinates of the rotating end effector and the initial end effector.
[0079] Where (x2, y2) are the coordinates of the rotating end effector with deviation, calculated by... y 2) and (x0, y The deviation between (x2, y2) and (x2, y2) can be used to calculate the compensation deviation of the robotic arm, that is, the compensation deviation to be solved can be derived by using (x2, y2).
[0080] Specifically, the robotic arm positioning device establishes a solution equation based on the coordinates of the rotating end-effector, the initial end-effector coordinates, and the compensation rotation angle. The compensation rotation angle is the angle by which the second robotic arm rotates around the connection point.
[0081] In one embodiment of this application, the X and Y coordinates of the robotic arm are kept stationary, and the robotic arm is controlled to rotate by K (K>0) points with a rotation step size of θ. 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 by using the number of rotations and pre-rotation compensation.
[0082] When K=1, the robotic arm positioning device establishes a solution equation based on the coordinates of the rotating end-effector, the initial end-effector coordinates, and the compensation rotation angle, 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, and θ are known, and the above equation forms a linear equation in two variables. Solving this linear equation yields the solution for (Δx, Δy).
[0085] When k>1, the robotic arm positioning device acquires the initial end-effector coordinates and initial rotation angle of the multi-axis robotic arm; in response to multiple rotation end-effector image coordinates, a system of equations is established based on the rotation end-effector coordinates, the initial end-effector coordinates, the initial rotation angle, and the compensation rotation angle, as follows:
[0086]
[0087] Step S16: Solve the compensation deviation to be solved based on the equation to obtain the second compensation deviation.
[0088] The typical least squares problem of Ax = b can be solved by X = (A T A) -1 A T b obtains the least squares solution of (Δx, Δy) and thus the second compensation bias.
[0089] Step S17: Resolve the calibration matrix according to the second compensation deviation to obtain the second compensation matrix.
[0090] The calibration matrix can be calculated using any matrix calculation method available 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] The above method is used to obtain the first compensation matrix for the multi-axis robotic arm calibration; obtain the initial end-effector coordinates of the multi-axis robotic arm; control the second robotic arm of the multi-axis robotic arm to rotate around the connection point between the first and second robotic arms, and obtain the rotated end-effector image coordinates; use the first compensation matrix and the compensation deviation to be solved to obtain the rotated end-effector coordinates corresponding to the rotated end-effector image coordinates; establish a solution equation according to the rotated end-effector coordinates and the initial end-effector coordinates; solve the compensation deviation to be solved based on the solution equation to obtain the second compensation deviation; re-solve 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 robotic arm coordinates and the image coordinates. This method can obtain more accurate hand-eye calibration results, which is beneficial for improving the robot's large-angle alignment and grasping accuracy when the rotation center is not accurately determined.
[0093] Furthermore, in one embodiment of this application, the robotic arm positioning device uses a first compensation deviation and a second compensation deviation to obtain a total deviation, and uses the total deviation to generate a compensation matrix for further positioning of the robotic arm. This application proposes an embodiment as a sub-step of step S17 for obtaining the second compensation matrix; please refer to the following for details. Figure 3 .
[0094] like Figure 3 As shown, the specific steps are as follows:
[0095] Step S171: Obtain the calibration point and the first compensation deviation when calibrating the first compensation matrix.
[0096] Specifically, the robotic arm positioning device acquires the coordinates of the calibrated robotic arm and the coordinates of the calibrated image at several calibration points. The coordinates of the fitted circle center are obtained by fitting the calibrated robotic arm coordinates. The first compensation deviation is generated using the calibrated image coordinates and the fitted circle center.
[0097] The robotic arm positioning device obtains the calibration image coordinates of the robotic arm's end effector through visual recognition; it then converts these coordinates into robotic arm coordinates using a visual calibration matrix. The rotation angle used to obtain the calibration points is determined based on the camera's field of view.
[0098] The robotic arm rotates by M points. While keeping the robot's X and Y coordinates stationary, the robot is controlled to grasp the calibration object and rotate M points (M>2, usually 3 or 5) in the same position. The rotation angle is determined based on the camera's field of view, with the standard being to rotate as large an angle as possible while still allowing the camera to see the feature points.
[0099] Among them, the calibration image coordinates are the sub-pixel coordinates of rotation point 13. The robotic arm positioning device uses the calibration matrix H0 to transform the sub-pixel coordinates of M rotation points 13 to the robot physical coordinate system, and obtains the fitting circle center (Xf, Yf) by least squares fitting. The robotic arm coordinates are (Xr, Yr).
[0100] The first compensation deviation Dx1 = Xr - Xf and Dy1 = Yr - Yf are calculated in the robot arm coordinates by fitting the center of the circle and the robot arm coordinates.
[0101] Step S172: Based on the first compensation deviation and the second compensation deviation, obtain the final compensation deviation.
[0102] The second compensation deviation is Dx2 = Xr - Xf - Δx, and Dy2 = Yr - Yf - Δy.
[0103] Step S173: Calculate the compensation calibration point of the calibration point using the final compensation deviation.
[0104] Step S174: Resolve the calibration matrix using the compensation calibration points to obtain the second compensation matrix.
[0105] The method of obtaining the compensation matrix using the compensation value can be any matrix calculation method in the existing technology, which will not be elaborated here.
[0106] By employing the above method and using secondary compensation, it is beneficial to improve the robot's alignment and grasping accuracy at large angles when the rotation center solution is inaccurate.
[0107] The reason this application requires calibration of the rotation center is that when a robot or machine axis picks up material, the axis center and the product center are not aligned. Therefore, the position after rotating by an angle θ needs to be calculated using the rotation center. This includes, but is not limited to, the following three situations:
[0108] The first type involves the gripping center coinciding with the rotation center, in which case calibration of the rotation center is unnecessary. The second type involves a mechanical deviation between the gripping center and the rotation center. The third type involves the gripping device and the gripping center being fixed together by a linkage, resulting in a clear misalignment between them. Theoretically, the second and third types can be grouped together because, with a rigid connection, the radius between the gripping device and the gripping center remains constant during rotation.
[0109] To recap the calibration process, at each position of the robotic arm, 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 robotic arm coordinate system, resulting in an offset in dX and dY relative to the true grasping center.
[0110] To correct this offset, the rotation center needs to be calibrated. 1. First, rotate the fixture around its rotation center. The coordinates (X0, Y0) of the rotation center can then be read by the robotic arm. 2. Take a picture of the calibration block with a camera to extract features. A series of yellow feature points can be obtained in the image coordinate system. 3. Transform the feature points to the robotic arm coordinate system. Remember that the theoretical points after transformation should be yellow, but due to the offset mentioned above, we can only obtain the coordinates of a series of red points. 4. Find the center (CX, CY) of the red point coordinates. 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 centers in the image coordinate system and the robotic coordinate system can be calculated.
[0111] To implement the robotic arm positioning method of the above embodiments, this application also provides a robotic arm positioning device, please refer to [link / reference needed]. Figure 5 , Figure 5 This is a schematic diagram of an embodiment of the robotic arm positioning device provided in this application.
[0112] like Figure 5 As shown, the robotic 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, memory 62, and 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, processor 61 can also be referred to as a CPU (Central Processing Unit). Processor 61 may be an integrated circuit chip with signal processing capabilities. Processor 61 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Processor 61 can also be a GPU (Graphics Processing Unit), also known as a display core, visual processor, or display chip, which is a microprocessor specifically designed for image processing in computers, workstations, game consoles, and some mobile devices (such as tablets and smartphones). The purpose of a GPU is to convert and drive the display information required by the computer system, provide line scanning signals to the display, and control the correct display of the display. It is an important component connecting the display and the computer motherboard. As an important component of the computer host, the graphics card is responsible for outputting and displaying graphics. The general-purpose processor can be a microprocessor, or processor 61 can be any conventional processor.
[0115] This application also provides a computer storage medium, such as Figure 6 As shown, the computer storage medium 700 is used to store the computer program 71, which, when executed by the processor, is used to implement the robotic arm positioning method of this application.
[0116] The methods involved in the embodiments of this application, when implemented as 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 this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0117] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A robotic arm positioning method, characterized in that, The robotic arm positioning method is applied to a multi-axis robotic arm, which includes at least a base, a first robotic arm, and a second robotic arm, wherein the end effector of the second robotic arm is used to grasp an object; the robotic arm positioning method includes: Obtain the first compensation matrix calibrated by the multi-axis robotic arm; Obtain the initial end effector coordinates of the multi-axis robotic arm; Control the second robotic arm of the multi-axis robotic arm to rotate around the connection point between the first robotic arm and the second robotic arm, and obtain the coordinates of the rotated end image. Using the first compensation matrix and the compensation deviation to be solved, the coordinates of the rotating end robotic arm corresponding to the coordinates of the rotating end image are obtained; Establish the solution equations based on the coordinates of the rotating end effector and the initial end effector coordinates; Based on the aforementioned equation, the compensation deviation to be solved is obtained by solving the second compensation deviation. The calibration matrix is re-solved according to the second compensation deviation to obtain the 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 robotic arm positioning method according to claim 1, characterized in that, The step of establishing the solution equations based on the coordinates of the rotating end effector and the initial end effector coordinates includes: The solution equations are established based on the coordinates of the rotating end effector, the initial coordinates of the end effector, and the compensation rotation angle. The compensation rotation angle is the angle by which the second robotic arm rotates around the connection point.
3. The robotic arm positioning method according to claim 2, characterized in that, The process of obtaining the initial end-effector coordinates of the multi-axis robotic arm includes: Obtain the initial end-effector coordinates and initial rotation angle of the multi-axis robotic arm; The step of establishing the solution equations based on the coordinates of the rotating end effector, the initial coordinates of the end effector, and the compensated rotation angle includes: When there are multiple coordinates of the rotating end image, a set of equations is established according to the coordinates of the rotating end robot arm, the initial coordinates of the end robot arm, the initial rotation angle, and the compensation rotation angle.
4. The robotic arm positioning method according to claim 2 or 3, characterized in that, The robotic arm positioning method further includes: Obtain the number of times the second robotic arm rotates around the connection point; The compensation rotation angle is obtained by using the number of rotations and the pre-rotation compensation.
5. The robotic arm positioning method according to claim 1, characterized in that, The step of resolving the calibration matrix according to the second compensation deviation to obtain the second compensation matrix includes: Obtain the calibration point and the first compensation deviation when calibrating the first compensation matrix; Based on the first compensation deviation and the second compensation deviation, the final compensation deviation is obtained; The compensation calibration point of the calibration point is calculated using the final compensation deviation; The calibration matrix is re-solved using the compensation calibration points to obtain the second compensation matrix.
6. The robotic arm positioning method according to claim 5, characterized in that, The robotic arm positioning method further includes: Obtain the calibration robot arm coordinates and calibration image coordinates at several of the calibration points; The coordinates of the fitted circle center are obtained by fitting the calibrated robot arm coordinates. The first compensation deviation is generated using the calibrated image coordinates and the fitted circle center.
7. The robotic arm positioning method according to claim 6, characterized in that, The step of obtaining the calibration robot coordinates and calibration image coordinates of the plurality of calibration points includes: The calibration image coordinates of the robotic arm's end effector are obtained through visual recognition; The coordinates of the calibration image are converted into the coordinates of the calibration robotic arm using a visual calibration matrix.
8. The robotic arm positioning method according to claim 6, characterized in that, The rotation angle when acquiring the aforementioned calibration points is determined based on the camera's field of view.
9. A robotic arm positioning device, characterized in that, The robotic arm positioning device includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the robotic 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, which, when executed by the computer, is used to implement the robotic 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