Tool coordinate positioning method of four-axis robot, robot and storage medium

By obtaining the image pixel coordinates of the four-axis robot calibration component, calculating the compensation value, and adjusting the tool coordinates, the problem of insufficient tool coordinate accuracy in the existing technology is solved, and higher precision tool coordinate positioning is achieved.

CN117733849BActive Publication Date: 2026-07-21GOERTEK INC
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GOERTEK INC
Filing Date
2023-12-21
Publication Date
2026-07-21

Smart Images

  • Figure CN117733849B_ABST
    Figure CN117733849B_ABST
Patent Text Reader

Abstract

The application discloses a tool coordinate positioning method of a four-axis robot, a robot and a storage medium. The method comprises the following steps: acquiring a first calibration piece image after a four-axis robot moves a calibration piece to a first reference point, and a second calibration piece image after the four-axis robot moves the calibration piece to a second reference point, wherein the coordinates of the first reference point and the second reference point are the same, and the rotation angle difference between the first reference point and the second reference point is 180 degrees; acquiring a first pixel coordinate of a center point of the calibration piece in the first calibration piece image, and a second pixel coordinate of the center point of the calibration piece in the second calibration piece image; determining a compensation value of a tool coordinate according to the first pixel coordinate and the second pixel coordinate; and adjusting an initial tool coordinate of the four-axis robot according to the compensation value to determine a target tool coordinate of the four-axis robot, so that the precision of the tool coordinate can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automation control technology, and in particular to a tool coordinate positioning method for a four-axis robot, the robot, and a storage medium. Background Technology

[0002] Robot coordinate systems are mainly divided into joint coordinate systems, Cartesian coordinate systems, tool coordinate systems, and user coordinate systems. Among them, the tool coordinate system is a coordinate system defined relative to the robot's end effector. It is used to describe the accurate position and orientation of the robot's end effector relative to the robot's base coordinate system, so that the position and orientation of the end effector can be precisely controlled when the robot is operating.

[0003] Robots are manufactured with a default tool coordinate system (Tool0), located at the center of the flange end. However, in actual operation, the robot's arm often mounts tools such as suction cups, welding torches, or cylinders at the flange end center as end effectors to perform different tasks and operations. For example, a suction cup enables object grasping and handling, a welding torch enables welding, and a cylinder enables clamping and pressing. In this case, the working center point of the end effector may deviate in position and orientation from the flange end center. To ensure the robot can accurately perform tasks, the tool coordinate system needs to be redefined.

[0004] In related technologies, a calibration operator moves an end effector mounted on the flange end of a robot to a reference point at the tip of a calibration needle. This reference point corresponds to different orientations, such as horizontal rotation of 0 degrees, ±60 degrees, and ±60 degrees. Using Tool0 as the reference coordinate system, the end effector is controlled to grip the calibration part and teach a pre-set reference point. Based on the deviation between the calibration part's position and the reference point, the tool coordinates are redefined. However, the accuracy of the tool coordinates determined by this method depends on the machining accuracy of the calibration needle and the visual accuracy of different calibration operators, resulting in low tool coordinate precision.

[0005] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] This invention provides a tool coordinate positioning method, terminal device, and computer-readable storage medium for a four-axis robot, aiming to solve the technical problem of low tool coordinate accuracy.

[0007] To achieve the above objectives, embodiments of the present invention provide a tool coordinate positioning method for a four-axis robot, the tool coordinate positioning method for a four-axis robot comprising the following: The four-axis robot acquires an image of the first calibration part after moving it to the first reference point, and an image of the second calibration part after moving it to the second reference point. The coordinates of the first reference point and the second reference point are the same, and the difference in rotation angle between the first reference point and the second reference point is 180 degrees. Obtain the first pixel coordinates of the center point of the calibration component in the first calibration component image, and the second pixel coordinates of the center point of the calibration component in the second calibration component image; Based on the first pixel coordinates and the second pixel coordinates, determine the compensation value for the tool coordinates; The initial tool coordinates of the four-axis robot are adjusted according to the compensation value, and the target tool coordinates of the four-axis robot are determined.

[0008] Optionally, the steps of acquiring the first image of the calibration part after the four-axis robot moves the calibration part to the first reference point, and the second image of the calibration part after the four-axis robot moves the calibration part to the second reference point, include the following: Determine the relative positional deviation between the flange end center and the end effector center of the four-axis robot; The initial tool coordinates of the four-axis robot are determined based on the relative position deviation.

[0009] Optionally, the step of determining the relative positional deviation between the flange end center and the end effector center of the four-axis robot includes: Obtain a first mechanism diagram of the four-axis robot and a second mechanism diagram of the end effector; Based on the first and second mechanism diagrams, determine the relative positional deviation between the flange end center and the end effector center of the four-axis robot; The initial tool coordinates of the four-axis robot are determined based on the relative position deviation.

