Workpiece positioning method, device and equipment
Through the two adjustments of the workpiece between workstations and the use of pixel coordinate information, the problem of workpiece position deviation is solved, the accuracy of the robotic arm's grabbing and placement is improved, the equipment accuracy requirements are reduced, and the efficiency of the production process is ensured.
Patent Information
- Application Number
- CN202410855846.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-08-23
AI Technical Summary
In industrial production, positional deviations may occur when workpieces move between workstations, causing the robot arm to fail to place them accurately after grabbing them, affecting production efficiency and processing accuracy.
Through the first adjustment when the workpiece is grabbed and moved from the first station to the second station, and the second adjustment is moved from the second station to the third station, the preset compensation values and pixel coordinates are used Information, control the robotic arm to perform precise position correction, reducing the impact of the inherent error of the robotic arm.
It improves the accuracy of workpiece positioning and movement, reduces the requirements for equipment accuracy, and ensures the smooth progress of subsequent processing.
Smart Images

Figure CN118528275A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of workpiece positioning, and relate to but are not limited to a workpiece positioning method, device, and equipment. Background Art
[0002] In the production process of industrial products, workpieces are placed in different stations according to production needs. In order to improve production efficiency, robotic arm technology is widely used in modern production lines to move workpieces from one station to another for necessary processing, and after processing, the workpiece is returned to the original station or transferred to the next station to ensure the smooth progress of the production process. However, since the placement of the workpiece may deviate when it moves between stations, it may cause the robotic arm to grab the workpiece and not be able to accurately place it in the designated processing station. Therefore, accurate positioning of the workpiece becomes a key link in achieving efficient and accurate movement operations. Summary of the invention
[0003] In view of this, the present application discloses a workpiece positioning method, device and equipment. The workpiece positioning method, device and equipment provided in the present application are implemented as follows:
[0004] The workpiece positioning method provided in the embodiment of the present application includes:
[0005] When the target workpiece is located at the first workstation, the robot arm is controlled to grab the target workpiece according to a preset first compensation value, and the target workpiece is moved to the second workstation;
[0006] When the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, a second compensation value is obtained, and the robot arm is controlled according to the second compensation value to move the target workpiece to be placed at the third workstation.
[0007] In some embodiments, when the target workpiece is located at the first workstation, controlling the robot arm to grab the target workpiece according to a preset first compensation value and moving the target workpiece to the second workstation includes:
[0008] When the target workpiece is located at a first workstation, a first image including the target workpiece is captured by a first camera, wherein the first camera is disposed at a position at a first preset distance from a plane where the first workstation is located;
[0009] According to the first image, obtaining first pixel coordinate information corresponding to the target workpiece in the first image;
[0010] According to the first pixel coordinate information and a preset first compensation value, the robot arm is controlled to grasp the target workpiece and move the target workpiece to a second station. The first compensation value is used to indicate a correction displacement of the robot arm grasping the target workpiece at the first station.
[0011] In some embodiments, when the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, obtaining a second compensation value, and controlling the robot arm to move the target workpiece to the third workstation according to the second compensation value include:
[0012] When the robot arm moves the target workpiece so that the target workpiece is located at a second workstation, a second image including the target workpiece is captured by a second camera, wherein the second camera is disposed at a second preset distance from a plane where the second workstation is located, and the second preset distance is smaller than the first preset distance;
[0013] According to the second image, obtaining second pixel coordinate information corresponding to the target workpiece in the second image;
[0014] According to the second pixel coordinate information and the preset template pixel coordinate information, the second compensation value is obtained, where the second compensation value is used to indicate the correction displacement of the robot arm to place the target workpiece at the third station, and the preset template pixel coordinate information is the pixel coordinate information of the sample workpiece at the second station obtained by the second camera when the robot arm grabs the preset position of the sample workpiece;
[0015] The robot arm is controlled to move the target workpiece to be placed at the third workstation according to the second compensation value.
[0016] In some embodiments, the preset first compensation value is determined by calculating the average of the differences between sample robot arm coordinate information corresponding to multiple sample workpieces at the first workstation and template robot arm coordinate information corresponding to the multiple sample workpieces, the sample robot arm coordinate information being the coordinate information of the multiple sample workpieces in the robot arm coordinate system when the multiple sample workpieces are located at the first workstation, and the template robot arm coordinate information being the coordinate information of the robot arm in the robot arm coordinate system when the robot arm grasps the multiple sample workpieces at the preset positions.
[0017] In some embodiments, the second workstation is a preset plane area in the process of the robot arm moving the workpiece from the first workstation to the third workstation, the optical axis of the second camera is perpendicular to the plane where the second workstation is located, the first image includes all image content of the target workpiece, and the second image includes at least part of the image content of the target workpiece.
[0018] In some embodiments, the first pixel coordinate information includes a first pixel horizontal coordinate, a first pixel vertical coordinate, and a first tilt angle of the target workpiece in the first image, and acquiring the first pixel coordinate information corresponding to the target workpiece in the first image according to the first image includes:
[0019] Performing image processing on the first image to obtain contour information corresponding to the target workpiece in the first image, wherein the image processing includes grayscale processing, binarization processing, and contour acquisition processing;
[0020] Determine the first pixel horizontal coordinate and the first pixel vertical coordinate according to the contour information and preset feature points, wherein the preset feature points include a center point or a preset vertex of the target workpiece;
[0021] Determine at least two feature areas corresponding to the target workpiece according to the contour information and preset feature extraction conditions, wherein the preset feature extraction conditions include a range interval and / or a ratio threshold;
[0022] The first tilt angle is determined according to the angles between the center points corresponding to the at least two feature areas and a reference straight line, where the reference straight line is a horizontal line or a vertical line in the first image.
[0023] In some embodiments, the second pixel coordinate information includes a second pixel horizontal coordinate, a second pixel vertical coordinate, and a second tilt angle of the target workpiece in the second image, and the target workpiece is a middle frame of a mobile phone. According to the second image, obtaining the second pixel coordinate information corresponding to the target workpiece in the second image includes:
[0024] Determine the second pixel horizontal coordinate and the second pixel vertical coordinate according to the intersection position of a first straight line extending from the first side of the target workpiece and a second straight line extending from the second side in the second image, wherein the first straight line and the second straight line are perpendicular to each other;
[0025] The second tilt angle is determined according to an angle between the first straight line and / or the second straight line and a reference straight line, where the reference straight line is a horizontal line or a vertical line in the second image.
[0026] In some embodiments, acquiring the second compensation value according to the second pixel coordinate information and preset template pixel coordinate information includes:
[0027] Determine, according to a preset second coordinate mapping relationship, a second robotic arm coordinate corresponding to the second pixel coordinate and robotic arm coordinate information corresponding to the template pixel coordinate information, wherein the second coordinate mapping relationship includes a mapping relationship between preset pixel coordinates and preset robotic arm coordinates in the second station;
[0028] The difference between the second mechanical arm coordinate and the mechanical arm coordinate information corresponding to the template pixel coordinate information is calculated to obtain the second compensation value.
[0029] The workpiece positioning device provided in the embodiment of the present application includes:
[0030] A first control module is used to control the robot arm to grab the target workpiece and move the target workpiece to the second workstation according to a preset first compensation value when the target workpiece is located at the first workstation;
[0031] The second control module is used to obtain a second compensation value when the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, and control the robot arm to move the target workpiece to be placed at the third workstation according to the second compensation value.
[0032] The computer device provided in the embodiment of the present application includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the method described in the embodiment of the present application is implemented.
[0033] The workpiece positioning method, device and computer equipment provided in the embodiments of the present application at least include the following
[0034] Beneficial effects:
[0035] By performing a first adjustment of grabbing and moving the target workpiece from the first station to the second station, and a second adjustment of moving the target workpiece from the second station to the third station, the present application adjusts the position of the target workpiece twice and then places it at the third station for subsequent processing. Compared with the problem in the traditional technology that a relatively large adjustment may affect the accuracy of workpiece placement due to the inherent error of the robot arm. The first adjustment of the present application is based on a pre-set first compensation value, and the positioning and adjustment processing efficiency is high. The second compensation value is obtained for the second adjustment. The adjustment amplitude of the target workpiece during this adjustment is smaller than the adjustment amplitude when only one adjustment is performed. It is less affected by the inherent error of the robot arm or the measurement error that may exist during the adjustment process, which improves the accuracy of workpiece positioning and movement, and at the same time reduces the accuracy requirements of the equipment required for workpiece positioning and movement to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0037] Figure 1 A schematic diagram of a flow chart of a workpiece positioning method provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of an application scenario of the workpiece positioning method provided in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of a first image and a second image provided in an embodiment of the present application;
[0040] Figure 4 Another schematic diagram of a workpiece positioning method provided in an embodiment of the present application;
[0041] Figure 5 A schematic diagram of obtaining first pixel coordinate information in the workpiece positioning method provided in an embodiment of the present application;
[0042] Figure 6 A schematic diagram of obtaining second pixel coordinate information in the workpiece positioning method provided in an embodiment of the present application;
[0043] Figure 7 A schematic diagram of obtaining a second coordinate mapping relationship in the workpiece positioning method provided in an embodiment of the present application;
[0044] Figure 8 A schematic diagram of a process of controlling a mechanical arm to grab a target workpiece at a first workstation in a workpiece positioning method provided in an embodiment of the present application;
[0045] Fig. 9 A schematic diagram of the structure of a workpiece positioning device provided in an embodiment of the present application;
[0046] Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0049] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0050] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0051] In the production process of industrial products, the application of robotic arm technology can greatly improve production efficiency. Through the flexible operation of the robotic arm, workpieces can be quickly and accurately transferred between various workstations, thus achieving an efficient production process. This automated transfer method not only optimizes the production process, but also effectively reduces dependence on manual operation and reduces labor costs.
[0052] However, in the process of moving the workpiece from one station to another, the placement of the workpiece may deviate due to various factors. In order to ensure the accurate placement of the workpiece in the processing equipment at different stations and the smooth progress of subsequent processing, accurate positioning of the workpiece is crucial. In related workpiece positioning technologies, due to certain inherent errors in the robot arm, such as mechanical aging or voltage changes, load changes, etc., there will be a certain difference in moving distance for each fixed distance moved. When the workpiece is moved a long distance at a time, the actual placement position of the workpiece may deviate from the ideal placement position, which is not conducive to the subsequent processing steps.
[0053] In addition, since the position and placement of the workpiece need to be determined before moving it, in order to achieve accurate positioning so that the effect after moving reaches the expected standard. For the common solution of determining the coordinate information of the workpiece through visual positioning, in order to achieve high-precision positioning and grasping of the workpiece by the robot arm, a higher-pixel camera is required, and then the visual positioning accuracy is improved by improving the camera pixel resolution. Since the cost of high-pixel cameras is higher than that of ordinary cameras, it undoubtedly increases the procurement cost of positioning equipment, which creates obstacles to the large-scale application of visual positioning equipment.
[0054] In view of this, an embodiment of the present application provides a workpiece positioning method, which reduces the position placement deviation that may be caused by the inherent error of the robot arm when only one workpiece position adjustment is performed, thereby improving the accuracy of workpiece positioning and movement.
[0055] See also Figure 1 , Figure 1 A schematic flow chart of a workpiece positioning method provided in an embodiment of the present application.
[0056] like Figure 1 As shown, the workpiece positioning method may include the following steps:
[0057] Step 101 : when a target workpiece is located at a first workstation, a robot arm is controlled to grab the target workpiece according to a preset first compensation value, and the target workpiece is moved to a second workstation.
[0058] In an embodiment of the present application, the robot arm can be controlled to grasp the target workpiece by a pre-set first compensation value. That is, for different workpieces, when the models of these workpieces are the same, there is no need to calculate a specific compensation value for each different workpiece, thereby improving the efficiency of positioning and moving the target workpiece.
[0059] It should be noted that the first station can be an assembly line for continuously transmitting workpieces in industrial production, or a processing station for processing workpieces, which is not limited here. The second station can be a loading platform outside the first station where the target workpiece for the first adjustment is placed, or a partial area in the area where the first station is located, which is not limited here.
[0060] Step 102 , when the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, a second compensation value is obtained, and the robot arm is controlled to move the target workpiece and place it at the third workstation according to the second compensation value.
[0061] In the embodiment of the present application, after the robot arm is controlled to grasp the target workpiece, when the robot arm moves the target workpiece so that the target workpiece is located at the second station, a second compensation value is obtained. The second compensation value needs to be determined according to the position of the target workpiece in the second station so as to achieve a more accurate grasping operation.
[0062] It should be noted that the third empty position may be a fixture table for subsequent processing of the target workpiece. Compared with the first and second workstations mentioned above, the third workstation has stricter requirements on the placement position and angle of the target workpiece.
[0063] It can be seen that by implementing the above method, even if there are certain errors in the robotic arm or positioning device such as a camera, since the first adjustment and the second adjustment are relatively independent and the second adjustment amplitude is smaller, the impact of the above error is also smaller, which can improve the accuracy of workpiece positioning and movement, and at the same time reduce the accuracy requirements of the equipment required for workpiece positioning and movement to a certain extent.
[0064] See also Figure 2 , Figure 2 A schematic diagram of an application scenario of the workpiece positioning method provided in the embodiment of the present application. Figure 2 As shown, in some embodiments, the workpiece positioning method provided by the present application can control the robot arm 40 to move the target workpiece 50 between the first station 10, the second station 20 and the third station 30. During the movement, the first camera 11 set at a first preset distance from the plane where the first station 10 is located and the second camera 21 set at a second preset distance from the plane where the second station 20 is located are used to complete the two positioning and adjustment of the target workpiece 50 at the two stations, thereby achieving accurate grasping and movement of the target workpiece 50.
[0065] In some embodiments, the first station 10 can be an assembly line for continuously transmitting workpieces in industrial production. Since the workpieces on the assembly line may be placed manually or by a simple mechanical structure, the placement position and angle of the workpieces may vary. When the robot arm 40 performs the operation of grabbing the workpieces, it is necessary to identify and adapt to the position and angle of these workpieces, combined with the preset first compensation value to ensure that each workpiece can be accurately grabbed. The first station 10 can also be a processing station for processing the workpiece, which is not limited here.
[0066] After the robot arm 40 successfully grabs the target workpiece 50 required for the current processing at the first workstation 10 , the robot arm 40 moves the target workpiece 50 to the second workstation 20 .
[0067] like Figure 1 As shown, in some embodiments, the second station 20 may be a designated area in the area where the first station 10 is located. In this way, by grabbing the target workpiece 50 from the first station 10 and placing it in the second station 20, the placement position and angle of the target workpiece 50 can be corrected, ensuring that the position and angle of the target workpiece 50 in the second station 20 are as close as possible to the position and angle of the sample workpiece at the second station 20, so as to provide a reference for the subsequent re-correction of the position of the target workpiece 50 and placing it in the third station 30. The position and angle of the sample workpiece at the second station 20 are obtained when the robot arm 40 moves the sample workpiece placed in the third station 30 and meets the placement success condition to the second station 20.
[0068] In other embodiments, the second station 20 may also be a designated area outside the area where the first station 10 is located. Exemplarily, the second station 20 is a designated area where the robot 40 grabs the target workpiece 50 and is determined according to preset robot arm coordinate information, for example, an air hovering area above the first station 10, or an air hovering area between the first station 10 and the third station 30. In this way, when the target workpiece 50 is located at the second station 20, since the second station 20 is a transitional station without a physical platform, there is no need to contact the target workpiece 50 with a physical surface, and there is no need to place or re-grasp the target workpiece 50. At the same time, it is conducive to setting the position of the second camera 21 more freely so that the second camera 21 can capture images that meet quality requirements.
[0069] Exemplarily, in some application embodiments, the target workpiece is positioned by a visual solution, and the position information of the target workpiece 50 in the first station 10 and the second station 20 is determined by two cameras respectively. The first camera 11 is set at a first preset distance from the plane where the first station 10 is located, and the second camera 21 is set at a second preset distance from the plane where the second station 20 is located, and the second preset distance is less than the first preset distance. According to the first image, the first pixel coordinate information corresponding to the target workpiece 50 in the first image can be obtained. According to the second image information, the second pixel coordinate information corresponding to the target workpiece 50 in the second image can be obtained according to the second image.
[0070] In some embodiments, the second workstation 20 is a preset plane area during the process of the robot arm 40 moving the workpiece from the first workstation 10 to the third workstation 30, the optical axis of the second camera 21 is perpendicular to the plane where the second workstation 20 is located, the first image includes all the image content of the target workpiece 50, and the second image includes at least part of the image content of the target workpiece 50.
[0071] See also Figure 3 , Figure 3 A schematic diagram of a first image and a second image provided in an embodiment of the present application. Figure 3 Part (a) is a first image captured by the first camera 11 when the target workpiece 50 is located at the first workstation 10 in one embodiment. Figure 3 Part (b) is a second image captured by the second camera 21 in this embodiment when the robot 40 moves the target workpiece 50 so that the target workpiece 50 is located at the second workstation 20 . Figure 3 Part (c) is a sample image captured by the second camera 21 when the sample workpiece is at the second workstation 20 in this embodiment. It can be seen that the bottom edge of the sample workpiece is parallel to the horizontal reference line of the image, and the side edge is parallel to the vertical reference line of the image. Figure 3As shown, after the robot arm 40 is controlled to grab the target workpiece 50 and move to the second workstation 20 according to the first pixel coordinate information and the preset first compensation value, the coordinate position difference between the target workpiece 50 in the second image and the sample workpiece in the sample image is reduced. In addition, by setting the second preset distance to be smaller than the first preset distance, the accurate second pixel coordinate information of the target workpiece 50 at the second workstation 20 can be obtained through the second camera 21 without using a high-precision camera, so as to control the robot arm 40 to realize the workpiece moving operation in the subsequent steps and improve the workpiece positioning accuracy.
[0072] See also Figure 4 , Figure 4 Another schematic diagram of a workpiece positioning method provided in an embodiment of the present application. Figure 4 As shown, the workpiece positioning method may include the following steps:
[0073] Step 401 : when a target workpiece is located at a first workstation, a first image including the target workpiece is captured by a first camera, and the first camera is arranged at a position at a first preset distance from a plane where the first workstation is located.
[0074] In the embodiment of the present application, the target workpiece can be a mobile phone middle frame or other types of workpieces, such as circuit boards, display screens, instrument components, etc. Through the workpiece positioning method provided in the embodiment of the present application, the target workpiece can be accurately moved from the first station to the third station to realize the subsequent process flow.
[0075] In some embodiments, the first camera is set at a position at a first preset distance from the plane where the first workstation is located. The first camera can be set above the area where the first workstation is located so that the optical axis of the first camera is perpendicular to the plane where the first workstation is located. This can reduce image distortion caused by angle deviation and ensure that the target workpiece can be captured by the first camera, reduce the possibility of the first camera being blocked by other equipment or workpieces, and improve the accuracy of the acquired position information of the target workpiece.
[0076] In other embodiments, due to space limitations or equipment layout requirements, the first camera may also be set on the side of the first workstation. After acquiring the first image including the target workpiece, the first image is corrected using a trapezoidal correction algorithm and camera parameters of the first camera, so that the effect of the corrected first image is close to or reaches the image quality when the first camera is installed from above, thereby increasing the flexibility of the first camera layout and enabling it to adapt to more different working environments and equipment layouts.
[0077] Step 402: Acquire first pixel coordinate information corresponding to the target workpiece in the first image according to the first image.
[0078] In the embodiment of the present application, the first pixel coordinate information is used to indicate the pixel position of the target workpiece in the first image, so that the pixel coordinate information can be subsequently converted into robot arm coordinate information to control the robot arm to grasp or move the target workpiece.
[0079] In some embodiments, the target workpiece may be a workpiece that is insensitive to the placement angle, such as a bearing. Such a target workpiece can be rotated at any angle at its center point without affecting the subsequent processing process. The first pixel coordinate information may include the first pixel horizontal coordinate and the first pixel vertical coordinate of the target workpiece in the first image. To facilitate the acquisition of the pixel coordinate information of the target workpiece, the horizontal coordinate of the center point or the center point of the target workpiece in the first image may be used as the first pixel horizontal coordinate, and the vertical coordinate of the center point of the target workpiece in the first image may be used as the first pixel vertical coordinate. Among them, according to the shape of the target workpiece, the center point may be the geometric center of the target workpiece, such as the center of a circle, etc., and the center point of mass may be obtained by calculating the average value of all pixel coordinates in the image area corresponding to the target workpiece, which is not limited here.
[0080] In some other embodiments, the first pixel coordinate information includes a first pixel horizontal coordinate, a first pixel vertical coordinate, and a first tilt angle of the target workpiece in the first image. Determining the first pixel coordinate information corresponding to the target workpiece in the first image according to the first image includes:
[0081] Performing image processing on the first image to obtain contour information corresponding to the target workpiece in the first image, the image processing including grayscale processing, binarization processing and contour acquisition processing;
[0082] Determine a first pixel horizontal coordinate and a first pixel vertical coordinate according to the contour information and preset feature points, wherein the preset feature points include a center point or a preset vertex of the target workpiece;
[0083] Determine at least two feature areas corresponding to the target workpiece according to the contour information and preset feature extraction conditions, wherein the preset feature extraction conditions include a range interval and / or a ratio threshold;
[0084] The first tilt angle is determined according to the angles between the center points corresponding to the at least two feature areas and a reference straight line, where the reference straight line is a horizontal line or a vertical line in the first image.
[0085] The first pixel coordinate information can be expressed as (X1, Y1, R1), where X1 is the first pixel horizontal coordinate, Y1 is the first pixel vertical coordinate, and R1 is the first tilt angle. A series of image processing is performed on the first image, such as grayscale processing to reduce the complexity of the first image processing, binarization processing to highlight the contour of the target workpiece, and then the boundary of the target workpiece in the first image is determined by using the contour acquisition processing related algorithm to obtain the contour information of the target workpiece. In addition, the quality of the first image can be improved by filtering processing, etc., and the accuracy of the acquired contour information can be improved, which is not limited here. According to the preset feature points and the extracted contour information, the feature point position of the target workpiece is determined, and then the first pixel horizontal coordinate and the first pixel vertical coordinate of the target workpiece are determined. The feature point includes the center point, the centroid point or a specific preset vertex of the target workpiece. The feature point selected in the target workpiece should be the same as the feature point when the pixel coordinate information of the first station and the robot arm coordinate information are converted through the sample workpiece, and the feature point type of the first compensation value is obtained, which is the center point or the preset vertex of the same standard selected, which is not limited again.
[0086] It is understandable that for precision workpieces such as the middle frame of a mobile phone, only obtaining its horizontal and vertical position information in the first image is not enough to place it in the subsequent third station. It is also necessary to obtain its inclination angle so that in the subsequent steps, the target workpiece can be accurately placed on the third station such as the jig table, assembly equipment, etc., which has strict requirements on the placement position.
[0087] See also Figure 5 , Figure 5 A schematic diagram of obtaining first pixel coordinate information in the workpiece positioning method provided in an embodiment of the present application. Figure 5 As shown, according to the preset feature extraction conditions including the range interval and / or the ratio threshold, two feature areas can be determined, and a line segment or a straight line is obtained by connecting the center points of the two feature areas. According to the angle between the line segment or the straight line and the reference straight line, the first tilt angle can be obtained. The reference straight line is a horizontal line or a vertical line in the first image, and is not limited again. Wherein, in the case where the feature extraction condition is the range interval, the pixel area size and contour information of the workpiece occupied by the target workpiece in the first image are used to determine two feature areas whose areas are related to the pixel area of the workpiece and are located within the boundary of the target workpiece at a specified distance from the boundary. When the feature extraction condition is the ratio threshold, the two feature areas can be two characteristic areas obtained by limiting the overall pixel length or pixel width of the target workpiece and the ratio threshold. In this way, accurate identification of the target workpiece can be obtained without identifying the feature points of the target workpiece, such as specified components, screw holes, etc., which reduces the parameter requirements of the first camera and is conducive to reducing equipment costs.
[0088] Step 403 , according to the first pixel coordinate information and a preset first compensation value, the robot arm is controlled to grasp the target workpiece and move the target workpiece to the second station, wherein the first compensation value is used to indicate the correction displacement of the robot arm grasping the target workpiece at the first station.
[0089] In the embodiment of the present application, once the first pixel coordinate information of the target workpiece is obtained, the robot arm can be controlled to grasp the target workpiece through the preset first compensation value, and move the target workpiece to the second workstation for subsequent steps.
[0090] In the actual production process, although there may be some deviations in the placement positions of different workpieces at the first station, these position differences often fall within an acceptable deviation range because the skilled workers who place the workpieces usually receive corresponding training or use simple machines to place the workpieces at the first station. Therefore, a preset first compensation value can be set to correct the grasping errors caused by these position deviations, thereby improving the grasping accuracy and correction efficiency of the robot arm.
[0091] In some embodiments, a preset first compensation value is determined by calculating the average value of the difference between sample robot arm coordinate information corresponding to multiple sample workpieces at the first workstation and template robot arm coordinate information corresponding to multiple sample workpieces, wherein the sample robot arm coordinate information is coordinate information of the multiple sample workpieces in the robot arm coordinate system when the multiple sample workpieces are located at the first workstation, and the template robot arm coordinate information is coordinate information of the robot arm in the robot arm coordinate system when the robot arm grasps the preset positions of the multiple sample workpieces.
[0092] In the above embodiment, the sample robot arm coordinate information corresponding to the multiple sample workpieces may be multiple sample pixel coordinate information obtained by pre-collecting multiple first sample images containing the sample workpieces. Then, the sample robot arm coordinate information corresponding to the above multiple sample workpieces is obtained by combining the multiple sample pixel coordinate information with the first coordinate mapping relationship corresponding to the first workstation. The template robot arm coordinate information corresponding to the multiple sample workpieces can be obtained by using the displacement sensor inside the robot arm to obtain the template robot arm coordinate information when the robot arm grabs the preset positions of the multiple sample workpieces. By calculating the difference between the sample robot arm coordinate information and the template robot arm coordinate information corresponding to different sample workpieces, and averaging the multiple differences, the preset first compensation value can be obtained.
[0093] It should be noted that the sample workpiece and the target workpiece are workpieces of the same type or model. The preset positions of the sample workpiece and the target workpiece are positions where the robotic arm can grasp them more stably. Exemplarily, in the case where the target workpiece and the sample workpiece are the middle frame of a mobile phone, the preset position can be a part of the middle frame of the mobile phone that is easy for the robotic arm to grasp and will not cause damage, such as the middle area of the middle frame of the mobile phone, to avoid unnecessary damage to the workpiece and ensure the stability of grasping. By obtaining the first compensation value based on multiple sample workpieces, in the actual processing process, the robotic arm can convert the first pixel coordinate position of the target workpiece into the first robotic arm pixel coordinate and combine it with the first compensation value to grasp the target workpiece for subsequent movement operations.
[0094] In some embodiments, to ensure that different workpieces can be grasped by the robot arm according to the first compensation value, the clamp of the robot arm can be set to a larger opening and closing angle. After moving to the specified position according to the first pixel coordinate information and the first compensation value, the clamp is controlled to open and close to grasp the target workpiece. During the grasping process, the clamp can also play a role in adjusting the coordinates or angle of the target workpiece. In some embodiments, a suction cup or other structure can also be used to complete the grasping of the target workpiece, which is not limited here.
[0095] Step 404, when the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, a second image including the target workpiece is collected by a second camera, and the second camera is set at a second preset distance from the plane where the second workstation is located, and the second preset distance is smaller than the first preset distance.
[0096] In the embodiment of the present application, the second image obtained can be as follows: Figure 3 As shown in part (b), it will not be repeated here.
[0097] Step 405: acquiring second pixel coordinate information corresponding to the target workpiece in the second image according to the second image.
[0098] In the embodiment of the present application, the representation form of the second pixel coordinate information is the same as the first pixel coordinate information. Exemplarily, when the first pixel coordinate information includes the first pixel horizontal coordinate, the first pixel vertical coordinate, and the first tilt angle of the target workpiece in the first image, the second pixel coordinate information includes the second pixel horizontal coordinate, the second pixel vertical coordinate, and the second tilt angle of the target workpiece in the second image.
[0099] In some embodiments, the second pixel coordinate information includes the second pixel horizontal coordinate, the second pixel vertical coordinate, and the second tilt angle of the target workpiece in the second image, and the target workpiece is a mobile phone middle frame. According to the second image, obtaining the second pixel coordinate information corresponding to the target workpiece in the second image includes:
[0100] Determine the second pixel horizontal coordinate and the second pixel vertical coordinate according to the intersection position of a first straight line extending from the first side of the target workpiece and a second straight line extending from the second side in the second image, wherein the first straight line and the second straight line are perpendicular to each other;
[0101] The second tilt angle is determined according to the angle between the first straight line and / or the second straight line and a reference straight line, where the reference straight line is a horizontal line or a vertical line in the second image.
[0102] See also Figure 6 , Figure 6 A schematic diagram of obtaining the second pixel coordinate information in the workpiece positioning method provided in the embodiment of the present application. Figure 6 In the embodiment shown, the target workpiece is a mobile phone middle frame, the first side and the second side of the target workpiece are the shorter side and the longer side of the mobile phone middle frame respectively, and a first straight line extending from the first side and a second straight line extending from the second side can obtain an intersection position in the second image, thereby determining the second pixel horizontal coordinate and the second pixel vertical coordinate. The second tilt angle can be determined according to the angle between any one of the first straight line and / or the second straight line and the reference straight line, and the reference straight line is a horizontal line or a vertical line in the second image.
[0103] In other embodiments, obtaining second pixel coordinate information corresponding to the target workpiece in the second image includes: determining the second pixel horizontal coordinate and the second pixel vertical coordinate based on the feature point of the target workpiece in the second image; and determining the second inclination angle based on the angle between the straight line extending from the feature edge and the reference straight line, where the reference straight line is a horizontal line or a vertical line in the second image.
[0104] Among them, the feature point of the target workpiece can be a designated point of the target workpiece obtained by a relevant visual recognition algorithm, such as a screw hole, a reserved installation position for installing a designated device, etc., and the feature edge can be a side on the target workpiece closest to the feature point, which is not limited here.
[0105] Step 406, obtaining a second compensation value based on the second pixel coordinate information and the preset template pixel coordinate information, the second compensation value is used to indicate the correction displacement of the robot arm to place the target workpiece at the third station, and the preset template pixel coordinate information is the pixel coordinate information of the sample workpiece at the second station obtained by the second camera when the robot arm grasps the preset position of the sample workpiece.
[0106] In the embodiment of the present application, when the robot grasps the preset position of the sample workpiece, the template pixel coordinate information obtained by the image containing the sample workpiece acquired by the second camera reflects the pixel coordinate information of the workpiece in an ideal state. Based on the second pixel coordinate information and the preset template pixel coordinate information, a second compensation value for the target workpiece can be calculated to instruct the robot to place the target workpiece at a corrected displacement at the third station.
[0107] In some embodiments, in order to accurately obtain template pixel coordinate information, in the workpiece positioning method provided in the embodiments of the present application, the above template pixel coordinate information is obtained by collecting a sample image when the robot arm moves the sample workpiece placed at the third station to the second station.
[0108] It can be understood that by using the robotic arm to re-grasp the sample workpiece that has been successfully placed at the third station and whose placement position meets the requirements, and move it to the second station according to the preset moving path, it can ensure that the collected template pixel coordinate information can reflect the position where the workpiece should be at the second station under ideal conditions.
[0109] It should be noted that the second compensation value is a data value in the robot arm coordinate system, and the robot arm can be controlled by the second compensation value to make fine adjustments to the target workpiece so that it can be accurately placed at the third workstation during the subsequent movement process.
[0110] In some embodiments, obtaining the second compensation value according to the second pixel coordinate information and the preset template pixel coordinate information includes:
[0111] Determine the second robot coordinate corresponding to the second pixel coordinate and the robot coordinate information corresponding to the template pixel coordinate information according to a preset second coordinate mapping relationship, wherein the second coordinate mapping relationship includes a mapping relationship between the preset pixel coordinates and the preset robot coordinates in the second station;
[0112] The difference between the second mechanical arm coordinates and the mechanical arm coordinate information corresponding to the template pixel coordinate information is calculated to obtain a second compensation value.
[0113] By calculating the difference between the second robot arm coordinates and the robot arm coordinate information corresponding to the template pixel coordinate information, the second compensation value obtained reflects the displacement that the robot arm needs to adjust, thereby improving the placement accuracy of the target workpiece on the third workstation and ensuring the precise placement of the target workpiece.
[0114] In some embodiments, the preset second coordinate mapping relationship is determined by multiple calibration images captured by the second camera. The multiple calibration images are obtained by adjusting the position of the sample workpiece in the second station relative to the second camera when the robot arm moves the sample workpiece placed on the third station to the second station, and obtains multiple images corresponding to different positions.
[0115] Figure 7 A schematic diagram of obtaining a second coordinate mapping relationship in the workpiece positioning method provided in an embodiment of the present application. Figure 7As shown, the method provided by the present application controls the robot arm to move the sample workpiece to change multiple positions in the second station, and acquires multiple calibration images through the second camera after the sample workpiece is stabilized. Each time a calibration image is acquired, the robot arm coordinate information of the robot arm in the robot arm coordinate system and the pixel coordinate information of the characteristic points of the target workpiece in the corresponding calibration image in the pixel coordinate system are recorded. In this way, by comparing the robot arm coordinate information at the second station with the corresponding pixel coordinate information, a second coordinate mapping relationship is established, which can ensure the precise positioning of the subsequent target workpiece at the second station.
[0116] Step 407 , controlling the robot arm to move the target workpiece to be placed at the third workstation according to the second compensation value.
[0117] In the embodiment of the present application, the third station has stricter requirements on the placement of the target workpiece. The second compensation value is calculated based on the second pixel coordinate information and the template pixel coordinate information under ideal conditions, which can ensure that the target workpiece is successfully placed at the third station.
[0118] It can be seen that by implementing the workpiece positioning method described in the above embodiment, the first camera captures the image of the target workpiece at the first station, obtains the first pixel coordinate information, and combines the preset compensation value, so that the robot arm can grab the target workpiece and move it to the second station. Subsequently, the second camera closer to the second station is used to obtain more accurate second pixel coordinate information, and the second compensation value is further calculated to accurately correct the position of the workpiece. Finally, the robot arm accurately places the workpiece at the third station according to the second compensation value for subsequent processing, which significantly improves the positioning accuracy of the workpiece and reduces the need for high-precision cameras.
[0119] See also Figure 8 , Figure 8 A schematic diagram of a process of controlling a robot arm to grab a target workpiece at a first workstation in a workpiece positioning method provided in an embodiment of the present application. Figure 8 As shown, the following steps may be included:
[0120] Step 801: Determine a first robot arm coordinate corresponding to a first pixel coordinate according to a preset first coordinate mapping relationship.
[0121] In the embodiment of the present application, the first pixel coordinate information of the target workpiece is obtained through the first image captured by the first camera. Since the robot arm needs to obtain the target workpiece in the robot arm coordinate system, that is, the actual physical coordinates, before it can move the target workpiece. Therefore, the conversion between the first pixel coordinate and the corresponding first robot arm coordinate is realized through the preset first coordinate mapping relationship.
[0122] In some embodiments, a sample workpiece or a calibration plate can be placed at a specified position in the first station, and a specified feature point or image is drawn on the calibration plate. The first camera is triggered to capture a calibration image currently containing the sample workpiece or the calibration plate, and the calibration pixel coordinate information of the feature point of the sample workpiece or the calibration plate in the calibration image is obtained. The calibration needle at the front end of the robotic arm is controlled to move to the feature point of the sample workpiece or the calibration plate to obtain the corresponding calibration robotic arm coordinate information. The first coordinate mapping relationship between the pixel coordinate system on the first station and the robotic arm coordinate system is calculated through the calibration pixel coordinate information and the calibration robotic arm coordinate information.
[0123] Step 802 , summing the first robot arm coordinates and the first compensation value, and controlling the robot arm to grab the target workpiece at the first station and move it to the second station according to the summation result.
[0124] In an embodiment of the present application, the first compensation value is used to indicate the correction displacement of the robot arm when grasping the target workpiece at the first workstation. The data format of the first compensation is the same as the data format of the first robot arm coordinates, and the coordinate information in the new robot arm coordinate system can be obtained by summing the two, so that the robot arm can grasp the target workpiece at the first workstation and move to the second workstation according to the summation result.
[0125] It can be understood that since the position of the first camera relative to the first workstation is different from the position of the second camera relative to the second workstation, similar to the first workstation, a second coordinate mapping relationship needs to be acquired in advance to convert the second pixel coordinate information of the target workpiece in the second image into the second robotic arm coordinate information in the corresponding robotic arm coordinate system.
[0126] It should be understood that, although the steps in the above-mentioned flowcharts are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flowcharts may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0127] Based on the foregoing embodiments, an embodiment of the present application provides a workpiece positioning device, which includes the modules included and the units included in the modules, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0128] Fig. 9 A schematic diagram of a workpiece positioning device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the workpiece positioning device 900 includes a first control module 901 and a second control module 902, wherein:
[0129] The first control module 901 is used to control the robot arm to grab the target workpiece according to a preset first compensation value and move the target workpiece to the second workstation when the target workpiece is located at the first workstation;
[0130] The second control module 902 is used to obtain a second compensation value when the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, and control the robot arm to move the target workpiece to the third workstation according to the second compensation value.
[0131] In some embodiments, the workpiece positioning device 900 further includes a collection module, which is used to collect a first image including the target workpiece through a first camera when the target workpiece is located at the first workstation, and the first camera is set at a position at a first preset distance from the plane where the first workstation is located;
[0132] In some embodiments, the first control module 901 is further used to obtain first pixel coordinate information corresponding to the target workpiece in the first image according to the first image; control the robot arm to grasp the target workpiece and move the target workpiece to the second station according to the first pixel coordinate information and a preset first compensation value, and the first compensation value is used to indicate the correction displacement of the robot arm to grasp the target workpiece at the first station;
[0133] In some embodiments, the acquisition module is further used to acquire a second image including the target workpiece through a second camera when the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, and the second camera is set at a second preset distance from the plane where the second workstation is located, and the second preset distance is smaller than the first preset distance;
[0134] In some embodiments, the second control module 902 is also used to obtain second pixel coordinate information corresponding to the target workpiece in the second image based on the second image; obtain a second compensation value based on the second pixel coordinate information and the preset template pixel coordinate information, the second compensation value is used to instruct the robot arm to place the target workpiece at a correction displacement in the third station, the preset template pixel coordinate information is the pixel coordinate information of the sample workpiece at the second station obtained by the second camera when the robot arm grabs the preset position of the sample workpiece; control the robot arm to move the target workpiece and place it at the third station based on the second compensation value.
[0135] In some embodiments, the first pixel coordinate information includes a first pixel horizontal coordinate, a first pixel vertical coordinate and a first tilt angle of the target workpiece in the first image. The first control module 901 is further used to: perform image processing on the first image to obtain contour information corresponding to the target workpiece in the first image, the image processing including grayscale processing, binarization processing and contour acquisition processing; determine the first pixel horizontal coordinate and the first pixel vertical coordinate according to the contour information and preset feature points, the preset feature points include the center point or preset vertices of the target workpiece; determine at least two feature areas corresponding to the target workpiece according to the contour information and preset feature extraction conditions, the preset feature extraction conditions include a range interval and / or a ratio threshold; determine the first tilt angle according to the angle between the center points corresponding to the at least two feature areas and a reference straight line, the reference straight line is a horizontal line or a vertical line in the first image.
[0136] In some embodiments, the second pixel coordinate information includes the second pixel horizontal coordinate, the second pixel vertical coordinate and the second tilt angle of the target workpiece in the second image, the target workpiece is the middle frame of the mobile phone, and the second control module 902 is also used to: determine the second pixel horizontal coordinate and the second pixel vertical coordinate according to the intersection position of the first straight line extended from the first side of the target workpiece and the second straight line extended from the second side in the second image, the first straight line and the second straight line are perpendicular to each other; determine the second tilt angle according to the angle between the first straight line and / or the second straight line and the reference straight line, the reference straight line is a horizontal line or a vertical line in the second image.
[0137] In some embodiments, the second control module 902 is also used to: determine the second robotic arm coordinates corresponding to the second pixel coordinates and the robotic arm coordinate information corresponding to the template pixel coordinate information according to a preset second coordinate mapping relationship, the second coordinate mapping relationship including a mapping relationship between preset pixel coordinates and preset robotic arm coordinates in the second workstation; calculate the difference between the second robotic arm coordinates and the robotic arm coordinate information corresponding to the template pixel coordinate information to obtain a second compensation value.
[0138] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0139] It should be noted that in the embodiments of this application Fig. 9 The division of modules in the workpiece positioning device shown is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.
[0140] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0141] The embodiment of the present application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.
[0142] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the above embodiment are implemented.
[0143] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.
[0144] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0145] In one embodiment, the workpiece positioning device provided by the present application can be implemented in the form of a computer program. The computer program can be Fig.10 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the above-mentioned device. The computer program composed of various program modules enables the processor to execute the steps in the method of each embodiment of the present application described in this specification.
[0146] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0147] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.
[0148] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0149] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0150] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0151] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0152] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0153] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0154] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0155] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0156] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0157] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0158] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A workpiece positioning method, characterized in that: The method comprises: When the target workpiece is located at the first workstation, the robot arm is controlled to grab the target workpiece according to a preset first compensation value, and the target workpiece is moved to the second workstation; When the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, a second compensation value is obtained, and the robot arm is controlled according to the second compensation value to move the target workpiece to be placed at the third workstation.
2. The method according to claim 1, characterized in that When the target workpiece is located at the first workstation, controlling the robot arm to grab the target workpiece according to a preset first compensation value, and moving the target workpiece to the second workstation includes: When the target workpiece is located at a first workstation, a first image including the target workpiece is captured by a first camera, wherein the first camera is disposed at a position at a first preset distance from a plane where the first workstation is located; According to the first image, obtaining first pixel coordinate information corresponding to the target workpiece in the first image; According to the first pixel coordinate information and a preset first compensation value, the robot arm is controlled to grasp the target workpiece and move the target workpiece to the second station. The first compensation value is used to indicate the correction displacement of the robot arm grasping the target workpiece at the first station.
3. The method according to claim 2, characterized in that When the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, obtaining a second compensation value, and controlling the robot arm to move the target workpiece to be placed at the third workstation according to the second compensation value, comprising: When the robot arm moves the target workpiece so that the target workpiece is located at a second workstation, a second image including the target workpiece is captured by a second camera, wherein the second camera is disposed at a second preset distance from a plane where the second workstation is located, and the second preset distance is smaller than the first preset distance; According to the second image, obtaining second pixel coordinate information corresponding to the target workpiece in the second image; According to the second pixel coordinate information and the preset template pixel coordinate information, the second compensation value is obtained, where the second compensation value is used to indicate the correction displacement of the robot arm to place the target workpiece at the third station, and the preset template pixel coordinate information is the pixel coordinate information of the sample workpiece at the second station obtained by the second camera when the robot arm grabs the preset position of the sample workpiece; The robot arm is controlled to move the target workpiece to be placed at the third workstation according to the second compensation value.
4. The method according to any one of claims 1 to 3, characterized in that: The preset first compensation value is determined by calculating the average value of the difference between sample robot arm coordinate information corresponding to multiple sample workpieces at the first workstation and template robot arm coordinate information corresponding to the multiple sample workpieces, the sample robot arm coordinate information being the coordinate information of the multiple sample workpieces in the robot arm coordinate system when the multiple sample workpieces are located at the first workstation, and the template robot arm coordinate information being the coordinate information of the robot arm in the robot arm coordinate system when the robot arm grasps the multiple sample workpieces at the preset positions.
5. The method according to claim 3, characterized in that: The second workstation is a preset plane area in the process of the robot arm moving the workpiece from the first workstation to the third workstation. The optical axis of the second camera is perpendicular to the plane where the second workstation is located. The first image includes all the image content of the target workpiece, and the second image includes at least part of the image content of the target workpiece.
6. The method according to claim 2 or 3, characterized in that: The first pixel coordinate information includes a first pixel horizontal coordinate, a first pixel vertical coordinate, and a first tilt angle of the target workpiece in the first image. The acquiring, according to the first image, the first pixel coordinate information corresponding to the target workpiece in the first image includes: Performing image processing on the first image to obtain contour information corresponding to the target workpiece in the first image, wherein the image processing includes grayscale processing, binarization processing, and contour acquisition processing; Determine the first pixel horizontal coordinate and the first pixel vertical coordinate according to the contour information and preset feature points, wherein the preset feature points include a center point or a preset vertex of the target workpiece; Determine at least two feature areas corresponding to the target workpiece according to the contour information and preset feature extraction conditions, wherein the preset feature extraction conditions include a range interval and / or a ratio threshold; The first tilt angle is determined according to the angles between the center points corresponding to the at least two feature areas and a reference straight line, where the reference straight line is a horizontal line or a vertical line in the first image.
7. The method according to claim 3 or 5, characterized in that: The second pixel coordinate information includes a second pixel horizontal coordinate, a second pixel vertical coordinate, and a second tilt angle of the target workpiece in the second image. The target workpiece is a middle frame of a mobile phone. According to the second image, obtaining the second pixel coordinate information corresponding to the target workpiece in the second image includes: Determine the second pixel horizontal coordinate and the second pixel vertical coordinate according to the intersection position of a first straight line extending from the first side of the target workpiece and a second straight line extending from the second side in the second image, wherein the first straight line and the second straight line are perpendicular to each other; The second tilt angle is determined according to an angle between the first straight line and / or the second straight line and a reference straight line, where the reference straight line is a horizontal line or a vertical line in the second image.
8. The method according to claim 3 or 5, characterized in that: The acquiring the second compensation value according to the second pixel coordinate information and preset template pixel coordinate information includes: Determine, according to a preset second coordinate mapping relationship, a second robotic arm coordinate corresponding to the second pixel coordinate and robotic arm coordinate information corresponding to the template pixel coordinate information, wherein the second coordinate mapping relationship includes a mapping relationship between preset pixel coordinates and preset robotic arm coordinates in the second station; The difference between the second mechanical arm coordinate and the mechanical arm coordinate information corresponding to the template pixel coordinate information is calculated to obtain the second compensation value.
9. A workpiece positioning device, characterized in that: include: A first control module, used for controlling the robot arm to grab the target workpiece and move the target workpiece to the second workstation according to a preset first compensation value when the target workpiece is located at the first workstation; The second control module is used to obtain a second compensation value when the robot arm moves the target workpiece so that the target workpiece is located at the second workstation, and control the robot arm to move the target workpiece to be placed at the third workstation according to the second compensation value.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Workpiece positioning and calibrating method
CN111070210A
Substrate conveying system, substrate conveying method, substrate processing system and substrate processing method
CN112018008A
Manipulator motion deviation compensation method and robot equipment
CN117697753A
Method for compensating working position
JP1994028018A
Industrial robot
JP2022096193A
Cited By
Laser machine
CN120080024A
Control method of multi-station manipulator for stamping washing machine shell
CN120347746A
