Teaching machining method and system for complex part narrow space double robot arms

By employing DMP coding and intelligent attitude adjustment methods, the spatial limitations and collision problems of collaborative machining of complex parts in confined spaces by dual robotic arms have been solved, enabling efficient and safe teaching-based machining, which is applicable to the machining of complex parts in aerospace and other fields.

CN118809556BActive Publication Date: 2025-10-17HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410957913.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2025-10-17
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve effective collaborative machining of complex parts within confined spaces, presenting challenges such as spatial limitations, collision avoidance, and difficulties in skill generalization, transfer, and decomposition.

Method used

The teaching trajectory of the master robotic arm is learned by DMP encoding. Combined with the real-time prediction of the master robotic arm's movement intention from the robotic arm, the teaching space in a confined space is increased through intelligent posture adjustment, and safety and efficiency are ensured through constraint optimization algorithm.

Benefits of technology

It enables efficient and safe collaborative machining of complex parts in confined spaces using two robotic arms, improving machining accuracy and production efficiency, reducing human resource costs, and is highly adaptable, suitable for machining complex parts in aerospace and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118809556B_ABST
    Figure CN118809556B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of robot control, and particularly discloses a double-robot-arm teaching machining method and system for complex parts in narrow space. The method comprises the following steps: adopting DMP coding to encode the teaching trajectory of a master robot arm A based on a human expert, wherein the DMP coding comprises translation generalization and rotation generalization of DMP, and the teaching trajectory is a complete machining trajectory for machining a part in an external machining area; predicting the trajectory position to be reached by the master robot arm A in the next step according to the complete machining trajectory of the DMP coding and the trajectory that has been taught by the master robot arm A in the narrow space; and adjusting the posture of a 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 the narrow space. The application proposes a double-robot-arm machining method for teaching complex parts in narrow space by a single human expert, avoids collision problems, and realizes direct teaching machining of complex parts in narrow space by a single human expert.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of robot control, and more particularly relates to a double-robot teaching machining method and system for complex parts in narrow spaces. BACKGROUND

[0002] With the continuous development of technology, the demand for more precise and complex parts in the fields of aerospace, medical devices, automotive industry, etc. is increasing. The development of robot technology makes part processing more flexible and efficient. The teaching machining technology greatly reduces the technical threshold and production preparation time because of its characteristics of no programming and "teaching and using". Even non-professionals can quickly guide the robot to complete complex processing tasks. It brings unprecedented convenience and economy to the manufacturing industry in product prototype development and small batch production.

[0003] However, directly teaching machining in the narrow space of complex parts may still have the following difficulties: 1. Space constraints: the movement of the robot in the narrow space is limited by space, including the shape of the part, the processing equipment, obstacles, etc. The movement of the robot is limited, and it is difficult to find a suitable path for teaching machining. 2. Collision avoidance: in the narrow space, the robot body is easy to collide with the workpiece or other robots when a human teaches the robot to perform a machining task, and collision avoidance needs to be considered to ensure safety and processing quality.

[0004] Generalizing the learned robot teaching machining skills to the part to be processed area is a common method, but for the skill generalization to the complex part to be processed area in the narrow space, there are also problems of insufficient workspace caused by single robot degree of freedom limitation, complex part structure, and narrow space of the to-be-processed area, causing part of the robot pose to be unreachable, and thus unable to meet the processing task requirements of complex parts. Double-robot collaborative machining: the collaborative machining mode of the main robot equipped with a processing tool and the slave robot holding the part to be processed can effectively solve the problems of insufficient workspace and part of the pose being unreachable caused by single robot degree of freedom, complex part, and narrow space of the to-be-processed area. However, the machining trajectory is formed by the relative motion of the two robots, and the learned teaching trajectory needs to be migrated and decomposed to the two robots. The general 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 even cannot solve the two-robot collaborative high-dimension.

[0005] The double-robot collaborative direct teaching machining can effectively alleviate the limited freedom of single robot and the possible machining position unreachable problem, and better meet the machining space conditions of the complex part in the narrow space. Moreover, the direct teaching machining does not need to pass through skill generalization and thus does not need a large amount of calculation and optimization. However, it is difficult for a single human expert to simultaneously teach the double-robot machining in the narrow space of the complex part, and the above-mentioned collision problem still exists.

[0006] Based on the above defects and deficiencies, there is an urgent need in the art to propose a method for a single human expert to simultaneously teach double-robot machining in the narrow space of a complex part, so as to solve the problems of difficulty in direct teaching machining of the robot in the machining area of the complex part in the narrow space, difficulty in simultaneous teaching of the double-robot collaborative machining by a single human expert in the machining area of the complex part in the narrow space, and difficulty in generalization and migration of the existing machining skill trajectory to two robots in the machining area of the complex part in the narrow space, and to realize direct teaching machining of a single human expert in the narrow space of a complex part. SUMMARY

[0007] In view of the above defects or improvement needs of the prior art, the present application provides a double-robot teaching machining method and system in a narrow space of a complex part. Through DMP encoding learning and trajectory prediction technology of the main robot A, accurate teaching and reproduction of the complex part machining task are realized. At the same time, the next motion intention of the main robot A can be analyzed and predicted in real time by the slave robot B, and a wider teaching space is provided for A through intelligent posture adjustment, which enhances the flexibility and adaptability of the machining task. In addition, through the constraint optimization algorithm, the present application ensures that the motion amount of the slave robot B is minimized while maintaining the safety of the robot operation, and improves the running efficiency of the system. Overall, the present application not only improves the accuracy and reliability of machining in a complex space, but also significantly improves the production efficiency and machining quality through an intelligent collaborative working mechanism, providing an innovative solution for the field of intelligent manufacturing.

[0008] To achieve the above-mentioned purpose, according to one aspect of the present application, a double-robot teaching machining method in a narrow space of a complex part is proposed, comprising the following steps:

[0009] S100 adopts DMP encoding of the teaching trajectory of the main robot A based on human experts, the DMP encoding including translation generalization and rotation generalization of DMP, and the teaching trajectory being a complete machining trajectory for machining the part in the external machining area;

[0010] S200 predicts the trajectory position to be reached by the main robot A next according to the complete machining trajectory of the DMP encoding and the trajectory already taught by the main robot A in the narrow space;

[0011] S300 adjusts the posture of the slave robot B according to the predicted trajectory position of the master robot A, so as to increase the teaching space of the master robot A in the narrow space.

[0012] As a further preferred, in step one, the teaching trajectory of the master robot A based on human experts using DMP encoding includes:

[0013] (11) Based on the classical DMP formula, a scaling term τ is added to the velocity curve to change the velocity of the trajectory, so as to obtain a trajectory with different convergence speed, by transforming the DMP formula, and given the teaching trajectory get the target trajectory f target that needs to be learned target , based on the target trajectory f , construct a loss function, and solve the loss function to perform translation generalization of DMP for the expert teaching trajectory of the master robot A;

[0014] (12) Introduce a rotation transformation, and introduce the rotation transformation into the basic motion pattern, so that the basic motion pattern has rotation invariance, get the rotated center, and redefine the rotated basic motion pattern according to the rotated center, so as to realize the rotation generalization of DMP.

[0015] As a further preferred, step (11) specifically includes the following steps:

[0016]

[0017] Wherein, y is the Cartesian space trajectory of the end of the master robot A, and

[0018] respectively represent the first and second derivatives of y, g is the target position of the trajectory, and α y and β y are constants;

[0019] (112) In order to change the velocity of the trajectory to obtain a trajectory with different convergence speed, a scaling term τ is added to the velocity curve to realize:

[0020]

[0021] Wherein, f is a trajectory shape learner, and its calculation model is:

[0022]

[0023] In the formula, y0 is the initial state, x is the time variable, w i is the weight value, and Ψ i(x) is a radial basis function;

[0024] (113) by transforming the DMP formula, and given 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), the target trajectory f target and the weight value w i , construct a square loss function, and then use an optimization method to solve the square loss function loss value minimum solution to translate the expert teaching main robot arm A machining trajectory generalization;

[0027] Preferably, the square loss function includes:

[0028]

[0029] Where P represents the total number of time steps of the entire trajectory, and ξ(t) = x(t)(g-y0).

[0030] As a further preferred, step (12) specifically includes the following steps:

[0031] (121) set the basic motion pattern as a Gaussian kernel function;

[0032] (122) introduce a rotation transformation, make it have rotation invariance, and apply the rotation transformation to the center c k of the Gaussian kernel function to get the rotated center c' k (θ);

[0033] (122) use the rotated center c' k (θ) to redefine the rotated basic motion pattern f k '(θ, x), so as to realize the rotation generalization of DMP;

[0034] Preferably, in step (121), the basic motion pattern includes:

[0035]

[0036] Where c k is the center of the Gaussian kernel function, and A k is the covariance matrix;

[0037] Preferably, in step (122), the calculation formula of the center c' k (θ) includes:

[0038] c′ k (θ) = R(θ) c k

[0039] where θ is the rotation angle, c k is the center of the Gaussian kernel function, and R(θ) is the rotation matrix.

[0040] Preferably, the calculation formula of the rotated basic motion pattern f k ′(θ, x) includes:

[0041]

[0042] where f k′ (θ, x) represents the DMP trajectory generated by the rotation angle θ.

[0043] As a further preferred, step two includes the following steps:

[0044] (21) Align the DMP-encoded machining trajectory with the current master robot A has walked through the teaching trajectory by a feature point-based trajectory alignment method;

[0045] (22) Construct an affine transformation matrix, and transform all points in the learned DMP-encoded machining trajectory based on the affine transformation matrix to obtain the converted DMP trajectory;

[0046] (23) Calculate the trajectory position of the master robot A teaching at the next time.

[0047] As a further preferred, step (21) includes the following steps:

[0048] (211) Assuming that the feature point set of the teaching trajectory is M = {p1, p2,..., pm}, where m is the number of feature points of the teaching trajectory, and the feature point set of the learned DMP trajectory is N = {q1, q2,..., qn}, where n is the number of feature points of the DMP trajectory. m n

[0049] (212) Using the Euclidean distance as the distance measure between descriptors, the descriptor of the i-th feature point of the teaching trajectory is its coordinate itself, i.e. the descriptor of the j-th feature point of the front part of the learned DMP trajectory is its coordinate itself, i.e.

[0050] (213) Use the nearest neighbor algorithm to match the feature points, for each feature point p i in the teaching trajectory, calculate the Euclidean distance between it and the DMP trajectory feature point q j , and select the feature point corresponding to the minimum distance as the matching point.​​

[0051] (214)For the found feature point pairs (p i q match(i) ), a least square method is used to fit an affine transformation matrix T, such that the feature points p i in the demonstration trajectory are transformed to the corresponding feature points q match(i) in the pre-part of the DMP trajectory. 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 demonstration trajectory, and Q is the coordinate matrix of the matching points in the pre-part of the DMP trajectory.

[0054] (215)Based on the affine transformation matrix, all points in the learned DMP encoded machining trajectory are transformed to obtain the converted DMP trajectory.

[0055] As a further preferred, step (23) includes the following steps:

[0056] (231)SVD decomposition is performed on the transformation matrix to extract a rotation matrix R:

[0057] (232)According to the rotation generalization of the DMP, the rotated DMP encoded machining trajectory is calculated;

[0058] (233)The speed and position of the rotated DMP encoded machining trajectory at the next time are calculated:

[0059]

[0060] where v is the speed of the DMP encoded machining trajectory at the next time, y next is the position of the DMP encoded machining trajectory at the next time, α y and β y are constants, v curr is the speed of the DMP encoded machining trajectory at the current time, y i is the position of the DMP encoded machining trajectory at the current time, Δt is the time step, g is the target position of the trajectory, and τ is a scaling term.

[0061] Preferably, step (233) includes: setting the trajectory point p i at the t j th time point in the demonstration trajectory to match the trajectory point q 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 can be obtained as 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 at the position y of the encoded DMP processing teaching trajectory curr =y match ,speed The teaching trajectory is estimated using the differential method, and the DMP encoding processing trajectory speed after rotation is obtained according to the DMP differential equation. and position y next .