[0010] Optionally, the step of determining the compensation value of the tool coordinates based on the first pixel coordinates and the second pixel coordinates includes: Determine the difference between the first pixel coordinates and the second pixel coordinates; The initial compensation value for the tool coordinates is determined based on the difference. The compensation value for the tool coordinates is determined based on the mapping relationship of the initial compensation value.

[0011] Optionally, the step of determining the initial compensation value of the tool coordinates based on the difference includes, after which: Determine whether the initial compensation value is within the preset deviation range; If the initial compensation value is not within the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation value is executed; If the initial compensation value is within the preset deviation range, the initial tool coordinates will be determined as the target tool coordinates of the four-axis robot.

[0012] Optionally, after the step of adjusting the initial tool coordinates of the four-axis robot according to the compensation value and determining the target tool coordinates of the four-axis robot, the method further includes: Continue executing the steps of obtaining the first image of the calibration part after the four-axis robot moves the calibration part to the first reference point and the second image of the calibration part after the four-axis robot moves the calibration part to the second reference point for a preset number of times, and obtain each initial compensation value corresponding to the preset number of times; When a preset number of the initial compensation values ​​are outside the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation values ​​continues; When all the initial compensation values ​​are within the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation values ​​ends.

[0013] Optionally, the steps of acquiring a first image of the calibration component after the four-axis robot moves the calibration component to the first reference point, and a second image of the calibration component after the four-axis robot moves the calibration component to the second reference point, include: The end effector of the four-axis robot is controlled to move the calibration component to the first reference point; Based on the image acquisition device, an image of the first calibration part is acquired after the end effector of the four-axis robot moves the calibration part to the first reference point; The end effector of the four-axis robot is controlled to move the calibration component to the second reference point; Based on the image acquisition device, an image of the second calibration component is acquired after the end effector of the four-axis robot moves the calibration component to the second reference point.

[0014] Optionally, before the step of acquiring a first image of the calibration component after the end effector of the quadcopter has moved the calibration component to the first reference point based on the image acquisition device, and / or before the step of acquiring a second image of the calibration component after the end effector of the quadcopter has moved the calibration component to the second reference point based on the image acquisition device, the following steps are further included: Upon receiving an evacuation order, determine the safe location corresponding to the evacuation order; Control the four-axis robot to release the calibration component and move it to the safe position corresponding to the evacuation command.

[0015] In addition, to achieve the above objectives, the present invention also provides a four-axis robot, the four-axis robot comprising: a memory, a processor, and a tool coordinate positioning program of the four-axis robot stored in the memory and executable on the processor, wherein when the tool coordinate positioning program of the four-axis robot is executed by the processor, it implements the steps of the tool coordinate positioning method of the four-axis robot as described above.

[0016] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a tool coordinate positioning program for a four-axis robot, wherein when the tool coordinate positioning program for the four-axis robot is executed by a processor, the tool coordinate positioning program for the four-axis robot implements the steps of the tool coordinate positioning method for the four-axis robot as described above.

[0017] An embodiment of this invention proposes a tool coordinate positioning method for a four-axis robot, comprising a terminal device and a computer-readable storage medium. The method acquires a first image of the calibration part after the four-axis robot moves it to a first reference point, and a second image of the calibration part after the four-axis robot moves it to a second reference point. The first and second reference points have the same coordinates, and the rotation angle difference between the first and second reference points is 180 degrees. Then, the method acquires the first pixel coordinates of the center point of the calibration part in the first image and the second pixel coordinates of the center point of the calibration part in the second image. Based on the first and second pixel coordinates, a compensation value for the tool coordinates is determined. The initial tool coordinates of the four-axis robot are then adjusted according to the compensation value to determine the target tool coordinates. This invention, by identifying the pixel coordinates of the center point of the calibration part in the calibration part image and determining the compensation value for the tool coordinates based on the pixel coordinates, does not require high precision of the calibration part, and the positioning process does not require manual intervention, thus improving the accuracy of the tool coordinates. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating an embodiment of the tool coordinate positioning method for a four-axis robot according to the present invention; Figure 2 This is a detailed flowchart of step S10 in the second embodiment of the tool coordinate positioning method for a four-axis robot of the present invention. Figure 3 This is a detailed flowchart of step S50 in the second embodiment of the tool coordinate positioning method for a four-axis robot of the present invention. Figure 4 This is a detailed flowchart of step S30 in the third embodiment of the tool coordinate positioning method for a four-axis robot of the present invention. Figure 5 This is another detailed flowchart of step S40 in the fourth embodiment of the tool coordinate positioning method for a four-axis robot of the present invention; Figure 6 This is a flowchart illustrating the tool coordinate positioning involved in the present invention; Figure 7 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of the present invention.

[0019] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0020] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0021] In related technologies, a calibration operator moves the end effector, mounted on the flange end of the robot, to a reference point at the tip of a calibration needle. This reference point corresponds to different orientations, such as horizontal rotation of 0 degrees, ±60 degrees, and ±60 degrees. Using Tool0 as the reference coordinate system, the end effector is controlled to grip the calibration part and teach a pre-set reference point. The tool coordinates are then redefined based on the deviation between the calibration part's position and the reference point. However, the accuracy of the tool coordinates determined by this method depends on the machining accuracy of the calibration needle and the visual accuracy of different calibration operators, leading to the technical problem of low tool coordinate accuracy.

[0022] To address the aforementioned deficiencies in related technologies, this invention proposes a tool coordinate positioning method for a four-axis robot, the main steps of which include the following: The invention acquires a first image of the calibration component after the four-axis robot moves it to a first reference point, and a second image of the calibration component after the four-axis robot moves it to a second reference point. The coordinates of the first and second reference points are the same, and the rotation angle difference between the first and second reference points is 180 degrees. Then, the first pixel coordinate of the center point of the calibration component in the first image and the second pixel coordinate of the center point of the calibration component in the second image are acquired. Based on the first and second pixel coordinates, a compensation value for the tool coordinates is determined. The initial tool coordinates of the four-axis robot are then adjusted according to the compensation value to determine the target tool coordinates. This invention improves the accuracy of the tool coordinates by identifying the pixel coordinates of the center point of the calibration component in the calibration component image and determining the compensation value of the tool coordinates based on the pixel coordinates. It does not require high precision from the calibration component, and the positioning process does not require manual intervention.

[0023] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the invention to those skilled in the art.

[0024] The tool coordinate system is a coordinate system defined relative to the robot's end effector. It describes the precise position and orientation of the end effector relative to the robot's base coordinate system, enabling accurate control of the end effector's position and orientation during robot operations. The four-axis robot coordinate system consists of the X-axis, Y-axis, Z-axis, and the rotational axis R-axis. Therefore, the tool coordinate system of a four-axis robot includes position and orientation components. Position components are typically represented in three-dimensional Cartesian coordinates, i.e., (x, y, z). These components describe the translational position of the end effector in the base coordinate system, where x represents the horizontal displacement, y represents the vertical displacement, and z represents the height or depth of the end effector relative to the base coordinate system. Orientation components describe the rotational orientation of the end effector. Common representation methods are Euler angles or quaternions. For example, Euler angles typically use roll, pitch, and yaw to describe the rotational angles of the end effector about the x, y, and z axes.

[0025] Reference Figure 1 In one embodiment of the tool coordinate positioning method for a four-axis robot of the present invention, the tool coordinate positioning method for a four-axis robot includes the following steps: Step S10: Obtain the first image of the calibration part after the four-axis robot moves the calibration part to the first reference point, and the second image of the calibration part after the four-axis robot moves the calibration part to the second reference point, wherein the coordinates of the first reference point and the second reference point are the same, and the rotation angle difference between the first reference point and the second reference point is 180 degrees. In this embodiment, the executing entity is a four-axis robot. The present invention pre-configures an image acquisition device in the tool coordinate positioning area and sets a first reference point and a second reference point within the field of view of the image acquisition device. The first and second reference points have the same coordinates, and their rotation angle difference is 180 degrees. Then, an end effector is installed at the flange end of the four-axis robot, and the end effector is controlled to grasp and move the calibration part to the first reference point. An image of the calibration part after it has moved to the first reference point is acquired through the image acquisition device. Then, the end effector is controlled to grasp and move the calibration part to the second reference point, and an image of the calibration part after it has moved to the second reference point is acquired through the image acquisition device.

[0026] Optionally, the four-axis robot can be controlled to grasp the calibration part at the calibration part grasping position and move it to the first reference point. An image of the calibration part after it has moved to the first reference point is acquired via an image acquisition device. Then, the robot can be controlled to grasp the calibration part at the calibration part grasping position and move it to the second reference point. A second image of the calibration part after it has moved to the second reference point is acquired via the image acquisition device. Alternatively, after acquiring the first image of the calibration part after it has moved to the first reference point, the four-axis robot can be directly controlled to move the calibration part from the first reference point to the second reference point. This embodiment does not specifically limit this approach.

