Method, device, computer equipment and readable storage medium for determining workpiece measurement coordinate system
Through calibration workpieces and mobile robot technology, the problem of low accuracy of measurement coordinate system when the reference features are blocked is solved, and a high-precision measurement coordinate system is established in the case of blind spots and blind spots is achieved.
Patent Information
- Application Number
- CN202411708002.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In workpiece measurement scenarios, it is difficult for the prior art to accurately establish a measurement coordinate system when the reference features are blocked by a fixture, resulting in low measurement accuracy.
By using calibration workpieces and mobile robots, the end position information of the measurement cameras and mobile robots is obtained, the measurement data is converted to the robot coordinate system using the calibration conversion matrix, and the known reference point data are extracted and calibrated to establish the workpiece measurement coordinate system.
The accuracy of determining the measurement coordinate system is improved, and the measurement coordinate system can be accurately established in the presence of blind spots and blind spots, which enhances the accuracy of workpiece measurement.
Smart Images

Figure CN119197324B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology processing, and in particular to a method, device, computer equipment and readable storage medium for determining a workpiece measurement coordinate system. Background Art
[0002] With the rapid development of science and technology, robots are used in different fields to perform different tasks. Intelligent robots can measure and acquire three-dimensional data in three-dimensional space. However, intelligent robots need to use precise three-dimensional space measuring instruments to acquire three-dimensional data. The coordinate information obtained by the measuring instrument is based on the system's own coordinate system. Therefore, constructing a measurement coordinate system in the workpiece measurement scenario is the basis for robot measurement and calibration.
[0003] At present, the measurement coordinate system of the measurement information extracted and calculated by the measurement system for the workpiece to be measured is mostly established by using additional feature points installed near the workstation or existing scan data on the fixture. At this time, it is often required that the workpiece cannot block the reference features when it is placed or clamped on the workstation. In this case, when the reference features are blocked by the fixture, there are dead angles and blind spots. At this time, the reference features of the workpiece itself cannot be smoothly extracted to establish the measurement coordinate system, or the existence of occlusion will lead to low accuracy of the established measurement coordinate system. Therefore, how to improve the accuracy of the determination of the measurement coordinate system is an urgent problem to be solved. Summary of the invention
[0004] Based on this, it is necessary to provide a workpiece measurement coordinate system determination system that can improve the accuracy of the measurement coordinate system determination in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a method for determining a workpiece measurement coordinate system, the method being applied to a processor of a workpiece measurement coordinate system determination system, the system comprising at least a processor, a measurement camera, a mobile robot, and a calibration workpiece; the calibration workpiece is a reference workpiece with known measurement point data information. The method comprises:
[0006] When the measuring camera moves to each preset measuring position, the surface measurement data collected by the measuring camera for the calibration workpiece and the terminal position information of the mobile robot are obtained;
[0007] Based on the calibration transformation matrix between the measuring camera and the end of the mobile robot, the surface measurement data is converted to the robot coordinate system of the mobile robot through the end posture information of the mobile robot at each preset measurement position, and the measurement point cloud data of the calibrated workpiece is obtained;
[0008] Extract the measuring point location information from the measured point cloud data; match the measuring point location information with the known measuring point data information to determine the optimal transformation solution that meets the conversion conditions;
[0009] Extract and calibrate multiple known reference point data from the known measurement point data information, and convert the multiple known reference point data into the robot coordinate system through the optimal transformation solution to obtain multiple system establishment and calibration points; establish a workpiece measurement coordinate system based on the multiple system establishment and calibration points, and the workpiece measurement coordinate system is used to measure the workpiece.
[0010] In one embodiment, each surface measurement data is converted into a robot coordinate system of a mobile robot to obtain measurement point cloud data of a calibration workpiece, including:
[0011] The surface measurement data at each preset measurement position is converted into the robot coordinate system of the mobile robot to obtain the surface measurement point cloud data corresponding to each preset measurement position;
[0012] Perform data aggregation processing on the measured point cloud data of each surface to obtain the measured point cloud data of the calibrated workpiece;
[0013] Extract the measuring point information from the measured point cloud data, including:
[0014] Determine the measuring point number of each measuring point;
[0015] Based on the measuring point number of each measuring point, the spatial coordinates of the center point of the measuring point on the calibration workpiece in the robot coordinate system are extracted from the measuring point cloud data;
[0016] Based on the spatial coordinates of the center point of each measuring point and the measuring point number of each measuring point, the measuring point position information is constructed.
[0017] In one of the embodiments, the measuring points on the calibration workpiece are circular;
[0018] Based on the measurement point number of each measurement point, the spatial coordinates of the center point of the measurement point on the calibration workpiece in the robot coordinate system are extracted from the measurement point cloud data, including:
[0019] Based on the measurement point number of each measurement point, the area point cloud data including the measurement point is cut out from the measurement point cloud data;
[0020] Perform plane fitting on the point cloud data of each region to obtain the maximum plane of the point cloud data of each region;
[0021] For each area point cloud data, project the area point cloud data onto the largest plane along the normal vector of the largest plane to obtain projected point cloud data;
[0022] The projected point cloud data is converted into two-dimensional image point data by using conversion parameters, and an outer circular contour and an inner circular contour are obtained based on the two-dimensional image point data;
[0023] The inner circular contour is fitted to obtain the coordinates of the circle center, which are then back-projected onto the maximum plane to obtain the spatial coordinates of the hole center. The spatial coordinates of the hole center are used as the spatial coordinates of the center point of the measurement point in the robot coordinate system.
[0024] In one embodiment, the method for determining the workpiece measurement coordinate system further includes:
[0025] Determine the plane parameters of each maximum plane; the plane parameters include the plane vector and the plane point passing through the maximum plane;
[0026] The first point is taken as the origin of the plane point, the second point is taken as the point obtained by taking the plane vector as the vertical axis direction, and the third point is taken as the vertical axis direction by taking any point on the maximum plane whose distance from the plane point is a preset value;
[0027] Obtain transformation parameters through the first point, the second point and the third point;
[0028] Obtaining the outer circular contour and the inner circular contour based on the two-dimensional image point data, including:
[0029] Binarization processing is performed pixel by pixel on the two-dimensional image point data to obtain binary image data;
[0030] The connected domain contour is extracted from the binary image data to obtain the outer circular contour and the inner circular contour.
[0031] In one embodiment, the measuring point position information includes at least the measuring point number of each measuring point, and the known measuring point data information includes at least the measuring point number of each known measuring point;
[0032] Match the measuring point location information with the known measuring point data information to determine the optimal transformation solution that meets the conversion conditions, including:
[0033] Matching is performed based on the measuring point number of each measuring point and the measuring point number of each known measuring point to obtain a plurality of paired point information; wherein the measuring point and the known measuring point belonging to the same paired point information have the same measuring point number, and the paired point information includes: the spatial coordinates of the center point of the measuring point and the spatial coordinates of the measuring point of the known measuring point, and the number of the plurality of paired point information is greater than or equal to 3;
[0034] The optimal transformation solution that meets the conversion conditions is determined through multiple paired point information.
[0035] In one of the embodiments, the calibration workpiece is a plurality of calibration sub-workpieces;
[0036] Through the optimal transformation solution, multiple known reference point data are converted to the robot coordinate system to obtain multiple system calibration points, including:
[0037] Through the optimal transformation solution under each calibration sub-workpiece, multiple known reference point data of each calibration sub-workpiece are converted to the robot coordinate system to obtain multiple system establishment calibration points of each calibration sub-workpiece;
[0038] The workpiece measurement coordinate system is established based on multiple calibration points, including:
[0039] The three-dimensional coordinates represented by multiple system building calibration points of each calibration sub-workpiece are numerically averaged to obtain multiple target system building calibration points;
[0040] The workpiece measurement coordinate system is established based on multiple target calibration points.
[0041] In a second aspect, the present application further provides a device for determining a workpiece measurement coordinate system, the device being deployed on a processor of a workpiece measurement coordinate system determination system, the system comprising at least a processor, a measuring camera, a mobile robot, and a calibration workpiece; the calibration workpiece is a reference workpiece with known measuring point data information;
[0042] The device comprises:
[0043] A data acquisition module, used to acquire surface measurement data collected by the measuring camera for the calibration workpiece and terminal position information of the mobile robot when the measuring camera moves to each preset measurement position;
[0044] A data processing module is used to convert each surface measurement data into the robot coordinate system of the mobile robot based on the calibration transformation matrix between the measurement camera and the end of the mobile robot and through the end posture information of the mobile robot at each preset measurement position to obtain the measurement point cloud data of the calibrated workpiece;
[0045] The data matching module is used to extract the measuring point position information from the measuring point cloud data; match the measuring point position information with the known measuring point data information to determine the optimal transformation solution that meets the transformation conditions;
[0046] The coordinate system determination module is used to extract and calibrate multiple known reference point data in the known measurement point data information, and convert the multiple known reference point data into the robot coordinate system through the optimal transformation solution to obtain multiple system establishment and calibration points; based on the multiple system establishment and calibration points, a workpiece measurement coordinate system is established, and the workpiece measurement coordinate system is used to measure the workpiece.
[0047] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0048] When the measuring camera moves to each preset measuring position, the surface measurement data collected by the measuring camera for the calibration workpiece and the terminal position information of the mobile robot are obtained;
[0049] Based on the calibration transformation matrix between the measuring camera and the end of the mobile robot, the surface measurement data is converted to the robot coordinate system of the mobile robot through the end posture information of the mobile robot at each preset measurement position, and the measurement point cloud data of the calibrated workpiece is obtained;
[0050] Extract the measuring point location information from the measured point cloud data; match the measuring point location information with the known measuring point data information to determine the optimal transformation solution that meets the conversion conditions;
[0051] Extract and calibrate multiple known reference point data from the known measurement point data information, and convert the multiple known reference point data into the robot coordinate system through the optimal transformation solution to obtain multiple system establishment and calibration points; establish a workpiece measurement coordinate system based on the multiple system establishment and calibration points, and the workpiece measurement coordinate system is used to measure the workpiece.
[0052] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0053] When the measuring camera moves to each preset measuring position, the surface measurement data collected by the measuring camera for the calibration workpiece and the terminal position information of the mobile robot are obtained;
[0054] Based on the calibration transformation matrix between the measuring camera and the end of the mobile robot, the surface measurement data is converted to the robot coordinate system of the mobile robot through the end posture information of the mobile robot at each preset measurement position, and the measurement point cloud data of the calibrated workpiece is obtained;
[0055] Extract the measuring point location information from the measured point cloud data; match the measuring point location information with the known measuring point data information to determine the optimal transformation solution that meets the conversion conditions;
[0056] Extract and calibrate multiple known reference point data from the known measurement point data information, and convert the multiple known reference point data into the robot coordinate system through the optimal transformation solution to obtain multiple system establishment and calibration points; establish a workpiece measurement coordinate system based on the multiple system establishment and calibration points, and the workpiece measurement coordinate system is used to measure the workpiece.
[0057] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0058] When the measuring camera moves to each preset measuring position, the surface measurement data collected by the measuring camera for the calibration workpiece and the terminal position information of the mobile robot are obtained;
[0059] Based on the calibration transformation matrix between the measuring camera and the end of the mobile robot, the surface measurement data is converted to the robot coordinate system of the mobile robot through the end posture information of the mobile robot at each preset measurement position, and the measurement point cloud data of the calibrated workpiece is obtained;
[0060] Extract the measuring point location information from the measured point cloud data; match the measuring point location information with the known measuring point data information to determine the optimal transformation solution that meets the conversion conditions;
[0061] Extract and calibrate multiple known reference point data from the known measurement point data information, and convert the multiple known reference point data into the robot coordinate system through the optimal transformation solution to obtain multiple system establishment and calibration points; establish a workpiece measurement coordinate system based on the multiple system establishment and calibration points, and the workpiece measurement coordinate system is used to measure the workpiece.
[0062] The above-mentioned workpiece measurement coordinate system determination method, device, computer equipment, computer-readable storage medium and computer program product obtain the surface measurement data obtained by the measuring camera at each preset measurement position for the calibration workpiece, and obtain the terminal posture information of the mobile robot when the measuring camera moves to each preset measurement position, and based on the calibration conversion matrix between the measuring camera and the terminal of the mobile robot, through the terminal posture information of the mobile robot at each preset measurement position, each surface measurement data is converted to the robot coordinate system of the mobile robot to obtain the measurement point cloud data of the calibration workpiece. Thus, the measuring point position information is extracted from the measuring point cloud data, the measuring point position information is matched with the known measuring point data information, and the optimal transformation solution that meets the transformation conditions is determined. Finally, multiple known reference point position data in the known measuring point data information are extracted and calibrated, and the multiple known reference point position data are converted to the robot coordinate system through the optimal transformation solution to obtain multiple system establishment calibration points, and the workpiece measurement coordinate system is established based on the multiple system establishment calibration points. The workpiece measurement coordinate system is used for workpiece measurement. The aforementioned determination method utilizes the known measuring point data information in the calibration workpiece, and considers the relative structure between the measuring camera and the end of the mobile robot to transform the robot coordinate system, thereby transforming the basic reference point extracted from the coordinate system to the robot coordinate system, and the obtained workpiece measurement coordinate system and the coordinate system deviation of the known measuring point data information are small. Secondly, the coordinate system is established by extracting the basic reference point from the coordinate system of the known measuring point data information in the calibration workpiece. Even if there are dead angles and blind spots, that is, when the reference features of the calibration workpiece cannot be completely and comprehensively extracted, it will not affect the establishment of the workpiece measurement coordinate system. It can be seen that since the coordinate system deviation of the workpiece measurement coordinate system and the known measuring point data information is small, and even if there are dead angles and blind spots, it will not affect the establishment of the workpiece measurement coordinate system, thereby improving the accuracy of the determination of the measurement coordinate system. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1 is a system architecture diagram of a system for determining a workpiece measurement coordinate system in one embodiment;
[0065] Figure 2 A schematic diagram of a process of establishing and measuring a workpiece measurement coordinate system in one embodiment;
[0066] Figure 3 is a schematic flow chart of a method for determining a workpiece measurement coordinate system in one embodiment;
[0067] Figure 4 A schematic diagram of a flow chart for determining an optimal transformation solution that satisfies a conversion condition in one embodiment;
[0068] Figure 5 A schematic diagram of a process of establishing a workpiece measurement coordinate system based on multiple system establishment and calibration points in one embodiment;
[0069] Figure 6 A schematic diagram of a complete flow chart of a method for determining a workpiece measurement coordinate system in one embodiment;
[0070] Figure 7 A schematic diagram of a complete process of a method for measuring a workpiece based on a workpiece measurement coordinate system in one embodiment;
[0071] Figure 8 is a structural block diagram of a device for determining a workpiece measurement coordinate system in one embodiment;
[0072] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0074] With the rapid development of science and technology, robots are used in different fields to perform different tasks. Intelligent robots can measure and acquire three-dimensional data in three-dimensional space. However, intelligent robots need to use precise three-dimensional space measuring instruments to acquire three-dimensional data. The coordinate information obtained by the measuring instrument is based on the system's own coordinate system. Therefore, building a measurement coordinate system in the workpiece measurement scenario is the basis for robot measurement and calibration. At present, the measurement coordinate system for the measurement information extracted and calculated by the measurement system for the workpiece to be measured is mostly established by using additional feature points installed near the workstation or existing scanning data on the fixture. At this time, it is often required that the workpiece cannot block the reference features when it is placed or clamped on the workstation. In the case where the reference features are blocked by the fixture, there are dead angles and blind spots. At this time, the reference features of the workpiece itself cannot be smoothly extracted to establish the measurement coordinate system, or the existence of occlusion will cause the accuracy of the established measurement coordinate system to be low. Therefore, how to improve the accuracy of the determination of the measurement coordinate system is an urgent problem to be solved.
[0075] Based on this, the present application provides a method for determining a workpiece measurement coordinate system to improve the accuracy of the determination of the measurement coordinate system. The method for determining a workpiece measurement coordinate system provided in the embodiment of the present application is specifically applied to Figure 1 The workpiece measurement coordinate system is shown in the determination system. The workpiece measurement coordinate system determination system includes at least a processor 101, a measuring camera 102, a mobile robot 103 and a calibration workpiece 104. The aforementioned calibration workpiece 104 itself has processing and manufacturing information or third-party measurement information. Therefore, the calibration workpiece 104 is a reference workpiece with known measuring point data information. The end joint of the mobile robot 103 is installed with a flange, that is, the mobile robot 103 fixes the measuring camera 102 through the installed flange. There is a connecting cable between the processor 101 and the mobile robot 103 to ensure the communication connection between the processor 101 and the mobile robot 103.
[0076] Specifically, after the mobile robot 103 drives the measuring camera 102 to complete the action of running to the preset measurement position along the predetermined trajectory under the instruction of the processor 101, the processor 101 sends a work trigger signal to the measuring camera 102. After receiving the trigger signal, the measuring camera 102 obtains the surface measurement data of the calibration workpiece 104 within the field of view and transmits it back to the processor 101. At this time, the processor 101 also obtains the terminal posture information of the mobile robot 103. Then, under the instruction of the processor 101, the mobile robot 103 drives the measuring camera 102 to run continuously to different preset measurement positions, and obtains the surface measurement data of the calibration workpiece 104 at different preset measurement positions in a similar manner as described above, and records the terminal posture information of the mobile robot 103 at each preset measurement position.
[0077] Based on this, the processor 101 converts the surface measurement data corresponding to the preset measurement position to the robot coordinate system of the mobile robot 103 based on the calibration conversion matrix between the measuring camera 102 and the end of the mobile robot 103 through the end posture information recorded in the above-mentioned manner at each preset measurement position, and obtains the measurement point cloud data of the calibration workpiece 104. At this time, the processor 101 extracts the measurement point information from the measurement point cloud data of the calibration workpiece 104 to obtain the measurement point position information, and matches it with the known measurement point data information of the calibration workpiece 104, thereby converting multiple known reference point position data to the robot coordinate system of the mobile robot 103, obtaining multiple system establishment calibration points, and thus establishing the workpiece measurement coordinate system. At this time, the measurement results can be calculated and constructed in the workpiece measurement coordinate system as the measurement output of the workpiece to be measured to complete the workpiece measurement.
[0078] For ease of understanding, the workpiece measurement coordinate system is established under the workpiece measurement coordinate system determination system, and the measurement process based on the workpiece measurement coordinate system is as follows: Figure 2 The schematic diagram of the workpiece measurement coordinate system establishment and measurement process is shown:
[0079] Step 201 : After the mobile robot 103 drives the measuring camera 102 to complete the action of running along a predetermined trajectory to a predetermined preset measuring position under the instruction of the processor 101 , the processor 101 sends a work trigger signal to the measuring camera 102 .
[0080] Step 202 : After receiving the trigger signal, the measuring camera 102 obtains the surface measurement data of the calibrated workpiece 104 within the field of view and transmits it back to the processor 101 .
[0081] Step 203 : The processor 101 obtains the current terminal position information of the mobile robot 103 .
[0082] Step 204: The mobile robot 103 drives the measuring camera 102 to continuously move to different preset measurement positions under the instruction of the processor 101, and obtains the surface measurement data of the calibration workpiece 104 at different preset measurement positions in a similar manner as described above, and records the terminal position information of the mobile robot 103 at each preset measurement position.
[0083] Step 205: The processor 101 converts the surface measurement data corresponding to the preset measurement positions into the robot coordinate system of the mobile robot 103 based on the calibration transformation matrix between the measuring camera 102 and the end of the mobile robot 103 and the end posture information at each preset measurement position recorded in the aforementioned manner, thereby obtaining the surface measurement point cloud data corresponding to each preset measurement position.
[0084] Step 206 : The processor 101 performs data aggregation processing on the measured point cloud data of each surface to obtain the measured point cloud data of the calibration workpiece 104 .
[0085] Step 207 : The processor 101 extracts measurement point information from the measurement point cloud data of the calibration workpiece 104 to obtain measurement point position information.
[0086] Step 208 : The processor 101 matches the measuring point position information with the known measuring point data information of the calibration workpiece 104 to determine the optimal transformation solution that meets the transformation condition.
[0087] Step 209 , the processor 101 extracts and calibrates a plurality of known reference point data from the known measurement point data information of the calibration workpiece 104 , and transforms the plurality of known reference point data into the robot coordinate system of the mobile robot 103 through an optimal transformation solution to obtain a plurality of system calibration points.
[0088] Step 210, determine the calibration workpiece as multiple calibration sub-workpieces according to actual needs, and the processor 101 obtains multiple system establishment calibration points of each calibration sub-workpiece in the above-mentioned manner. At this time, the three-dimensional coordinates represented by the multiple system establishment calibration points of each calibration sub-workpiece are numerically averaged to obtain multiple target system establishment calibration points, and then the workpiece measurement coordinate system is established based on the multiple target system establishment calibration points.
[0089] Step 211 , remove the calibration workpiece, place the workpiece to be measured and perform the actual measurement steps from step 201 to step 207 .
[0090] Step 212: The processor 101 calculates and constructs a measurement result based on the determined workpiece measurement coordinate system and in the established workpiece measurement coordinate system as a measurement output of the workpiece to be measured, so as to complete the workpiece measurement.
[0091] The above process is described in detail below. In an exemplary embodiment, Figure 3 As shown, a method for determining a workpiece measurement coordinate system is provided. The method for determining a workpiece measurement coordinate system is applied to a processor of a workpiece measurement coordinate system determination system. The workpiece measurement coordinate system determination system is specifically as follows: Figure 1 As shown, the system at least includes a processor, a measuring camera, a mobile robot and a calibration workpiece. Figure 1 The processor 101 in the embodiment is taken as an example to illustrate, and the following steps 302 to 308 are included. Among them:
[0092] Step 302 : When the measuring camera moves to each preset measuring position, the surface measurement data collected by the measuring camera for the calibration workpiece and the terminal position information of the mobile robot are obtained.
[0093] Among them, the calibration workpiece itself has processing and manufacturing information or third-party measurement information, that is, the calibration workpiece is a reference workpiece with known measurement point data information. The aforementioned known measurement point data information can be the measurement point information obtained by third-party measurement, or it can be the measurement point information given during processing and manufacturing. The end joint of the mobile robot is equipped with a flange, that is, the mobile robot fixes the measurement camera through the installed flange. The aforementioned preset measurement position is a position determined based on the size of the calibration workpiece and the actual measurement needs, and there are multiple preset measurement positions.
[0094] Secondly, the surface measurement data is specifically a (3D, three dimensional) image obtained by acquiring an image of the calibration workpiece at a preset measurement position. Therefore, the surface measurement data specifically includes the surface point cloud data of the calibration workpiece, and the shape of the measurement points of the calibration workpiece in the surface point cloud data of the calibration workpiece needs to be extracted by subsequent algorithms, that is, the measurement points of the calibration workpiece can be round holes, square holes, waist holes, bosses, etc., that is, the shape of the measurement points of the calibration workpiece is not limited here. The terminal posture information at least includes: the transformation matrix between the terminal of the mobile robot and the robot base coordinates, and the rotation angle of the terminal joint of the mobile robot, that is, the terminal posture information is specifically the terminal posture coordinate conversion parameters, and the terminal posture coordinate conversion parameters at least include rotation transformation information R and parallel transformation information t.
[0095] Specifically, the processor obtains the surface measurement data obtained by the measuring camera at each preset measurement position for the calibration workpiece, and also obtains the terminal posture information of the mobile robot that grabs the measuring camera when the measuring camera moves to each preset measurement position. At this time, there is a connecting cable between the processor and the mobile robot to ensure the communication connection between the processor and the mobile robot. Therefore, the processor sends a moving trajectory instruction to the mobile robot through the connecting cable. After receiving the moving trajectory instruction sent by the processor, the mobile robot fixes the measuring camera through the flange installed on the end joint, and drives the measuring camera to move to the preset measurement position. The arrival at the preset measurement position is controlled by the preset program of the mobile robot, that is, the mobile robot runs the trajectory program to confirm that it has reached the preset measurement position. Based on this, the mobile robot will send an arrival signal to the processor after confirming that it has reached the preset measurement position. The processor determines that the mobile robot has driven the measuring camera to the preset measurement position based on the arrival signal, and at this time sends a measurement trigger signal to the measuring camera through the connecting cable.
[0096] Therefore, after receiving the measurement trigger signal sent by the processor, the measuring camera takes a picture of the calibration workpiece within the field of view to obtain the surface measurement data at the preset measurement position, and transmits the collected surface measurement data back to the processor through the connection cable, so that the processor obtains the surface measurement data obtained when the mobile robot drives the measuring camera to different preset measurement positions. For example, when the mobile robot drives the measuring camera to the preset measurement position A1, the measuring camera obtains the surface measurement data of the preset measurement position A1 obtained by performing 3D image acquisition on the calibration workpiece. Similarly, when the mobile robot drives the measuring camera to the preset measuring position A2, the measuring camera acquires 3D images of the calibration workpiece to obtain the surface measurement data of the preset measuring position A2. When the mobile robot drives the measuring camera to the preset measuring position A3, the measuring camera acquires 3D images of the calibration workpiece to obtain surface measurement data of the preset measuring position A3. .
[0097] Furthermore, when the mobile robot drives the measuring camera to different preset measurement positions, the mobile robot can also directly obtain the terminal posture information at the preset measurement position. The aforementioned terminal posture information is specifically the terminal posture coordinate conversion parameters, and the terminal posture coordinate conversion parameters at least include rotation transformation information R and parallel transformation information t. The aforementioned rotation transformation information and parallel transformation information are both conversions of the terminal coordinate system of the mobile robot to the robot base coordinate system of the mobile robot. Therefore, the mobile robot transmits the terminal posture information at the preset measurement position back to the processor through the connecting cable, so that the processor can also obtain the terminal posture information of the preset measurement position when the mobile robot drives the measuring camera to different preset measurement positions. For example, when the mobile robot drives the measuring camera to the preset measurement position A1, the terminal posture information of the preset measurement position A1 transmitted back by the mobile robot is obtained. Similarly, when the mobile robot drives the measuring camera to the preset measuring position A2, the end position information of the preset measuring position A2 transmitted back by the mobile robot is obtained. When the mobile robot drives the measuring camera to the preset measuring position A3, the terminal position information of the preset measuring position A3 transmitted back by the mobile robot is obtained. .
[0098] Therefore, the surface measurement data of each preset measurement position and the terminal posture information of each preset measurement position can be obtained by the above method, that is, the surface measurement set C and the terminal posture information set T can be obtained. From the above example, it can be known that the surface measurement set C includes: the surface measurement data of the preset measurement position A1 , Surface measurement data of preset measurement position A2 , Surface measurement data of preset measurement position A3 The terminal position information set T includes: the terminal position information of the preset measurement position A1 , the end position information of the preset measurement position A2 , the end position information of the preset measurement position A3 .
[0099] It can be understood that since the operation of the mobile robot is controlled by a preset program, the mobile robot can also run the preset program to determine whether to move to the preset measurement posture. That is, when the mobile robot moves to the preset measurement posture, it can also send an execution completion signal to the processor. The processor determines that the mobile robot has moved to the preset measurement posture based on the execution completion signal. At this time, a measurement trigger signal is sent to the measuring camera through the connecting cable to trigger the measuring camera to execute subsequent similar processes. It will not be repeated here.
[0100] Step 304 , based on the calibration transformation matrix between the measurement camera and the end of the mobile robot, and through the end posture information of the mobile robot at each preset measurement position, each surface measurement data is converted to the robot coordinate system of the mobile robot to obtain the measurement point cloud data of the calibrated workpiece.
[0101] The calibration transformation matrix is specifically a hand-eye calibration matrix, that is, the calibration transformation matrix is a fixed transformation relationship between the measurement camera and the end of the mobile robot. Secondly, the measurement point cloud data is the complete point cloud data of the workpiece surface of the calibration workpiece.
[0102] Specifically, the processor first obtains the calibration transformation matrix between the measuring camera and the end of the mobile robot, that is, the processor can directly obtain the fixed transformation relationship between the measuring camera and the end of the mobile robot, and determine the aforementioned fixed transformation relationship as the calibration transformation matrix, or the processor can also obtain the joint angle information of the mobile robot, obtain the end position transformation information of the mobile robot through the mobile robot model, and determine the end position transformation information as the calibration transformation matrix.
[0103] Based on this, the processor converts each surface measurement data to the robot coordinate system of the mobile robot based on the calibration conversion matrix between the measuring camera and the end of the mobile robot, and obtains the measurement point cloud data of the calibrated workpiece through the end posture information of the mobile robot at each preset measurement position. That is, for each preset measurement position, the server converts the surface measurement data to the robot coordinate system of the mobile robot through the preset recorded calibration conversion matrix between the measuring camera and the end of the mobile robot through the end posture information. Since only the surface measurement point cloud data at one preset measurement position can be obtained when the coordinate system is converted for the surface measurement data at each preset measurement position, it is necessary to uniformly process the surface measurement point cloud data at all preset measurement positions in order to obtain the complete measurement point cloud data representing the workpiece surface of the calibrated workpiece.
[0104] In a specific embodiment, each surface measurement data is converted into the robot coordinate system of the mobile robot to obtain the measurement point cloud data of the calibrated workpiece, including: converting the surface measurement data at each preset measurement position into the robot coordinate system of the mobile robot to obtain the surface measurement point cloud data corresponding to each preset measurement position; performing data aggregation processing on each surface measurement point cloud data to obtain the measurement point cloud data of the calibrated workpiece.
[0105] The data aggregation process is to unify the point cloud data into a unified point cloud data set. Specifically, the processor uses the terminal pose information of the preset measurement position to , and the calibration transformation matrix between the measurement camera and the end of the mobile robot , the surface measurement data of the preset measurement position After conversion to the robot coordinate system of the mobile robot, the surface measurement point cloud data corresponding to the preset measurement position is obtained. Therefore, the surface measurement point cloud data corresponding to all preset measurement positions can be unified to obtain the measurement point cloud data. To facilitate understanding of the above conversion method, formula (1) is used as an example for explanation:
[0106] ; (1)
[0107] in, Represents surface measurement point cloud data at preset measurement locations, Represents surface measurement data at a preset measurement location, Indicates the end position information of the preset measurement position, represents the calibration transformation matrix between the measurement camera and the end of the mobile robot.
[0108] For example, it can be seen from the above examples that the surface measurement set C includes: surface measurement data of the preset measurement position A1 , Surface measurement data of preset measurement position A2 , Surface measurement data of preset measurement position A3 Then, through formula (1), we can get: the surface measurement point cloud data of the preset measurement position A1 , surface measurement point cloud data of preset measurement position A2 , surface measurement point cloud data of preset measurement position A3 Then the surface measurement point cloud data , surface measurement point cloud data , and surface measurement point cloud data Unify them to get the measured point cloud number of the calibration workpiece .
[0109] It can be understood that the data processing method introduced in the embodiment of the present application of first unifying the surface measurement point cloud data corresponding to all preset measurement positions to obtain the measurement point cloud data, and then performing subsequent measurement point extraction can also be a data processing method of directly performing subsequent measurement point extraction on the surface measurement point cloud data corresponding to the preset measurement positions, and then finally performing unified processing. Therefore, the unified processing method for the surface measurement point cloud data corresponding to the preset measurement positions is optional.
[0110] Step 306: extracting the measuring point position information from the measuring point cloud data; matching the measuring point position information with the known measuring point data information, and determining the optimal transformation solution that meets the transformation conditions.
[0111] The measuring point position information includes: the spatial coordinates of the center point of each measuring point and the measuring point number of each measuring point. Secondly, the optimal transformation solution is used to transform the known point position data into the robot coordinate system.
[0112] Specifically, the processor extracts the measuring point position information for the measuring point cloud data, that is, the processor extracts the measuring points for the measuring point cloud data, and determines the spatial coordinates and measuring point number of the center point of each measuring point. And it can be seen from the above embodiments that if the surface measuring point cloud data corresponding to the preset measuring position is not uniformly processed, the processor can extract the measuring points for the surface measuring point cloud data corresponding to each preset measuring position, so as to extract the measuring points in each surface measuring point cloud data, and determine the spatial coordinates and measuring point number of the center point of each measuring point.
[0113] Furthermore, the processor matches the measuring point position information with the known measuring point data information to determine the optimal transformation solution that meets the transformation conditions. Since the measuring point position information includes the spatial coordinates of the center point of the measuring point and the measuring point number, matching can be performed based on the measuring point number of each measuring point and the measuring point number of each known measuring point, and the optimal transformation solution that meets the transformation conditions can be determined based on the matched spatial coordinates of the measuring point and the spatial coordinates of the known measuring point.
[0114] The following is an introduction to how to extract measurement point information from the measurement point cloud data. It can be understood that the method of extracting measurement point information from the surface measurement point cloud data corresponding to each preset measurement position is similar to the following introduction and will not be repeated here. In a specific embodiment, the measurement point position information is extracted from the measurement point cloud data, including: determining the measurement point number of each measurement point; based on the measurement point number of each measurement point, extracting the spatial coordinates of the center point of the measurement point on the calibration workpiece in the robot coordinate system from the measurement point cloud data; based on the spatial coordinates of the center point of each measurement point and the measurement point number of each measurement point, constructing the measurement point position information.
[0115] Among them, the measurement point is the measurement point obtained on the surface of the calibration workpiece, and the measurement point existing on the calibration workpiece has a pre-defined known measurement point number. Therefore, the measurement point number of the measurement point is the known measurement point number of the measurement point on the calibration workpiece. Secondly, the spatial coordinate is the spatial information of the robot coordinate system. Specifically, the processor first determines the known measurement point number of the measurement point on the calibration workpiece, and determines the known measurement point number of the measurement point as the measurement point number of the measurement point , for example, the measuring point number of measuring point B1 , measure the point number of point B2 , measure the point number of point B3 .
[0116] Furthermore, since the measuring point number of the measuring point is the known measuring point number of the measuring point on the calibration workpiece, the region of interest (ROI) corresponding to each known measuring point number can also be determined in advance. Then, the processor can extract the regional point cloud data of the measuring point on the calibration workpiece from the measuring point cloud data based on the ROI matched by the measuring point number, and then perform data processing on the regional point cloud data to determine the spatial coordinates of the center point of the measuring point in the robot coordinate system [ ]. For example, measure the spatial coordinates of the center point of measuring point B1 in the robot coordinate system [ ], measure the spatial coordinates of the center point of measuring point B2 in the robot coordinate system [ ], measure the spatial coordinates of the center point of measuring point B3 in the robot coordinate system [ ].
[0117] Thus, based on the determined spatial coordinates of the center point of each measuring point and the obtained measuring point number of each measuring point, the measuring point position information is constructed. Based on the above examples, it can be seen that the measuring point information can be specifically , , .
[0118] As mentioned above, the measuring points of the calibration workpiece can be in the shape of round holes, square holes, waist-shaped holes, bosses, etc. The following takes the measuring points on the calibration workpiece as a circle as an example to introduce in detail the method of determining the spatial coordinates of the center point: In a specific embodiment, the measuring points on the calibration workpiece are circular.
[0119] Based on this, based on the measuring point number of each measuring point, the spatial coordinates of the center point of the measuring point on the calibration workpiece in the robot coordinate system are extracted from the measuring point cloud data, including: based on the measuring point number of each measuring point, cutting out the regional point cloud data containing the measuring point in the measuring point cloud data; performing plane fitting on each regional point cloud data to obtain the maximum plane of each regional point cloud data; for each regional point cloud data, projecting the regional point cloud data onto the maximum plane along the normal vector of the maximum plane to obtain projected point cloud data; converting the projected point cloud data into two-dimensional image point data through conversion parameters, and obtaining the outer circular contour and the inner circular contour based on the two-dimensional image point data; performing circle fitting on the inner circular contour to obtain the center coordinates of the circle, back-projecting the center coordinates of the circle onto the maximum plane to obtain the spatial coordinates of the hole center, and using the spatial coordinates of the hole center as the spatial coordinates of the center point of the measuring point in the robot coordinate system.
[0120] Specifically, the processor can obtain the ROI from the measured point cloud data based on the ROI matched by the measured point number. The regional point cloud data of the measured points on the calibration workpiece is extracted, and the regional point cloud data U containing the measured points is cut out from the measured point cloud data. At this time, the regional point cloud data U is the approximate regional point cloud data containing the measured points to be measured, and the regional point cloud data matches the measuring point number. For example, based on the measuring point number The matched ROI is obtained from the measured point cloud data Extract regional point cloud data Based on the measurement point number The matched ROI is obtained from the measured point cloud data Extract regional point cloud data Based on the measurement point number The matched ROI is obtained from the measured point cloud data Extract regional point cloud data .
[0121] Furthermore, the processor performs plane fitting on the point cloud data of each region to obtain the maximum plane of the point cloud data of each region. That is, the processor performs random sample consistency (RANSAC) plane fitting on each region point cloud data to obtain the maximum plane P obtained by fitting, that is, the maximum plane of the point cloud data of each region. Based on this, for each region point cloud data, the normal vector of the regional point cloud data along the maximum plane P is calculated. Projected onto the maximum plane P, the projected point cloud data is obtained. At this time, the conversion parameters of each area point cloud data are determined based on the maximum plane of each area point cloud data, so that the projected point cloud data of each area point cloud data is converted into two-dimensional image point data through the obtained conversion parameters. To facilitate the understanding of the above conversion process, formula (2) is used as an example for explanation:
[0122] ; (2)
[0123] in, Represents two-dimensional image point data, Represents the conversion parameters, Represents projected point cloud data.
[0124] Thus, the processor obtains the outer circular contour and the inner circular contour based on the two-dimensional image point data, and at this time only performs circle fitting on the inner circular contour, that is, performs circle fitting on the inner circular contour to obtain the coordinates of the circle center. , the center coordinates Back-project to the maximum plane P to obtain the spatial coordinates of the hole center. At this time, the spatial coordinates of the hole center are [ ], therefore, the processor uses the spatial coordinates of the hole center as the spatial coordinates of the center point of the measurement point in the robot coordinate system.
[0125] The following specifically introduces a method for determining the conversion parameters of the point cloud data of each area based on the maximum plane of the point cloud data of each area: In a specific embodiment, the method for determining the workpiece measurement coordinate system also includes: determining the plane parameters of each maximum plane; the plane parameters include plane vectors and plane points passing through the maximum plane; taking the plane point as the origin as the first point, taking the normal vector of the maximum plane as the point obtained in the vertical axis direction as the second point, and taking any point on the maximum plane with a preset length from the plane point as the longitudinal axis direction to obtain the third point; obtaining the conversion parameters through the first point, the second point and the third point.
[0126] Specifically, the processor determines the plane parameters of the maximum plane P of the point cloud data in each region. The aforementioned plane parameters include the plane vector [ ], and the plane points passing through the maximum plane [ The plane equation of the aforementioned maximum plane P is explained using formula (3) as an example:
[0127] ; (3)
[0128] in, Represents a plane vector In , Represents a plane vector In , Represents a plane vector In .
[0129] Based on this, the processor needs to transform the normal vector of the regional point cloud data along the maximum plane P based on the plane parameters of the maximum plane for each regional point cloud data. Project it onto the maximum plane P to obtain the projected point cloud data. To facilitate understanding of the projection process of the plane parameters based on the maximum plane, take formula (4) and formula (5) as examples:
[0130] ; (4)
[0131] ; (5)
[0132] in, represents the projected point, [ ] represents the coordinates of a point on the plane that passes through the maximum plane, [ ] represents a plane vector. The point after the above projection The point coordinates are [ ],point[ ] is a point belonging to the regional point cloud data U.
[0133] Further, the processor uses the plane point as the origin as the first point, uses the normal vector of the maximum plane as the point obtained in the vertical axis direction as the second point, and uses any point on the maximum plane with a preset length from the plane point as the vertical axis direction to obtain the third point; and obtains the conversion parameter through the first point, the second point, and the third point. In this embodiment, the preset value is 1. That is, the processor uses the plane point [ ] is the origin as the first point, specifically the normal vector of the largest plane P The coordinate information in is the vertical axis direction (z axis direction) and the first point [ ] add, and get point [ ], and the obtained points [ ] as the second point. Then take any point on the maximum plane P whose distance from the plane point is 1 The vertical axis direction (y axis direction) is directly used as the third point [ ], then construct three sets of equations corresponding to the preset point set {[0, 0, 0], [0, 0, 1], [0, 1, 0]}, and solve them through singular value decomposition (SVD) to obtain the conversion parameters , then the conversion parameters Including rotation variables and translation variables .
[0134] To facilitate understanding of the specific construction process of the conversion parameters, formula (6) and formula (7) are used as examples for explanation:
[0135] ; (6)
[0136] ; (7)
[0137] in, Indicates the conversion parameters, [ ] represents the coordinates of the first point, represents the point coordinates of the second point, The point coordinates representing the third point.
[0138] Secondly, the following specifically introduces the method of obtaining the outer circular contour and the inner circular contour: Based on this, the outer circular contour and the inner circular contour are obtained based on the two-dimensional image point data, including: binarizing the two-dimensional image point data pixel by pixel to obtain binary image data; extracting the connected domain contour of the binary image data to obtain the outer circular contour and the inner circular contour.
[0139] Specifically, the processor performs binarization processing on the two-dimensional image point data to obtain the binarized image data, and considering that the two-dimensional image point data is composed of multiple pixels, the binarization processing is that the processor performs binarization processing on the two-dimensional image point data pixel by pixel to obtain the binarized image data, that is, when the pixel value of the pixel in the two-dimensional image point data is less than the preset pixel value, the pixel is set to 1, and when the pixel value of the pixel in the two-dimensional image point data is greater than or equal to the preset pixel value, the pixel is set to 0. In the embodiment of the present application, the aforementioned preset pixel value is 125.
[0140] To facilitate understanding of the binarization process, we take formula (8) as an example:
[0141] ; (8)
[0142] in, Represents the pixel conversion parameters after binarization. Represents the pixel point in the two-dimensional image point data, Indicates the preset pixel value.
[0143] Furthermore, the processor extracts the connected domain contour from the binary image data to obtain the outer circular contour and the inner circular contour. Perform classic connected domain contour extraction, and then obtain the outer circular contour and the inner circular contour.
[0144] Step 308, extract and calibrate multiple known reference point data in the known measurement point data information, and convert the multiple known reference point data into the robot coordinate system through the optimal transformation solution to obtain multiple system establishment and calibration points; establish a workpiece measurement coordinate system based on the multiple system establishment and calibration points, and the workpiece measurement coordinate system is used to measure the workpiece.
[0145] Specifically, the processor extracts and calibrates multiple known reference point data in the known measuring point data information, that is, the known measuring point data information includes the known point data corresponding to the known measuring point, and the known reference point data in the known point data corresponding to the measuring point is selected. For ease of understanding, taking the x, y, and z axes as an example, three reference points [L, 0, 0], [0, W, 0], and [0, 0, H] are set according to the length L, width W, and height H size parameters of the calibration workpiece, and then the origin [0, 0, 0] is selected as the reference point, thereby forming multiple known reference points in the known point data. = {[0, 0, 0], [L, 0, 0], [0, W, 0], [0, 0, H]}. At this point, the processor can also number each known reference point. , obtain the final known reference point data = { , }.
[0146] Furthermore, the processor transforms the data of the plurality of known reference points into the robot coordinate system through the optimal transformation solution to obtain a plurality of system establishment calibration points. That is, the coordinates of the known reference points are transformed into the robot coordinate system through the optimal transformation solution to obtain a plurality of system establishment calibration points.
[0147] To facilitate understanding of the aforementioned data conversion process, we take formula (9) as an example:
[0148] ; (9)
[0149] in, represents the calibration point of the system. represents the optimal transformation solution, Indicates a known reference point. You can now record The midpoint is used as the calibration point for establishing the measurement coordinate system. .
[0150] It is understandable that the embodiment of the present application provides a method of selecting known reference points using the x, y, and z axes and the length, width, and height dimension parameters of the calibration workpiece. In practical applications, spatial points greater than 3 can be randomly selected in the calibration workpiece as basic reference points. For example, three measuring points A, B, and C in the calibration workpiece are selected, or any three non-collinear fixed points A[0.001, 1000.99, -100.37], B[1000.039, -1000.99, -0.37], and C[375.6, 200.3, -7000]. Therefore, the method of selecting known reference points to determine the known reference point data is not limited here.
[0151] Furthermore, the processor establishes a workpiece measurement coordinate system based on multiple system establishment and calibration points, and the workpiece measurement coordinate system is used to measure the workpiece. Since the established workpiece measurement coordinate system is used to measure the workpiece, the following describes how to measure the workpiece:
[0152] The processor removes the calibration workpiece, places the workpiece to be measured, and repeats the actual measurement method described in the above embodiment to obtain a real-time measurement point cloud set of the workpiece to be measured. , and extract the measurement point information of the real-time measurement point cloud set of the workpiece to be measured to obtain the required real-time measurement information, and then the processor applies the aforementioned workpiece measurement coordinate system to convert, calculate and construct the real-time measurement information, so that the result obtained is the measurement output of the workpiece to be measured. That is, using the system calibration point With known benchmark data Based on to calculate the optimal transformation , and then through the optimal transformation Conversion based on real-time measurement point cloud collection The extracted real-time measurement information is transferred to the obtained workpiece measurement coordinate system, and the measurement results are converted, calculated and constructed in the workpiece measurement coordinate system to obtain the measurement output of the workpiece to be measured.
[0153] It can be understood that the method mentioned in the embodiment of the present application of first establishing a workpiece measurement coordinate system for measuring the workpiece, converting the measurement data of the workpiece to be measured, and then extracting and calculating the measurement information, can also be to first extract and calculate the measurement information of the workpiece to be measured and then establish a workpiece measurement coordinate system for measuring the workpiece to convert the coordinate system of the obtained measurement information, which is not limited here.
[0154] Secondly, the method mentioned in the embodiment of the present application of using the reference point set to perform pairing calculation to convert the measurement information to the new workpiece measurement coordinate system can also be to convert the measurement information to the new workpiece measurement coordinate system by establishing the X-axis, Y-axis, and Z-axis through the reference point set and then calculating the origin translation and axis rotation transformation matrix. That is, first select an axial direction of the workpiece measurement coordinate system, such as selecting the X-axis, then the axis vector of the X-axis is [1, 0, 0]. Then, based on the reference point calibration result of the robot coordinate system, select the vertex k along the X-axis and obtain the vector from the vertex k to the origin 0 in the reference point calibration result. , the vector Normalize to get vector The normal vector Then, according to the calculation method of the rotation matrix between vectors (such as: cross product to obtain the rotation axis, dot product to obtain the angle, and use Rodrigues formula to solve the rotation matrix), calculate [1, 0, 0] to normal vector The rotation matrix r is used, and finally the origin of the calibration result is calibrated using the reference point The translation matrix t is obtained by subtracting the origin 0 [0, 0, 0] in the workpiece measurement coordinate system, and the aforementioned transformation is performed through the obtained rotation matrix r and the translation matrix t.
[0155] It should be noted that all examples in the embodiments of the present application are only shown to facilitate understanding of the present application, and the implementation methods of the present application are not limited in this regard.
[0156] In the above-mentioned method for determining the workpiece measurement coordinate system, the known measuring point data information in the calibration workpiece is used to consider the relative structure between the measuring camera and the end of the mobile robot to transform the robot coordinate system, so that the basic reference point extracted by the coordinate system is transformed into the robot coordinate system, and the obtained workpiece measurement coordinate system and the coordinate system deviation of the known measuring point data information are small. Secondly, the coordinate system is established by extracting the basic reference point from the coordinate system of the known measuring point data information in the calibration workpiece. Even if there are dead angles and blind spots, that is, when the reference features of the calibration workpiece cannot be completely and comprehensively extracted, it will not affect the establishment of the workpiece measurement coordinate system. It can be seen that since the coordinate system deviation of the workpiece measurement coordinate system and the known measuring point data information is small, and even if there are dead angles and blind spots, it will not affect the establishment of the workpiece measurement coordinate system, thereby improving the accuracy of the determination of the measurement coordinate system.
[0157] In an exemplary embodiment, Figure 4 As shown, the measuring point position information at least includes the measuring point number of each measuring point, and the known measuring point data information at least includes the measuring point number of each known measuring point.
[0158] Based on this, the measuring point position information is matched with the known measuring point data information to determine the optimal transformation solution that meets the conversion conditions, including:
[0159] Step 402, matching is performed based on the measuring point number of each measuring point and the measuring point number of each known measuring point to obtain a plurality of paired point information; wherein the measuring point and the known measuring point belonging to the same paired point information have the same measuring point number, the paired point information includes: the spatial coordinates of the center point of the measuring point and the spatial coordinates of the measuring point of the known measuring point, and the number of the plurality of paired point information is greater than or equal to 3.
[0160] Among them, the measured points and the known points in the paired point information have the same point number, that is, the measured points and the known points with the same point number belong to the same paired point information. Therefore, the paired point information includes the spatial coordinates of the center point of the measured points and the spatial coordinates of the known points, that is, the paired point information includes the spatial coordinates of the center point of the measured points with the same point number obtained based on the aforementioned embodiment, and the spatial coordinates of the known points with the same point number as the measured points, and the spatial coordinates of the points are the coordinate information already existing in the known point data information. Secondly, since it is necessary to solve the optimal transformation solution, and the solution formula of the optimal transformation solution in this embodiment requires at least 3 paired coordinates to be solved, the number of multiple paired point information needs to be greater than or equal to 3.
[0161] Specifically, the processor matches the measurement point number of each measurement point and the measurement point number of each known measurement point, matches the measurement point and the known measurement point with the same measurement point number to the same paired point information, and determines the paired point information through the spatial coordinates of the center point of the measurement point and the spatial coordinates of the measurement point of the known measurement point. For ease of understanding, based on the above example, the measurement point number of the measurement point B1 is , measure the point number of point B2 , measure the point number of point B3 If the measuring point number of measuring point C1 is known , the measuring point number of the known measuring point C2 , the measuring point number of the known measuring point C3 . It can be seen that for the measuring point number , the measured point B1 is the same as the known point C1. , the measured point B2 is the same as the known point C2. , the measured point B3 is the same as the known point C3. Therefore, the paired point information D1 can be formed: the spatial coordinates of the center point of the measured point B1 and the spatial coordinates of the known point C1. Paired point information D2: the spatial coordinates of the center point of the measured point B2 and the spatial coordinates of the known point C2. Paired point information D3: the spatial coordinates of the center point of the measured point B3 and the spatial coordinates of the known point C3.
[0162] From the above example, we can know that the spatial coordinates of the center point of the measuring point B1 in the robot coordinate system are [ ], measure the spatial coordinates of the center point of measuring point B2 in the robot coordinate system [ ], measure the spatial coordinates of the center point of measuring point B3 in the robot coordinate system [ ]. If the spatial coordinates of the measuring point C1 are known [ ], the spatial coordinates of the known measuring point C2 are [ ], the spatial coordinates of the measuring point C3 are known [ Then the pairing point information D1 is specifically: spatial coordinates [ ] and the spatial coordinates of the measuring points[ ]. The pairing point information D2 is specifically: spatial coordinates [ ] and the spatial coordinates of the measuring points[ ]. The matching point information D3 is specifically: spatial coordinates [ ] and the spatial coordinates of the measuring points[ ].
[0163] Step 404: determine the optimal transformation solution that meets the transformation condition through multiple paired point information.
[0164] Specifically, the processor determines the optimal transformation solution that meets the transformation conditions through multiple paired point information, that is, the processor constructs a least squares formula through multiple paired point information, and then uses the SVD algorithm to solve the optimal transformation solution that meets the transformation conditions. , then the optimal transformation solution It also includes the optimal rotation variable and the optimal translation variable. To facilitate understanding of the process of solving the optimal transformation solution, we take formula (10) as an example:
[0165] ; (10)
[0166] in, represents the optimal transformation solution, Indicates the spatial coordinates of the center point of the measurement point in the paired point information. Represents the spatial coordinates of the known measured points in the paired point information.
[0167] Therefore, in practical applications, the optimal transformation solution can be used The spatial coordinates of the known measuring points are converted into the robot coordinate system to obtain the robot measuring point coordinates of the measuring point spatial coordinates. To facilitate understanding of the above conversion process, formula (11) is used as an example for explanation:
[0168] ; (11)
[0169] in, The robot measurement point coordinates representing the spatial coordinates of the measurement point, represents the spatial coordinates of the measuring point, represents the optimal transformation solution.
[0170] It should be noted that all examples in the embodiments of the present application are only shown to facilitate understanding of the present application, and the implementation methods of the present application are not limited in this regard.
[0171] In this embodiment, the measuring point numbers of the known measuring points on the calibrated workpiece are matched with the measuring point numbers of the measuring measuring points to ensure that the coordinates of the same measuring point are actually calculated when solving the optimal transformation solution. The known coordinates are then converted to the robot coordinate system through an accurate optimal transformation solution. The measurement accuracy of the workpiece measurement coordinate system calibrated in this way is high, which further improves the accuracy of the determination of the measurement coordinate system.
[0172] In an exemplary embodiment, the calibration workpiece is a plurality of calibration sub-workpieces, for example, calibration sub-workpiece E1, calibration sub-workpiece E2, calibration sub-workpiece E3, and calibration sub-workpiece E4.
[0173] Based on this, Figure 5 As shown in the figure, multiple known reference point data are converted to the robot coordinate system through the optimal transformation solution to obtain multiple system calibration points, including:
[0174] Step 502 : by using the optimal transformation solution under each calibration sub-workpiece, convert the multiple known reference point data of each calibration sub-workpiece into the robot coordinate system to obtain multiple system establishment calibration points of each calibration sub-workpiece.
[0175] Specifically, the processor performs similar steps as mentioned above for each calibrated sub-workpiece, that is, for each calibrated sub-workpiece, surface measurement data is obtained at each preset measurement position, and the terminal posture information of the mobile robot is obtained, and then for each calibrated sub-workpiece, based on the calibration transformation matrix and through the terminal posture information, each surface measurement data is converted to the robot coordinate system of the mobile robot to obtain the measurement point cloud data of each calibrated sub-workpiece, and then the measurement point information is extracted for the measurement point cloud data of each calibrated sub-workpiece to obtain the measurement point position information of each calibrated sub-workpiece, and then the measurement point position information of each calibrated sub-workpiece is matched with the known measurement point data information of each calibrated sub-workpiece to determine the optimal transformation solution for each calibrated sub-workpiece.
[0176] Furthermore, the processor converts the multiple known reference point data of each calibration sub-workpiece to the robot coordinate system through the optimal transformation solution under each calibration sub-workpiece, and obtains multiple system establishment calibration points of each calibration sub-workpiece. That is, for each calibration sub-workpiece, the processor first extracts and calibrates the multiple known reference point data in the known measurement point data information of each calibration sub-workpiece, and the processor selects the known reference points for each calibration sub-workpiece in a consistent manner. Then, through the data conversion method exemplified by formula (9) in the aforementioned embodiment, for each calibration sub-workpiece, the multiple known reference point data are converted to the robot coordinate system through the optimal transformation solution, and multiple system establishment calibration points are obtained.
[0177] Based on this, the workpiece measurement coordinate system is established based on multiple system calibration points, including:
[0178] Step 504 , numerically average the three-dimensional coordinates represented by the multiple system building calibration points of each calibration sub-workpiece to obtain multiple target system building calibration points.
[0179] Specifically, the processor numerically averages the three-dimensional coordinates represented by the multiple calibration points of each calibration sub-workpiece to obtain multiple target calibration points. That is, the processor numerically averages the multiple calibration points obtained for each calibration sub-workpiece based on the three-dimensional coordinates represented by the multiple calibration points, thereby obtaining the average result of the three-dimensional coordinates of each reference point, and then determines the average result of the three-dimensional coordinates of each reference point as the target calibration point. It can be understood that in actual applications, it is also possible to perform workpiece weight matching for each calibration sub-workpiece, and then perform weighted fusion calculation for the calibration points of each different calibration sub-workpiece, thereby obtaining the weighted fusion result of the three-dimensional coordinates of each reference point, and then determine the weighted fusion result of the three-dimensional coordinates of each reference point as the target calibration point.
[0180] Step 506: Establish a workpiece measurement coordinate system based on multiple target system establishment and calibration points.
[0181] Specifically, the processor repeatedly measures a plurality of calibration sub-workpieces multiple times according to requirements to obtain stable target system establishment calibration points. Therefore, the processor then establishes a workpiece measurement coordinate system based on the plurality of target system establishment calibration points.
[0182] In this embodiment, multiple calibration sub-workpieces are measured repeatedly to obtain stable target system calibration points, thereby ensuring that the obtained target system calibration points avoid errors in a single measurement and ensuring the stability and reliability of the target system calibration points. The workpiece measurement coordinate system is established based on the target system calibration points, which can further improve the stability and reliability of the measurement coordinate system.
[0183] Based on the detailed introduction of the above embodiments, the complete process of the method for determining the workpiece measurement coordinate system in the embodiment of the present application will be described below. In one embodiment, Figure 6 As shown, a method for determining a workpiece measurement coordinate system is provided, and the method is applied to Figure 1 The processor 101 in the embodiment is taken as an example for explanation. In this embodiment, the method includes the following steps:
[0184] Step 601: When the measuring camera moves to each preset measuring position, the surface measurement data collected by the measuring camera for the calibration workpiece and the terminal position information of the mobile robot are obtained; the calibration workpiece includes a plurality of calibration sub-workpieces.
[0185] Step 602: Based on the calibration transformation matrix between the measurement camera and the end of the mobile robot, the surface measurement data at each preset measurement position is converted to the robot coordinate system of the mobile robot through the end posture information of the mobile robot at each preset measurement position, so as to obtain the surface measurement point cloud data corresponding to each preset measurement position.
[0186] Step 603: perform data aggregation processing on the measured point cloud data of each surface to obtain the measured point cloud data of the calibration workpiece.
[0187] Step 604: determine the measurement point number of each measurement point; based on the measurement point number of each measurement point, cut out the area point cloud data including the measurement point from the measurement point cloud data.
[0188] Step 605: Perform plane fitting on the point cloud data of each region to obtain the maximum plane of the point cloud data of each region.
[0189] Step 606 : For each area point cloud data, project the area point cloud data onto the largest plane along the normal vector of the largest plane to obtain projected point cloud data.
[0190] Step 607: Determine the plane parameters of each maximum plane; the plane parameters include the plane vector and the plane points passing through the maximum plane.
[0191] Step 608, taking the plane point as the origin as the first point, taking the normal vector of the maximum plane as the point obtained in the vertical axis direction as the second point, and taking any point on the maximum plane whose distance from the plane point is a preset value as the vertical axis direction to obtain the third point; obtaining the conversion parameters through the first point, the second point and the third point.
[0192] Step 609: convert the projected point cloud data into two-dimensional image point data by using conversion parameters; perform binarization processing on the two-dimensional image point data pixel by pixel to obtain binary image data; perform connected domain contour extraction on the binary image data to obtain an outer circular contour and an inner circular contour.
[0193] Step 610: Perform circle fitting on the inner circular contour to obtain the coordinates of the circle center, back-project the coordinates of the circle center onto the maximum plane to obtain the spatial coordinates of the hole center, and use the spatial coordinates of the hole center as the spatial coordinates of the center point of the measurement point in the robot coordinate system.
[0194] Step 611: Matching is performed based on the measuring point number of each measuring measuring point and the measuring point number of each known measuring point to obtain a plurality of paired point information; wherein the measuring measuring point and the known measuring point belonging to the same paired point information have the same measuring point number, the paired point information includes: the spatial coordinates of the center point of the measuring measuring point and the spatial coordinates of the measuring point of the known measuring point, and the number of the plurality of paired point information is greater than or equal to 3; and the optimal transformation solution satisfying the transformation condition is determined through the plurality of paired point information.
[0195] Step 612: by using the optimal transformation solution under each calibration sub-workpiece, convert the multiple known reference point data of each calibration sub-workpiece into the robot coordinate system to obtain multiple system establishment calibration points of each calibration sub-workpiece.
[0196] Step 613: numerically average the three-dimensional coordinates represented by multiple system building calibration points of each calibrated sub-workpiece to obtain multiple target system building calibration points; establish a workpiece measurement coordinate system based on the multiple target system building calibration points, and the workpiece measurement coordinate system is used to measure the workpiece.
[0197] It should be understood that the specific implementations of steps 601 to 613 are similar to those of the aforementioned embodiments and will not be described in detail here.
[0198] The foregoing Figure 6 The complete process of determining the workpiece measurement coordinate system is introduced. After the workpiece measurement coordinate system is determined, it is necessary to perform actual workpiece measurement based on the aforementioned workpiece measurement coordinate system. The complete process of the method for measuring a workpiece based on the workpiece measurement coordinate system in an embodiment of the present application is introduced below. In one embodiment, Figure 7 As shown, a method for measuring a workpiece based on a workpiece measurement coordinate system is provided. Figure 1The processor 101 in the embodiment is taken as an example for explanation. In this embodiment, the method includes the following steps:
[0199] Step 701: When the measuring camera moves to each preset measuring position, the surface measurement data collected by the measuring camera for the workpiece to be inspected and the terminal position information of the mobile robot are obtained.
[0200] Step 702: Based on the calibration transformation matrix, the surface data to be detected at each preset measurement position is converted to the robot coordinate system of the mobile robot through the terminal posture information of each preset measurement position to obtain the point cloud data to be detected of the workpiece to be detected.
[0201] Step 703: Obtain the position information of the to-be-detected measuring points for the to-be-detected point cloud data.
[0202] Step 704: convert the position information of the to-be-detected measuring point into the workpiece measurement coordinate system, and use the obtained conversion result as the measurement result of the to-be-detected workpiece.
[0203] It should be understood that the specific implementation of steps 701 to 704 is similar to the method of processing the calibration workpiece in the aforementioned embodiment, and will not be repeated here.
[0204] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments 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 does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these 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 steps or stages in other steps.
[0205] Based on the same inventive concept, the embodiment of the present application also provides a device for determining a workpiece measurement coordinate system for implementing the method for determining a workpiece measurement coordinate system involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more devices for determining a workpiece measurement coordinate system provided below can refer to the limitations of the method for determining a workpiece measurement coordinate system above, and will not be repeated here.
[0206] In an exemplary embodiment, Figure 8As shown, a device for determining a workpiece measurement coordinate system is provided. The device is deployed on a processor of a workpiece measurement coordinate system determination system. The system at least includes a processor, a measuring camera, a mobile robot, and a calibration workpiece; the calibration workpiece is a reference workpiece with known measuring point data information. The device for determining a workpiece measurement coordinate system includes: a data acquisition module 802, a data processing module 804, a data matching module 806, and a coordinate system determination module 808, wherein:
[0207] The data acquisition module 802 is used to acquire the surface measurement data collected by the measuring camera for the calibration workpiece and the terminal position information of the mobile robot when the measuring camera moves to each preset measurement position;
[0208] The data processing module 804 is used to convert each surface measurement data into the robot coordinate system of the mobile robot based on the calibration transformation matrix between the measurement camera and the end of the mobile robot and the end posture information of the mobile robot at each preset measurement position to obtain the measurement point cloud data of the calibrated workpiece;
[0209] The data matching module 806 is used to extract the measuring point position information from the measuring point cloud data; match the measuring point position information with the known measuring point data information to determine the optimal transformation solution that meets the transformation conditions;
[0210] The coordinate system determination module 808 is used to extract and calibrate multiple known reference point data in the known measurement point data information, and convert the multiple known reference point data into the robot coordinate system through the optimal transformation solution to obtain multiple system establishment and calibration points; based on the multiple system establishment and calibration points, a workpiece measurement coordinate system is established, and the workpiece measurement coordinate system is used to measure the workpiece.
[0211] In an exemplary embodiment, the data processing module 804 is specifically used to convert the surface measurement data at each preset measurement position into the robot coordinate system of the mobile robot to obtain the surface measurement point cloud data corresponding to each preset measurement position; perform data aggregation processing on each surface measurement point cloud data to obtain the measurement point cloud data of the calibration workpiece;
[0212] The data matching module 806 is specifically used to determine the measuring point number of each measuring point; based on the measuring point number of each measuring point, extract the spatial coordinates of the center point of the measuring point on the calibration workpiece in the robot coordinate system from the measuring point cloud data; based on the spatial coordinates of the center point of each measuring point and the measuring point number of each measuring point, construct the measuring point position information.
[0213] In an exemplary embodiment, the measuring points on the calibration workpiece are circular;
[0214] The data matching module 806 is specifically used to cut out the regional point cloud data containing the measuring points in the measuring point cloud data based on the measuring point number of each measuring point; perform plane fitting on each regional point cloud data to obtain the maximum plane of each regional point cloud data; for each regional point cloud data, project the regional point cloud data onto the maximum plane along the normal vector of the maximum plane to obtain the projected point cloud data; convert the projected point cloud data into two-dimensional image point data through conversion parameters, and obtain the outer circular contour and the inner circular contour based on the two-dimensional image point data; perform circle fitting on the inner circular contour to obtain the center coordinates of the circle, back-project the center coordinates of the circle onto the maximum plane to obtain the spatial coordinates of the hole center, and use the spatial coordinates of the hole center as the spatial coordinates of the center point of the measuring point in the robot coordinate system.
[0215] In an exemplary embodiment, the data matching module 806 is specifically used to determine the plane parameters of each maximum plane; the plane parameters include a plane vector and a plane point passing through the maximum plane; taking the plane point as the origin as the first point, taking the plane vector as the point obtained in the vertical axis direction as the second point, and taking any point on the maximum plane with a preset length from the plane point as the vertical axis direction to obtain the third point; obtaining conversion parameters through the first point, the second point and the third point; binarizing the two-dimensional image point data pixel by pixel to obtain binary image data; performing connected domain contour extraction on the binary image data to obtain an external circular contour and an internal circular contour.
[0216] In an exemplary embodiment, the measuring point position information includes at least the measuring point number of each measuring point, and the known measuring point data information includes at least the measuring point number of each known measuring point;
[0217] The data matching module 806 is specifically used to match based on the measuring point number of each measuring point and the measuring point number of each known measuring point to obtain multiple paired point information; wherein the measuring point and the known measuring point belonging to the same paired point information have the same measuring point number, and the paired point information includes: the spatial coordinates of the center point of the measuring point and the spatial coordinates of the known measuring point, and the number of the multiple paired point information is greater than or equal to 3; determine the optimal transformation solution that meets the transformation condition through the multiple paired point information.
[0218] In an exemplary embodiment, the calibration workpiece is a plurality of calibration sub-workpieces;
[0219] The coordinate system determination module 808 is specifically used to convert the multiple known reference point data of each calibration sub-workpiece into the robot coordinate system through the optimal transformation solution under each calibration sub-workpiece, so as to obtain multiple system establishment calibration points of each calibration sub-workpiece; numerically average the three-dimensional coordinates represented by the multiple system establishment calibration points of each calibration sub-workpiece to obtain multiple target system establishment calibration points; and establish the workpiece measurement coordinate system based on the multiple target system establishment calibration points.
[0220] Each module in the above-mentioned workpiece measurement coordinate system determination device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0221] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The computer device is described as a terminal as an example. The internal structure diagram thereof may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for determining a workpiece measurement coordinate system is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0222] Those skilled in the art will understand that Fig. 9 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.
[0223] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0224] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0225] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0226] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0227] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0228] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0229] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining a workpiece measurement coordinate system, characterized in that: The method is applied to a processor of a workpiece measurement coordinate system determination system, the system at least comprising the processor, a measurement camera, a mobile robot and a calibration workpiece, the calibration workpiece being a plurality of calibration sub-workpieces; The calibration workpiece is a reference workpiece with known measuring point data information; The method comprises: When the measuring camera moves to each preset measuring position, the surface measurement data collected by the measuring camera for the calibration workpiece and the terminal position information of the mobile robot are obtained; the terminal position information at least includes: the transformation matrix between the terminal of the mobile robot and the robot coordinate system, and the rotation angle of the terminal joint of the mobile robot; Based on the calibration transformation matrix between the measuring camera and the end of the mobile robot, and through the end posture information of the mobile robot at each of the preset measurement positions, each of the surface measurement data is converted into the robot coordinate system of the mobile robot to obtain the measurement point cloud data of the calibration workpiece; Extracting the measuring point position information from the measuring point cloud data, matching the measuring point position information with the known measuring point data information, and determining the optimal transformation solution that meets the transformation conditions; Extract and calibrate multiple known reference point data in the known measurement point data information, and convert the multiple known reference point data of each calibration sub-workpiece to the robot coordinate system through the optimal transformation solution under each calibration sub-workpiece, so as to obtain multiple system establishment calibration points of each calibration sub-workpiece; perform numerical averaging on the three-dimensional coordinates represented by the multiple system establishment calibration points of each calibration sub-workpiece to obtain multiple target system establishment calibration points, or perform workpiece weight matching on each calibration sub-workpiece, and perform weighted fusion calculation on the system establishment calibration points of each calibration sub-workpiece, and determine the weighted fusion result of the three-dimensional coordinates of each reference point as the target system establishment calibration point; establish a workpiece measurement coordinate system based on the multiple target system establishment calibration points; The method of measuring a workpiece by using the workpiece measurement coordinate system includes: An axial direction in the workpiece measurement coordinate system is selected, and a vertex along the axial direction is selected in the reference point calibration result of the robot coordinate system, a vector from the vertex to the origin in the reference point calibration result is obtained, and the vector is normalized to obtain a normal vector matched by the vector; a rotation matrix from the axial vector of the axial direction to the normal vector is obtained according to a calculation method of a rotation matrix between vectors, and the origin in the reference point calibration result and the origin in the workpiece measurement coordinate system are subtracted to obtain a translation matrix; real-time measurement information of the workpiece to be measured is converted to the workpiece measurement coordinate system through the rotation matrix and the translation matrix, and the obtained conversion result is used as the measurement output of the workpiece to be measured.
2. The method according to claim 1, characterized in that The step of converting each of the surface measurement data into the robot coordinate system of the mobile robot to obtain the measurement point cloud data of the calibration workpiece includes: Converting the surface measurement data at each of the preset measurement positions into the robot coordinate system of the mobile robot to obtain surface measurement point cloud data corresponding to each of the preset measurement positions; Performing data aggregation processing on each of the surface measurement point cloud data to obtain the measurement point cloud data of the calibration workpiece; The step of extracting the measuring point position information from the measuring point cloud data comprises: Determine the measuring point number of each measuring point; Based on the measuring point number of each measuring point, extracting the spatial coordinates of the center point of the measuring point on the calibration workpiece in the robot coordinate system from the measuring point cloud data; Based on the spatial coordinates of the center point of each measuring point and the measuring point number of each measuring point, the measuring point position information is constructed.
3. The method according to claim 2, characterized in that The measuring points on the calibration workpiece are circular; The step of extracting the spatial coordinates of the center point of the measurement point on the calibration workpiece in the robot coordinate system from the measurement point cloud data based on the measurement point number of each measurement point comprises: Based on the measuring point number of each measuring point, cutting out the regional point cloud data including the measuring point from the measuring point cloud data; Performing plane fitting on the point cloud data of each region to obtain the maximum plane of the point cloud data of each region; For each of the regional point cloud data, projecting the regional point cloud data onto the maximum plane along the normal vector of the maximum plane to obtain projected point cloud data; Converting the projected point cloud data into two-dimensional image point data by using conversion parameters, and acquiring an outer circular contour and an inner circular contour based on the two-dimensional image point data; The inner circular contour is fitted with a circle to obtain the coordinates of the circle center, the coordinates of the circle center are back-projected onto the maximum plane to obtain the spatial coordinates of the hole center, and the spatial coordinates of the hole center are used as the spatial coordinates of the center point of the measuring point in the robot coordinate system.
4. The method according to claim 3, characterized in that The method further comprises: Determining plane parameters of each of the maximum planes; the plane parameters include a plane vector and a plane point passing through the maximum plane; Taking the plane point as the origin as the first point, taking the plane vector as the point obtained in the vertical axis direction as the second point, and taking any point on the maximum plane with a preset length from the plane point as the longitudinal axis direction to obtain the third point; Obtaining the conversion parameter through the first point, the second point and the third point; The step of acquiring an outer circular contour and an inner circular contour based on the two-dimensional image point data comprises: Binarizing the two-dimensional image point data pixel by pixel to obtain binary image data; Connected domain contour extraction is performed on the binary image data to obtain an outer circular contour and an inner circular contour.
5. The method according to claim 1, characterized in that The measuring point position information at least includes the measuring point number of each measuring point, and the known measuring point data information at least includes the measuring point number of each known measuring point; The matching of the measuring point position information with the known measuring point data information to determine the optimal transformation solution that meets the transformation condition includes: Based on the measurement point number of each of the measured measurement points and the measurement point number of each of the known measurement points, a plurality of paired point information are obtained by matching; wherein the measured measurement points and the known measurement points belonging to the same paired point information have the same measurement point number, and the paired point information includes: the spatial coordinates of the center point of the measured measurement point and the spatial coordinates of the measurement point of the known measurement point, and the number of the plurality of paired point information is greater than or equal to 3; An optimal transformation solution satisfying the transformation condition is determined through the plurality of paired point information.
6. A device for determining a workpiece measurement coordinate system, characterized in that: The device is deployed on a processor of a workpiece measurement coordinate system determination system, the system at least comprising the processor, a measurement camera, a mobile robot and a calibration workpiece, the calibration workpiece being a plurality of calibration sub-workpieces; The calibration workpiece is a reference workpiece with known measuring point data information; The device comprises: A data acquisition module, used for acquiring the surface measurement data collected by the measuring camera for the calibration workpiece and the terminal position information of the mobile robot when the measuring camera moves to each preset measurement position; the terminal position information at least includes: the transformation matrix between the terminal of the mobile robot and the robot coordinate system, and the rotation angle of the terminal joint of the mobile robot; A data processing module, configured to convert each of the surface measurement data into a robot coordinate system of the mobile robot based on a calibration transformation matrix between the measurement camera and the end of the mobile robot and through the end posture information of the mobile robot at each of the preset measurement positions, so as to obtain measurement point cloud data of the calibration workpiece; A data matching module is used to extract the measuring point position information from the measuring point cloud data; match the measuring point position information with the known measuring point data information to determine the optimal transformation solution that meets the transformation conditions; A coordinate system determination module is used to extract and calibrate multiple known reference point data in the known measurement point data information, and convert the multiple known reference point data of each calibration sub-workpiece to the robot coordinate system through the optimal transformation solution under each calibration sub-workpiece, so as to obtain multiple system establishment calibration points of each calibration sub-workpiece; numerically average the three-dimensional coordinates represented by the multiple system establishment calibration points of each calibration sub-workpiece to obtain multiple target system establishment calibration points, or, for each calibration sub-workpiece, perform workpiece weight matching, and perform weighted fusion calculation on the system establishment calibration points of each calibration sub-workpiece, and determine the obtained three-dimensional coordinate weighted fusion result of each reference point as the target system establishment calibration point; establish a workpiece measurement coordinate system based on the multiple target system establishment calibration points; The method of measuring a workpiece by using the workpiece measurement coordinate system includes: An axial direction in the workpiece measurement coordinate system is selected, and a vertex along the axial direction is selected in the reference point calibration result of the robot coordinate system, a vector from the vertex to the origin in the reference point calibration result is obtained, and the vector is normalized to obtain a normal vector matched by the vector; a rotation matrix from the axial vector of the axial direction to the normal vector is obtained according to a calculation method of a rotation matrix between vectors, and the origin in the reference point calibration result and the origin in the workpiece measurement coordinate system are subtracted to obtain a translation matrix; real-time measurement information of the workpiece to be measured is converted to the workpiece measurement coordinate system through the rotation matrix and the translation matrix, and the obtained conversion result is used as the measurement output of the workpiece to be measured.
7. The device according to claim 6, characterized in that The data processing module is specifically used to convert the surface measurement data at each of the preset measurement positions into the robot coordinate system of the mobile robot to obtain the surface measurement point cloud data corresponding to each of the preset measurement positions; perform data aggregation processing on each of the surface measurement point cloud data to obtain the measurement point cloud data of the calibration workpiece; The data matching module is specifically used to determine the measuring point number of each measuring point; based on the measuring point number of each measuring point, extract the spatial coordinates of the center point of the measuring point on the calibration workpiece in the robot coordinate system from the measuring point cloud data; based on the spatial coordinates of the center point of each measuring point and the measuring point number of each measuring point, construct the measuring point position information.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Calibration parameter determination method, calibration method, medium and equipment
CN118518009A
Robot calibration method
JP2015147280A