[0062] As further preferred, step three includes the following steps:

[0063] (301) Based on the outer surface model of the robot arm and the workpiece model, a minimum distance model from the outer surface of the robot arm to the surface of the workpiece in a narrow space is constructed;

[0064] (302) Setting a safe distance threshold as ∈ according to the minimum distance model, the distance threshold is used to ensure that the main robot arm A has enough teaching space;

[0065] (303) Taking minimizing the movement of the slave robot B as the objective function and ensuring that the robot A has enough teaching space as the constraint condition, the gradient descent method is used to calculate the optimized position of the slave robot B, and the posture of the slave robot B is updated accordingly.

[0066] As a further preferred embodiment, 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 narrow space of the workpiece model at the position, y next is the predicted position of the teaching trajectory at the next moment;

[0069] Preferably, step (303) comprises the following steps:

[0070] Assume the pose of manipulator B is represented by vector Q B , the goal is to find a new pose Q' B such that the movement of manipulator B ||Q' B - Q B || is minimized while ensuring manipulator A has enough teaching space, which can be achieved by the following optimization problem:

[0071] minimize ||Q' B - Q B || 2 subject to d min ≥∈,

[0072] Use gradient descent to solve this optimization problem:

[0073] (a) Define the objective function as the squared Euclidean distance between the new pose of manipulator B Q' B and the current pose Q B :