[0027] For example, the coordinates of the first reference point can be set to (1,1,1) with a rotation angle of 0 degrees within the field of view of the image acquisition device, and the coordinates of the second reference point can be set to (1,1,1) with a rotation angle of 180 degrees. Then, the end effector of the four-axis robot is sequentially controlled to grasp the calibration part at the calibration part grasping position and move it to the first reference point and the second reference point. The image acquisition device is used to acquire the first image of the calibration part after it has moved to the first reference point, and the second image of the calibration part after it has moved to the second reference point.

[0028] Optionally, after the quadcopter moves the calibration component to the first reference point, if it is detected that the quadcopter is obstructing the field of view of the image acquisition device, a withdrawal command is issued to the quadcopter. This withdrawal command includes the coordinates of a safe position. Upon receiving the withdrawal command, the quadcopter parses it to determine the coordinates of the safe position, then controls the quadcopter to release the calibration component and move to the coordinates corresponding to the safe position. Finally, the image of the first calibration component is acquired through the image acquisition device. Similarly, after the quadcopter moves the calibration component to the second reference point, if it is detected that the quadcopter is obstructing the field of view of the image acquisition device, a withdrawal command is issued to the quadcopter. This withdrawal command includes the coordinates of a safe position. Upon receiving the withdrawal command, the quadcopter parses it to determine the coordinates of the safe position, then controls the quadcopter to release the calibration component and move to the coordinates corresponding to the safe position. Finally, the image of the second calibration component is acquired through the image acquisition device. It is understood that the safe position is outside the field of view of the image acquisition device and will not obstruct its field of view.

[0029] Step S20: Obtain the first pixel coordinates of the center point of the calibration component in the first calibration component image, and the second pixel coordinates of the center point of the calibration component in the second calibration component image; Step S30: Determine the compensation value of the tool coordinates based on the first pixel coordinates and the second pixel coordinates; In this embodiment, the present invention identifies the calibration component in the first calibration component image and the second calibration component image, and obtains the first pixel coordinates of the center point of the calibration component in the first calibration component image and the second pixel coordinates of the center point of the calibration component in the second calibration component image. Based on the first and second pixel coordinates, the compensation value of the tool coordinates is determined. By acquiring the calibration component image through an image acquisition device and determining the pixel coordinates of the center point of the calibration component in the calibration component image, no manual intervention is required, and there are no requirements on the accuracy of the calibration component. This improves the accuracy of the compensation value of the tool coordinates, thereby improving the precision of the tool coordinates.

[0030] Step S40: Adjust the initial tool coordinates of the four-axis robot according to the compensation value, and determine the target tool coordinates of the four-axis robot.

[0031] In this embodiment, the initial tool coordinates can be the center of the flange end of the four-axis robot or a preset coordinate system; this embodiment does not specifically limit this. It is understood that when controlling the four-axis robot to move to the first reference point and the second reference point, the initial tool coordinates are used as the reference coordinate system.

[0032] For example, after determining the compensation values ​​as Δx1 and Δy1, the target tool coordinates are obtained by performing corresponding addition and subtraction operations with the initial tool coordinates x and y according to the positive and negative signs of Δx1 and Δy1.

[0033] In the technical solution provided in this embodiment, a first image of the calibration part after the four-axis robot moves the calibration part to a first reference point, and a second image of the calibration part after the four-axis robot moves the calibration part to a second reference point are acquired. The coordinates of the first and second reference points are the same, and the rotation angle difference between the first and second reference points is 180 degrees. Then, the first pixel coordinates of the center point of the calibration part in the first image and the second pixel coordinates of the center point of the calibration part in the second image are acquired. Based on the first and second pixel coordinates, a compensation value for the tool coordinates is determined. The initial tool coordinates of the four-axis robot are then adjusted according to the compensation value to determine the target tool coordinates of the four-axis robot. This invention identifies the pixel coordinates of the center point of the calibration part in the calibration part image and determines the compensation value of the tool coordinates based on the pixel coordinates. It does not require high precision from the calibration part, and the positioning process does not require manual intervention, thus improving the accuracy of the tool coordinates.

[0034] Reference Figure 2 In the second embodiment, based on the first embodiment described above, the step S10 includes the following steps: Step S50: Determine the relative positional deviation between the center of the flange end of the four-axis robot and the center of the end effector; Step S60: Determine the initial tool coordinates of the four-axis robot based on the relative position deviation.

[0035] In this embodiment, to improve the efficiency of tool coordinate positioning, the default tool coordinates of the four-axis robot can be adjusted first by determining the relative positional deviation between the center of the flange end of the four-axis robot and the center of the end effector, thus determining the initial tool coordinates. Then, based on the initial tool coordinates, the step of controlling the end effector of the four-axis robot to move the calibration part to the first reference point is executed, and based on the image acquisition device, the first image of the calibration part after the end effector moves the calibration part to the first reference point is acquired, further adjusting the initial tool coordinates, thereby improving the accuracy of the tool coordinates.

