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

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

Info

Publication number
CN117733849A
CN117733849A CN202311769891.2A CN202311769891A CN117733849A CN 117733849 A CN117733849 A CN 117733849A CN 202311769891 A CN202311769891 A CN 202311769891A CN 117733849 A CN117733849 A CN 117733849A
Authority
CN
China
Prior art keywords
axis robot
calibration piece
tool
determining
compensation value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311769891.2A
Other languages
Chinese (zh)
Inventor
孙传路
王新福
郭连超
乔海涛
顾金泰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Inc
Original Assignee
Goertek Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Inc filed Critical Goertek Inc
Priority to CN202311769891.2A priority Critical patent/CN117733849A/en
Publication of CN117733849A publication Critical patent/CN117733849A/en
Pending legal-status Critical Current

Links

Landscapes

  • Manipulator (AREA)

Abstract

The invention discloses a tool coordinate positioning method of a four-axis robot, the robot and a storage medium, wherein the method comprises the following steps: acquiring a first calibration piece image after a four-axis robot moves a calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point, wherein the coordinates of the first datum point and the second datum point are the same, and the rotation angle difference between the first datum point and the second datum 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 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, so that the precision of the tool coordinates can be improved.

Description

Tool coordinate positioning method of four-axis robot, robot and storage medium
Technical Field
The invention relates to the technical field of automatic control, in particular to a tool coordinate positioning method of a four-axis robot, the robot and a storage medium.
Background
The robot coordinate system is mainly divided into a joint coordinate system, a rectangular coordinate system, a tool coordinate system and a user coordinate system. Wherein the tool coordinate system is a coordinate system defined with respect to the end effector of the robot, and is used to describe the exact position and attitude of the end effector of the robot with respect to the robot base coordinate system, so that the position and attitude of the end effector can be precisely controlled when the robot is operated.
The robot has a default Tool coordinate system (Tool 0) at the factory, and the position is at the center of the flange end. However, in actual movement, the mechanical arm of the robot often installs tools such as a sucker, a welding gun, a cylinder and the like at the center of the tail end of the flange as an end effector for performing different tasks and operations. For example, the object grabbing and carrying can be realized by installing the sucking disc, the welding operation can be performed by installing the welding gun, and the clamping and pressing can be realized by installing the air cylinder. At this time, there may be a deviation in position and posture between the working center point of the end effector and the flange end center, and in order to ensure that the robot can accurately perform the task, it is necessary to re-determine the tool coordinates.
In the related art, an end effector mounted at the flange end of a robot is moved by a calibration person to a calibration needle tip reference point corresponding to different poses, for example, 0 degrees of horizontal rotation, plus 60 degrees, minus 60 degrees. And using Tool0 as a reference coordinate system, controlling the end effector to clamp the calibration piece, teaching a preset reference point, and accordingly, redefining the Tool coordinate according to the deviation between the position of the calibration piece and the reference point. However, the accuracy of the tool coordinates determined based on the above method depends on the calibration needle processing accuracy and the human eye visual accuracy of different calibration personnel, resulting in low accuracy of the tool coordinates.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The embodiment of the invention aims to solve the technical problem of low tool coordinate precision by providing a tool coordinate positioning method, terminal equipment and a computer readable storage medium of a four-axis robot.
In order to achieve the above object, an embodiment of the present invention provides a tool coordinate positioning method of a four-axis robot, including:
Acquiring a first calibration piece image after a four-axis robot moves a calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point, wherein the coordinates of the first datum point and the second datum point are the same, and the rotation angle difference between the first datum point and the second datum 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 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.
Optionally, the step of acquiring a first calibration piece image after the four-axis robot moves the calibration piece to the first reference point and a second calibration piece image after the four-axis robot moves the calibration piece to the second reference point includes:
determining the relative position deviation of the center of the flange tail end of the four-axis robot and the center of the tail end actuator;
And determining the initial tool coordinates of the four-axis robot according to the relative position deviation.
Optionally, the step of determining a relative positional deviation of the flange end center of the four-axis robot from the end effector center includes:
acquiring a first mechanical diagram of the four-axis robot and acquiring a second mechanical diagram of the end effector;
determining the relative position deviation of the center of the flange tail end of the four-axis robot and the center of the tail end actuator according to the first mechanical diagram and the second mechanical diagram;
and determining the initial tool coordinates of the four-axis robot according to the relative position deviation.
Optionally, the step of determining the compensation value of the tool coordinate according to the first pixel coordinate and the second pixel coordinate includes:
determining a difference between the first pixel coordinate and the second pixel coordinate;
determining an initial compensation value of the tool coordinate according to the difference value;
and determining the compensation value of the tool coordinate according to the mapping relation of the initial compensation value.
Optionally, the step of determining an initial compensation value for the tool coordinates from the difference value comprises:
determining whether the initial compensation value is within a preset deviation range;
If the initial compensation value is not in the preset deviation range, executing the step of determining the compensation value of the tool coordinate according to the mapping relation of the initial compensation value;
and if the initial compensation value is in the preset deviation range, determining the initial tool coordinate as the target tool coordinate of the four-axis robot.
Optionally, after the step of determining the target tool coordinates of the four-axis robot, adjusting the initial tool coordinates of the four-axis robot according to the compensation value, the method further includes:
continuously executing the steps of acquiring a first calibration piece image after the four-axis robot moves the calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point for preset times, and acquiring initial compensation values corresponding to the preset times;
when a preset number of the initial compensation values are not in the preset deviation range, continuing to execute the step of determining the compensation values of the tool coordinates according to the mapping relation of the initial compensation values;
and when each initial compensation value is in the preset deviation range, ending the step of executing the compensation value determining the tool coordinates according to the mapping relation of the initial compensation values.
Optionally, the step of acquiring a first calibration piece image after the four-axis robot moves the calibration piece to the first reference point and a second calibration piece image after the four-axis robot moves the calibration piece to the second reference point includes:
controlling an end effector of the four-axis robot to move the calibration piece to the first datum point;
acquiring a first calibration piece image after the end effector of the four-axis robot moves the calibration piece to the first datum point based on an image acquisition device;
controlling an end effector of the four-axis robot to move the calibration piece to the second reference point;
and acquiring a second calibration piece image after the end effector of the four-axis robot moves the calibration piece to the second datum point based on the image acquisition device.
Optionally, before the step of acquiring the first calibration piece image after the calibration piece is moved to the first reference point by the end effector of the four-axis robot based on the image acquisition device, and/or before the step of acquiring the second calibration piece image after the calibration piece is moved to the second reference point by the end effector of the four-axis robot based on the image acquisition device, the method further comprises:
When an evacuation instruction is received, determining a safety position corresponding to the evacuation instruction;
and controlling the four-axis robot to release the calibration piece and move to a safety position corresponding to the evacuation instruction.
In addition, in order to achieve the above object, the present invention also provides a four-axis robot including: the method comprises the steps of a memory, a processor and a tool coordinate positioning program of a four-axis robot, wherein the tool coordinate positioning program of the four-axis robot is stored in the memory and can run on the processor, and the tool coordinate positioning program of the four-axis robot is executed by the processor to realize the tool coordinate positioning method of the four-axis robot.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a tool coordinate positioning program of a four-axis robot, which when executed by a processor, implements the steps of the tool coordinate positioning method of a four-axis robot as described above.
According to the tool coordinate positioning method of the four-axis robot, terminal equipment and a computer readable storage medium, a first calibration piece image after the four-axis robot moves a calibration piece to a first datum point is obtained, and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point is obtained, wherein the coordinates of the first datum point and the second datum point are the same, the rotation angle difference between the first datum point and the second datum point is 180 degrees, then a first pixel coordinate of a central point of the calibration piece in the first calibration piece image is obtained, and a second pixel coordinate of the central point of the calibration piece in the second calibration piece image is obtained, and a compensation value of the tool coordinate is determined according to the first pixel coordinate and the second pixel coordinate, so that an initial tool coordinate of the four-axis robot is adjusted according to the compensation value, and a target tool coordinate of the four-axis robot is determined. According to the method, the pixel coordinates of the center point of the calibration piece in the image of the calibration piece are identified, the compensation value of the tool coordinates is determined based on the pixel coordinates, the precision of the calibration piece is not required, manual participation is not needed in the positioning process, and the precision of the tool coordinates can be improved.
Drawings
FIG. 1 is a flow chart of an embodiment of a method for positioning tool coordinates of a four-axis robot according to the present invention;
FIG. 2 is a detailed flowchart of step S10 in a second embodiment of the tool coordinate positioning method of the four-axis robot according to the present invention;
FIG. 3 is a detailed flowchart of step S50 in a second embodiment of the tool coordinate positioning method of the four-axis robot according to the present invention;
FIG. 4 is a schematic diagram of another refinement of step S30 in a third embodiment of the tool coordinate positioning method of the four-axis robot according to the present invention;
FIG. 5 is another detailed flowchart of step S40 in a fourth embodiment of the tool coordinate positioning method of the four-axis robot of the present invention;
FIG. 6 is a flow chart of tool coordinate positioning according to the present invention;
fig. 7 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Since in the related art, an end effector mounted at the flange end of the robot is moved to a calibration needle tip reference point by a calibration person, the calibration needle tip reference point corresponds to different postures, for example, 0 degree of horizontal rotation, plus 60 degrees, minus 60 degrees. And using Tool0 as a reference coordinate system, controlling the end effector to clamp the calibration piece, teaching a preset reference point, and accordingly, redefining the Tool coordinate according to the deviation between the position of the calibration piece and the reference point. However, the accuracy of the tool coordinates determined based on the above method depends on the calibration needle processing accuracy and the human eye visual accuracy of different calibration personnel, resulting in a technical problem that the accuracy of the tool coordinates is low.
In order to solve the above-mentioned drawbacks in the related art, the present invention provides a tool coordinate positioning method of a four-axis robot, which mainly comprises the following steps:
the method comprises the steps of obtaining a first calibration piece image after a four-axis robot moves a calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point, wherein the coordinates of the first datum point and the coordinates of the second datum point are the same, the rotation angle difference between the first datum point and the second datum point is 180 degrees, obtaining a first pixel coordinate of a central point of the calibration piece in the first calibration piece image and a second pixel coordinate of the central 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 accordingly adjusting the initial tool coordinate of the four-axis robot according to the compensation value, and determining a target tool coordinate of the four-axis robot. According to the method, the pixel coordinates of the center point of the calibration piece in the image of the calibration piece are identified, the compensation value of the tool coordinates is determined based on the pixel coordinates, the precision of the calibration piece is not required, manual participation is not needed in the positioning process, and the precision of the tool coordinates can be improved.
In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The tool coordinate system is a coordinate system defined with respect to the end effector of the robot for describing the exact position and attitude of the end effector of the robot with respect to the robot base coordinate system so that the position and attitude of the end effector can be precisely controlled when the robot is operated. Wherein the four-axis robot coordinates are composed of an X-axis, a Y-axis, a Z-axis, and a rotation axis R-axis, so that the tool coordinates of the four-axis robot include a position component and an attitude component. The position component is 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 displacement of the end effector in the horizontal direction, y represents the displacement of the end effector in the vertical direction, and z represents the height or depth of the end effector relative to the base coordinate system. The attitude component is used to describe the rotational attitude of the end effector. A common representation is euler angles or quaternions. For example, euler angles generally use roll, pitch, and yaw to describe the angle of rotation of an end effector about x, y, and z axes.
Referring to fig. 1, in an embodiment of a tool coordinate positioning method of a four-axis robot according to the present invention, the tool coordinate positioning method of a four-axis robot includes the steps of:
step S10: acquiring a first calibration piece image after a four-axis robot moves a calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point, wherein the coordinates of the first datum point and the second datum point are the same, and the rotation angle difference between the first datum point and the second datum point is 180 degrees;
in the present embodiment, the execution body is a four-axis robot. The invention configures an image acquisition device in a tool coordinate positioning area in advance, and sets a first datum point and a second datum point in the visual field range of the image acquisition device, wherein the coordinates of the first datum point and the second datum point are the same, and the rotation angle difference value is 180 degrees. And then the end effector is arranged at the tail end of the flange of the four-axis robot, the end effector of the four-axis robot is controlled to grasp the calibration piece and move to the first datum point, and the image acquisition device is used for acquiring a first calibration piece image after the calibration piece moves to the first datum point. And then controlling an end effector of the four-axis robot to grasp the calibration piece and move the calibration piece to a second datum point, and acquiring a second calibration piece image after the calibration piece moves to the second datum point through an image acquisition device.
Optionally, the four-axis robot can be controlled to grasp the calibration piece at the grabbing position of the calibration piece and move to the first datum point, the image acquisition device is used for acquiring a first calibration piece image after the calibration piece moves to the first datum point, then the robot is controlled to grasp the calibration piece at the grabbing position of the calibration piece and move to the second datum point, and the image acquisition device is used for acquiring a second calibration piece image after the calibration piece moves to the second datum point. Or after the image of the first calibration piece after the calibration piece moves to the first reference point is acquired by the image acquisition device, the four-axis robot is directly controlled to move the calibration piece of the first reference point to the second reference point, which is not particularly limited in this embodiment.
For example, the coordinates of the first reference point may be set to (1, 1), the rotation angle may be set to 0 degrees, the coordinates of the second reference point may be set to (1, 1), and the rotation angle may be set to 180 degrees in the field of view of the image capturing apparatus. And then sequentially controlling an end effector of the four-axis robot to grasp the calibration piece at the calibration piece grabbing position and move the calibration piece to the first datum point and the second datum point, acquiring a first calibration piece image after the calibration piece moves to the first datum point through an image acquisition device, and acquiring a second calibration piece image after the calibration piece moves to the second datum point.
Optionally, after the four-axis robot moves the calibration piece to the first reference point, if the four-axis robot is detected to block the visual field range of the image acquisition device, an evacuation instruction is generated to the four-axis robot, wherein the evacuation instruction comprises coordinates of the safety position. When the four-axis robot receives the evacuation instruction, analyzing the evacuation instruction to determine the coordinate corresponding to the safety position, controlling the four-axis robot to release the calibration piece, moving the calibration piece to the coordinate corresponding to the safety position, and acquiring a first calibration piece image through the image acquisition device. Similarly, after the four-axis robot moves the calibration piece to the second reference point, if the four-axis robot is detected to block the visual field range of the image acquisition device, an evacuation instruction is generated to the four-axis robot, wherein the evacuation instruction comprises coordinates of a safety position. When the four-axis robot receives the evacuation instruction, analyzing the evacuation instruction to determine the coordinate corresponding to the safety position, controlling the four-axis robot to release the calibration piece, moving the calibration piece to the coordinate corresponding to the safety position, and acquiring a second calibration piece image through the image acquisition device. It will be appreciated that the safe position is not within the field of view of the image capture device and does not obstruct the field of view of the image capture device.
Step S20: 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;
step S30: determining a compensation value of a tool coordinate according to the first pixel coordinate and the second pixel coordinate;
in this embodiment, the method identifies the calibration piece of the first calibration piece image and the second calibration piece image, and obtains the first pixel coordinate of the center point of the calibration piece in the first calibration piece image and the second pixel coordinate of the center point of the calibration piece in the second calibration piece image, so as to determine the compensation value of the tool coordinate according to the first pixel coordinate and the second pixel coordinate. The image acquisition device is used for acquiring the image of the calibration piece, determining the pixel coordinate of the center point of the calibration piece in the image of the calibration piece, and having no need of manual participation and no requirement on the precision of the calibration piece, and can improve the accuracy of the compensation value of the tool coordinate, thereby improving the precision of the tool coordinate.
Step S40: and 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.
In this embodiment, the initial tool coordinates may be the center of the flange end of the four-axis robot, or may be preset coordinates, which is not specifically limited in this embodiment. It will be appreciated that the control of the four-axis robot to move to the first datum point and the second datum point takes the initial tool coordinates as a reference coordinate system.
For example, after determining that the compensation values are Δx1 and Δy1, respectively, the target tool coordinates are obtained by performing corresponding addition and subtraction operations with x and y of the initial tool coordinates according to positive and negative identifiers of Δx1 and Δy1.
In the technical scheme provided by the embodiment, a first calibration piece image after the four-axis robot moves the calibration piece to the first reference point and a second calibration piece image after the four-axis robot moves the calibration piece to the second reference point are obtained, wherein the coordinates of the first reference point and the coordinates of the second reference point are the same, the rotation angle difference between the first reference point and the second reference point is 180 degrees, then a first pixel coordinate of a central point of the calibration piece in the first calibration piece image and a second pixel coordinate of the central point of the calibration piece in the second calibration piece image are obtained, and a compensation value of the tool coordinate is determined according to the first pixel coordinate and the second pixel coordinate, so that the initial tool coordinate of the four-axis robot is adjusted according to the compensation value, and the target tool coordinate of the four-axis robot is determined. According to the method, the pixel coordinates of the center point of the calibration piece in the image of the calibration piece are identified, the compensation value of the tool coordinates is determined based on the pixel coordinates, the precision of the calibration piece is not required, manual participation is not needed in the positioning process, and the precision of the tool coordinates can be improved.
Referring to fig. 2, in a second embodiment, based on the above-described first embodiment, the step S10 includes, before:
step S50: determining the relative position deviation of the center of the flange tail end of the four-axis robot and the center of the tail end actuator;
step S60: and determining the initial tool coordinates of the four-axis robot according to the relative position deviation.
In this embodiment, to improve the efficiency of positioning the tool coordinates, the default tool coordinates of the four-axis robot may be adjusted by determining the relative position deviation between the center of the flange end of the four-axis robot and the center of the end effector, determining the initial tool coordinates, then, based on the initial tool coordinates, performing the step of controlling the end effector of the four-axis robot to move the calibration piece to the first reference point, and based on the image acquisition device, acquiring the first calibration piece image after the end effector moves the calibration piece to the first reference point, and further adjusting the initial tool coordinates, thereby improving the precision of the tool coordinates.
Optionally, referring to fig. 3, the step of determining a relative positional deviation of a flange end center of the four-axis robot from an end effector center includes:
Step S51: acquiring a first mechanical diagram of the four-axis robot and a second mechanical diagram of an end effector;
step S52: determining the relative position deviation of the center of the flange tail end of the four-axis robot and the center of the tail end actuator according to the first mechanical diagram and the second mechanical diagram;
in the present embodiment, the mechanical diagram is a diagram model in which geometric shape, size, and scale information, material properties, connection, joint information, and the like of the target object are recorded. According to the invention, the first mechanical diagram of the four-axis robot and the second mechanical diagram of the end effector are acquired, the first mechanical diagram and the second mechanical diagram are input into simulation software, the simulation software simulates the end effector to be arranged at the flange end of the four-axis robot through the information of the first mechanical diagram and the second mechanical diagram, and therefore the relative coordinate deviation between the end effector and the center of the flange end is calculated.
Alternatively, the first mechanical drawing may be a CAD (Computer-aided design drawing) drawing of a four-axis robot and the second mechanical drawing may be a CAD drawing of the end effector. The relative coordinate deviations may be calculated using CAD-based three-dimensional modeling software or CAE-based simulation software, such as simulation software of SolidWorks, CATIA, pro/Engineer, etc.
Step S60: and determining the initial tool coordinates of the four-axis robot according to the relative position deviation.
In this embodiment, the present invention adjusts the default tool coordinates of the four-axis robot according to the relative coordinate deviation, thereby obtaining the initial tool coordinates. It will be appreciated that the default tool coordinate system for a four-axis robot is the center of the flange tip. By finely adjusting the default tool coordinates in advance and taking the default tool coordinates as the initial tool coordinates, the deviation between the initial tool coordinates and the target tool coordinates can be reduced, so that the number of times of positioning the tool coordinates is reduced, the efficiency of positioning the tool coordinates is improved, and the precision of the tool coordinates is improved.
For example, after determining that the relative positional deviation is Δx and Δy, corresponding addition and subtraction operations are performed with x and y of the default tool coordinates according to positive and negative identifiers of Δx and Δy, thereby obtaining the initial tool coordinates.
Alternatively, in another alternative embodiment, the four-axis robot may directly receive the relative positional deviation of 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 positional deviation, thereby determining the initial tool coordinates, which is not specifically limited in this embodiment.
In the technical scheme provided by the embodiment, through determining the relative position deviation between the center of the flange end of the four-axis robot and the center of the end effector, then determining the initial tool coordinate of the four-axis robot according to the relative position deviation, executing the steps of controlling the end effector of the four-axis robot to move the calibration piece to the first datum point based on the initial tool coordinate, acquiring a first calibration piece image after the end effector moves the calibration piece to the first datum point based on the image acquisition device, further adjusting the initial tool coordinate, determining the final target tool coordinate and improving the precision of the tool coordinate.
Referring to fig. 4, in a third embodiment, based on any of the above embodiments, the step S30 includes:
step S31: determining a difference between the first pixel coordinate and the second pixel coordinate;
step S32: determining an initial compensation value of the tool coordinate according to the difference value;
in this embodiment, the first pixel coordinate and the second pixel coordinate may be subtracted, and a difference value may be calculated. The half of the difference is then calculated, thereby determining the half of the difference as the initial compensation value for the tool coordinates. It will be appreciated that the half of the difference is the result of dividing the difference by 2.
Step S33: and determining the compensation value of the tool coordinate according to the mapping relation of the initial compensation value.
In this embodiment, the initial compensation value determined based on the pixel coordinates of the image and the compensation value corresponding to the initial compensation value in the real physical environment may be stored in advance, thereby acquiring the mapping relationship between the initial compensation value and the compensation value. And further, after the initial compensation value is obtained, the compensation value associated with the initial compensation value can be searched in the mapping relation, so that the initial tool coordinate is adjusted according to the compensation value, and the target tool coordinate is obtained.
It will be appreciated that since the first pixel coordinates and the second pixel coordinates are image coordinates and not coordinates in the real physical environment, after the initial compensation value is determined according to the first pixel coordinates and the second pixel coordinates, the initial compensation value needs to be converted into a compensation value in the real physical environment, so that the initial tool coordinates are adjusted according to the compensation value to obtain the target tool coordinates.
Alternatively, in another alternative embodiment, after the first pixel coordinate and the second pixel coordinate are obtained, the first pixel coordinate and the second pixel coordinate may be directly converted into the first coordinate and the second coordinate in the real physical environment, then the first coordinate and the second coordinate are subtracted, a difference value is obtained by calculation, and half of the difference value is calculated, so that the half of the difference value is determined as the compensation value of the tool coordinate, without creating a mapping relation, which is not specifically limited in this embodiment.
Optionally, after the step of determining the difference between the first pixel coordinate and the second pixel coordinate, it may be determined whether an 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 coordinate according to the mapping relation of the initial compensation value is performed, and if the initial compensation value is within the preset deviation range, the initial tool coordinate is determined as the target tool coordinate of the four-axis robot.
In this embodiment, a preset deviation range of the initial compensation value may be preset, so as to determine whether the accuracy of the target tool coordinates meets the construction accuracy requirement. When the initial compensation value is in a preset deviation range, the precision of the initial tool coordinate representing the current four-axis robot meets the construction precision requirement, and the initial tool coordinate of the current four-axis robot can be directly used as a target tool coordinate without adjustment. When the initial compensation value is not in the preset deviation range, the precision of the initial tool coordinate representing the current four-axis robot does not meet the construction precision requirement, so that the initial tool coordinate needs to be adjusted according to the initial compensation value, and the target tool coordinate meeting the construction precision requirement is obtained. For example, the preset deviation range may be set to 1-2 pixel units according to the construction accuracy requirement.
In the technical scheme provided by the embodiment, the difference value of the first pixel coordinate and the second pixel coordinate is determined, and then the initial compensation value of the tool coordinate is determined according to the difference value, so that the compensation value of the tool coordinate is determined according to the mapping relation of the initial compensation value, and then the initial tool coordinate of the four-axis robot is adjusted according to the compensation value, and the target tool coordinate of the four-axis robot is determined, so that the precision of the target tool coordinate is improved.
Referring to fig. 5, in a fourth embodiment, based on any of the above embodiments, the step S40 further includes:
step S100: continuously executing the steps of acquiring a first calibration piece image after the four-axis robot moves the calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point for preset times, and acquiring initial compensation values corresponding to the preset times;
in this embodiment, to determine whether the accuracy of the target tool coordinate meets the construction accuracy requirement, the four-axis robot is continuously controlled to perform tool coordinate positioning for a preset number of times, and an initial compensation value determined according to the pixel coordinate each time is obtained, so as to determine whether the adjusted target tool coordinate meets the construction accuracy requirement according to the initial compensation value.
Step S110: when a preset number of the initial compensation values are not in the preset deviation range, continuing to execute the step of determining the compensation values of the tool coordinates according to the mapping relation of the initial compensation values;
in this embodiment, when there are a preset number of initial compensation values not in the preset deviation range, it indicates that the current target tool coordinate of the four-axis robot does not meet the construction precision requirement, and the error rate is high, and it is necessary to continuously adjust the target tool coordinate according to the initial compensation values until the construction precision requirement is met. The preset number may be set to one or more, and this embodiment is not particularly limited.
Step S120: and when each initial compensation value is in the preset deviation range, ending the step of executing the compensation value determining the tool coordinates according to the mapping relation of the initial compensation values.
In this embodiment, when all the initial compensation values are within the preset deviation range, it indicates that the current target tool coordinate meets the construction precision requirement, and positioning of the tool coordinate may be ended. Or when the preset number of initial compensation values are not in the preset deviation range, the target tool coordinate meets the construction precision requirement, and the error rate is low, so that the positioning of the tool coordinate is received.
By way of example, referring to fig. 6, fig. 6 is a flow chart of tool coordinate positioning according to the present invention. The invention can pre-determine the initial tool coordinates, and after the initial tool coordinates are determined, a first datum point and a second datum point are arranged in the visual field range of the image acquisition device, so that the end effector of the four-axis robot is controlled to grasp the first datum point and obtain a first calibration piece image after the calibration piece is moved to the first datum point through the image acquisition device, then the end effector of the four-axis robot is controlled to grasp the second datum point and obtain a second calibration piece image after the calibration piece is moved to the second datum point through the image acquisition device. And then, acquiring a first pixel coordinate of a central point of the calibration piece in the first calibration piece image and a second pixel coordinate of the central point of the calibration piece in the second calibration piece image, determining a compensation value of the 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 so as to determine a target tool coordinate of the four-axis robot. After the tool coordinates are determined, in order to determine whether the tool coordinates meet the construction precision requirement, the tool coordinates are continuously positioned for a preset number of times, and an initial compensation value determined according to the pixel coordinates is obtained, so that whether the target tool coordinates meet the construction precision requirement is judged according to whether the initial compensation value is in a preset deviation range, the tool coordinates are positioned after the target tool coordinates meet the construction precision requirement, if the target tool coordinates do not meet the construction precision requirement, the tool coordinates are continuously positioned until the determined target tool coordinates meet the construction precision requirement, and the precision effect of the target tool coordinates is improved.
In the technical solution provided in this embodiment, after the step of adjusting the initial tool coordinates of the four-axis robot according to the compensation values and determining the target tool coordinates of the four-axis robot, the step of obtaining the first calibration piece image after the four-axis robot moves the calibration piece to the first reference point and the step of obtaining the second calibration piece image after the four-axis robot moves the calibration piece to the second reference point are continuously performed for a preset number of times, and each initial compensation value corresponding to the preset number of times is obtained.
Referring to fig. 7, fig. 7 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a robot.
As shown in fig. 7, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), an input unit, etc., and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 7 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 7, an operating system, a network communication module, a user interface module, and a tool coordinate positioning program of the four-axis robot may be included in a memory 1005 as one type of computer storage medium.
In the terminal shown in fig. 7, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the processor 1001 may be configured to call a tool coordinate positioning program of the four-axis robot stored in the memory 1005, and perform the following operations:
acquiring a first calibration piece image after a four-axis robot moves a calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point, wherein the coordinates of the first datum point and the second datum point are the same, and the rotation angle difference between the first datum point and the second datum 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 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.
Further, the processor 1001 may call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and further perform the following operations:
determining the relative position deviation of the center of the flange tail end of the four-axis robot and the center of the tail end actuator;
and determining the initial tool coordinates of the four-axis robot according to the relative position deviation.
Acquiring a first mechanical diagram of the four-axis robot and acquiring a second mechanical diagram of the end effector;
determining the relative position deviation of the center of the flange tail end of the four-axis robot and the center of the tail end actuator according to the first mechanical diagram and the second mechanical diagram;
and determining the initial tool coordinates of the four-axis robot according to the relative position deviation.
Further, the processor 1001 may call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and further perform the following operations:
Determining a difference between the first pixel coordinate and the second pixel coordinate;
determining an initial compensation value of the tool coordinate according to the difference value;
and determining the compensation value of the tool coordinate according to the mapping relation of the initial compensation value.
Further, the processor 1001 may call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and further perform the following operations:
determining whether the initial compensation value is within a preset deviation range;
if the initial compensation value is not in the preset deviation range, executing the step of determining the compensation value of the tool coordinate according to the mapping relation of the initial compensation value;
and if the initial compensation value is in the preset deviation range, determining the initial tool coordinate as the target tool coordinate of the four-axis robot.
Further, the processor 1001 may call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and further perform the following operations:
continuously executing the steps of acquiring a first calibration piece image after the four-axis robot moves the calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point for preset times, and acquiring initial compensation values corresponding to the preset times;
When a preset number of the initial compensation values are not in the preset deviation range, continuing to execute the step of determining the compensation values of the tool coordinates according to the mapping relation of the initial compensation values;
and when each initial compensation value is in the preset deviation range, ending the step of executing the compensation value determining the tool coordinates according to the mapping relation of the initial compensation values.
Further, the processor 1001 may call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and further perform the following operations:
controlling an end effector of the four-axis robot to move the calibration piece to the first datum point;
acquiring a first calibration piece image after the end effector of the four-axis robot moves the calibration piece to the first datum point based on an image acquisition device;
controlling an end effector of the four-axis robot to move the calibration piece to the second reference point;
and acquiring a second calibration piece image after the end effector of the four-axis robot moves the calibration piece to the second datum point based on the image acquisition device.
Further, the processor 1001 may call the tool coordinate positioning program of the four-axis robot stored in the memory 1005, and further perform the following operations:
When an evacuation instruction is received, determining a safety position corresponding to the evacuation instruction;
and controlling the four-axis robot to release the calibration piece and move to a safety position corresponding to the evacuation instruction.
In addition, in order to achieve the above object, the present invention also provides a four-axis robot including: the method comprises the steps of a memory, a processor and a tool coordinate positioning program of a four-axis robot, wherein the tool coordinate positioning program of the four-axis robot is stored in the memory and can run on the processor, and the tool coordinate positioning program of the four-axis robot is executed by the processor to realize the tool coordinate positioning method of the four-axis robot.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a tool coordinate positioning program of a four-axis robot, which when executed by a processor, implements the steps of the tool coordinate positioning method of a four-axis robot as described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (robot) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The tool coordinate positioning method of the four-axis robot is characterized by comprising the following steps of:
Acquiring a first calibration piece image after a four-axis robot moves a calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point, wherein the coordinates of the first datum point and the second datum point are the same, and the rotation angle difference between the first datum point and the second datum 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 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.
2. The method of claim 1, wherein the step of acquiring a first calibration piece image after the four-axis robot moves the calibration piece to the first reference point and a second calibration piece image after the four-axis robot moves the calibration piece to the second reference point is preceded by the steps of:
determining the relative position deviation of the center of the flange tail end of the four-axis robot and the center of the tail end actuator;
And determining the initial tool coordinates of the four-axis robot according to the relative position deviation.
3. The method of claim 2, wherein the step of determining the relative positional offset of the center of the flange end of the four-axis robot from the center of the end effector comprises:
acquiring a first mechanical diagram of the four-axis robot and acquiring a second mechanical diagram of the end effector;
determining the relative position deviation of the center of the flange tail end of the four-axis robot and the center of the tail end actuator according to the first mechanical diagram and the second mechanical diagram;
and determining the initial tool coordinates of the four-axis robot according to the relative position deviation.
4. The method of claim 1, wherein the step of determining a compensation value for tool coordinates from the first pixel coordinates and the second pixel coordinates comprises:
determining a difference between the first pixel coordinate and the second pixel coordinate;
determining an initial compensation value of the tool coordinate according to the difference value;
and determining the compensation value of the tool coordinate according to the mapping relation of the initial compensation value.
5. The method of claim 4, wherein the step of determining an initial compensation value for tool coordinates from the difference value comprises:
Determining whether the initial compensation value is within a preset deviation range;
if the initial compensation value is not in the preset deviation range, executing the step of determining the compensation value of the tool coordinate according to the mapping relation of the initial compensation value;
and if the initial compensation value is in the preset deviation range, determining the initial tool coordinate as the target tool coordinate of the four-axis robot.
6. The method of claim 5, wherein the step of adjusting the initial tool coordinates of the four-axis robot based on the compensation value, and determining the target tool coordinates of the four-axis robot further comprises, after:
continuously executing the steps of acquiring a first calibration piece image after the four-axis robot moves the calibration piece to a first datum point and a second calibration piece image after the four-axis robot moves the calibration piece to a second datum point for preset times, and acquiring initial compensation values corresponding to the preset times;
when a preset number of the initial compensation values are not in the preset deviation range, continuing to execute the step of determining the compensation values of the tool coordinates according to the mapping relation of the initial compensation values;
And when each initial compensation value is in the preset deviation range, ending the step of executing the compensation value determining the tool coordinates according to the mapping relation of the initial compensation values.
7. The method of claim 1, wherein the step of acquiring a first calibration piece image after the four-axis robot moves the calibration piece to the first reference point and a second calibration piece image after the four-axis robot moves the calibration piece to the second reference point comprises:
controlling an end effector of the four-axis robot to move the calibration piece to the first datum point;
acquiring a first calibration piece image after the end effector of the four-axis robot moves the calibration piece to the first datum point based on an image acquisition device;
controlling an end effector of the four-axis robot to move the calibration piece to the second reference point;
and acquiring a second calibration piece image after the end effector of the four-axis robot moves the calibration piece to the second datum point based on the image acquisition device.
8. The method of claim 7, wherein before the step of acquiring a first calibration piece image after the calibration piece has been moved to the first reference point by the end effector of the four-axis robot based on the image acquisition device and/or before the step of acquiring a second calibration piece image after the calibration piece has been moved to the second reference point by the end effector of the four-axis robot based on the image acquisition device, further comprises:
When an evacuation instruction is received, determining a safety position corresponding to the evacuation instruction;
and controlling the four-axis robot to release the calibration piece and move to a safety position corresponding to the evacuation instruction.
9. A four-axis robot, the four-axis robot comprising: a memory, a processor and a positioning program of tool coordinates of a robot stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the four-axis robot tool coordinate positioning method according to any one of claims 1 to 8.
10. A computer-readable storage medium, wherein a positioning program of tool coordinates of a robot is stored on the computer-readable storage medium, which when executed by a processor, implements the steps of the tool coordinate positioning method of a four-axis robot according to any one of claims 1 to 8.
CN202311769891.2A 2023-12-21 2023-12-21 Tool coordinate positioning method of four-axis robot, robot and storage medium Pending CN117733849A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311769891.2A CN117733849A (en) 2023-12-21 2023-12-21 Tool coordinate positioning method of four-axis robot, robot and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311769891.2A CN117733849A (en) 2023-12-21 2023-12-21 Tool coordinate positioning method of four-axis robot, robot and storage medium