[0074] J(Q' B ) = ||Q' B - Q B || 2

[0075] (b) Define the constraint as the minimum distance between the outer shell of manipulator A and the narrow space surface of the workpiece being no less than the safety threshold∈:

[0076] d min ≥∈

[0077] (3) Introduce the Lagrange multiplier λ to construct the Lagrangian function:

[0078] L(Q' B , λ) = J(Q' B ) + λ(∈ - d min )

[0079] (4) Calculate the gradient of the Lagrangian function with respect to the new pose of manipulator B Q' B and the Lagrange multiplier λ:

[0080]

[0081] (5) Update the new pose of manipulator B Q' B using gradient descent:

[0082]

[0083] where α is the learning rate;

[0084] (6) Check the updated pose Q' B whether the constraint condition is satisfied, if not, return to step (5), adjust a, until the constraint condition is satisfied, if yes, update the pose of the slave robot B, and proceed to the next adjustment of the pose of the slave robot B.

[0085] According to another aspect of the present application, there is also provided a complex part narrow space dual-robot teaching machining system, comprising:

[0086] a first master control module for adopting DMP encoding to teach the trajectory of the master robot A based on human experts, the teaching trajectory being a complete machining trajectory for machining the part in the external machining area;

[0087] a second master control module for predicting the trajectory position to be reached by the master robot A next according to the complete machining trajectory encoded by DMP and the trajectory already taught by the master robot A in the narrow space;

[0088] a third master control module for adjusting the pose of the slave robot B according to the predicted trajectory position of the master robot A to increase the teaching space of the master robot A in the narrow space.

[0089] Overall, compared with the prior art, the above technical solutions conceived by the present application mainly have the following technical advantages:

[0090] 1. The master robot A has learned machining skills by teaching the grinding tool by human experts, and the machining skills are encoded by DMP method. The slave robot B combines the previous teaching trajectory of the master robot A and the learned DMP encoded machining skills to judge the motion intention of the master robot A next time, predict the machining trajectory of the master robot A taught by human experts in the narrow space next time, and optimize the pose of the slave robot B for clamping the complex part in real time according to the predicted machining trajectory next time and the pose state of the two robots at this time, so that the master robot A has a larger teaching space next time, i.e. the master robot A is used to teach the machining trajectory, and the slave robot B optimizes the pose of the workpiece in real time according to the trajectory. The collision problem is avoided, and a single human expert can directly teach machining in the narrow space of the complex part.

[0091] 2.The present application realizes efficient processing of complex parts in narrow space through the cooperative work of master-slave manipulators. The processing skills learned by the master manipulator A are encoded by the DMP method, which can flexibly cope with different processing tasks and environmental changes. The slave manipulator B combines the predicted processing trajectory and the real-time optimized clamping posture to provide more teaching space for A, enhancing the adaptability of the system to complex processing tasks. That is, the method of the present application realizes direct teaching processing of the mechanical arm in the machining area of the complex part in the narrow space, without programming, "teaching and using", which will bring great convenience and economy to the development of complex part products and small batch processing in the field of national major needs such as aerospace.

[0092] 3.The present application realizes real-time monitoring of the minimum distance between the manipulators, and adjusts the posture of the slave manipulator B by using the constraint optimization method, ensuring the safety of the operation. At the same time, by minimizing the motion amount of the slave manipulator B and using the gradient descent method for posture optimization, the running efficiency of the system is improved. This dual optimization of safety and efficiency enables the manipulator to ensure the safety of the operation while improving the efficiency of the processing when performing complex processing tasks. That is, the present application realizes that a single human expert can complete the cooperative processing of the double manipulators by teaching, solving the problem of generalizing and migrating the existing processing skill trajectory to two manipulators. It effectively saves the labor cost of human resources, and the realization of double manipulator teaching cooperative processing makes it possible to realize robot teaching processing of higher complexity parts. BRIEF DESCRIPTION OF DRAWINGS

[0093] Figure 1 is a flow chart of a complex part narrow space double manipulator teaching processing method related to an embodiment of the present application;

[0094] Figure 2 is a human expert teaching processing trajectory data acquisition and encoding workflow chart related to an embodiment of the present application;

[0095] Figure 3 is a workflow chart of predicting the next moment master manipulator A teaching trajectory position related to an embodiment of the present application;

[0096] Figure 4 is a workflow chart of adjusting the posture of the slave manipulator B to increase the teaching space of the master manipulator A related to an embodiment of the present application;

[0097] Figure 5 is a double-arm cooperative teaching processing schematic diagram related to an embodiment of the present application.

[0098] In all the drawings, the same reference signs represent the same technical features, specifically: 1-slave manipulator B, 2-part with narrow internal space and complex structure, 3-end effector, 4-master manipulator A. DETAILED DESCRIPTION

[0099] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining 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 may 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-robotic arm teaching processing method for complex parts in a narrow space. The master robotic arm A equipped with a grinding tool has learned the processing skills through teaching by human experts, and this processing skill is encoded through the DMP method. When teaching complex parts in a narrow space: the master robotic arm A is still loaded with the grinding tool, and the slave robotic arm B clamps the complex part to be processed. The human expert teaches the master robotic arm A to perform the processing task in the narrow space of the complex part clamped by the slave robotic arm B. The slave robotic arm B combines the teaching trajectory of the previous robotic arm A and the learned DMP encoding processing skills to judge the movement intention of the master robotic arm A at the next moment, and predicts the processing trajectory of the master robotic arm A in the narrow space taught by the human expert at the next moment. The slave robotic arm B optimizes its own posture of clamping the complex part in real time through the predicted processing trajectory at the next moment and the posture status of the two robotic arms at this time, so that the master robotic arm A has a larger teaching space at the next moment, that is, the master robotic arm A is used to teach the processing trajectory, and the slave robotic arm B optimizes the workpiece posture in real time according to the trajectory. The details are as follows:

[0101] In step 1, a human expert teaches the main robot arm A equipped with a grinding tool to acquire processing skills for the external processing area of ​​the part and encodes this processing trajectory using the DMP method.

[0102] S11 collects trajectory data of a human expert when operating robotic arm A to perform processing tasks.

[0103] First, Robot Arm A is ensured to be in optimal working condition, including precise calibration of all sensors and actuators. Experts then manually guide Robot Arm A to complete the predetermined processing task. Every movement, including parameters such as joint angles, speed, acceleration, and position, is recorded and captured in real time by Robot Arm A's control system. 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 undergoes a series of processing steps, such as filtering and denoising. The denoising process aims to reduce random fluctuations in the data and preserve the true characteristics of the robot's motion, thereby improving data usability and reliability. After denoising, the data enters the segmentation stage. Segmentation decomposes the continuous trajectory data into several independent parts or stages, each representing a specific movement or task of the robot during the processing. Accurate segmentation allows the robot to identify key nodes in the processing process, providing more precise instructions for the robot's automated control. The processed data is then 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 arm 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. 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. i (x) is defined as the radial basis function:

[0114]

[0115] Among them, σ i and c i Represent the basis function Ψ iwidth and center position, which are parameters to be learned from the demonstration trajectory in the learning phase of the model. The constant parameters a x , a y , b y , N are given in advance, which are manually specified according to experience values, a x = 1.0, a y = 25, b y = a y / 4, and the default value of N is 150.

[0116] For the determination of the weight w i in f, the locally weighted regression (LWR) method is used to learn. By transforming the DMP formula and giving the demonstration trajectory , the f target to be learned is obtained:

[0117]

[0118] For each basis function Ψ i , the corresponding weight value w i is constructed as follows:

[0119]

[0120] Then, an optimization method is used to solve the above formula to minimize J i . Where P represents the total time step of the entire trajectory (i.e. t / dt), and ξ(t) = x(t)(g-y0). The solving process of the above loss function is a weighted linear regression problem, and its solution is:

[0121] where,

[0122] Through the above formula, the expert demonstration main mechanical arm A machining trajectory is encoded by changing the target state and nonlinear term to obtain a machining skill. However, at this time, only translation generalization can be performed, and rotation generalization cannot be simply achieved by setting the rotation angle.

[0123] To solve the rotation generalization, assume that a DMP represented trajectory is f orig (x), where x is the time variable, and a rotation parameter θ is introduced to represent the rotation angle of the trajectory.

[0124] In order to realize rotation invariance in DMP, the basic motion pattern f k (x) is adjusted to have rotation invariance. Assume that the basic motion pattern is a Gaussian kernel function, which has the form:

[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 center c′ after rotation 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 rotating the DMP by an angle θ. In this way, by introducing the rotation parameter and adjusting the center of the basic motion pattern, the rotation generalization of the DMP can be achieved.

[0131] Step 2: The complete processing trajectory encoded by the DMP obtained in the previous step is combined with the small trajectory that has been taught to the current main robot A in the narrow space and the predicted trajectory position that the main robot A will reach next.

[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 using 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 feature point set of the learned DMP trajectory is N = {q1,q2,...,q n}, where n is the number of feature points of the DMP trajectory.

[0136] (2) Descriptor calculation:

[0137] Euclidean distance is used as the distance metric between descriptors. The descriptor of the i-th feature point of the demonstrated trajectory is its coordinate itself, i.e. The descriptor of the j-th feature point of the learned DMP trajectory's front part is its coordinate itself, i.e.

[0138] (3) Feature point matching:

[0139] Nearest neighbor algorithm is used for feature point matching. For each feature point p i in the demonstrated trajectory, the Euclidean distance between it and the DMP trajectory feature point q j is calculated, and the feature point corresponding to the smallest 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] such that:

[0142] q match(i) = argmin j ‖p i -q j ‖

[0143] (4) Calculate the conversion matrix

[0144] 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 i in the demonstrated trajectory can be transformed to the corresponding feature point q match(i) in the DMP trajectory front part. The affine transformation matrix T can be calculated by the following formula:

[0145] T = (P T P) -1 P T Q

[0146] where P is the coordinate matrix of the matching points in the demonstrated trajectory, and Q is the coordinate matrix of the matching points in the DMP trajectory front part. The construction of the coordinate matrix is as follows:

[0147]

[0148] (5) Convert the learned DMP coded machining trajectory:

[0149] Use the calculated affine transformation matrix T to transform all points in the learned DMP coded machining trajectory to get the converted DMP trajectory. Where each point q i , calculate its coordinate in the converted DMP trajectory

[0150] The position in the back space is: q' i = Tq i .

[0151] 2.2. Deriving the position of the next teaching trajectory

[0152] (1) Extract the rotation matrix by SVD decomposition:

[0153] SVD decomposition is performed on the transformation matrix T:

[0154] T = UΣV T

[0155] (2) Extract the rotation matrix R:

[0156] For an affine transformation matrix T in three-dimensional space, R can be obtained by multiplying the first three columns of U and V, i.e. R = U(:,1:3) x V(:,1:3) T .

[0157] (3) Calculate the rotated DMP encoded machining trajectory using the previously derived DMP rotation generalization formula:

[0158] DMP rotation generalization formula:

[0159]

[0160] where,

[0161] c' k (θ) = R(θ) c k

[0162] Bring the extracted rotation matrix R into it to obtain the rotated DMP encoded machining trajectory, where the feature points N' = {q1', q2',..., q n '}.

[0163] (4) Calculate the position of the next time rotated DMP encoded machining trajectory:

[0164] Suppose the t i th time point of the teaching trajectory p i matches the t j th time point of the DMP encoded machining trajectory q match(i) . That is, suppose the time point sequence of the teaching trajectory matching the DMP trajectory corresponding point is t1, t2,..., t i ,..., t match , and the corresponding DMP trajectory time is t1', t2',..., t j ',..., t match .', according to the rotation generalized DMP formula, the corresponding positions can be obtained as 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 obtain the trajectory velocity 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 the slave robot arm B to provide enough teaching space for the master robot arm A.

[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 robotic arm is located at y next The point on the robot body when the position is workpiece Indicates that the main robotic 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 to ∈ to ensure that the main robot A has enough teaching space for the next step, which should meet the following requirements:

[0175] d min ≥∈

[0176] A constraint optimization method is used to optimize the pose of robot B in real time. This optimization problem can be formalized as a constraint optimization problem, where the objective function is to minimize the motion of robot B, and the constraint condition is to guarantee that robot A has enough teaching space.

[0177] Suppose the pose of robot B is denoted by vector Q B , the goal is to find a new pose Q′ B such that the motion of robot B ||Q′ B - Q B || is minimized, while guaranteeing that robot A has enough teaching space. This can be achieved by the following optimization problem:

[0178] minimize ||Q′ B - Q B || 2 subject to d min ≥∈,

[0179] The gradient descent method is used to solve this optimization problem:

[0180] (1) Define the objective function

[0181] The objective function is defined as the square of the Euclidean distance between the new pose of robot B Q′ B and the current pose Q B :

[0182] J(Q′ B ) = ||Q′ B - Q B || 2

[0183] (2) Define the constraint condition

[0184] The constraint condition is defined as the minimum distance between the robot shell and the narrow space surface of the workpiece being no less than the safety threshold∈:

[0185] d min ≥∈

[0186] (3) Use the Lagrange multiplier method to construct the Lagrange function

[0187] Introduce the Lagrange multiplier λ to construct the Lagrange function:

[0188] L(Q′ B , λ) = J(Q′ B ) + λ (∈ - d min )

[0189] (4) Calculate the gradient of the Lagrange 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 the 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 d is satisfied min ≥∈. If satisfied, continue the iteration; 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 the 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 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 two robot arms in the small space to be processed 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. At the same time, the realization of teaching and collaborative processing of dual robot arms 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 scope of protection of the present invention.

Claims

1. A dual-arm teaching method for processing complex parts in a narrow space, wherein the complex parts to be processed are clamped by the robot arm B, and the method is characterized by: The following steps are involved: The S100 uses DMP encoding based on the teaching trajectory of the main robot arm A of a human expert. The DMP encoding includes translational and rotational generalizations of DMP. The teaching trajectory is a complete machining trajectory for machining parts in the external machining area. S200 predicts the next trajectory position that the main robot A will reach based on the complete machining trajectory encoded by DMP and the trajectory that the main robot A has been taught in the confined space of the complex part. 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. A dual-manipulator teaching processing method for complex parts in a narrow space according to claim 1, characterized in that: In step 1, the teaching trajectory of the master robot A based on human experts using DMP coding includes: (11) Based on the classic DMP formula, in the speed curve Add a scaling term τ to change the trajectory speed 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 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 includes 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, the velocity curve Add a scaling term τ to achieve: Among them, f is the trajectory shape learner, and its calculation model is: Where y0 is the initial 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 the 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 expert-taught main robot arm A.

4. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 3 is characterized in that: The square loss function includes: Where P represents the total number of time steps of the entire trajectory, ξ(t) = x(t)(g-y0).

5. 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 includes the following steps: (121) The basic motion pattern is set to 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 rotation generalization of DMP.

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: 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.

7. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 6, characterized in that: In step (122), the center c' k Calculation formula for (θ) include: c′ k (θ)=R(θ)·c k Where θ is the rotation angle, c k is the center of the Gaussian kernel function, and R(θ) is the rotation matrix.

8. The method for processing complex parts in a narrow space with dual robotic arms according to claim 7, characterized in that: Basic motion pattern after rotation f′ k The calculation formula for (θ,x) includes: Among them, f k ′(θ,x) represents the DMP trajectory generated by rotating by an angle θ.

9. The method for processing complex parts in a narrow space with dual robotic arms according to claim 1, 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 traversed through 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 of the main robot arm A at the next moment.

10. A dual-manipulator teaching method for processing complex parts in a narrow space according to claim 9, 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 feature point set 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 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 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 transformed DMP trajectory.

11. The method for processing complex parts in a narrow space with dual robotic arms according to claim 9, 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, The DMP encoding processing trajectory speed at the current moment, y curr is the position of the DMP encoding the machining trajectory at the current moment, Δt is the time step, g is the target position of the trajectory, τ is the scaling term, and f is the trajectory shape learner.

12. A dual-manipulator teaching method for processing complex parts in a narrow space according to claim 11, characterized in that: Step (233) includes: setting the tth i The trajectory point p at a time point i Matched 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 t′1, t′2, ..., t′ j ,...,t′ match According to the rotation generalization 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 at the position y of the encoded DMP processing teaching trajectory curr =y match ,speed The teaching trajectory is estimated using the differential method, and the DMP encoding processing trajectory speed after rotation is obtained according to the DMP differential equation. and position y next .

13. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 1, characterized in that: Step three includes the following steps: (301) Based on the outer surface model of the robot arm and the workpiece model, a minimum distance model from the outer surface of the robot arm to the surface of the workpiece in a narrow space is constructed; (302) Setting a safe distance threshold as ∈ according to the minimum distance model, the distance threshold is used to ensure that the main robot arm A has enough teaching space; (303) Taking minimizing the movement of the slave robot B as the objective function and ensuring that the robot A has enough teaching space as the constraint condition, the gradient descent method is used to calculate the optimized position of the slave robot B, and the posture of the slave robot B is updated accordingly.

14. A dual-manipulator teaching method for processing complex parts in a narrow space according to claim 13, 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 narrow space of the workpiece model at the position, y next is the predicted position of the teaching trajectory at the next moment.

15. The method for teaching and processing complex parts in a narrow space with dual robotic arms according to claim 14, characterized in that: Step (303) includes the following steps: Assume that the posture of the robot arm B is represented by vector Q B The goal is to find a new posture Q′ B , so that the movement of the robot arm B || Q′ B -Q B || is minimized while ensuring that robot arm A has enough teaching space. This is 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 the 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) Define the constraint condition as the minimum distance between the robot arm A shell and the surface of the workpiece in the narrow space is not less than the safety threshold ∈: d min ≥∈ (3) Introduce the Lagrange multiplier λ and construct the Lagrange 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 gradient descent 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 of the slave robot B and make the next adjustment of the position of the slave robot B.

16. A dual-arm teaching processing system for complex parts in a narrow space, wherein the robot arm B clamps the complex parts to be processed, and is characterized by: include: A first master control module is used to encode a teaching trajectory of a master robot arm A based on a human expert using DMP coding, where the teaching trajectory is a complete machining trajectory for machining a part in an external machining area; The second main control module is used to predict the trajectory position that the main robot arm A will reach next based on the complete processing trajectory encoded by DMP and the trajectory that the main robot arm A has been taught in the narrow space of the complex part; 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 small space.

Citation Information

Patent Citations

  • Method for realizing double-arm cooperative operation task based on teaching learning

    CN112207835A

  • Double-arm robot layout optimization method based on teaching learning

    CN116834013A