[0036] Optionally, refer to Figure 3 The step of determining the relative positional deviation between the flange end center and the end effector center of the four-axis robot includes: Step S51: Obtain the first mechanism diagram of the four-axis robot and the second mechanism diagram of the end effector; Step S52: Determine the relative positional deviation between the flange end center of the four-axis robot and the end effector center based on the first mechanism diagram and the second mechanism diagram; In this embodiment, the mechanism diagram is a graphical model that records the geometric shape, size and dimensional information, material properties, connection and joint information of the target object. This invention obtains a first mechanism diagram of the four-axis robot and a second mechanism diagram of the end effector, and inputs these diagrams into simulation software. The simulation software uses the information from the first and second mechanism diagrams to simulate the end effector being installed at the flange end of the four-axis robot, thereby calculating the relative coordinate deviation between the end effector and the center of the flange end.

[0037] Optionally, the first mechanism drawing can be a CAD (Computer-Aided Design Drawing) of the four-axis robot, and the second mechanism drawing can be a CAD drawing of the end effector. Relative coordinate deviations can be calculated using CAD-based 3D modeling software or CAE-based simulation software, such as SolidWorks, CATIA, and Pro / Engineer.

[0038] Step S60: Determine the initial tool coordinates of the four-axis robot based on the relative position deviation.

[0039] In this embodiment, the present invention adjusts the default tool coordinates of the four-axis robot based on the relative coordinate deviation to obtain the initial tool coordinates. It is understood that the default tool coordinate system of the four-axis robot is the center of the flange end. By fine-tuning the default tool coordinates in advance and using them as the initial tool coordinates, the deviation between the initial tool coordinates and the target tool coordinates can be reduced, thereby reducing the number of tool coordinate positioning operations, improving the efficiency of tool coordinate positioning, and improving the accuracy of the tool coordinates.

[0040] For example, after determining the relative position deviations as Δx and Δy, the initial tool coordinates are obtained by performing corresponding addition and subtraction operations with the default tool coordinates x and y according to the positive and negative signs of Δx and Δy.

[0041] Alternatively, in another optional embodiment, the four-axis robot can directly receive the relative position deviation between the center of the flange end and the center of the end effector input by the user, and then adjust the default tool coordinates based on the relative position deviation to determine the initial tool coordinates. This embodiment does not specifically limit this.

[0042] In the technical solution provided in this embodiment, by determining the relative positional deviation between the flange end center and the end effector center of the four-axis robot, and then determining the initial tool coordinates of the four-axis robot based on the relative positional deviation, and based on the initial tool coordinates, executing the step of controlling the end effector of the four-axis robot to move the calibration part to the first reference point, and acquiring the first calibration part image after the end effector moves the calibration part to the first reference point based on the image acquisition device, the initial tool coordinates are further adjusted to determine the final target tool coordinates, thereby improving the accuracy of the tool coordinates.

[0043] Reference Figure 4 In the third embodiment, based on any of the above embodiments, step S30 includes: Step S31: Determine the difference between the first pixel coordinates and the second pixel coordinates; Step S32: Determine the initial compensation value for the tool coordinates based on the difference; In this embodiment, the first pixel coordinates and the second pixel coordinates can be subtracted to obtain the difference. Then, half of the difference is calculated, and this half of the difference is used as the initial compensation value for the tool coordinates. It can be understood that half of the difference is the result of dividing the difference by 2.

[0044] Step S33: Determine the compensation value of the tool coordinates according to the mapping relationship of the initial compensation value.

[0045] In this embodiment, initial compensation values ​​determined based on the pixel coordinates of the image and corresponding compensation values ​​in the real physical environment can be pre-stored to obtain the mapping relationship between the initial compensation values ​​and the compensation values. Then, after obtaining the initial compensation values, the compensation values ​​associated with the initial compensation values ​​can be found in the mapping relationship, and the initial tool coordinates can be adjusted according to the compensation values ​​to obtain the target tool coordinates.

[0046] It is understandable that since the first and second pixel coordinates are image coordinates, not coordinates in the real physical environment, after determining the initial compensation value based on the first and second pixel coordinates, it is necessary to convert them into compensation values ​​in the real physical environment, so as to adjust the initial tool coordinates according to the compensation value and obtain the target tool coordinates.

[0047] Alternatively, in another optional embodiment, after obtaining the first pixel coordinates and the second pixel coordinates, they can be directly converted into the first coordinates and the second coordinates in the real physical environment. Then, the first coordinates and the second coordinates are subtracted to calculate the difference. Half of the difference is then calculated, and half of the difference is used as the compensation value for the tool coordinates without creating a mapping relationship. This embodiment does not specifically limit this.