Publications (1)

Publication Number Publication Date
CN117733849A true CN117733849A (en) 2024-03-22

Family

ID=90258935

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311769891.2A Pending CN117733849A (en) 2023-12-21 2023-12-21 Tool coordinate positioning method of four-axis robot, robot and storage medium

Country Status (1)

Country Link
CN (1) CN117733849A (en)

Similar Documents

Publication Publication Date Title
CN111482959B (en) Automatic hand-eye calibration system and method of robot motion vision system
US10695910B2 (en) Automatic calibration method for robot system
JP4271232B2 (en) Apparatus, method, program, and recording medium for executing offline programming of robot
CN111331592B (en) Mechanical arm tool center point correcting device and method and mechanical arm system
CN106767393B (en) Hand-eye calibration device and method for robot
JP3946711B2 (en) Robot system
CN107428009B (en) Method for commissioning an industrial robot, industrial robot system and control system using the method
JP2018126857A (en) Control method of robot, teaching method of the robot, robot system, program, and recording medium
US11130236B2 (en) Robot movement teaching apparatus, robot system, and robot controller
CN112123341B (en) Robot double-arm coordinated motion control method and device and electronic equipment
JP2015147280A (en) robot calibration method
JP6885856B2 (en) Robot system and calibration method
CN108687767B (en) Offline programming device and offline programming method
CN114310880A (en) Mechanical arm calibration method and device
US20220203517A1 (en) Non-transitory storage medium and method and system of creating control program for robot
CN115446847A (en) System and method for improving 3D eye-hand coordination accuracy of a robotic system
CN113524201A (en) Active adjusting method and device for pose of mechanical arm, mechanical arm and readable storage medium
JP7323993B2 (en) Control device, robot system, operating method and program for control device
JP2022152845A (en) Calibration device for controlling robot
JP7112528B2 (en) Work coordinate creation device
CN117733849A (en) Tool coordinate positioning method of four-axis robot, robot and storage medium
WO2023013740A1 (en) Robot control device, robot control system, and robot control method
US20230356405A1 (en) Robot control system, and control device
JP7366264B2 (en) Robot teaching method and robot working method
JP7309592B2 (en) Robot curved surface scanning control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination