Robot pose solving method based on margin data analysis
The casting point cloud data is obtained through structured light three-dimensional scanner, and the common coordinate method and rotation matrix processing are used to realize the automated calculation of the position of the robot, solving the problems of automated scribing and position calculation in the existing technology, and improving casting processing accuracy and efficiency.
Patent Information
- Application Number
- CN202411450441.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-01-03
AI Technical Summary
The existing robot position calculation methods cannot realize automated scribing, and the precise margin data obtained by three-dimensional measurement technology cannot be effectively used, resulting in low scribing accuracy and low efficiency.
Point cloud data is obtained through structured light three-dimensional scanner, the data is converted into the robot coordinate system using the common coordinate method, the tangent vector and normal vector direction are calculated, the initial pose is determined, and the robot position data is finally obtained through the preset rotation matrix adjustment, which is realized Automatic marking.
The accuracy and efficiency of robot scribing are improved, and the automated process from three-dimensional measurement data to robot position calculation is realized, which enhances the flexibility and compatibility of the system.
Smart Images

Figure CN119238611A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot posture calculation, and in particular to a robot posture solving method based on residual data analysis. Background Art
[0002] Before finishing, the casting needs to be analyzed for allowance and marked. The existing method is mainly to manually calculate the allowance and use the marking height gauge to perform the marking process. Its disadvantages include low efficiency, inability to perform accurate allowance analysis, relying entirely on manual experience, and low marking accuracy. With the development of three-dimensional measurement technology, non-contact measurement is increasingly being used in the field of industrial measurement due to its advantages of high accuracy, fast measurement speed, and high measurement quality. The data obtained after measurement can be aligned with the digital model to accurately obtain the allowance distribution of the parts. The entire process has a high degree of automation and high data accuracy.
[0003] Combining 3D scanning data residual analysis and industrial robots, the precise data obtained from the residual analysis can be used to convert the line data obtained from the analysis into the robot coordinate system. However, the analyzed data cannot be used directly by the robot and the position and posture need to be solved.
[0004] However, there is currently no technical solution that can realize the robot marking process based on the robot's precise posture data and realize automatic marking, and there is no robot posture solution method based on residual data analysis. Summary of the invention
[0005] The present invention provides a robot posture solving method based on residual data analysis, which uses data processing software to perform residual analysis to obtain marking data, and then solves and converts them into robot posture data, thereby completing the robot marking process and realizing automatic marking.
[0006] In a first aspect, the present invention provides a robot posture solving method based on residual data analysis, comprising:
[0007] Residue analysis point cloud data to obtain line drawing point cloud data, wherein the line drawing point cloud data includes all first point coordinate data and first normal vector data corresponding to each first point coordinate data; all first point coordinate data and all first normal vector data are converted using a common coordinate method to obtain all second point coordinate data and all second normal vector data in the robot coordinate system;
[0008] For any point in all the second point coordinate data, calculate the vector between adjacent points as the tangent vector, normalize all the tangent vectors, and obtain all unit tangent vectors;
[0009] Determine the maximum absolute value of the tangent direction of each unit tangent vector from all unit tangent vectors, determine the maximum absolute value of the normal direction of each second normal vector data from all second normal vector data, for each point, obtain the third direction value corresponding to the point according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal direction, determine the initial posture data of the point according to the maximum absolute value of the tangent direction, the maximum absolute value of the normal direction and the third direction value, traverse all points to obtain all initial posture data;
[0010] All initial posture data are processed using the preset rotation matrix to obtain all final posture data in the TCP coordinate system, and the position and posture data of all points in the robot coordinate system are determined based on all second point coordinate data and all final posture data.
[0011] According to the robot posture solving method for residual data analysis provided by the present invention, before residual analysis point cloud data is performed and line drawing point cloud data is obtained, the method further includes:
[0012] Scanning the target casting using a structured light three-dimensional scanner to obtain the point cloud data;
[0013] The structured light 3D scanner includes a line structured light or a surface structured light 3D scanner.
[0014] According to the robot posture solving method of residual data analysis provided by the present invention, the method of converting all first point coordinate data and all first normal vector data using the common coordinate method to obtain all second point coordinate data and all second normal vector data in the robot coordinate system includes:
[0015]
[0016] Among them, P cami For all first point coordinate data, n cami is all the first normal vector data, r is a 3×3 rotation matrix, t is a 3×1 translation matrix, Prob i For all the second point coordinate data, n i For all second normal vector data.
[0017] According to the robot posture solving method of residual data analysis provided by the present invention, for any point in all the second point coordinate data, the vector between adjacent points is calculated as the tangent vector, all the tangent vectors are normalized to obtain all unit tangent vectors, including:
[0018] For any point in all the second point coordinate data, determine the tangent vector of the point according to the vector difference between the point and the point next to the point;
[0019] Traverse all points and get each vector corresponding to all points;
[0020] All tangent vectors are normalized to obtain all unit tangent vectors, each of which includes a component in the X direction, a component in the Y direction, and a component in the Z direction.
[0021] According to the robot posture solving method of residual data analysis provided by the present invention, the maximum absolute value of the tangent direction of each unit tangent vector is determined from all unit tangent vectors, and the maximum absolute value of the normal direction of each second normal vector data is determined from all second normal vector data, including:
[0022] For each unit tangent vector, determine the maximum absolute value of the tangent direction according to the absolute values of the components of the unit tangent vector in different directions, and determine the direction of the maximum absolute value of the tangent direction as the direction of the unit tangent vector;
[0023] For each second normal vector data, the maximum absolute value of the normal vector direction is determined according to the absolute values of the components of the second normal vector data in different directions, and the direction of the maximum absolute value of the normal vector direction is determined as the direction of the unit normal vector.
[0024] According to the robot posture solving method of residual data analysis provided by the present invention, the third direction value corresponding to the point is obtained according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal vector direction, including:
[0025] When the direction of the unit normal vector is X and the direction of the unit tangent vector is Y, according to the maximum absolute value n of the tangent direction i And the maximum absolute value of the normal vector direction tan i , get the third direction value n corresponding to the point i ×tan i ;
[0026] When the direction of the unit normal vector is X and the direction of the unit tangent vector is Z, according to the maximum absolute value n of the tangent direction i And the maximum absolute value of the normal vector direction n i ×tan i , get the third direction value tan corresponding to the point i ;
[0027] When the unit normal vector direction is Y and the unit tangent vector direction is X, according to the maximum absolute value of the tangent direction tan i And the maximum absolute value of the normal vector direction n i , get the third direction value n corresponding to the point i ×tan i ;
[0028] When the unit normal vector direction is Y and the unit tangent vector direction is Z, according to the maximum absolute value n of the tangent direction i ×tan i And the maximum absolute value of the normal vector direction n i , get the third direction value tan corresponding to the point i ;
[0029] When the unit normal vector direction is Z and the unit tangent vector direction is X, according to the maximum absolute value of the tangent direction tan i And the maximum absolute value of the normal vector direction n i ×tan i , get the third direction value n corresponding to the point i ;
[0030] When the unit normal vector direction is Z and the unit tangent vector direction is Y, according to the maximum absolute value n of the tangent direction i ×tan i And the maximum absolute value of the normal vector direction tan i , get the third direction value n corresponding to the point i .
[0031] According to the robot posture solving method of residual data analysis provided by the present invention, all initial posture data are processed by using a preset rotation matrix to obtain all final posture data in the TCP coordinate system, including:
[0032] Rot i =R tempi ·R
[0033] Among them, R tempi For all initial posture data, rot i is all the final posture data, R is the preset rotation matrix;
[0034]
[0035] Among them, α is the rotation angle around the Z axis, β is the rotation angle around the Y axis, and γ is the rotation angle around the X axis.
[0036] According to the robot posture solving method of residual data analysis provided by the present invention, the posture data of all points in the robot coordinate system are determined according to all second point coordinate data and all final posture data, including:
[0037]
[0038] Among them, Pos i is the pose data of all points in the robot coordinate system, Prob i For all the second point coordinate data, roti For all final pose data.
[0039] In a second aspect, a robot posture solving device based on residual data analysis is provided, comprising:
[0040] An acquisition unit, the acquisition unit is used for residual analysis point cloud data, acquiring line drawing point cloud data, the line drawing point cloud data including all first point coordinate data and first normal vector data corresponding to each first point coordinate data; converting all first point coordinate data and all first normal vector data using a common coordinate method to obtain all second point coordinate data and all second normal vector data in a robot coordinate system;
[0041] A calculation unit, the calculation unit being used to calculate, for any point in all the second point coordinate data, a vector between adjacent points as a tangent vector, normalize all the tangent vectors, and obtain all unit tangent vectors;
[0042] A determination unit, the determination unit is used to determine the maximum absolute value of the tangent direction of each unit tangent vector from all unit tangent vectors, determine the maximum absolute value of the normal direction of each second normal vector data from all second normal vector data, for each point, according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal direction, obtain the third direction value corresponding to the point, according to the maximum absolute value of the tangent direction, the maximum absolute value of the normal direction and the third direction value, determine the initial posture data of the point, traverse all points, and obtain all initial posture data;
[0043] A processing unit is used to process all initial posture data using a preset rotation matrix to obtain all final posture data in the TCP coordinate system, and determine the posture data of all points in the robot coordinate system according to all second point coordinate data and all final posture data.
[0044] According to a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the robot posture solving method based on residual data analysis is implemented when the processor executes the program.
[0045] The present invention obtains accurate point cloud data, including the coordinates and normal vector data of the points, through a structured light 3D scanner. These data provide high-precision input for subsequent calculations. The accuracy of posture calculation is further improved by calculating the tangent vectors between adjacent points and performing normalization processing. The initial posture of the point is determined by using the maximum absolute value of the tangent direction and the maximum absolute value of the normal vector direction, and is adjusted by a preset rotation matrix, finally obtaining accurate posture data in the TCP coordinate system.
[0046] The present invention is applicable to different types of structured light 3D scanners, including line structured light and surface structured light 3D scanners, which improves the flexibility and compatibility of the system, realizes an automated process from point cloud data acquisition to robot posture calculation, uses mathematical tools such as matrix operations and vector operations for data processing, improves computing efficiency, and achieves comprehensive coverage and efficient processing of point cloud data by traversing all points and calculating their posture data. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 It is a flow chart of the robot posture solving method of the residual data analysis provided by the present invention;
[0049] Figure 2 It is a structural schematic diagram of a robot posture solving device for residual data analysis provided by the present invention;
[0050] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] Figure 1 : is a flow chart of a robot posture solving method based on residual data analysis provided by the present invention, and the robot posture solving method based on residual data analysis comprises:
[0053] Step 101: Analyze the residual point cloud data to obtain the line drawing point cloud data, wherein the line drawing point cloud data includes all the first point coordinate data and the first normal vector data corresponding to each first point coordinate data; convert all the first point coordinate data and all the first normal vector data by using the common coordinate method to obtain all the second point coordinate data and all the second normal vector data in the robot coordinate system;
[0054] Step 102: for any point in all the second point coordinate data, calculate the vector between adjacent points as the tangent vector, normalize all the tangent vectors, and obtain all unit tangent vectors;
[0055] Step 103, determine the maximum absolute value of the tangent direction of each unit tangent vector from all unit tangent vectors, determine the maximum absolute value of the normal direction of each second normal vector data from all second normal vector data, for each point, according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal direction, obtain the third direction value corresponding to the point, according to the maximum absolute value of the tangent direction, the maximum absolute value of the normal direction and the third direction value, determine the initial posture data of the point, traverse all points, and obtain all initial posture data;
[0056] Step 104: Use the preset rotation matrix to process all initial posture data to obtain all final posture data in the TCP coordinate system, and determine the position and posture data of all points in the robot coordinate system based on all second point coordinate data and all final posture data.
[0057] In step 101, before the residual point cloud data is analyzed and the scribing point cloud data is obtained, the method further includes: scanning the target casting with a structured light 3D scanner to obtain the point cloud data; the structured light 3D scanner includes a line structured light or a surface structured light 3D scanner. The present invention combines 3D measurement technology and robot scribing technology, the laser scribing head is installed at the end of the industrial six-axis robot, the casting is subjected to non-contact 3D measurement, and the point cloud data is obtained, and the acquisition method can use a line structured light 3D scanner or a surface structured light 3D scanner.
[0058] Optionally, the present invention aims to extract and calculate the precise posture that the robot should adopt when performing related tasks, such as welding, spraying, etc. from the original point cloud data. First, the original point cloud data is processed to identify the marked part related to the robot's operating path. This part of the data contains the trajectory information that the robot needs to follow. The point cloud data of the marked part is extracted from the processed data, including the coordinates (x, y, z) of each point and the normal vector data of each point's coordinates. The normal vector data represents the direction of the surface where the point is located. The common coordinate method is used to convert all the first point coordinate data and normal vector data from the original coordinate system to the robot coordinate system to obtain the second point coordinate data and the second normal vector data, thereby ensuring that subsequent calculations are based on a unified coordinate system and avoiding errors caused by inconsistent coordinate systems.
[0059] Optionally, the converting all first point coordinate data and all first normal vector data by using a common coordinate method to obtain all second point coordinate data and all second normal vector data in the robot coordinate system includes:
[0060]
[0061] Among them, P cami For all first point coordinate data, n cami is all the first normal vector data, r is a 3×3 rotation matrix, t is a 3×1 translation matrix, Prob i For all the second point coordinate data, n i For all second normal vector data.
[0062] Optionally, in the acquisition of input data, after the scanned data is aligned, the distribution of the margin is accurately analyzed. There is a line drawing process corresponding to the casting in the mechanical process, and there will be lines that need to be drawn. According to the requirements of the process, the lines to be drawn can be determined, including the baseline and the contour line. The present invention uses data processing software to obtain the data of each line to be drawn. The data format is (x i ,y i , z i , n 1i , n 2i , n 3i ), the position and unit normal vector of each point in the identification line are determined according to the process of each part. cami is a set containing all the first point coordinate data, and the coordinates of each point are expressed as (x i ,y i , z i ) in the camera coordinate system, n cami is with P cami The normal vector data set corresponding to each point in , each normal vector is expressed as (n1i, n2i, n3i), representing the direction of the surface where the point is located.
[0063] Optionally, the present invention first calibrates the measurement system and the robot marking in advance, and uses the common coordinate method to calculate the coordinate values of the common feature points in different coordinate systems, and then obtains the transformation matrix, using a 3×3 rotation matrix r and a 3×1 translation matrix t. These two matrices together constitute a homogeneous transformation matrix [rt]. Through the homogeneous transformation matrix, the points in the camera coordinate system can be converted to points in the robot coordinate system, that is, the line data obtained after data processing is converted into coordinates to obtain data in the robot coordinate system, which is recorded as Prob i Correspondingly, the transformation of the normal vector is relatively simple, because the normal vector only represents the direction and does not involve the position. Therefore, it is only necessary to rotate the normal vector using the rotation matrix to obtain all the second normal vector data n in the robot coordinate system. i .
[0064] Through precise coordinate transformation, the present invention can ensure that the robot can accurately reach the expected position and posture when performing operations, thereby improving the operation accuracy. By unifying the point cloud data into the robot coordinate system, the control logic of the robot can be simplified, because all calculations and instructions can be performed based on the same coordinate system. The two factors of rotation and translation are considered in the coordinate transformation process, which makes the method have good adaptability to data collected by cameras or sensors at different positions and angles, and enhances the robustness of the system.
[0065] In step 102, the original data obtained in step 101 includes the position coordinates of each line and the unit normal vector information of each point. Next, the posture data of each point needs to be calculated. For each second point coordinate data, the vector between it and the adjacent point is calculated as the tangent vector. These tangent vectors reflect the local direction of the path. All tangent vectors are normalized, that is, the length of each tangent vector is adjusted to 1, and only its direction information is retained. The normalized unit tangent vector can more accurately represent the local direction of the path, providing a reliable basis for subsequent posture calculations.
[0066] Optionally, for any point in all the second point coordinate data, calculating the vector between adjacent points as the tangent vector, normalizing all the tangent vectors, and obtaining all unit tangent vectors includes:
[0067] For any point in all the second point coordinate data, determine the tangent vector of the point according to the vector difference between the point and the point next to the point;
[0068] Traverse all points and get each vector corresponding to all points;
[0069] All tangent vectors are normalized to obtain all unit tangent vectors, each of which includes a component in the X direction, a component in the Y direction, and a component in the Z direction.
[0070] Optionally, in the present invention, the vector tangentVector is set i Indicates the direction of linear motion, and its value is equal to the next point minus the current point, which can be expressed as:
[0071] tangentVector i =Prob i+1 -Prob i ;
[0072] Normalize this vector to get its unit tangent vector tan i =(tan xi ,tan yi ,tan zi), calculate the vector between adjacent points as the tangent vector, and normalize it to get the unit tangent vector tan i ,The normal vector of each point obtained in the previous steps cannot be used directly, and needs to be classified and processed to correctly obtain the correct posture of each point.
[0073] In step 103, the maximum absolute value of the tangent direction of each unit tangent vector is determined from all unit tangent vectors, representing the main direction of the path at the point. The maximum absolute value of the normal direction of each normal vector is determined from all second normal vector data, reflecting the main direction of the surface at the point. For each point, the initial posture data of the point is determined by combining the maximum absolute value of the tangent direction, the maximum absolute value of the normal direction, and the third direction value calculated by the cross product.
[0074] Optionally, determining the maximum absolute value of the tangent direction of each unit tangent vector from all unit tangent vectors, and determining the maximum absolute value of the normal direction of each second normal vector data from all second normal vector data, includes:
[0075] For each unit tangent vector, determine the maximum absolute value of the tangent direction according to the absolute values of the components of the unit tangent vector in different directions, and determine the direction of the maximum absolute value of the tangent direction as the direction of the unit tangent vector;
[0076] For each second normal vector data, the maximum absolute value of the normal vector direction is determined according to the absolute values of the components of the second normal vector data in different directions, and the direction of the maximum absolute value of the normal vector direction is determined as the direction of the unit normal vector.
[0077] Optionally, for each unit tangent vector, first obtain its components in three-dimensional space. Then, calculate the absolute values of these components, compare the three absolute values, and find the largest one, whose maximum value represents the strongest projection of the unit tangent vector in a certain direction, that is, the main direction of the vector, and regard the direction with the largest absolute value determined above as the direction of the unit tangent vector; for each second normal vector data, similarly, obtain its components in three-dimensional space, and calculate the absolute values of these components. Similar to the processing of the unit tangent vector, compare the absolute values of the components of the normal vector in three directions, find the maximum value, and regard the direction with the largest absolute value determined above as the main direction of the normal vector.
[0078] Optionally, obtaining the third direction value corresponding to the point according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal vector direction includes:
[0079] When the direction of the unit normal vector is X and the direction of the unit tangent vector is Y, according to the maximum absolute value n of the tangent direction i And the maximum absolute value of the normal vector direction tan i, get the third direction value n corresponding to the point i ×tan i ;
[0080] When the direction of the unit normal vector is X and the direction of the unit tangent vector is Z, according to the maximum absolute value n of the tangent direction i And the maximum absolute value of the normal vector direction n i ×tan i , get the third direction value tan corresponding to the point i ;
[0081] When the unit normal vector direction is Y and the unit tangent vector direction is X, according to the maximum absolute value of the tangent direction tan i And the maximum absolute value of the normal vector direction n i , get the third direction value n corresponding to the point i ×tan i ;
[0082] When the unit normal vector direction is Y and the unit tangent vector direction is Z, according to the maximum absolute value n of the tangent direction i ×tan i And the maximum absolute value of the normal vector direction n i , get the third direction value tan corresponding to the point i ;
[0083] When the unit normal vector direction is Z and the unit tangent vector direction is X, according to the maximum absolute value of the tangent direction tan i And the maximum absolute value of the normal vector direction n i ×tan i , get the third direction value n corresponding to the point i ;
[0084] When the direction of the unit normal vector is Z and the direction of the unit tangent vector is Y, the third direction value ni corresponding to the point is obtained according to the maximum absolute value of the tangent direction ni×tani and the maximum absolute value of the normal vector direction tani.
[0085] Optionally, for the three components of the unit normal vector in the selected coordinate system, compare the absolute values of the three components and find the largest one. The coordinate axis direction corresponding to the component with the largest absolute value is the direction of the maximum absolute value of the unit normal vector. The same is true for the unit tangent vector. For each point, the unit normal vector n i =(n xi , n yi , n zi ), and the unit tangent vector tan i =(tan xi ,tan yi ,tanzi ), respectively solve the corresponding maximum absolute value, recorded as n maxi ,tan maxi .
[0086] Next, we need to first calculate the maximum absolute value n of the normal vector direction maxi The direction of the normal is distinguished, and then the tangent direction is determined according to the maximum absolute value tan maxi To distinguish the tangent direction, the value of the third direction can be solved by cross product to obtain the initial posture data R tempi =(R xi , R yi , R zi ), which is a 3×3 matrix.
[0087] Optionally, for determining the direction with the largest absolute value of the unit normal vector, the criterion is:
[0088] abs1(n xi )-n maxi <△1;
[0089] abs 1(n yi )-n maxi< Δ1;
[0090] abs 1(n zi )-n maxi <Δ1;
[0091] Where abs1(*) represents the absolute value of the normal vector direction of the point, △1 is the first threshold, which is a very small number, and here it is 1E-06.
[0092] Optionally, determine the direction of the unit tangent vector with the largest absolute value.
[0093] abs2(tan xi )-tan maxi <△2;
[0094] abs 2(tan yi )-tan maxi <△2;
[0095] abs 3(tan zi )-tan maxi <△2;
[0096] Where abs2(*) represents the absolute value of the tangent vector at the point, △2 is the second threshold, which is an extremely small number, and here it is 1E-06.
[0097] Optionally, if the direction of the absolute maximum value of the unit normal vector is in the x direction, and the direction of the absolute maximum value of the unit tangent vector is in the y direction, then the final posture data is calculated as follows:
[0098] R xi =n i ;
[0099] R yi =tan i ;
[0100] R zi =n i ×tan i ;
[0101] If the direction of the maximum absolute value of the unit normal vector is in the x direction, and the direction of the maximum absolute value of the unit tangent vector is in the z direction, then the final posture data calculation method is:
[0102] R xi =n i ;
[0103] R yi =n i ×tan i ;
[0104] R zi =tan i ;
[0105] Optionally, if the direction of the maximum absolute value of the unit normal vector is in the y direction, and the direction of the maximum absolute value of the unit tangent vector is in the x direction, then the final posture data calculation method is:
[0106] R xi =tan i ;
[0107] R yi =n i ;
[0108] R zi =n i ×tan i ;
[0109] Optionally, if the direction of the maximum absolute value of the unit normal vector is in the y direction, and the direction of the maximum absolute value of the unit tangent vector is in the z direction, then the final posture data calculation method is:
[0110] R xi =n i ×tan i ;
[0111] R yi =n i ;
[0112] R zi =tan i ;
[0113] Optionally, if the direction of the maximum absolute value of the unit normal vector is in the z direction and the direction of the maximum absolute value of the unit tangent vector is in the x direction, then the final posture data calculation method is:
[0114] R xi =tan i ;
[0115] R yi =n i ×tan i ;
[0116] R zi =n i ;
[0117] Optionally, if the direction of the maximum absolute value of the unit normal vector is in the z direction, and the direction of the maximum absolute value of the unit tangent vector is in the y direction, then the final posture data calculation method is:
[0118] R xi =n i ×tan i ;
[0119] R yi =tan i ;
[0120] R zi =n i .
[0121] In step 104, the initial posture data is processed using a preset rotation matrix, and is converted from the current coordinate system to the tool center point TCP coordinate system to obtain the final posture data. All second point coordinate data and the final posture data are combined to determine the complete posture data of the robot in the robot coordinate system.
[0122] Optionally, all initial posture data are processed using a preset rotation matrix to obtain all final posture data in the TCP coordinate system, including:
[0123] Rot i =R tempi ·R;
[0124] Among them, R tempi For all initial posture data, rot i is all the final posture data, R is the preset rotation matrix;
[0125]
[0126] Among them, α is the rotation angle around the Z axis, β is the rotation angle around the Y axis, and γ is the rotation angle around the X axis.
[0127] Optionally, after determining the initial posture data of each point, the present invention needs to convert it to the TCP coordinate system. This step may have different corresponding rotation angles depending on the robot calibration direction. The final posture data of each point can be solved by combining the robot TCP calibration results. i .
[0128] Optionally, determining the position and posture data of all points in the robot coordinate system according to all the second point coordinate data and all the final posture data includes:
[0129]
[0130] Among them, Pos i is the pose data of all points in the robot coordinate system, Prob i For all the second point coordinate data, rot i For all final pose data.
[0131] The present invention determines the position and posture of the final target point in the robot coordinate system by calculating the position and posture of the line. After generating the final point information of the robot, this value is assigned to the position and posture information of the point. Combined with the external axis information, the final information of each target point can be obtained. This target point is displayed in real time in the simulation software, and the final posture data can be converted into quaternion format.
[0132] In an optional embodiment, all final posture data rot i for:
[0133]
[0134] Convert to quaternion format (q iw ,q i1 ,q i2 ,q i3 ), the conversion formula is:
[0135]
[0136] signq1=sign(r yi3 -r yi2 );
[0137] signq2=sign(r zi -r xi3 );
[0138] signq3=sign(r xi2 -r yi1 );
[0139] Among them, (r xi ,r yi ,r zi ) is a vector representation, [3*3] matrix is a matrix representation, r xi The column vector corresponding to the x direction is r xi1 ,r xi2 ,r xi3 The other two columns are in the same way, one in the y direction and the other in the z direction.
[0140] The transformation matrix between the measurement system and the marking system calibrated in advance in the present invention is:
[0141] One of the line data after the residual analysis and data conversion is:
[0142]
[0143] The final calculated pose data (quaternion format) is as follows:
[0144]
[0145]
[0146] Figure 2 It is a structural schematic diagram of a robot posture solving device based on residual data analysis provided by the present invention, the robot posture solving device based on residual data analysis comprises an acquisition unit 1, the acquisition unit is used for residual analysis point cloud data, and obtains line point cloud data, the line point cloud data comprises all first point coordinate data and first normal vector data corresponding to each first point coordinate data; all first point coordinate data and all first normal vector data are converted by using a common coordinate method, and all second point coordinate data and all second normal vector data in the robot coordinate system are obtained. The working principle of the acquisition unit 1 can refer to the aforementioned step 101 and will not be repeated here.
[0147] The robot posture solving device based on residual data analysis also includes a calculation unit 2, which is used to calculate the vector between adjacent points as a tangent vector for any point in all the second point coordinate data, normalize all tangent vectors, and obtain all unit tangent vectors. The working principle of the calculation unit 2 can refer to the aforementioned step 102 and will not be repeated here.
[0148] The robot posture solving device based on residual data analysis also includes a determination unit 3, which is used to determine the maximum absolute value of the tangent direction of each unit tangent vector from all unit tangent vectors, and determine the maximum absolute value of the normal direction of each second normal vector data from all second normal vector data. For each point, according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal direction, the third direction value corresponding to the point is obtained, according to the maximum absolute value of the tangent direction, the maximum absolute value of the normal direction and the third direction value, the initial posture data of the point is determined, and all points are traversed to obtain all initial posture data. The working principle of the determination unit 3 can refer to the aforementioned step 103 and will not be repeated here.
[0149] The robot posture solving device based on residual data analysis also includes a processing unit 4, which is used to process all initial posture data using a preset rotation matrix to obtain all final posture data in the TCP coordinate system, and determine the posture data of all points in the robot coordinate system based on all second point coordinate data and all final posture data. The working principle of the processing unit 4 can refer to the aforementioned step 104 and will not be repeated here.
[0150] The present invention obtains accurate point cloud data, including the coordinates and normal vector data of the points, through a structured light 3D scanner. These data provide high-precision input for subsequent calculations. The accuracy of posture calculation is further improved by calculating the tangent vectors between adjacent points and performing normalization processing. The initial posture of the point is determined by using the maximum absolute value of the tangent direction and the maximum absolute value of the normal vector direction, and is adjusted by a preset rotation matrix, finally obtaining accurate posture data in the TCP coordinate system.
[0151] The present invention is applicable to different types of structured light 3D scanners, including line structured light and surface structured light 3D scanners, which improves the flexibility and compatibility of the system, realizes an automated process from point cloud data acquisition to robot posture calculation, uses mathematical tools such as matrix operations and vector operations for data processing, improves computing efficiency, and achieves comprehensive coverage and efficient processing of point cloud data by traversing all points and calculating their posture data.
[0152] Figure 3 Schematic diagram of the structure of the electronic device provided by the present invention. Figure 3As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the robot posture solution method of residual data analysis, the method comprising: residual analysis point cloud data, obtaining line drawing point cloud data, the line drawing point cloud data including all first point coordinate data and the first normal vector data corresponding to each first point coordinate data; using the common coordinate method to transform all first point coordinate data and all first normal vector data to obtain all second point coordinate data and all second normal vector data in the robot coordinate system; for any point in all second point coordinate data, calculating the vector between adjacent points as the tangent vector, normalizing all tangent vectors to obtain all unit tangent vectors; determining each from all unit tangent vectors. The maximum absolute value of the tangent direction of the unit tangent vector, determine the maximum absolute value of the normal direction of each second normal vector data from all the second normal vector data, for each point, obtain the third direction value corresponding to the point according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal direction, determine the initial posture data of the point according to the maximum absolute value of the tangent direction, the maximum absolute value of the normal direction and the third direction value, traverse all points to obtain all initial posture data; use the preset rotation matrix to process all the initial posture data to obtain all the final posture data in the TCP coordinate system, and determine the posture data of all points in the robot coordinate system according to all the second point coordinate data and all the final posture data.
[0153] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0154] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a robot posture solution method for residual data analysis provided by the above methods, the method including: residual analysis point cloud data, obtaining line point cloud data, the line point cloud data including all first point coordinate data and first normal vector data corresponding to each first point coordinate data; using the common coordinate method to convert all first point coordinate data and all first normal vector data to obtain all second point coordinate data and all second normal vector data in the robot coordinate system; for any point in all second point coordinate data, calculate the vector between adjacent points as the tangent vector, and normalize All tangent vectors are processed in a unified manner to obtain all unit tangent vectors; the maximum absolute value of the tangent direction of each unit tangent vector is determined from all unit tangent vectors, and the maximum absolute value of the normal direction of each second normal vector data is determined from all second normal vector data; for each point, the third direction value corresponding to the point is obtained according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal direction; the initial posture data of the point is determined according to the maximum absolute value of the tangent direction, the maximum absolute value of the normal direction and the third direction value, and all points are traversed to obtain all initial posture data; all initial posture data are processed using a preset rotation matrix to obtain all final posture data in the TCP coordinate system, and the position and posture data of all points in the robot coordinate system are determined according to all second point coordinate data and all final posture data.
[0155] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a robot posture solving method for performing the residual data analysis provided by the above-mentioned methods, the method comprising: residual analysis point cloud data, obtaining line drawing point cloud data, the line drawing point cloud data comprising all first point coordinate data and first normal vector data corresponding to each first point coordinate data; using a common coordinate method to transform all first point coordinate data and all first normal vector data, to obtain all second point coordinate data and all second normal vector data in the robot coordinate system; for any point in all second point coordinate data, calculating the vector between adjacent points as a tangent vector, normalizing all tangent vectors, and obtaining all unit Tangent vector; determine the maximum absolute value of the tangent direction of each unit tangent vector from all unit tangent vectors, determine the maximum absolute value of the normal direction of each second normal vector data from all second normal vector data, for each point, according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal direction, obtain the third direction value corresponding to the point, according to the maximum absolute value of the tangent direction, the maximum absolute value of the normal direction and the third direction value, determine the initial posture data of the point, traverse all points to obtain all initial posture data; use a preset rotation matrix to process all initial posture data to obtain all final posture data in the TCP coordinate system, and determine the posture data of all points in the robot coordinate system according to all second point coordinate data and all final posture data.
[0156] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A robot posture solving method based on residual data analysis, characterized in that: include: Residue analysis point cloud data to obtain line drawing point cloud data, wherein the line drawing point cloud data includes all first point coordinate data and first normal vector data corresponding to each first point coordinate data; all first point coordinate data and all first normal vector data are converted using a common coordinate method to obtain all second point coordinate data and all second normal vector data in the robot coordinate system; For any point in all the second point coordinate data, the vector between adjacent points is calculated as the tangent vector, and all the tangent vectors are normalized to obtain all unit tangent vectors; Determine the maximum absolute value of the tangent direction of each unit tangent vector from all unit tangent vectors, determine the maximum absolute value of the normal direction of each second normal vector data from all second normal vector data, for each point, obtain the third direction value corresponding to the point according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal direction, determine the initial posture data of the point according to the maximum absolute value of the tangent direction, the maximum absolute value of the normal direction and the third direction value, traverse all points to obtain all initial posture data; All initial posture data are processed using the preset rotation matrix to obtain all final posture data in the TCP coordinate system, and the position and posture data of all points in the robot coordinate system are determined based on all second point coordinate data and all final posture data.
2. The robot posture solving method based on residual data analysis according to claim 1 is characterized in that: Before analyzing the residual point cloud data and obtaining the line drawing point cloud data, the method further includes: Scanning the target casting using a structured light three-dimensional scanner to obtain the point cloud data; The structured light 3D scanner includes a line structured light or a surface structured light 3D scanner.
3. The robot posture solving method based on residual data analysis according to claim 1 is characterized in that: The method of converting all first point coordinate data and all first normal vector data using the common coordinate method to obtain all second point coordinate data and all second normal vector data in the robot coordinate system includes: Among them, P cami For all first point coordinate data, n cami is all the first normal vector data, r is a 3×3 rotation matrix, t is a 3×1 translation matrix, Prob i For all the second point coordinate data, n i For all second normal vector data.
4. The robot posture solving method based on residual data analysis according to claim 1 is characterized in that: For any point in all the second point coordinate data, the vector between adjacent points is calculated as the tangent vector, and all the tangent vectors are normalized to obtain all unit tangent vectors, including: For any point in all the second point coordinate data, determine the tangent vector of the point according to the vector difference between the point and the point next to the point; Traverse all points and get each vector corresponding to all points; All tangent vectors are normalized to obtain all unit tangent vectors, each of which includes a component in the X direction, a component in the Y direction, and a component in the Z direction.
5. The robot posture solving method based on residual data analysis according to claim 1 is characterized in that: The step of determining the maximum absolute value of the tangent direction of each unit tangent vector from all unit tangent vectors, and determining the maximum absolute value of the normal direction of each second normal vector data from all second normal vector data, includes: For each unit tangent vector, determine the maximum absolute value of the tangent direction according to the absolute values of the components of the unit tangent vector in different directions, and determine the direction of the maximum absolute value of the tangent direction as the direction of the unit tangent vector; For each second normal vector data, the maximum absolute value of the normal vector direction is determined according to the absolute values of the components of the second normal vector data in different directions, and the direction of the maximum absolute value of the normal vector direction is determined as the direction of the unit normal vector.
6. The robot posture solving method based on residual data analysis according to claim 5 is characterized in that: The obtaining of the third direction value corresponding to the point according to the maximum absolute value of the tangent direction and the maximum absolute value of the normal direction includes: When the direction of the unit normal vector is X and the direction of the unit tangent vector is Y, according to the maximum absolute value n of the tangent direction i And the maximum absolute value of the normal vector direction tan i , get the third direction value n corresponding to the point i ×tan i ; When the direction of the unit normal vector is X and the direction of the unit tangent vector is Z, according to the maximum absolute value n of the tangent direction i And the maximum absolute value of the normal vector direction n i ×tan i , get the third direction value tan corresponding to the point i ; When the unit normal vector direction is Y and the unit tangent vector direction is X, according to the maximum absolute value of the tangent direction tan i And the maximum absolute value of the normal vector direction n i , get the third direction value n corresponding to the point i ×tan i ; When the unit normal vector direction is Y and the unit tangent vector direction is Z, according to the maximum absolute value n of the tangent direction i ×tan i And the maximum absolute value of the normal vector direction n i , get the third direction value tan corresponding to the point i ; When the unit normal vector direction is Z and the unit tangent vector direction is X, according to the maximum absolute value of the tangent direction tan i And the maximum absolute value of the normal vector direction n i ×tan i , get the third direction value n corresponding to the point i ; When the unit normal vector direction is Z and the unit tangent vector direction is Y, according to the maximum absolute value n of the tangent direction i ×tan i And the maximum absolute value of the normal vector direction tan i , get the third direction value n corresponding to the point i .
7. The robot posture solving method based on residual data analysis according to claim 1 is characterized in that: All initial posture data are processed using the preset rotation matrix to obtain all final posture data in the TCP coordinate system, including: rot i =R tempi ·R Among them, R tempi For all initial posture data, rot i is all the final posture data, R is the preset rotation matrix; Among them, α is the rotation angle around the Z axis, β is the rotation angle around the Y axis, and γ is the rotation angle around the X axis.
8. The robot posture solving method based on residual data analysis according to claim 7 is characterized in that: The step of determining the position and posture data of all points in the robot coordinate system according to all the second point coordinate data and all the final posture data includes: Among them, Pos i is the pose data of all points in the robot coordinate system, Prob i For all the second point coordinate data, rot i For all final pose data.