[0048] Optionally, after the step of determining the difference between the first pixel coordinates and the second pixel coordinates, it can be determined whether the initial compensation value is within a preset deviation range. If the initial compensation value is not within the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation value is executed. If the initial compensation value is within the preset deviation range, the initial tool coordinates are determined as the target tool coordinates of the four-axis robot.

[0049] In this embodiment, a preset deviation range for the initial compensation value can be established to determine whether the accuracy of the target tool coordinates meets the construction accuracy requirements. When the initial compensation value is within the preset deviation range, it indicates that the accuracy of the initial tool coordinates of the current four-axis robot meets the construction accuracy requirements, and no adjustment is needed; the initial tool coordinates of the current four-axis robot can be directly used as the target tool coordinates. When the initial compensation value is outside the preset deviation range, it indicates that the accuracy of the initial tool coordinates of the current four-axis robot does not meet the construction accuracy requirements, and therefore, the initial tool coordinates need to be adjusted according to the initial compensation value to obtain the target tool coordinates that meet the construction accuracy requirements. For example, the preset deviation range can be set to 1-2 pixel units according to the construction accuracy requirements.

[0050] In the technical solution provided in this embodiment, the difference between the first pixel coordinate and the second pixel coordinate is determined, and then the initial compensation value of the tool coordinate is determined based on the difference. Based on the mapping relationship of the initial compensation value, the compensation value of the tool coordinate is determined, and then the initial tool coordinate of the four-axis robot is adjusted based on the compensation value to determine the target tool coordinate of the four-axis robot, thereby improving the accuracy of the target tool coordinate.

[0051] Reference Figure 5 In the fourth embodiment, based on any of the above embodiments, step S40 is followed by: Step S100: Continue to execute the steps of obtaining the first image of the calibration part after the four-axis robot moves the calibration part to the first reference point and the second image of the calibration part after the four-axis robot moves the calibration part to the second reference point for a preset number of times, and obtain each initial compensation value corresponding to the preset number of times; In this embodiment, to determine whether the accuracy of the target tool coordinates meets the construction accuracy requirements, the four-axis robot is controlled to perform tool coordinate positioning a preset number of times, and the initial compensation value determined based on the pixel coordinates is obtained each time, so as to determine whether the adjusted target tool coordinates meet the construction accuracy requirements based on the initial compensation value.

[0052] Step S110: When a preset number of the initial compensation values ​​are not within the preset deviation range, continue to execute the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation values; In this embodiment, when a preset number of initial compensation values ​​are outside the preset deviation range, it indicates that the target tool coordinates of the current four-axis robot do not meet the construction accuracy requirements and have a high error rate. The target tool coordinates need to be adjusted further based on the initial compensation values ​​until the construction accuracy requirements are met. The preset number can be set to one or more; this embodiment does not specifically limit this.

[0053] Step S120: When all the initial compensation values ​​are within the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation values ​​ends.

[0054] In this embodiment, when all initial compensation values ​​are within the preset deviation range, it indicates that the current target tool coordinates meet the construction accuracy requirements, and the positioning of the tool coordinates can be terminated. Alternatively, when a preset number of initial compensation values ​​are not within the preset deviation range, it indicates that the target tool coordinates meet the construction accuracy requirements and have a low error rate, thus the positioning of the tool coordinates can be accepted.

[0055] Example, see reference Figure 6 , Figure 6This is a flowchart illustrating the tool coordinate positioning involved in the present invention. The present invention can pre-determine initial tool coordinates. After determining the initial tool coordinates, a first reference point and a second reference point are set within the field of view of an image acquisition device. This controls the end effector of the four-axis robot to grasp and move the calibration part to the first reference point, and acquires a first image of the calibration part after it has moved to the first reference point using the image acquisition device. Then, the end effector of the four-axis robot is controlled to grasp and move the calibration part to the second reference point, and a second image of the calibration part after it has moved to the second reference point using the image acquisition device. Then, the first pixel coordinates of the center point of the calibration part in the first calibration part image and the second pixel coordinates of the center point of the calibration part in the second calibration part image are acquired. By determining the compensation value of the tool coordinates based on the first and second pixel coordinates, the initial tool coordinates of the four-axis robot are adjusted according to the compensation value, thereby determining the target tool coordinates of the four-axis robot. After the tool coordinates are determined, to determine whether the tool coordinates meet the construction accuracy requirements, the tool coordinate positioning is performed a preset number of times, and the initial compensation value determined based on the pixel coordinates is obtained. Then, based on whether the initial compensation value is within the preset deviation range, it is determined whether the target tool coordinates meet the construction accuracy requirements. If the target tool coordinates meet the construction accuracy requirements, the tool coordinate positioning ends. If the construction accuracy requirements are not met, the tool coordinate positioning continues until the determined target tool coordinates meet the construction accuracy requirements, thereby improving the accuracy of the target tool coordinates.

