Robot track simulation method and system and storage medium

By introducing the combination of the five-order polynomial function model and dynamic motion primitives in the robot trajectory imitation technology, the problems of large computing resources and poor generalization capabilities in the existing technology are solved, and efficient and flexible trajectory imitation and independent learning capabilities are achieved.

CN120056103APending Publication Date: 2025-05-30XIAMEN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510205474.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Existing robot trajectory imitation technology faces the problems of large computing resources and poor generalization capabilities. The trajectory fitting method is difficult to meet the requirements of real-time and flexibility; while the method based on dynamic motion primitives is difficult to make full use of rich demonstration resources due to the limitations of single-sample learning.

Method used

A trajectory imitation method of robots is proposed. By recording multiple trajectory demonstrations using kinesthetic teaching method, a five-order polynomial function model is constructed and multiple trajectories are fitted using incremental learning mechanism; then a dynamic motion primitive is used to model the fitted trajectory, and the model parameters are learned through local weighted regression method to achieve trajectory generalization.

Benefits of technology

This method can gradually improve the accuracy and robustness of trajectory fitting under low computing resource consumption, adapt to different tasks and environmental needs, and enhance the generalization ability and autonomous learning potential of the robot.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120056103A_ABST
    Figure CN120056103A_ABST
Patent Text Reader

Abstract

The track simulation method comprises the following steps: recording multiple track demonstrations of an execution line device at the tail end of the robot by utilizing a kinesthetic teaching mode, and generating a plurality of track point sets containing x, y and z three-dimensional coordinates; constructing a quintic polynomial function model of x, y and z three-dimensional coordinates, and fitting a plurality of tracks by using an incremental learning mechanism; and performing modeling on the fitting trajectory by using the dynamic motion primitive, learning parameters of a dynamic motion primitive model through a local weighted regression method, setting a starting point and an ending point based on different scenes, and performing trajectory generalization by using the dynamic motion primitive model to obtain a trajectory result. According to the method, the problems of high calculation complexity, poor generalization ability, single-sample learning limitation and the like in the prior art are solved, efficient, accurate and widely-applicable track simulation ability is realized, and a new way is opened up for simulation learning of the robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot trajectory imitation, and in particular to a method, a system and a storage medium for robot trajectory imitation. Background Art

[0002] In the field of robot technology, imitating the trajectory of human demonstrations is an important part of realizing efficient and precise motion control of robots. With the rapid development of fields such as artificial intelligence, information technology, and intelligent manufacturing, significant progress has been made in robot trajectory imitation technology. Traditional methods are mainly divided into two categories: methods based on fitting trajectories and methods based on dynamic movement primitives. The method based on trajectory fitting can fit multiple demonstration trajectories and can overcome the uncertainty of single demonstrations, but it consumes a large amount of computing resources and has poor generalization ability. The method based on dynamic movement primitives has strong generalization ability and high real-time performance of trajectory reproduction, but it has the defect of only being able to perform single-sample learning.

[0003] The existing robot trajectory imitation technology faces many challenges: on the one hand, although the traditional method based on trajectory fitting can integrate multiple demonstration data to reduce uncertainty, it is often accompanied by high computing costs and limited generalization ability, making it difficult to meet the requirements of real-time performance and flexibility; on the other hand, although the method based on dynamic movement primitives has strong generalization ability and real-time response characteristics, it is limited by the inherent defect of single-sample learning and is difficult to make full use of rich demonstration resources. Summary of the Invention

[0004] In order to solve the above technical problems existing in the prior art, the present invention proposes a method and a system for robot trajectory imitation to solve the above technical problems.

[0005] According to a first aspect of the present invention, a method for robot trajectory imitation is proposed, including:

[0006] S1: Using the kinesthetic teaching method to record multiple trajectory demonstrations of the robot end effector, generating multiple trajectory point sets containing three-dimensional coordinates of x, y, and z;

[0007] S2: Constructing a fifth-degree polynomial function model of three-dimensional coordinates of x, y, and z, and using an incremental learning mechanism to fit multiple trajectories;

[0008] S3: Using dynamic movement primitives to model the fitted trajectory, learning the parameters of the dynamic movement primitive model through the locally weighted regression method, setting the starting point and the ending point based on different scenarios, and using the dynamic movement primitive model for trajectory generalization to obtain the trajectory result.

[0009] In some specific embodiments, the fifth-degree polynomial function model in S2 is constructed by the following formula: x(t) = w 0 +w 1t+w 2 t 2 +w 3 t 3 +w 4 t 4 +w 5 t 5 , y(t)=m 0 +m 1 t+m 2 t 2 +m 3 t 3 +m 4 t 4 +m 5 t 5 , z(t)=n 0 +n 1 t+n 2 t 2 +n 3 t 3 +n 4 t 4 +n 5 t 5 , where w 0 、w 1 、w 2 、w 3 、w 4 、w 5 is the weight of the fitted x-coordinate polynomial function, m 0 、m 1 、m 2 、m 3 、m 4 、m 5 is the weight of the fitted y-coordinate polynomial function, n 0 、n 1 、n 2 、n 3 、n 4 、n 5 is the weight of the fitted z-coordinate polynomial function, and t is the sampling time.

[0010] In some specific embodiments, fitting multiple trajectories using the incremental learning mechanism in S2 specifically includes: establishing a mean square error function of polynomial fitting: Ez=12t=t0tn[zt-z′(t)]2, where Ex, Ey, and Ez are the error functions of x, y, and z respectively, x′(t), y′(t), and z′(t) are the actual values ​​of x, y, and z at time t, and x(t), y(t), and z(t) are the predicted values ​​at time t. The weight parameters of x(t), y(t), and z(t) are solved by linear regression to fit multiple trajectories into a single trajectory.

