Double-mechanical-arm teaching machining method and system for complex parts in narrow space
Through DMP coding and trajectory prediction technology, combined with the collaborative operation of dual robot arms, the problem of difficulty for a single human expert to teach and process complex parts in a small space is solved, achieving efficient and precise processing effects, and improving production efficiency and processing quality. .
Patent Information
- Application Number
- CN202410957913.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-07-17
AI Technical Summary
In the small space of complex parts, it is difficult for a single robot to perform teaching processing, and it is difficult for a single human expert to cooperate with dual robotic arms for processing, and it is difficult to generalize and transfer existing processing skill trajectories to two robotic arms.
Using DMP coding learning and trajectory prediction technology, through the teaching trajectory encoding and rotation generalization of the master robotic arm A, combined with the real-time attitude adjustment of the slave robotic arm B, it is ensured that the master robotic arm A has a wider teaching space in a small space. , and minimize the movement of robot arm B through a constrained optimization algorithm.
It achieves high-precision and reliable processing of complex parts in a small space, improves production efficiency and processing quality, reduces human resource costs, and solves the problem of a single human expert teaching dual robotic arm processing of complex parts in a small space.
Smart Images

Figure CN118809556A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of robot control technology, and more specifically, relates to a double-robot arm teaching processing method and system for complex parts in a narrow space. Background Art
[0002] With the continuous development of science and technology, the demand for more precise and complex parts in the fields of aerospace, medical equipment, and the automotive industry is increasing. The development of robotics technology has made parts processing more flexible and efficient. Among them, teaching processing technology has greatly reduced the technical threshold and production preparation time due to its "teach and use" characteristics without programming, so that even non-professionals can quickly guide robots to complete complex processing tasks. It has brought unprecedented convenience and economy to the manufacturing industry in product prototype development and small-batch production.
[0003] However, when teaching processing directly on complex parts in a small space, the robot may still face the following difficulties: 1. Spatial constraints: The movement of the robot in a small space is limited by space, including the shape of the part, processing equipment, obstacles and other factors, which results in the robot's movement workspace being limited and it is difficult to find a suitable path for teaching processing. 2. Collision avoidance: In a small space, when humans teach the robot to perform processing tasks, the robot arm body is prone to collision with the workpiece or other robots. The problem of collision avoidance needs to be considered to ensure safety and processing quality.
[0004] It is a common method to generalize the learned robot teaching processing skills to the processing area of the part. However, for the generalization of skills to the processing area of the small space of complex parts, there is also the problem of insufficient working space due to the limitation of the freedom degree of a single robot, the complex structure of the parts, and the small space of the processing area, which makes some robot postures unreachable, and thus cannot meet the processing task requirements of complex parts. Dual-arm collaborative processing: The main robot arm is equipped with processing tools, and the slave robot arm clamps the parts to be processed. The collaborative processing method can effectively solve the problems of insufficient working space and unreachable postures caused by the freedom degree of a single robot arm, complex parts, and small space of the processing area. However, at this time, the processing trajectory is formed by the relative motion of the two robots, and the learned teaching trajectory needs to be transferred and decomposed to the two robots. The traditional robot obstacle avoidance trajectory generation method can fully consider the geometric shape of the robot and the workpiece, but its computational complexity is extremely large and it cannot even solve the high-dimensional collaboration of the two robots.
[0005] Using dual robotic arms to collaborate and directly teach machining can effectively alleviate the problem of limited freedom of a single robot and the possible inaccessibility of machining postures, and better meet the machining space conditions of the robotic arm for teaching machining of complex parts in a small space. In addition, since direct teaching machining does not require skill generalization, it does not require a lot of computational optimization. However, it is difficult for a single human expert to teach dual robotic arms to process complex parts in a small space at the same time, and the above-mentioned collision problem is still prone to occur.
[0006] Based on the above defects and deficiencies, this field urgently needs to propose a method for a single human expert to simultaneously teach dual robotic arms processing of complex parts in a small space, so as to solve the problems in the prior art that it is difficult for a single human expert to simultaneously teach dual robotic arms collaborative processing in a small space to be processed in a complex part, and it is difficult to generalize, transfer and decompose existing processing skill trajectories in a small space to be processed in the complex part to be processed to two robotic arms, so as to enable a single human expert to directly teach processing of complex parts in a small space. Summary of the invention
[0007] In view of the above defects or improvement needs of the prior art, the present invention provides a dual-manipulator teaching processing method and system for complex parts in a narrow space. Through the DMP coding learning and trajectory prediction technology of the main robot arm A, accurate teaching and reproduction of complex parts processing tasks are achieved. At the same time, the slave robot arm B can analyze and predict the next movement intention of the main robot arm A in real time, and through intelligent posture adjustment, it provides A with a wider teaching space, enhancing the flexibility and adaptability of the processing task. In addition, through the constraint optimization algorithm, the present invention ensures that while maintaining the safety of the robot arm operation, the movement of the slave robot arm B is minimized, thereby improving the operating efficiency of the system. Overall, the present invention not only improves the accuracy and reliability of processing in complex spaces, but also significantly improves production efficiency and processing quality through an intelligent collaborative operation mechanism, providing an innovative solution for the field of intelligent manufacturing.
[0008] To achieve the above object, according to one aspect of the present invention, a dual-manipulator teaching processing method for complex parts in a narrow space is proposed, comprising the following steps:
[0009] S100 uses DMP encoding based on the teaching trajectory of the main robot A of a human expert. The DMP encoding includes the translation generalization and rotation generalization of DMP. The teaching trajectory is a complete processing trajectory for processing parts in the external processing area.
[0010] S200 predicts the trajectory position that the main robot A will reach next based on the complete processing trajectory encoded by DMP and the trajectory that the main robot A has currently been taught in a small space;
[0011] S300 adjusts the posture of the slave robot arm B according to the predicted trajectory position of the master robot arm A to increase the teaching space of the master robot arm A in a narrow space.
[0012] As a further preferred embodiment, in step 1, the teaching trajectory of the main robot arm A based on human experts using DMP coding includes:
[0013] (11) Based on the classic DMP formula, in the speed curve A scaling term τ is added to change the speed of the trajectory to obtain trajectories with different convergence speeds. By transforming the DMP formula and giving the teaching trajectory Get the target trajectory f that needs to be learned target , based on the target trajectory f target Construct a loss function and solve the loss function to generalize the DMP translation of the machining trajectory of the master robot A taught by the expert;
[0014] (12) A rotation transformation is introduced and introduced into the basic motion pattern so that the basic motion pattern has rotation invariance, the center after rotation is obtained, and the basic motion pattern after rotation is redefined according to the center after rotation, thereby realizing the rotation generalization of DMP.
[0015] As further preferred, step (11) specifically comprises the following steps:
[0016] (111)Introducing the classic DMP formula:
[0017] Where y is the Cartesian space trajectory of the end of the main robot A, and
[0018] They represent the first and second derivatives of y, g is the target position of the trajectory, α y and β y is a constant;
[0019] (112) In order to change the trajectory speed to obtain trajectories with different convergence speeds, in the speed curve Add a scaling term τ to achieve:
[0020]
[0021] Among them, f is the trajectory shape learner, and its calculation model is:
[0022]
[0023] In the formula, y0 is the starting state, x is the time variable, and w i is the weight value, Ψ i(x) is the radial basis function;
[0024] (113) By transforming the DMP formula and giving the teaching trajectory Get the target trajectory f that needs to be learned target :
[0025]
[0026] (114) Based on the radial basis function Ψ i (x), target trajectory f target And the weight value w i , construct a square loss function, and then use an optimization method to solve the solution with the minimum loss value of the square loss function to translate and generalize the processing trajectory of the master robot A taught by the expert;
[0027] Preferably, the square loss function includes:
[0028]
[0029] Where P represents the total number of time steps of the entire trajectory, ξ(t) = x(t)(g-y0).
[0030] As further preferred, step (12) specifically comprises the following steps:
[0031] (121) Setting the basic motion mode as the Gaussian kernel function;
[0032] (122) A rotation transformation is introduced to make it rotation invariant, and the rotation transformation is applied to the center c of the Gaussian kernel function. k , get the rotated center c′ k (θ);
[0033] (122) Using the rotated center c′ k (θ) to redefine the basic motion mode after rotation f k ′(θ,x), thus enabling the rotational generalization of DMP;
[0034] Preferably, in step (121), the basic movement pattern includes:
[0035]
[0036] Among them, c k is the center of the Gaussian kernel function, A k is the covariance matrix;
[0037] Preferably, in step (122), the center c′ k The calculation formula of (θ) includes:
[0038] c′ k (θ) = R (θ)·c k
[0039] Where θ is the rotation angle, c k is the center of the Gaussian kernel function, R(θ) is the rotation matrix;
[0040] Preferably, the basic motion mode after rotation is k The calculation formula of ′(θ,x) includes:
[0041]
[0042] Among them, f k′ (θ, x) represents the DMP trajectory generated by rotating by an angle θ.
[0043] As further preferred, step 2 comprises the following steps:
[0044] (21) Aligning the DMP-encoded processing trajectory with the teaching trajectory that the current main robot arm A has traveled through by using a trajectory alignment method based on feature points;
[0045] (22) constructing an affine transformation matrix, and transforming all points in the learned DMP encoding processing trajectory based on the affine transformation matrix to obtain a transformed DMP trajectory;
[0046] (23) Calculate the trajectory position taught by the main robot arm A at the next moment.
[0047] As further preferred, step (21) comprises the following steps:
[0048] (211) Assume that the feature point set of the teaching trajectory is M = {p1, p2, ..., p m}, where m is the number of feature points of the teaching trajectory, and the set of feature points of the learned DMP trajectory is N = {q1, q2, ..., q n}, where n is the number of feature points of the DMP trajectory;
[0049] (212) Using Euclidean distance as the distance metric between descriptors, the descriptor of the i-th feature point of the teaching trajectory is its coordinates itself, that is, The descriptor of the jth feature point in the front part of the learned DMP trajectory is its coordinates itself, that is,
[0050] (213) The nearest neighbor algorithm is used to match feature points. For each feature point p in the teaching trajectory, i , calculate its difference with the DMP trajectory feature point q j The Euclidean distance between them is calculated, and the feature point corresponding to the minimum distance is selected as the matching point;
[0051] (214) For the found feature point pair (p i ,q match(i) ), use the least squares method to fit an affine transformation matrix T so that the feature point p in the teaching trajectory i Transform to the corresponding feature point q in the front part of the DMP trace match(i) Above, the affine transformation matrix T includes:
[0052] T=(P T P) -1 P T Q
[0053] Where P is the coordinate matrix of the matching points in the teaching trajectory, and Q is the coordinate matrix of the matching points in the front part of the DMP trajectory;
[0054] (215) Based on the affine transformation matrix, all points in the learned DMP encoding processing trajectory are transformed to obtain a converted DMP trajectory.
[0055] As further preferred, step (23) comprises the following steps:
[0056] (231) Perform SVD decomposition on the transformation matrix to extract the rotation matrix R:
[0057] (232) According to the rotation generalization of the DMP in step 1, a rotational DMP encoding processing trajectory is calculated;
[0058] (233) Calculate the speed and position of the DMP encoding processing trajectory after rotation at the next moment:
[0059]
[0060] in, The DMP encoding processing trajectory speed at the next moment, y next The position of the DMP encoding processing trajectory at the next moment, α y and β y is a constant, is the DMP encoding processing trajectory speed at the current moment, y curr is the position of the DMP-encoded machining trajectory at the current moment, Δt is the time step, g is the target position of the trajectory, and τ is the scaling term;
[0061] Preferably, step (233) includes: setting the tth path in the teaching trajectory i The trajectory point p at a time point i Matched to the tth in the DMP coding processing trajectory j 'The trajectory point q at a time point match(i), that is, assuming that the time sequence of the teaching trajectory matching the corresponding point of the DMP trajectory is t1, t2, ..., t i ,...,t match , the corresponding DMP trajectory time is t1', t2', ..., t j ',...,t match ', according to the rotation generalized DMP formula, the corresponding positions are q1',q2',...,q j ', then the latest matching teaching trajectory time point t match The corresponding DMP trajectory position is y match =q j ', that is, the current teaching position is located at the position y of the encoded DMP processing teaching trajectory curr =y match ,speed The teaching trajectory is estimated by using the difference method, and the DMP encoding machining trajectory speed after rotation is obtained according to the DMP differential equation. and position y next .
[0062] As further preferred, step three comprises the following steps:
[0063] (301) constructing a minimum distance model from the outer surface of the robot arm to the narrow space surface of the workpiece based on the outer surface model of the robot arm and the workpiece model;
[0064] (302) according to the minimum distance model, a safe distance threshold is set as ∈, and the distance threshold is used to ensure that the main robot arm A has enough teaching space;
[0065] (303) Taking minimizing the movement of slave robot B as the objective function and ensuring that robot A has enough teaching space as a constraint condition, the gradient descent method is used to calculate the optimized position and posture of slave robot B, and the posture of slave robot B is updated accordingly.
[0066] As further preferred, in step (301), the minimum distance model includes:
[0067]
[0068] Among them, p arm The main robot arm A is located at y next The point on the robot A body at position q workpiece The main robot arm A is located at y next The point on the surface of the workpiece model in a narrow space when the position is next is the predicted position of the teaching trajectory at the next moment;
[0069] Preferably, step (303) comprises the following steps:
[0070] Assume that the posture of the robot arm B is represented by vector Q B Indicates that the goal is to find a new posture Q′ B , so that the movement of the robot arm B is ||Q′ B -Q B || is minimum, while ensuring that robot arm A has enough teaching space, which can be achieved through the following optimization problem:
[0071] minimize||Q′ B -Q B || 2 subject to min ≥∈,
[0072] Use gradient descent to solve this optimization problem:
[0073] (a) Define the objective function as the new posture Q′ of robot arm B B With the current posture Q B The square of the Euclidean distance between:
[0074] J(Q′ B )=||Q′ B -Q B || 2
[0075] (b) The constraint condition is defined as the minimum distance from the outer shell of the robot A to the surface of the narrow space of the workpiece is not less than the safety threshold ∈:
[0076] d min ≥∈
[0077] (3) Introduce the Lagrangian multiplier λ and construct the Lagrangian function:
[0078] L(Q′ B ,λ)=J(Q′ B )+λ(∈-d min )
[0079] (4) Calculate the Lagrangian function about the new posture Q′ of the robot arm B B And the gradient of the Lagrange multiplier λ:
[0080]
[0081] (5) Use the gradient descent method to update the new posture Q′ of the slave robot B B :
[0082]
[0083] Among them, α is the learning rate;
[0084] (6) Check the updated posture Q′ B Whether the constraint condition is satisfied, if not, return to step (5) and adjust α until the constraint condition is satisfied. If so, update the position and posture of slave robot B and make the next adjustment of the position and posture of slave robot B.
[0085] According to another aspect of the present invention, there is also provided a double-manipulator teaching processing system for complex parts in a narrow space, comprising:
[0086] A first main control module is used to use DMP coding to teach a trajectory of a main robot arm A based on a human expert, where the teaching trajectory is a complete processing trajectory for processing a part in an external processing area;
[0087] The second main control module is used to predict the trajectory position that the main robot A will reach next based on the complete processing trajectory encoded by DMP and the trajectory that the main robot A has been taught in the narrow space;
[0088] The third main control module is used to adjust the posture of the slave robot arm B according to the predicted trajectory position of the master robot arm A, so as to increase the teaching space of the master robot arm A in a narrow space.
[0089] In general, the above technical solution conceived by the present invention has the following technical advantages compared with the prior art:
[0090] 1. The present invention has learned the processing skills of the main robot arm A equipped with grinding tools through human expert teaching, and encoded this processing skills through the DMP method. The slave robot arm B combines the teaching trajectory of the previous robot arm A and the learned DMP coded processing skills to judge the movement intention of the main robot arm A at the next moment, and predict the processing trajectory of the main robot arm A in a small space taught by the human expert at the next moment. The slave robot arm B optimizes its own posture of clamping complex parts in real time through the predicted processing trajectory at the next moment and the posture state of the two robots at this time, so that the main robot arm A has a larger teaching space at the next moment, that is, the main robot arm A is used to teach the processing trajectory, and the slave robot arm B optimizes the workpiece posture in real time according to the trajectory. The collision problem is avoided, and a single human expert can directly teach the processing of complex parts in a small space.
[0091] 2. The present invention realizes efficient processing of complex parts in narrow spaces through the collaborative operation of master and slave robotic arms. The processing skills learned by the master robotic arm A are encoded through the DMP method, which can flexibly respond to different processing tasks and environmental changes. The slave robotic arm B combines the predicted processing trajectory and the real-time optimized clamping posture to provide A with a larger teaching space, enhancing the system's adaptability to complex processing tasks. That is, the method of the present invention realizes the direct teaching processing of the robotic arm in the narrow space to be processed area of complex parts, without programming, "teach and use", which will bring great convenience and economy to the prototype development and small batch processing of complex parts in major national demand fields such as aerospace.
[0092] 3. The present invention ensures the safety of operation by real-time monitoring of the minimum distance between the robotic arms and adjusting the posture of the slave robotic arm B using a constrained optimization method. At the same time, the operating efficiency of the system is improved by minimizing the amount of motion of the slave robotic arm B and using the gradient descent method for posture optimization. This dual optimization of safety and efficiency ensures that the robotic arm can both ensure the safety of operation and improve the efficiency of the processing process when performing complex processing tasks. That is, the present invention enables a single human expert to complete the simultaneous teaching and collaborative processing of dual robotic arms in a small space to be processed in a complex part, solving the problem of difficulty in generalizing and migrating the existing processing skill trajectory to two robotic arms. It effectively saves human resource labor costs, and at the same time, the realization of dual robotic arm teaching and collaborative processing makes robot teaching processing of parts with higher complexity possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 It is a flow chart of a method for teaching and processing complex parts in a narrow space using dual robotic arms according to an embodiment of the present invention;
[0094] Figure 2 It is a workflow diagram of data collection and encoding of processing trajectory taught by human experts involved in an embodiment of the present invention;
[0095] Figure 3 It is a workflow diagram for predicting the teaching trajectory position of the main robot arm A at the next moment involved in an embodiment of the present invention;
[0096] Figure 4 The embodiment of the present invention involves adjusting the posture of the slave robot B to increase the teaching space of the master robot A;
[0097] Figure 5 It is a schematic diagram of dual-arm collaborative teaching processing involved in an embodiment of the present invention.
[0098] In all the drawings, the same reference numerals represent the same technical features, specifically: 1-slave robot arm B, 2-parts with a small internal space and a complex structure, 3-end effector, 4-main robot arm A. DETAILED DESCRIPTION
[0099] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention 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 invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0100] like Figures 1 to 5 As shown, an embodiment of the present invention provides a dual-robot teaching processing method for complex parts in a narrow space. The main robot arm A equipped with a grinding tool has learned the processing skills through human expert teaching, and the processing skills are encoded through the DMP method. When teaching the narrow space of complex parts: the main robot arm A is still loaded with grinding tools, and the slave robot arm B clamps the complex parts to be processed. The human expert teaches the main robot arm A to perform processing tasks in the narrow space of the complex parts clamped by the slave robot arm B. The slave robot arm B combines the teaching trajectory of the previous robot arm A and the learned DMP encoding processing skills to judge the movement intention of the main robot arm A at the next moment, and predicts the processing trajectory of the human expert teaching the main robot arm A in the narrow space at the next moment. The slave robot arm B optimizes its own posture of clamping complex parts in real time through the predicted processing trajectory at the next moment and the posture state of the two robots at this time, so that the main robot arm A has a larger teaching space at the next moment, that is, the main robot arm A is used to teach the processing trajectory, and the slave robot arm B optimizes the workpiece posture in real time according to the trajectory. The details are as follows:
[0101] In step 1, human experts teach the main robot arm A equipped with a grinding tool to acquire processing skills for the external processing area of the part, and encode this processing trajectory through the DMP method.
[0102] S11 collects trajectory data of human experts when operating robot arm A to perform processing tasks.
[0103] First, ensure that Robot A is in the best working condition, including accurate calibration of all sensors and actuators. Then, the expert will manually guide Robot A to complete the predetermined processing task, and each of its movements, including parameters such as joint angle, speed, acceleration and position, will be recorded and captured in real time through the control system of Robot A. The data acquisition system operates at a high frequency to ensure the continuity and accuracy of trajectory data.
[0104] S12 performs denoising and segmentation processing on the collected teaching trajectory data.
[0105] The collected raw data then goes through a series of processing steps, such as filtering and denoising. The denoising process aims to reduce random fluctuations in the data and retain the true characteristics of the robot's motion, thereby improving the availability and reliability of the data. After denoising, the data will enter the segmentation stage. Segmentation is the process of breaking down the continuous trajectory data into several independent parts or stages, each of which represents a specific action or task of the robot in the processing process. Through accurate segmentation, the key nodes of the robot in the processing process can be identified, thereby providing more refined instructions for the automatic control of the robot. The processed data is sent to the DMP for encoding.
[0106] S13 performs DMP encoding on the teaching trajectory data based on the processed teaching trajectory data. The details are as follows:
[0107] Introducing the classic DMP formula:
[0108]
[0109] The first term on the right side of the above equation is the PD controller, where y represents the Cartesian space trajectory of the end of the main robot A. and They represent the first and second derivatives of y respectively. g represents the target position of the trajectory, and the system will converge to this position in the end. y and β y are two constants, equivalent to the P parameter and D parameter in the PD controller. In order to change the speed of the trajectory to obtain trajectories with different convergence speeds, Add a scaling term τ to achieve:
[0110]
[0111] The second term f is the trajectory shape learner. In order to make the system converge to the target state g, f also converges to 0, so that it no longer affects the control process of the system, f is defined as:
[0112]
[0113] Among them, y0 represents the starting state (y0 = y(t = 0)), the x term can ensure that f will tend to 0 as x converges, and g-y0 determines the "amplitude" of f, which is used to "scale" the shape of the trajectory later. Basis function Ψ i (x) is defined as the radial basis function:
[0114]
[0115] Among them, σ i and c i Denote the basis function Ψ iThe width and center position of the model need to be obtained through the teaching trajectory during the learning phase of the model. x ,α y ,β y , N need to be given in advance, and here it is manually specified based on empirical values, α x =1.0,α y =25,β y =α y / 4, the default value of N is 150.
[0116] For the weight w in f i The parameters of the training data are determined by using the local weighted regression method LWR (Locally Weighted Regression). By transforming the DMP formula and giving the teaching trajectory Get the f you need to learn target :
[0117]
[0118] For each basis function Ψ i The corresponding weight value w i , construct the following square loss function:
[0119]
[0120] Then use the optimization method to solve the above equation so that J i Minimize. Where P represents the total number of time steps of the entire trajectory (i.e., t / dt), ξ(t) = x(t)(g-y0), and the solution process of the above loss function is a weighted linear regression problem, and its solution is:
[0121] in,
[0122] Through the above formula, the expert teaches the machining trajectory of the main robot A, and by changing the target state and nonlinear terms, the taught trajectory can be encoded to obtain a machining skill. However, at this time, only translation generalization can be performed, and rotation generalization cannot be achieved simply by setting the rotation angle.
[0123] To solve the problem of rotation generalization, assume that a trajectory represented by a DMP is f orig (x), where x is the time variable and the rotation parameter θ is introduced to represent the rotation angle of the trajectory.
[0124] In order to achieve rotation invariance in DMP, the basic motion pattern f k (x) is adjusted to make it rotation invariant. Assuming the basic motion mode is a Gaussian kernel function, its form is:
[0125]
[0126] Among them, c k is the center of the Gaussian kernel function, A k is the covariance matrix. For each basic motion mode, a rotation transformation is introduced to make it rotation invariant. The rotation operation is applied to the center c of the Gaussian kernel function. k Assume that the rotation operation is completed by the rotation matrix R(θ), where θ is the rotation angle. The rotated center c′ can be obtained k (θ) is as follows:
[0127] c′ k (θ) = R (θ)·c k
[0128] Then, using the rotated center c′ k (θ) to redefine the basic motion mode after rotation f k ′(θ,x), as follows:
[0129]
[0130] where f k′ (θ, x) represents the DMP trajectory generated by the rotation angle θ. In this way, by introducing the rotation parameter and adjusting the center of the basic motion pattern, the rotation generalization of DMP can be achieved.
[0131] Step 2: The complete processing trajectory encoded by DMP obtained in the previous step is combined with the small trajectory that the current main robot A has been taught in a small space and the trajectory position that the main robot A will reach next is predicted.
[0132] 2.1 Trajectory Alignment
[0133] The DMP-encoded processing trajectory is aligned with the teaching trajectory that the current main robot arm A has traveled through through a trajectory alignment method based on feature points.
[0134] (1) Feature point extraction:
[0135] Assume that the feature point set of the teaching trajectory is M = {p1, p2, ..., p m}, where m is the number of feature points of the teaching trajectory, and the set of feature points of the learned DMP trajectory is N = {q1, q2, ..., q n}, where n is the number of feature points in the DMP trajectory.
[0136] (2) Descriptor calculation:
[0137] The Euclidean distance is used as the distance measure between descriptors. Then the descriptor of the i-th feature point of the teaching trajectory is its coordinates itself, that is, The descriptor of the jth feature point in the front part of the learned DMP trajectory is its coordinates itself, that is,
[0138] (3) Feature point matching:
[0139] The nearest neighbor algorithm is used to match feature points. i , calculate its difference with the DMP trajectory feature point q j The Euclidean distance between them is calculated, and the feature point corresponding to the minimum distance is selected as the matching point. The formula steps are as follows:
[0140] For each feature point p i ∈M, find the corresponding q match(i) ∈N
[0141] So that:
[0142] q match(i) =argmin j ‖p i -q j ‖
[0143] (4) Calculate the transformation matrix
[0144] For the found feature point pairs (p i ,q match(i) ), use the least squares method to fit an affine transformation matrix T so that the feature point p in the teaching trajectory i It can be transformed to the feature point q of the front part of the corresponding DMP trajectory match(i) The affine transformation matrix T can be calculated by the following formula:
[0145] T=(P T P) -1 P T Q
[0146] Among them, P is the coordinate matrix of the matching points in the teaching trajectory, and Q is the coordinate matrix of the matching points in the front part of the DMP trajectory. The coordinate matrix is constructed as follows:
[0147]
[0148] (5) Convert the learned DMP encoding processing trajectory:
[0149] Use the calculated affine transformation matrix T to transform all points in the learned DMP encoding processing trajectory to obtain the converted DMP trajectory. i , calculate its conversion
[0150] The position in the back space is: q′ i =Tq i .
[0151] 2.2. Derivation of the position of the next teaching trajectory
[0152] (1) Extract the rotation matrix through SVD decomposition:
[0153] Perform SVD decomposition on the transformation matrix T:
[0154] T=UΣV T
[0155] (2) Extract the rotation matrix R:
[0156] For the affine transformation matrix T in three-dimensional space, R can be obtained by multiplying the first three columns of U and V, that is, R = U (:, 1:3) × V (:, 1:3) T .
[0157] (3) Use the previously derived DMP rotation generalization formula to calculate the rotated DMP encoding processing trajectory:
[0158] DMP rotation generalization formula:
[0159]
[0160] in,
[0161] c′ k (θ) = R (θ)·c k
[0162] Substituting the extracted rotation matrix R into the DMP coding processing trajectory after rotation, the feature point N'={q1',q2',...,q n '}.
[0163] (4) Calculate the DMP encoding processing trajectory position after rotation at the next moment:
[0164] Assume that the tth i The trajectory point p at a time point i Matched to the tth in the DMP coding processing trajectory j 'The trajectory point q at a time point match(i) That is, assuming that the time sequence of the teaching trajectory matching the corresponding point of the DMP trajectory is t1, t2, ..., t i ,...,t match , the corresponding DMP trajectory time is t1', t2', ..., t j ',...,t match', according to the rotation generalized DMP formula, the corresponding positions are q1',q2',...,q j ', then the latest matching teaching trajectory time point t match The corresponding DMP trajectory position is y match =q j '. That is, the current teaching position is located at the position y of the encoded DMP processing teaching trajectory curr =y match .
[0165] speed The teaching trajectory is estimated using the difference method, namely:
[0166]
[0167] Use the previously learned DMP differential equation to get the trajectory speed at the next moment and position y next :
[0168]
[0169] Where Δt is the time step, assuming that the average sampling time interval between adjacent sampling time points in the teaching trajectory is Δt demo , then we can set Δt = Δt demo .y next This is the predicted position of the teaching trajectory at the next moment.
[0170] Step 3: Use the predicted trajectory position y next Adjust the posture of slave robot arm B to give master robot arm A enough teaching space.
[0171] Assume the outer surface model of the robot arm is M arm , the workpiece model is M workpiece , then the minimum distance from the outer surface of the robot arm to the surface of the narrow space of the workpiece is:
[0172]
[0173] where p arm Indicates that the main robot arm is located at y next The point on the robot body when the position is workpiece Indicates that the main robot arm is located at y next The position is a point on the surface of the workpiece model in a narrow space.
[0174] Set the safe distance threshold as ∈ to ensure that the main robot A has enough teaching space next, which should meet the following requirements:
[0175] d min ≥∈
[0176] A constrained optimization method is used to optimize the posture of the slave robot B in real time. This optimization problem can be formalized as a constrained optimization problem, where the objective function is to minimize the motion of the slave robot B and the constraint is to ensure that the robot A has enough teaching space.
[0177] Assume that the posture of the robot arm B is represented by vector Q B Indicates that the goal is to find a new posture Q′ B , so that the movement of the robot arm B is ||Q′ B -Q B || is minimum, while ensuring that robot A has enough teaching space. This can be achieved through the following optimization problem:
[0178] minimize||Q′ B -Q B || 2 subject to min ≥∈,
[0179] Use gradient descent to solve this optimization problem:
[0180] (1) Define the objective function
[0181] Define the objective function as the new posture Q′ of the robot arm B B With the current posture Q B The square of the Euclidean distance between:
[0182] J(Q′ B )=||Q′ B -Q B || 2
[0183] (2) Define constraints
[0184] The constraint condition is defined as the minimum distance from the robot housing to the surface of the narrow space of the workpiece is not less than the safety threshold ∈:
[0185] d min ≥∈
[0186] (3) Constructing the Lagrangian function using the Lagrangian multiplier method
[0187] Introduce the Lagrange multiplier λ and construct the Lagrange function:
[0188] L(Q′ B ,λ)=J(Q′ B )+λ(∈-d min )
[0189] (4) Calculate the gradient of the Lagrangian function
[0190] Calculate the Lagrangian function about the new posture Q′ of the robot arm B B And the gradient of the Lagrange multiplier λ:
[0191]
[0192] (5) Update the new posture of slave robot B
[0193] Use gradient descent to update the new posture Q′ of the slave robot B B :
[0194]
[0195] Where α is the learning rate, which controls the update step size.
[0196] (6) Check constraints
[0197] Check the updated pose Q′ B Whether the constraint condition d is satisfied min ≥∈. If satisfied, continue iterating; otherwise, adjust α or modify the steps of the gradient descent method until the constraints are met, according to the calculated target posture Q′ B The posture of slave robot arm B can be changed.
[0198] The above method realizes the direct teaching and processing of the robot arm in the small space to be processed area of complex parts. It does not require programming and is "taught and used immediately". It will bring great convenience and economy to the prototype development and small batch processing of complex parts in major national demand fields such as aerospace. Furthermore, this method enables a single human expert to complete the simultaneous teaching and collaborative processing of dual robot arms in the small space to be processed area of complex parts, solving the problem of the difficulty of generalizing and migrating the existing processing skill trajectory to two robot arms. It effectively saves human resource labor costs, and the realization of dual robot arm teaching and collaborative processing makes robot teaching processing of more complex parts possible.
[0199] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A dual-manipulator teaching processing method for complex parts in a narrow space, characterized in that: The following steps are involved: S100 uses DMP encoding based on the teaching trajectory of the main robot A of a human expert. The DMP encoding includes the translation generalization and rotation generalization of DMP. The teaching trajectory is a complete processing trajectory for processing parts in the external processing area. S200 predicts the trajectory position that the main robot A will reach next based on the complete processing trajectory encoded by DMP and the trajectory that the main robot A has currently been taught in a small space; S300 adjusts the posture of the slave robot arm B according to the predicted trajectory position of the master robot arm A to increase the teaching space of the master robot arm A in a narrow space.
2. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 1 is characterized in that: In step 1, the teaching trajectory of the main robot arm A based on human experts using DMP coding includes: (11) Based on the classic DMP formula, in the speed curve A scaling term τ is added to change the speed of the trajectory to obtain trajectories with different convergence speeds. By transforming the DMP formula and giving the teaching trajectory Get the target trajectory f that needs to be learned target , based on the target trajectory f target Construct a loss function and solve the loss function to generalize the DMP translation of the machining trajectory of the master robot A taught by the expert; (12) A rotation transformation is introduced and introduced into the basic motion pattern so that the basic motion pattern has rotation invariance, the center after rotation is obtained, and the basic motion pattern after rotation is redefined according to the center after rotation, thereby realizing the rotation generalization of DMP.
3. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 2 is characterized in that: Step (11) specifically comprises the following steps: (111)Introducing the classic DMP formula: Where y is the Cartesian space trajectory of the end of the main robot A, and They represent the first and second derivatives of y, g is the target position of the trajectory, α y and β y is a constant; (112) In order to change the trajectory speed to obtain trajectories with different convergence speeds, in the speed curve Add a scaling term τ to achieve: Among them, f is the trajectory shape learner, and its calculation model is: In the formula, y0 is the starting state, x is the time variable, and w i is the weight value, Ψ i (x) is the radial basis function; (113) By transforming the DMP formula and giving the teaching trajectory Get the target trajectory f that needs to be learned target : (114) Based on the radial basis function Ψ i (x), target trajectory f target And the weight value w i , construct a square loss function, and then use an optimization method to solve the solution with the minimum loss value of the square loss function to translate and generalize the processing trajectory of the master robot A taught by the expert; Preferably, the square loss function includes: Where P represents the total number of time steps of the entire trajectory, ξ(t) = x(t)(g-y0).
4. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 2 is characterized in that: Step (12) specifically comprises the following steps: (121) Setting the basic motion mode as the Gaussian kernel function; (122) A rotation transformation is introduced to make it rotation invariant, and the rotation transformation is applied to the center c of the Gaussian kernel function. k , get the rotated center c′ k (θ); (122) Using the rotated center c′ k (θ) to redefine the basic motion mode f′ after rotation k (θ, x), thus enabling the rotational generalization of DMP; Preferably, in step (121), the basic movement pattern includes: Among them, c k is the center of the Gaussian kernel function, A k is the covariance matrix; Preferably, in step (122), the center c′ k The calculation formula of (θ) includes: c′ k (θ)=R(θ)·c k Where θ is the rotation angle, c k is the center of the Gaussian kernel function, R(θ) is the rotation matrix; Preferably, the basic motion pattern f′ after rotation k The calculation formula for (θ,x) includes: Among them, f k′ (θ, x) represents the DMP trajectory generated by rotating by an angle θ.
5. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 1 is characterized in that: Step 2 includes the following steps: (21) Aligning the DMP-encoded processing trajectory with the teaching trajectory that the current main robot arm A has traveled through by using a trajectory alignment method based on feature points; (22) constructing an affine transformation matrix, and transforming all points in the learned DMP encoding processing trajectory based on the affine transformation matrix to obtain a transformed DMP trajectory; (23) Calculate the trajectory position taught by the main robot arm A at the next moment.
6. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 5 is characterized in that: Step (21) comprises the following steps: (211) Assume that the feature point set of the teaching trajectory is M = {p1, p2, ..., p m }, where m is the number of feature points of the teaching trajectory, and the set of feature points of the learned DMP trajectory is N = {q1, q2, ..., q n }, where n is the number of feature points of the DMP trajectory; (212) Using Euclidean distance as the distance metric between descriptors, the descriptor of the i-th feature point of the teaching trajectory is its coordinates itself, that is, The descriptor of the jth feature point in the front part of the learned DMP trajectory is its coordinates itself, that is, (213) The nearest neighbor algorithm is used to match feature points. For each feature point p in the teaching trajectory, i , calculate its difference with the DMP trajectory feature point q j The Euclidean distance between them is calculated, and the feature point corresponding to the minimum distance is selected as the matching point; (214) For the found feature point pair (p i ,q match(i) ), use the least squares method to fit an affine transformation matrix T so that the feature point p in the teaching trajectory i Transform to the corresponding feature point q in the front part of the DMP trace match(i) Above, the affine transformation matrix T includes: T=(P T P) -1 P T Q Where P is the coordinate matrix of the matching points in the teaching trajectory, and Q is the coordinate matrix of the matching points in the front part of the DMP trajectory; (215) Based on the affine transformation matrix, all points in the learned DMP encoding processing trajectory are transformed to obtain a converted DMP trajectory.
7. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 5, characterized in that: Step (23) comprises the following steps: (231) Perform SVD decomposition on the transformation matrix to extract the rotation matrix R: (232) According to the rotation generalization of the DMP in step 1, a rotational DMP encoding processing trajectory is calculated; (233) Calculate the speed and position of the DMP encoding processing trajectory after rotation at the next moment: in, The DMP encoding processing trajectory speed at the next moment, y next The position of the DMP encoding processing trajectory at the next moment, α y and β y is a constant, is the DMP encoding processing trajectory speed at the current moment, y curr is the position of the DMP-encoded machining trajectory at the current moment, Δt is the time step, g is the target position of the trajectory, and τ is the scaling term; Preferably, step (233) includes: setting the tth path in the teaching trajectory i The trajectory point p at a time point i Matched to the tth in the DMP coding processing trajectory j 'The trajectory point q at a time point match(i) , that is, assuming that the time sequence of the teaching trajectory matching the corresponding point of the DMP trajectory is t1, t2, ..., t i ,...,t match , the corresponding DMP trajectory time is t1′, t2′, ..., t j ′,...,t match ′, according to the rotation generalized DMP formula, the corresponding positions are q1',q2',...,q j ', then the latest matching teaching trajectory time point t match The corresponding DMP trajectory position is y match =q j ', that is, the current teaching position is located at the position y of the encoded DMP processing teaching trajectory curr =y match ,speed The teaching trajectory is estimated by using the difference method, and the DMP encoding machining trajectory speed y after rotation is obtained according to the DMP differential equation. next and position y next .
8. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 1 is characterized in that: Step three includes the following steps: (301) constructing a minimum distance model from the outer surface of the robot arm to the narrow space surface of the workpiece based on the outer surface model of the robot arm and the workpiece model; (302) according to the minimum distance model, a safe distance threshold is set as ∈, where ∈ is used to ensure that the main robot arm A has enough teaching space; (303) Taking minimizing the movement of slave robot B as the objective function and ensuring that robot A has enough teaching space as a constraint condition, the gradient descent method is used to calculate the optimized position and posture of slave robot B, and the posture of slave robot B is updated accordingly.
9. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 1, characterized in that: In step (301), the minimum distance model includes: Among them, p arm The main robot arm A is located at y next The point on the robot A body at position q workpiece The main robot arm A is located at y next The point on the surface of the workpiece model in a narrow space when the position is next is the predicted position of the teaching trajectory at the next moment; Preferably, step (303) comprises the following steps: Assume that the posture of the robot arm B is represented by vector Q B Indicates that the goal is to find a new posture Q′ B , so that the movement of the robot arm B is ||Q′ B -Q B || is minimum, while ensuring that the robot arm A has enough teaching space, which can be achieved through the following optimization problem: minimize||Q′ B -Q B || 2 subject to d min ≥∈, Use gradient descent to solve this optimization problem: (a) Define the objective function as the new posture Q′ of robot arm B B With the current posture Q B The square of the Euclidean distance between: J(Q′ B )=||Q′ B -Q B || 2 (b) The constraint condition is defined as the minimum distance from the outer shell of the robot A to the surface of the narrow space of the workpiece is not less than the safety threshold ∈: d min ≥∈∈ (3) Introduce the Lagrangian multiplier λ and construct the Lagrangian function: L(Q′ B ,λ)=J(Q′ B )+λ(∈-d min ) (4) Calculate the Lagrangian function about the new posture Q′ of the robot arm B B And the gradient of the Lagrange multiplier λ: (5) Use the gradient descent method to update the new posture Q′ of the slave robot B B : Among them, α is the learning rate; (6) Check the updated posture Q′ B Whether the constraint condition is satisfied, if not, return to step (5) and adjust α until the constraint condition is satisfied. If so, update the position and posture of slave robot B and make the next adjustment of the position and posture of slave robot B.
10. A dual-manipulator teaching processing system for complex parts in a narrow space, characterized in that: include: A first main control module is used to use DMP coding to teach a trajectory of a main robot arm A based on a human expert, where the teaching trajectory is a complete processing trajectory for processing a part in an external processing area; The second main control module is used to predict the trajectory position that the main robot A will reach next based on the complete processing trajectory encoded by DMP and the trajectory that the main robot A has been taught in the narrow space; The third main control module is used to adjust the posture of the slave robot arm B according to the predicted trajectory position of the master robot arm A, so as to increase the teaching space of the master robot arm A in a narrow space.
Citation Information
Patent Citations
Method for realizing double-arm cooperative operation task based on teaching learning
CN112207835A
Deep reinforcement learning dual-arm robot control method based on demonstration examples, and system
CN113524186A
Coordinate self-calibration method and system of ultrasonic-guided double-arm puncture robot and medium
CN116392254A
Double-arm robot layout optimization method based on teaching learning
CN116834013A
Mechanical arm teaching method, system and equipment based on bilateral control and storage medium
CN118081734A
Cited By
Double-arm teaching assembly method and system based on dynamic motion primitive
CN120395927A
Dynamic-movement-primitive-based adaptive skill learning method for dual-arm robot
WO2026113816A1