[0056] In the technical solution provided in this embodiment, after adjusting the initial tool coordinates of the four-axis robot according to the compensation value and determining the target tool coordinates of the four-axis robot, the steps of obtaining the first calibration part image after the four-axis robot moves the calibration part to the first reference point and the second calibration part image after the four-axis robot moves the calibration part to the second reference point are executed a preset number of times, and each initial compensation value corresponding to the preset number of times is obtained. When there are a preset number of initial compensation values ​​that are not within the preset deviation range, the steps of determining the compensation value of the tool coordinates according to the mapping relationship of the initial compensation values ​​are executed to ensure that the target tool coordinates meet the construction accuracy requirements and have a low error rate.

[0057] Reference Figure 7 , Figure 7 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of the present invention.

[0058] In this embodiment of the invention, the terminal can be a robot.

[0059] like Figure 7As shown, the terminal may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, an input unit, etc., and optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or stable non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0060] Those skilled in the art will understand that Figure 7 The terminal structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0061] like Figure 7 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a tool coordinate positioning program for a four-axis robot.

[0062] exist Figure 7 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and communicate with it; the processor 1001 can be used to call the tool coordinate positioning program of the four-axis robot stored in the memory 1005 and perform the following operations: The four-axis robot acquires an image of the first calibration part after moving it to the first reference point, and an image of the second calibration part after moving it to the second reference point. The coordinates of the first reference point and the second reference point are the same, and the difference in rotation angle between the first reference point and the second reference point is 180 degrees. Obtain the first pixel coordinates of the center point of the calibration component in the first calibration component image, and the second pixel coordinates of the center point of the calibration component in the second calibration component image; Based on the first pixel coordinates and the second pixel coordinates, determine the compensation value for the tool coordinates; The initial tool coordinates of the four-axis robot are adjusted according to the compensation value, and the target tool coordinates of the four-axis robot are determined.

[0063] Furthermore, the processor 1001 can call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and also perform the following operations: Determine the relative positional deviation between the flange end center and the end effector center of the four-axis robot; The initial tool coordinates of the four-axis robot are determined based on the relative position deviation.

[0064] Obtain a first mechanism diagram of the four-axis robot and a second mechanism diagram of the end effector; Based on the first and second mechanism diagrams, determine the relative positional deviation between the flange end center and the end effector center of the four-axis robot; The initial tool coordinates of the four-axis robot are determined based on the relative position deviation.

[0065] Furthermore, the processor 1001 can call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and also perform the following operations: Determine the difference between the first pixel coordinates and the second pixel coordinates; The initial compensation value for the tool coordinates is determined based on the difference. The compensation value for the tool coordinates is determined based on the mapping relationship of the initial compensation value.

[0066] Furthermore, the processor 1001 can call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and also perform the following operations: Determine whether the initial compensation value is within the preset deviation range; If the initial compensation value is not within the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation value is executed; If the initial compensation value is within the preset deviation range, the initial tool coordinates will be determined as the target tool coordinates of the four-axis robot.

[0067] Furthermore, the processor 1001 can call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and also perform the following operations: Continue executing the steps of obtaining the first image of the calibration part after the four-axis robot moves the calibration part to the first reference point and the second image of the calibration part after the four-axis robot moves the calibration part to the second reference point for a preset number of times, and obtain each initial compensation value corresponding to the preset number of times; When a preset number of the initial compensation values ​​are outside the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation values ​​continues; When all the initial compensation values ​​are within the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation values ​​ends.

[0068] Furthermore, the processor 1001 can call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and also perform the following operations: The end effector of the four-axis robot is controlled to move the calibration component to the first reference point; Based on the image acquisition device, an image of the first calibration part is acquired after the end effector of the four-axis robot moves the calibration part to the first reference point; The end effector of the four-axis robot is controlled to move the calibration component to the second reference point; Based on the image acquisition device, an image of the second calibration component is acquired after the end effector of the four-axis robot moves the calibration component to the second reference point.

[0069] Furthermore, the processor 1001 can call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and also perform the following operations: Upon receiving an evacuation order, determine the safe location corresponding to the evacuation order; Control the four-axis robot to release the calibration component and move it to the safe position corresponding to the evacuation command.

[0070] In addition, to achieve the above objectives, the present invention also provides a four-axis robot, the four-axis robot comprising: a memory, a processor, and a tool coordinate positioning program of the four-axis robot stored in the memory and executable on the processor, wherein when the tool coordinate positioning program of the four-axis robot is executed by the processor, it implements the steps of the tool coordinate positioning method of the four-axis robot as described above.