[0011] In some specific embodiments, the use of dynamic movement primitives to model the fitting trajectory in S3 specifically includes: taking values at 100 ms intervals from the input time t ∈ [t 0 , t n , calculating the outputs of x(t), y(t), and z(t) at each moment, and respectively establishing dynamic movement primitive models for the x-trajectory, y-trajectory, and z-trajectory based on the formula , where X, and represent the position, velocity, and acceleration of the robot, α χ and β X are constants, g is the target state, τ is the time scaling factor, and f represents the forcing function of the demonstration trajectory characteristics. By modeling with dynamic movement primitives and combining with the locally weighted regression method to learn the model parameters, trajectory generalization can be achieved, thus adapting to diverse scenarios and task requirements.

[0012] In some specific embodiments, the forcing function is obtained by the normalized linear superposition of multiple non-linear basis functions, and the calculation formula is as follows: Ψ k (t) = exp(-h i (χ - c i ) 2 ) is the basis function, w k is the weight parameter to be learned, χ 0 is the initial state or the specified starting point of the trajectory, the basis function follows a Gaussian distribution centered on c i , and h i is the variance of the basis function. With this setting, the dynamic movement primitive model can more accurately simulate the trajectory characteristics and improve the trajectory generalization ability.

[0013] In some specific embodiments, the learning of the parameters of the dynamic movement primitive model by the locally weighted regression method in S3 specifically includes: taking a set of movement trajectories as the teaching trajectory, extracting the position information X demo (t), velocity information acceleration information where t ∈ [t 0 , t 1 , …, t n , defining the initial point of the teaching trajectory as the starting point X 0 , g = χ demo (t = t n ), χ 0 = χ demo (t = t 0 ), and according to the teaching trajectory information, combining with the expression of the target forcing function: using the locally weighted regression method to determine the weight wk , such that the forcing functions f and f target are close, obtaining the weight w k The expression of is: Wherein,

[0014] According to the second aspect of the present invention, a trajectory imitation system for a robot is proposed, including:

[0015] A data acquisition module configured to record multiple trajectory demonstrations of the end effector of the robot by means of kinesthetic teaching, generating multiple trajectory point sets including three-dimensional coordinates of x, y, and z;

[0016] A quintic polynomial fitting module configured to construct a quintic polynomial function model of the three-dimensional coordinates of x, y, and z, and fit multiple trajectories by means of an incremental learning mechanism;

[0017] A dynamic movement primitive module configured to model the fitted trajectory using dynamic movement primitives, learn the parameters of the dynamic movement primitive model by means of local weighted regression, set the start point and the end point based on different scenarios, and perform trajectory generalization using the dynamic movement primitive model to obtain a trajectory result.

[0018] In some specific embodiments, the quintic polynomial function model in the quintic polynomial fitting module is constructed by the following formula: x(t) = w 0 + w 1 t + w 2 t 2 + w 3 t 3 + w 4 t 4 + w 5 t 5 , y(t) = m 0 + m 1 t + m 2 t 2 + m 3 t 3 + m 4 t 4 + m 5 t 5 , z(t) = n 0 + n 1 t + n 2 t 2 + n 3 t 3 + n 4 t 4 + n 5 t 5 , wherein, w 0 、w 1 、w 2 、w3 , w 4 , w 5 is the weight for fitting the polynomial function of the x - coordinate, m 0 , m 1 , m 2 , m 3 , m 4 , m 5 is the weight for fitting the polynomial function of the y - coordinate, n 0 , n 1 , n 2 , n 3 , n 4 , n 5 is the weight for fitting the polynomial function of the z - coordinate, t is the sampling time; specifically, using the incremental learning mechanism to fit multiple trajectories includes: establishing the mean - square error function of polynomial fitting: where, E x , e y , e z are the error functions of x, y, and z respectively, x′(t), y′(t), z′(t) are the actual values of x, y, and z at time t, x(t), y(t), z(t) are the predicted values at time t, and the weight parameters of x(t), y(t), z(t) are solved by linear regression to fit multiple trajectories into a single trajectory.

[0019] In some specific embodiments, using dynamic motion primitives in the dynamic motion primitive module to model the fitted trajectory specifically includes: taking values at intervals of 100 ms from the input time t ∈ [t 0 , t n , calculating the outputs of x(t), y(t), z(t) at each moment, and respectively establishing the dynamic motion primitive models of the x - trajectory, y - trajectory, and z - trajectory based on the formula , where χ, and represent the position, velocity, and acceleration of the robot, α χ and β χ are constants, g is the target state, τ is the time - scaling factor, f represents the forcing function of the demonstration trajectory features, and the forcing function is obtained by the normalized linear superposition of multiple non - linear basis functions. The calculation formula is as follows: Ψ k (t) = exp(-h i (χ - c i ) 2 ) is the basis function, w k is the weight parameter to be learned, χ 0 is the initial state or the specified starting point of the trajectory, the basis function follows a Gaussian distribution centered on c i , h iThe variance of the basis function; specifically, learning the parameters of the dynamic motion primitive model by the locally weighted regression method includes: taking a set of motion trajectories as the demonstration trajectories, and extracting the position information χ demo (t), the velocity information and the acceleration information where t ∈ [t 0 , t 1 , …, t n , defining the initial point of the demonstration trajectory as the starting point χ 0 , g = χ demo (t = t n ), χ 0 = χ demo (t = t 0 ), according to the demonstration trajectory information, combined with the expression of the target forcing function: using the locally weighted regression method to determine the weight w k , such that the forcing function f and f target are close, and obtaining the expression of the weight w k as: wherein,

[0020] According to the third aspect of the present invention, a computer-readable storage medium is provided, on which one or more computer programs are stored, and when the one or more computer programs are executed by a computer processor, the above method is implemented.

[0021] The present invention provides a trajectory imitation method and system for a robot. By introducing an incremental learning mechanism, a polynomial function can fit multiple demonstration trajectories with extremely low computing resources and update the trajectory model parameters online. This mechanism enables the robot to gradually improve the accuracy and robustness of trajectory fitting without complex calculations during the continuous learning process. After fitting the trajectory, the dynamic motion primitive is used to learn the trajectory well-fitted by the polynomial function, and the nonlinear characteristics, high real-time performance, and generalization ability of the dynamic motion primitive are utilized to adapt to different task and environmental requirements. By combining the incremental trajectory fitting of the polynomial function with the dynamic motion primitive, not only the accuracy and adaptability of trajectory imitation are improved, but also the robot is endowed with the ability of autonomous learning and generalization. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The drawings illustrate the embodiments and, together with the description, are used to explain the principles of the present invention. Other embodiments and many of the intended advantages of the embodiments will be readily appreciated as they become better understood by reference to the following detailed description. The other features, objects, and advantages of the present application will become more apparent from the following detailed description of the non-limiting embodiments made with reference to the accompanying drawings:

[0023] Figure 1 is a flowchart of a trajectory imitation method of a robot according to an embodiment of the present application;

[0024] Figure 2 is a flowchart of a trajectory imitation method of a robot according to a specific embodiment of the present application;

[0025] Figure 3 is an architecture diagram of a trajectory imitation system of a robot according to an embodiment of the present application;

[0026] Figure 4 is a schematic structural diagram of a computer system of an electronic device for implementing the embodiments of the present application. Detailed implementation manners

[0027] The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related invention, rather than limiting the invention. In addition, it should be noted that for the convenience of description, only parts related to the relevant invention are shown in the drawings.

[0028] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and embodiments.

[0029] Figure 1 shows a flowchart of a trajectory imitation method of a robot according to an embodiment of the present application. As Figure 1 shown, the method includes the following steps:

[0030] S101: Use the kinesthetic teaching method to record multiple trajectory demonstrations of the robot end effector, and generate multiple trajectory point sets including three-dimensional coordinates of x, y, and z.

[0031] S102: Construct a fifth-degree polynomial function model of three-dimensional coordinates of x, y, and z, and use the incremental learning mechanism to fit multiple trajectories.

[0032] In a specific embodiment, the fifth-degree polynomial function model is constructed by the following formula: x(t) = w 0 + w 1 t + w 2 t 2 + w 3 t 3 + w 4 t 4 + w 5 t 5 , y(t) = m 0 + m 1 t + m 3 t3 +m 3 t 3 +m 4 t 4 +m 5 t 5 ,z(t) = n 0 +n 1 t + n 2 t 2 +n 3 t 3 +n 4 t 4 +n 5 t 5 ,where w 0 、w 1 、w 2 、w 3 、w 4 、w 5 are the weights for fitting the x - coordinate polynomial function, m 0 、m 1 、m 2 、m 3 、m 4 、m 5 are the weights for fitting the y - coordinate polynomial function, n 0 、n 1 、n 2 、n 3 、n 4 、n 5 are the weights for fitting the z - coordinate polynomial function, and t is the sampling time.

[0033] In a specific embodiment, using the incremental learning mechanism to fit multiple trajectories specifically includes: establishing the mean - square error function for polynomial fitting: where E x 、E y 、E z are the error functions for x, y, and z respectively, x′(t), y′(t), z′(t) are the actual values of x, y, and z at time t, x(t), y(t), z(t) are the predicted values at time t. Solve the weight parameters of x(t), y(t), z(t) through linear regression to fit multiple trajectories into a single trajectory.

[0034] S103: Model the fitted trajectory using dynamic motion primitives, learn the parameters of the dynamic motion primitive model through local weighted regression, set the starting point and ending point based on different scenarios, and use the dynamic motion primitive model for trajectory generalization to obtain the trajectory result.

[0035] In a specific embodiment, modeling the fitting trajectory using dynamic motion primitives specifically includes: taking values at 100 ms intervals from the input time t ∈ [t 0 , t n , calculating the outputs of x(t), y(t), and z(t) at each moment, and respectively establishing dynamic motion primitive models for the x-trajectory, y-trajectory, and z-trajectory based on the formula where X, and represent the position, velocity, and acceleration of the robot, α χ and β χ are constants, g is the target state, τ is the time scaling factor, and f represents the forcing function of the demonstration trajectory characteristics. The forcing function is obtained by the normalized linear superposition of multiple non-linear basis functions, and the calculation formula is as follows: Ψ k (t) = exp(-h i (χ - c i ) 2 ) is the basis function, w k is the weight parameter to be learned, χ 0 is the initial state or the specified starting point of the trajectory, the basis function follows a Gaussian distribution centered on c i , and h i is the variance of the basis function.

[0036] In a specific embodiment, learning the parameters of the dynamic motion primitive model by the locally weighted regression method specifically includes: taking a set of motion trajectories as the teaching trajectory, extracting the position information χ demo (t), velocity information acceleration information where t ∈ [t 0 , t 1 , …, t n , defining the initial point of the teaching trajectory as the starting point χ 0 , g = χ demo (t = t n ), χ 0 = χ demo (t = t 0 ), and according to the teaching trajectory information, combined with the expression of the target forcing function: using the locally weighted regression method to determine the weight w k such that the forcing function f and f target are close, and obtaining the expression of the weight w k as: where,

[0037] Figure 2 shows the flowchart of the trajectory imitation method of a robot in a specific embodiment of the present application, asFigure 2 As shown, the method includes the following steps:

[0038] S201: Collect multiple demonstration trajectories; Drag the end effector of the robot in a kinesthetic teaching mode for trajectory demonstration (such as a robot palletizing trajectory), and record the coordinates of the end effector of the robot, and record the position information of each moment of the trajectory at a frequency of 100 Hz. Among them, the trajectory point set of the first demonstration is denoted as S1 = {s1 t0 、s1 t1 、…、s1 tn}, the trajectory point set of the second demonstration is denoted as S2 = {s2 t0 、s2 t1 、…、s2 tn}, the trajectory point set of the Nth demonstration is SN = {sN t0 、sN t1 、…、sN tn}, N takes a number greater than 2, and each trajectory point contains three data of x, y, and z.

[0039] S202: Establish 3 fifth-degree polynomial functions. Specifically, it includes: Establish three fifth-degree polynomial functions of the end coordinates x, y, and z with respect to time t:

[0040] x(t) = w 0 +w 1 t+w 2 t 2 +w 3 t 3 +w 4 t 4 +w 5 t 5

[0041] y(t) = m 0 +m 1 t+m 2 t 2 +m 3 t 3 +m 4 t 4 +m 5 t 5

[0042] z(t) = n 0 +n 1 t+n 2 t 2 +n 3 t 3 +n 4 t 4 +n 5 t 5

[0043] Among them, w 0 、w 1 、w 2 、w 3 、w 4 、w 5 are the weights for fitting the x - coordinate polynomial function, m 0 、m 1 、m 2 、m 3 、m 4 、m 5 are the weights for fitting the y - coordinate polynomial function, n 0 、n 1 、n 2 、n 3 、n 4 、n 5 are the weights for fitting the z - coordinate polynomial function, and t is the sampling time. Establish the mean - square error function for polynomial fitting:

[0044]

[0045] Among them, E x 、E y 、E z are the error functions of x, y, and z respectively, x′(t), y′(t), z′(t) are the actual values of x, y, z at time t, and x(t), y(t), z(t) are the predicted values at time t.

[0046] S203: Solve the parameters of 3 fifth - degree polynomials through linear regression to fit multiple trajectories in the x, y, and z directions respectively; solve the weight parameters of x(t), y(t), t(t) through linear regression to fit multiple trajectories into a single trajectory.

[0047] S204: Calculate the trajectory points after fitting using the fifth - degree polynomial. Input the time t ∈ [t0, tn], and take values at 100 - ms intervals. Calculate the outputs of x(t), y(x), z(t) at each moment, that is, the positions x, y, z of the trajectory points that the robot should reach at each moment. Establish the DMP models for the x - trajectory, y - trajectory, and z - trajectory respectively, and the formulas are as follows: In the formula, χ, and represent the position, velocity, and acceleration of the system, α x and β x are constants, g is the target state, τ is the time - scaling factor used to adjust the decay rate of the system. f is the forcing function representing the characteristics of the demonstration trajectory, which is obtained by the normalized linear superposition of multiple non - linear basis functions, and the expression is: Among them, Ψ k (t) = exp(-h i (χ - ci ) 2 ) is the basis function, denoted as the number of basis functions, w k is the weight parameter to be learned. χ 0 is the initial state and can also be the specified starting point of the trajectory. The basis function follows a Gaussian distribution centered at c i and h i is the variance of the basis function.

[0048] S205: Use DMP to learn trajectory points. Select a set of motion trajectories as the demonstration trajectory, and extract the position information χ demo (t), the velocity information and the acceleration information where t ∈ [t 0 , t 1 , …, t n . Define the initial point of the demonstration trajectory as the starting point χ 0 , that is: g = X demo (t = t n ), χ 0 = χ demo (t = t 0 ). According to the demonstration trajectory information, the expression of the target forcing function can be obtained: Use the locally weighted regression method to determine the weight w k such that the forcing function f and f target are as close as possible, and finally obtain the expression of w k as: where,

[0049] S206: Set the starting point and ending point according to the specific task, generate the trajectory, and complete the imitation. According to the requirements of the target task, adjust the starting point and ending point of the dynamic movement primitive model, and use the modeled trajectory to generate the final trajectory for the robot to perform the imitation task. The finally generated trajectory not only meets the task accuracy requirements but also can flexibly adapt to the changing task scenarios to ensure that the robot can complete the specified task.

[0050] On the one hand, the trajectory imitation method of the robot in this application introduces polynomial fitting technology, which can gradually learn and integrate multiple demonstration trajectories without iterative solution, thus greatly reducing the consumption of computing resources and improving the computing efficiency of trajectory fitting. It directly solves the problem of high computational complexity of traditional neural network fitting methods, enabling the robot to process demonstration data more efficiently. On the other hand, based on the well-fitted trajectory by polynomials, the present invention further uses dynamic movement primitives to learn and optimize the trajectory. The non-linear characteristics and high real-time performance of dynamic movement primitives enable the robot to flexibly combine and adjust primitive movements to adapt to various complex task requirements. This step not only retains the original advantages of dynamic movement primitives, but also provides richer and more accurate trajectory information for them through the preliminary fitting of multiple demonstration trajectories by polynomials, thus significantly enhancing the generalization ability and autonomous learning potential of the robot.

[0051] Figure 3 Fig. shows the architecture diagram of the trajectory imitation system of the robot according to an embodiment of the present application, as Figure 3 shown, the system includes a data acquisition module 301, a fifth-degree polynomial fitting module 302, and a dynamic movement primitive module 303. Among them, the data acquisition module 301 is configured to record multiple trajectory demonstrations of the robot end effector by kinesthetic teaching, generating multiple trajectory point sets including three-dimensional coordinates of x, y, and z; the fifth-degree polynomial fitting module 302 is configured to construct a fifth-degree polynomial function model of the three-dimensional coordinates of x, y, and z, and fit multiple trajectories by using an incremental learning mechanism; the dynamic movement primitive module 303 is configured to model the fitted trajectory by using dynamic movement primitives, learn the parameters of the dynamic movement primitive model by the local weighted regression method, set the start point and end point based on different scenarios, and use the dynamic movement primitive model for trajectory generalization to obtain the trajectory result.

[0052] Next, refer to Figure 4 , which shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. Figure 4 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0053] As Figure 4 shown, the computer system includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage section 408 into the random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the system 400 are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other through a bus 404. The input / output (I / O) interface 405 is also connected to the bus 404.

[0054] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including, for example, a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.

[0055] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable storage medium, and the computer program includes program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 409, and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above-described functions defined in the methods of the present application are performed. It should be noted that the computer-readable storage medium of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable storage medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0056] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0057] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0058] The modules described in the embodiments of this application can be implemented in software or in hardware.

[0059] As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist alone without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the electronic device, the electronic device is enabled to: record multiple trajectory demonstrations of the robot end effector using kinesthetic teaching, generate multiple trajectory point sets including three-dimensional coordinates of x, y, and z; construct a fifth-degree polynomial function model of the three-dimensional coordinates of x, y, and z, and fit multiple trajectories using an incremental learning mechanism; model the fitted trajectories using dynamic movement primitives, learn the parameters of the dynamic movement primitive model through local weighted regression, set the start and end points based on different scenarios, and use the dynamic movement primitive model for trajectory generalization to obtain a trajectory result.

[0060] The above description is only a preferred embodiment of the present application and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solution formed by mutually replacing the above features with technical features having similar functions (but not limited to) disclosed in the present application.

Claims

1. A robot trajectory imitation method, characterized in that: include: S1: Use kinesthetic teaching to record multiple trajectory demonstrations of the robot's end effector and generate multiple trajectory point sets containing x, y, and z three-dimensional coordinates; S2: constructing a quintic polynomial function model of the x, y, z three-dimensional coordinates, and fitting multiple trajectories using an incremental learning mechanism; S3: Use dynamic motion primitives to model the fitted trajectory, learn the parameters of the dynamic motion primitive model through local weighted regression method, set the starting point and end point based on different scenarios, use the dynamic motion primitive model to generalize the trajectory, and obtain the trajectory result.

2. The robot trajectory imitation method according to claim 1, characterized in that: The fifth-order polynomial function model in S2 is constructed by the following formula: x(t)=w0+w1t+w2t 2 +w3t 3 +w4t 4 +w5t 5 , y(t)=m0+m1t+m2t 2 +m3t 3 +m4t 4 +m5t 5 , z(t)=n0+n1t+n2t 2 +n3t 3 +n4t 4 +n5t 5 , where w0, w1, w2, w3, w4, w5 are the weights of the fitted x-coordinate polynomial function, m0, m1, m2, m3, m4, m5 are the weights of the fitted y-coordinate polynomial function, n0, n1, n2, n3, n4, n5 are the weights of the fitted z-coordinate polynomial function, and t is the sampling time.

3. The robot trajectory imitation method according to claim 1, characterized in that: The use of the incremental learning mechanism to fit multiple trajectories in S2 specifically includes: establishing a mean square error function of polynomial fitting: Among them, E x 、E y 、E z are the error functions of x, y, and z respectively, x ″ (t), y ″ (t), z ′ (t) is the actual value of x, y, and z at time t, and x(t), y(t), and z(t) are the predicted values ​​at time t. The weight parameters of x(t), y(t), and z(t) are solved by linear regression to fit multiple trajectories into a single trajectory.

4. The robot trajectory imitation method according to claim 3, characterized in that: The use of dynamic motion primitives to model the fitting trajectory in S3 specifically includes: n ] to take values ​​and calculate the output of x(t), y(t), and z(t) at each moment, based on the formula The dynamic motion primitive models of x-trajectory, y-trajectory and z-trajectory are established respectively, where χ, χ and χ represent the position, velocity and acceleration of the robot, and α χ and β χ is a constant, g is the target state, τ is the time scaling factor, and f represents the forcing function that characterizes the demonstration trajectory.

5. The robot trajectory imitation method according to claim 4, characterized in that: The forcing function is obtained by normalizing linear superposition of multiple nonlinear basis functions, and the calculation formula is as follows: Ψ k (t) = exp(-h i (χ-c i ) 2 ) is the basis function, w k is the weight parameter to be learned, χ0 is the initial state or the specified trajectory starting point, and the basis function obeys c i The Gaussian distribution centered at h i is the variance of the basis function.

6. The robot trajectory imitation method according to claim 5, characterized in that: The method of learning the parameters of the dynamic motion primitive model by the local weighted regression method in S3 specifically includes: taking a set of motion trajectories as teaching trajectories, extracting the position information x of the teaching trajectories demo (t), speed information Acceleration information where t∈[t0,t1,…,t m ], define the initial point of the teaching trajectory as the starting point χ0, g = χ demo (t=t n ), χ0=χ demo (t=t0), according to the teaching trajectory information, combined with the expression of the target forcing function: The weight w is determined by using the local weighted regression method k , so that the forcing functions f and f target Approximately, we get the weight w k The expression is: in, 7. A robot trajectory imitation system, characterized in that: include: A data acquisition module is configured to record multiple trajectory demonstrations of the robot's end effector using a kinesthetic teaching method to generate multiple trajectory point sets including x, y, and z three-dimensional coordinates; A quintic polynomial fitting module is configured to construct a quintic polynomial function model of the x, y, z three-dimensional coordinates, and fit multiple trajectories using an incremental learning mechanism; The dynamic motion primitive module is configured to use the dynamic motion primitive to model the fitting trajectory, learn the parameters of the dynamic motion primitive model through the local weighted regression method, set the starting point and the end point based on different scenes, and use the dynamic motion primitive model to generalize the trajectory to obtain the trajectory result.

8. The robot trajectory imitation method according to claim 7, characterized in that: The fifth-order polynomial function model in the fifth-order polynomial fitting module is constructed by the following formula: x(t)=w0+w1t+w2t 2 +w3t 3 +w4t 4 +w5t 5 , y(t)=m0+m1t+m2t 2 +m3t 3 +m4t 4 +m5t 5 , z(t)=n0+n1t+n2t 2 +n3t 3 +n4t 4 +n5t 5 , where w0, w1, w2, w3, w4, w5 are weights for fitting the x-coordinate polynomial function, m0, m1, m2, m3, m4, m5 are weights for fitting the y-coordinate polynomial function, n0, n1, n2, n3, n4, n5 are weights for fitting the z-coordinate polynomial function, and t is the sampling time; fitting multiple trajectories using the incremental learning mechanism specifically includes: establishing the mean square error function of the polynomial fitting: Among them, E x 、E y 、E z are the error functions of x, y, and z respectively, x ′ (t), y ′ (t), z ′ (t) is the actual value of x, y, and z at time t, and x(t), y(t), and z(t) are the predicted values ​​at time t. The weight parameters of x(t), y(t), and z(t) are solved by linear regression to fit multiple trajectories into a single trajectory.

9. The robot trajectory imitation method according to claim 8, characterized in that: The dynamic motion primitive module uses the dynamic motion primitive to model the fitting trajectory, specifically including: according to the 100ms interval from the input time t∈[t0,t n ] to take values ​​and calculate the output of x(t), y(t), and z(t) at each moment, based on the formula The dynamic motion primitive models of x-trajectory, y-trajectory and z-trajectory are established respectively, where χ, and represents the position, velocity and acceleration of the robot, α χ and β χ is a constant, g is the target state, τ is the time scaling factor, and f represents the forcing function of the demonstration trajectory feature. The forcing function is obtained by the normalized linear superposition of multiple nonlinear basis functions. The calculation formula is as follows: Ψ k (t) = exp(-h i (Xc i ) 2 ) is the basis function, w k is the weight parameter to be learned, X0 is the initial state or the specified trajectory starting point, and the basis function obeys c i The Gaussian distribution centered at h i is the variance of the basis function; the parameters of the dynamic motion primitive model are learned by the local weighted regression method, specifically including: taking a set of motion trajectories as teaching trajectories, extracting the position information of the teaching trajectory χ demo (t), speed information Acceleration information where t∈[t0,t1,…,t n ], define the initial point of the teaching trajectory as the starting point χ0, g = χ demo (t=t n ), χ0=χ demo (t=t0), according to the teaching trajectory information, combined with the expression of the target forcing function: The weight w is determined by using the local weighted regression method k , so that the forcing functions f and f target Approximately, we get the weight w k The expression is: in, 10. A computer-readable storage medium having one or more computer programs stored thereon, characterized in that: When the one or more computer programs are executed by a computer processor, the method according to any one of claims 1 to 6 is implemented.