[0071] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a tool coordinate positioning program for a four-axis robot, wherein when the tool coordinate positioning program for the four-axis robot is executed by a processor, the tool coordinate positioning program for the four-axis robot implements the steps of the tool coordinate positioning method for the four-axis robot as described above.

[0072] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0073] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0074] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (robot) to execute the methods described in the various embodiments of the present invention.

[0075] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A tool coordinate positioning method for a four-axis robot, characterized in that, The tool coordinate positioning method for the four-axis robot includes: The system acquires a first image of the calibration component after the four-axis robot picks up and moves it to a first reference point, and a second image of the calibration component after the four-axis robot moves it to a second reference point. The first and second reference points have the same coordinates, and the rotation angle difference between them is 180 degrees. An image acquisition device is pre-configured in the tool coordinate positioning area. The first and second reference points are within the field of view of the image acquisition device. When the four-axis robot is detected to be obstructing the field of view of the image acquisition device, the system controls the four-axis robot to drop the calibration component based on a withdrawal command and moves the four-axis robot outside the field of view. Obtain the first pixel coordinates of the center point of the calibration component in the first calibration component image, and the second pixel coordinates of the center point of the calibration component in the second calibration component image; Based on the first pixel coordinates and the second pixel coordinates, a compensation value for the tool coordinates is determined, including determining the difference between the first pixel coordinates and the second pixel coordinates; determining an initial compensation value for the tool coordinates based on the difference; and determining the compensation value for the tool coordinates based on the mapping relationship of the initial compensation value. The initial tool coordinates of the four-axis robot are adjusted according to the compensation value, and the target tool coordinates of the four-axis robot are determined.

2. The method as described in claim 1, characterized in that, The steps preceding the acquisition of the first image of the calibration part after the four-axis robot has grasped and moved the calibration part to the first reference point, and the second image of the calibration part after the four-axis robot has moved the calibration part to the second reference point, include: Determine the relative positional deviation between the flange end center and the end effector center of the four-axis robot; The initial tool coordinates of the four-axis robot are determined based on the relative position deviation.

3. The method as described in claim 2, characterized in that, The step of determining the relative positional deviation between the flange end center and the end effector center of the four-axis robot includes: Obtain a first mechanism diagram of the four-axis robot and a second mechanism diagram of the end effector; Based on the first and second mechanism diagrams, determine the relative positional deviation between the flange end center and the end effector center of the four-axis robot; The initial tool coordinates of the four-axis robot are determined based on the relative position deviation.

4. The method as described in claim 1, characterized in that, The step of determining the initial compensation value of the tool coordinates based on the difference is followed by: Determine whether the initial compensation value is within the preset deviation range; If the initial compensation value is not within the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation value is executed; If the initial compensation value is within the preset deviation range, the initial tool coordinates will be determined as the target tool coordinates of the four-axis robot.

5. The method as described in claim 4, characterized in that, After the step of adjusting the initial tool coordinates of the four-axis robot according to the compensation value and determining the target tool coordinates of the four-axis robot, the method further includes: Continue executing the steps of obtaining the first image of the calibration part after the four-axis robot grabs and moves the calibration part to the first reference point, and the second image of the calibration part after the four-axis robot moves the calibration part to the second reference point, for a preset number of times, and obtain each initial compensation value corresponding to the preset number of times; When a preset number of the initial compensation values ​​are outside the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation values ​​continues; When all the initial compensation values ​​are within the preset deviation range, the step of determining the compensation value of the tool coordinates based on the mapping relationship of the initial compensation values ​​ends.

6. The method as described in claim 1, characterized in that, The steps of acquiring the first image of the calibration part after the four-axis robot has grasped and moved the calibration part to the first reference point, and the second image of the calibration part after the four-axis robot has moved the calibration part to the second reference point, include: The end effector of the four-axis robot is controlled to move the calibration component to the first reference point; Based on the image acquisition device, an image of the first calibration part is acquired after the end effector of the four-axis robot moves the calibration part to the first reference point; The end effector of the four-axis robot is controlled to move the calibration component to the second reference point; Based on the image acquisition device, an image of the second calibration component is acquired after the end effector of the four-axis robot moves the calibration component to the second reference point.

7. A four-axis robot, characterized in that, The four-axis robot includes: a memory, a processor, and a tool coordinate positioning program for the robot stored in the memory and executable on the processor. When the tool coordinate positioning program is executed by the processor, it implements the steps of the tool coordinate positioning method for the four-axis robot as described in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a tool coordinate positioning program for the robot, which, when executed by a processor, implements the steps of the tool coordinate positioning method for a four-axis robot as described in any one of claims 1 to 6.