Trajectory encoding method based on motion primitives
By using probabilistic motion primitives algorithms and reference weight optimization, the problems of missing trajectory information and excessive dimensionality in traditional trajectory encoding methods are solved, achieving low-dimensional feature vector encoding and efficient trajectory optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2026-04-14
AI Technical Summary
Traditional trajectory coding methods suffer from problems such as missing trajectory information or excessive dimensionality in scenarios like obstacle avoidance by robotic arms and autonomous driving, resulting in low trajectory optimization efficiency.
A probabilistic motion primitive algorithm is used to encode multiple trajectories to be encoded. The reference weights are determined by the performance of the reference trajectories, and the encoding results are optimized to favor the trajectories with better performance, forming a low-dimensional feature vector.
It improves the generalization and expressive power of trajectory coding, reduces the pollution of overall performance by poor-performing trajectories, and improves the efficiency of trajectory optimization.
Smart Images

Figure CN121091854B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a trajectory encoding method based on motion primitives. Background Technology
[0002] In scenarios such as obstacle avoidance by robotic arms and autonomous driving, trajectory coding technology is often used to map the original trajectory to a low-dimensional space so that trajectory optimization can be performed in the low-dimensional space, thereby improving the efficiency of trajectory optimization.
[0003] Traditional trajectory encoding methods can be mainly divided into two categories: using neural networks to extract features from the trajectory; or discretizing the trajectory and directly using it as a feature encoding. However, the former will miss some details and the network inference is relatively slow, while the latter has too high a dimensionality to be used for subsequent optimization. Summary of the Invention
[0004] The purpose of this application is to provide a trajectory encoding method based on motion primitives, which can efficiently encode trajectories into low-dimensional feature vectors containing sufficient trajectory information.
[0005] In a first aspect, embodiments of this application provide a trajectory encoding method based on motion primitives, the method comprising:
[0006] When multiple trajectories to be encoded are received, the probabilistic motion primitive algorithm is used to encode the multiple trajectories to be encoded to obtain the initial encoding result corresponding to the multiple trajectories to be encoded. The initial encoding result includes: parameters used to describe the probability distribution of the trajectory.
[0007] Based on the initial encoding results, the trajectory is reproduced to obtain multiple reference trajectories;
[0008] Based on the performance of each of the multiple reference trajectories on the preset target, the reference weights of each of the multiple reference trajectories are determined.
[0009] Based on the multiple reference trajectories and their respective reference weights, the initial encoding result is optimized so that the trajectory probability distribution described by the encoding result is biased towards the reference trajectory with better performance, thereby obtaining the target encoding result corresponding to the multiple trajectories to be encoded.
[0010] As one possible implementation, the target encoding result corresponding to the plurality of trajectories to be encoded includes: the mean of the optimized trajectory probability distribution. and variance The target encoding results corresponding to the multiple trajectories to be encoded are determined by the following formula:
[0011]
[0012]
[0013] Among them, the Reference trajectory Corresponding encoding vector ,matrix Constructed based on the block diagonal matrix and sampling number corresponding to each of the multiple reference trajectories, where the superscript T indicates transpose operation and the superscript -1 indicates matrix inverse operation; Indicates the first Reference weights for each reference trajectory.
[0014] As one possible implementation, the first of the plurality of reference trajectories Reference weights of each reference trajectory Determined by the following formula:
[0015]
[0016] in, Represents the normalization constant; Represents positive integers; This represents the evaluation index, used to evaluate the performance of the trajectory on the preset target. Indicates the first One reference trajectory; This represents the natural exponential function.
[0017] As one possible implementation, the trajectory reproduction based on the initial encoding result yields multiple reference trajectories, including:
[0018] Based on the initial encoding results, determine the target probability distribution;
[0019] The target trajectory probability distribution is sampled multiple times to obtain the multiple reference trajectories;
[0020] The initial encoding result includes: the mean of the trajectory probability distribution. and variance The expression for the target probability distribution is as follows:
[0021]
[0022] Among them, the target probability distribution Used to describe the angles of n active joints at time t under the probability distribution of the trajectory described by the initial encoding result. The probability distribution; Represents the basis matrix that changes with time t; Represents a normal distribution; encoding vector ; This represents the variance of the probability distribution of the angles of n movable joints.
[0023] As one possible implementation, the initial encoding result describes the trajectory probability distribution. It is expressed as follows:
[0024]
[0025] The initial encoding result includes: the mean of the trajectory probability distribution. and variance ; Represents the plurality of trajectories to be encoded; encoding vector ; Represents the basis matrix that changes with time t; Represents a normal distribution; Represents the angles of n movable joints; This represents the variance of the probability distribution of the angles of n movable joints.
[0026] As one possible implementation, the n movable joint angles The expression is as follows:
[0027]
[0028] Wherein, the merged vector of the i-th active joint at time t. , This indicates the position of the i-th movable joint at time t. express The rate of change; This represents the basis matrix that changes with time t. express rate of change; encoding vector ; Represents a normal distribution; This indicates Gaussian noise; the superscript T indicates the transpose operation.
[0029] As one possible implementation, the method further includes:
[0030] Upon receiving a single trajectory to be encoded, the dynamic motion primitive algorithm is used to encode the single trajectory to obtain the target encoding result corresponding to the single trajectory.
[0031] A second aspect of this application provides a trajectory encoding device based on motion primitives, the device comprising:
[0032] The first encoding module is used to encode the multiple trajectories to be encoded using a probabilistic motion primitive algorithm when multiple trajectories to be encoded are received, so as to obtain the initial encoding result corresponding to the multiple trajectories to be encoded. The initial encoding result includes: parameters used to describe the probability distribution of the trajectory.
[0033] The trajectory reproduction module is used to reproduce the trajectory based on the initial encoding result and obtain multiple reference trajectories;
[0034] The weight calculation module is used to determine the reference weight of each of the multiple reference trajectories based on their performance on the preset target.
[0035] The distribution optimization module is used to optimize the initial encoding result based on the multiple reference trajectories and their respective reference weights, so that the trajectory probability distribution described by the encoding result is biased towards the reference trajectory with good performance, thereby obtaining the target encoding result corresponding to the multiple trajectories to be encoded.
[0036] A third aspect of this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the trajectory encoding method based on motion primitives as described in the first aspect.
[0037] A fourth aspect of this application provides a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the trajectory encoding method based on motion primitives as described in the first aspect.
[0038] A fifth aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the trajectory encoding method based on motion primitives as described in the first aspect.
[0039] As can be seen from the above technical solutions, this application uses probabilistic motion primitives to model trajectories, and models multiple trajectories at once and learns their distributions to efficiently encode multiple trajectories to be encoded, thereby improving the generalization and expressive power of trajectory encoding. In addition, this application also introduces reference weights to optimize the initial encoding results, making them biased towards trajectories that perform better on the preset target, thereby reducing the pollution of the overall performance of multiple trajectories by poorly performing trajectories, which is conducive to improving the efficiency of subsequent optimization. Thus, this application applies probabilistic motion primitives to the trajectory encoding process, which can encode trajectories into low-dimensional feature vectors containing sufficient trajectory information, thereby ensuring the smooth and efficient execution of trajectory optimization. Attached Figure Description
[0040] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart illustrating the implementation of a trajectory encoding method based on motion primitives provided in this application embodiment;
[0042] Figure 2 A schematic diagram illustrating a trajectory encoding and reproduction process based on dynamic motion primitives, provided for an embodiment of this application;
[0043] Figure 3 A schematic diagram of the structure of a trajectory encoding device based on motion primitives provided in an embodiment of this application;
[0044] Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0046] See Figure 1 The diagram shown is an implementation flowchart of a trajectory encoding method based on motion primitives provided in this application. The method may include the following steps:
[0047] Step S101: When multiple trajectories to be encoded are received, the probabilistic motion primitive algorithm is used to encode the multiple trajectories to be encoded to obtain the initial encoding result corresponding to the multiple trajectories to be encoded. The initial encoding result includes: parameters used to describe the probability distribution of the trajectory.
[0048] In practical implementation, considering the nonlinear dynamic system inherent in motion primitives, each dynamic system behaves differently during the trajectory's time period. Learning a weight function (i.e., encoding) to encode the trajectory in this space can bypass the time dimension of the trajectory (typically involving thousands of points), thus obtaining a simple, low-dimensional trajectory encoding. Based on the foregoing analysis, this application uses the weight vector to be learned in the probabilistic model as the trajectory encoding vector to implement the probabilistic motion primitive algorithm. This extends the aforementioned process to the case where the weight function is a sampling of a probability distribution, thereby enabling the simultaneous encoding of multiple trajectories.
[0049] Step S102: Reproduce the trajectory based on the initial encoding result to obtain multiple reference trajectories.
[0050] In practice, the trajectory probability distribution described by the initial encoding result is sampled to achieve trajectory reproduction, thereby obtaining multiple reference trajectories.
[0051] Step S103: Determine the reference weights of the multiple reference trajectories based on their performance on the preset target.
[0052] In specific implementation, the preset target is flexibly determined according to actual needs. For example, the robot's tracking accuracy (i.e., how well the robot follows the trajectory, which can be expressed as the degree of deviation between the robot's actual movement trajectory and the planned trajectory) can be used as the preset target. Then, based on the performance of each of the multiple reference trajectories on the preset target, the reference weights of each of the multiple reference trajectories are determined. For example, the reference trajectory with better performance on the preset target (e.g., the higher the tracking accuracy of the associated robot) can be assigned a larger reference weight.
[0053] Step S104: Optimize the initial encoding result based on the multiple reference trajectories and their respective reference weights, so that the trajectory probability distribution described by the encoding result is biased towards the reference trajectory with good performance, and obtain the target encoding result corresponding to the multiple trajectories to be encoded.
[0054] In practice, one or more parameters in the initial encoding result can be recalculated based on the multiple reference trajectories and their respective reference weights to optimize the initial encoding result. This allows the trajectory probability distribution described by the encoding result to be biased (i.e., to fit better to) the reference trajectory with good performance, thereby reducing the pollution of the overall performance by the reference trajectory with poor performance.
[0055] In this embodiment, considering that after introducing probabilistic motion primitives, trajectory reproduction (i.e., decoding and recovering the encoded trajectory) is achieved by sampling the trajectory probability distribution described by the encoding result, this application assigns different reference weights to different trajectories based on their performance evaluation. Thus, the method of optimizing the encoding result based on the reference weight is adopted to achieve trajectory optimization, so as to improve the performance of the trajectory obtained by sampling the trajectory probability distribution described by the optimized encoding result (i.e., the target encoding result).
[0056] As can be seen from the above technical solutions, this application uses probabilistic motion primitives to model trajectories, and models multiple trajectories at once and learns their distributions to efficiently encode multiple trajectories to be encoded, thereby improving the generalization and expressive power of trajectory encoding. In addition, this application also introduces reference weights to optimize the initial encoding results, making them biased towards trajectories that perform better on the preset target, thereby reducing the pollution of the overall performance of multiple trajectories by poorly performing trajectories, which is conducive to improving the efficiency of subsequent optimization. Thus, this application applies probabilistic motion primitives to the trajectory encoding process, which can encode trajectories into low-dimensional feature vectors containing sufficient trajectory information, thereby ensuring the smooth and efficient execution of trajectory optimization.
[0057] In an optional embodiment, to facilitate subsequent construction of a probability model for trajectory reproduction, the target encoding result corresponding to the plurality of trajectories to be encoded may include: the mean of the optimized trajectory probability distribution. and variance The target encoding results corresponding to the multiple trajectories to be encoded are determined by the following formula:
[0058]
[0059]
[0060] Among them, the Reference trajectory The corresponding encoding vector (i.e., the first) (mean of the probability distribution of the active joint angles in each reference trajectory) , express 3D real vector, matrix Constructed based on the block diagonal matrix and sampling number corresponding to each of the multiple reference trajectories. express Real matrix, Indicates the sampling number. Indicates the number of movable joints. This represents the number of basis functions. For example, it can be represented by the basis matrices that vary with time t for each block of diagonal matrices (e.g., the basis matrices corresponding to multiple reference matrices). The matrix is obtained by vertically stacking samples according to their sampling numbers. The superscript T indicates the transpose operation, and the superscript -1 indicates the matrix inversion operation. Indicates the first Reference weights for each reference trajectory.
[0061] In this embodiment, according to The mean and variance of the trajectory probability distribution are recalculated using each reference trajectory and its respective reference weight, thereby achieving optimization of the encoding results based on trajectory performance representation.
[0062] In an optional embodiment, the first of the plurality of reference trajectories Reference weights of each reference trajectory Determined by the following formula:
[0063]
[0064] in, Represents the normalization constant; It represents a positive constant, and is usually defined as a small positive constant. This represents the evaluation index, used to evaluate the performance of the trajectory on the preset target. Indicates the first One reference trajectory; This represents the natural exponential function.
[0065] In an optional embodiment, the step of reproducing the trajectory based on the initial encoding result to obtain multiple reference trajectories includes:
[0066] Based on the initial encoding results, determine the target probability distribution;
[0067] The target trajectory probability distribution is sampled multiple times to obtain the multiple reference trajectories;
[0068] The initial encoding result includes: the mean of the trajectory probability distribution. and variance The expression for the target probability distribution is as follows:
[0069]
[0070] in, The angles of the n active joints at time t can be represented by a combined vector consisting of the positions and velocities of the n active joints at time t; target probability distribution. Used to describe the angles of n active joints at time t under the probability distribution of the trajectory described by the initial encoding result. The probability distribution; This represents the basis matrix that varies with time t (it conforms to Gaussian form). express Real matrix, Indicates the number of movable joints. Indicates the number of basis functions; Represents a normal distribution; encoding vector ; This represents the variance of the probability distribution of the angles of n movable joints.
[0071] In this embodiment, this application targets the encoding vector. Following the normal distribution, the above expression was designed to model the new trajectory at time t, thereby achieving trajectory reproduction.
[0072] Optionally, the trajectory probability distribution described by the initial encoding result It is expressed as follows:
[0073]
[0074] The initial encoding result includes: the mean of the trajectory probability distribution. and variance ; Represents the plurality of trajectories to be encoded; encoding vector , , express Real matrix, This represents the basis matrix that varies with time t (it conforms to Gaussian form). express Real matrix, Indicates the number of movable joints. Indicates the number of basis functions; Represents a normal distribution; The angle of the n active joints at time t can be represented by a combined vector consisting of the positions and velocities of the n active joints at time t. This represents the variance of the probability distribution of the angles of n movable joints.
[0075] In this embodiment, this application uses Description Encoding Vector The trajectory probability distribution is as follows; it can be understood that this is based on the encoding vector. The mean can be determined. and variance This leads to a normal distribution. .
[0076] Optionally, the n movable joint angles The expression is as follows:
[0077]
[0078] Wherein, the merged vector of the i-th active joint at time t. , This indicates the position of the i-th movable joint at time t. express The rate of change (i.e., velocity); This represents the basis matrix that varies with time t (it conforms to Gaussian form). express Real matrix, Indicates the number of movable joints. Indicates the number of basis functions; express rate of change; encoding vector ; Represents a normal distribution; This represents Gaussian noise, which can be zero-mean independent and identically distributed Gaussian noise, for example... , It represents the variance of the probability distribution of the angles of n movable joints; the superscript T indicates the transpose operation.
[0079] In an optional embodiment, the method further includes:
[0080] Upon receiving a single trajectory to be encoded, the dynamic motion primitive algorithm is used to encode the single trajectory to obtain the target encoding result corresponding to the single trajectory.
[0081] For example, see Figure 2 The diagram shown illustrates the trajectory encoding and reproduction process based on dynamic motion primitives. In the dynamic primitive algorithm, trajectory parameters... The expression is as follows:
[0082]
[0083] in, , Indicates hyperparameters; This indicates the position of the i-th movable joint. The corresponding joint velocity , This represents the angular velocity of the i-th movable joint. This represents the weight vector, and J represents the number of kernel functions. This represents the j-th kernel function, with parameters... and Both are constants, used to adjust the height and center position of the kernel function curve, respectively, where t represents time.
[0084] For the offline phase, the teaching trajectory will be... (i.e., the trajectory that needs to be encoded) serves as the trajectory that needs to be learned in the offline phase. Incremental Locally Weighted Regression is performed using the following formula to learn the weight function. :
[0085]
[0086] in, This represents an intermediate variable in incremental learning. Let j represent the j-th kernel function, t represent time t, and the regression error be t. The expression is as follows:
[0087]
[0088] in, and express Position of the j-th movable joint The first and second derivatives.
[0089] For the online phase, As the trajectory to be generated In order to reproduce the trajectory, Determined by the following formula:
[0090]
[0091] in, The angular velocity representing the trajectory period T ,matrix Encoding vectors (i.e., weight vectors) of multiple moving joint trajectories ) stacked together Let t denote the basis function, and t denote time.
[0092] The expressions for the relevant parameters at different motion frequencies (i.e., different frequency components) are as follows:
[0093]
[0094]
[0095]
[0096]
[0097] in, , Indicates the phase and its rate of change. , Indicates the amplitude and its rate of change. , Represents angular velocity and its rate of change. This represents the trajectory reconstruction error, where j represents the number of the frequency component. , , It is a constant. This indicates the actual execution trajectory.
[0098] It should be noted that, for cases where the trajectory to be encoded is a single object (i.e., the case applicable to traditional encoding methods), there is a problem that only the trajectory shape is encoded but not the velocity information. To solve the aforementioned problem, this application applies dynamic motion primitives to the encoding process of a single trajectory, adapting to the trajectory velocity through an online phase to achieve the acquisition of velocity information.
[0099] For cases where there are multiple trajectories to be encoded, this application designs an encoding method based on probabilistic motion primitives to encode multiple trajectories at once. It is understood that because the probabilistic modeling process considers the entire trajectory rather than the angles of active joints at a single moment, velocity information is implicitly included, thus eliminating the need for an online process to learn trajectory velocities, thereby improving trajectory optimization efficiency.
[0100] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0101] This application also provides a trajectory encoding device based on motion primitives, such as... Figure 3 As shown, the device includes:
[0102] The first encoding module is used to encode the multiple trajectories to be encoded using a probabilistic motion primitive algorithm when multiple trajectories to be encoded are received, so as to obtain the initial encoding result corresponding to the multiple trajectories to be encoded. The initial encoding result includes: parameters used to describe the probability distribution of the trajectory.
[0103] The trajectory reproduction module is used to reproduce the trajectory based on the initial encoding result and obtain multiple reference trajectories;
[0104] The weight calculation module is used to determine the reference weight of each of the multiple reference trajectories based on their performance on the preset target.
[0105] The distribution optimization module is used to optimize the initial encoding result based on the multiple reference trajectories and their respective reference weights, so that the trajectory probability distribution described by the encoding result is biased towards the reference trajectory with good performance, thereby obtaining the target encoding result corresponding to the multiple trajectories to be encoded.
[0106] Optionally, the target encoding result corresponding to the plurality of trajectories to be encoded includes: the mean of the optimized trajectory probability distribution. and variance The target encoding results corresponding to the multiple trajectories to be encoded are determined by the following formula:
[0107]
[0108]
[0109] Among them, the Reference trajectory Corresponding encoding vector ,matrix Constructed based on the block diagonal matrix and sampling number corresponding to each of the multiple reference trajectories, where the superscript T indicates transpose operation and the superscript -1 indicates matrix inverse operation; Indicates the first Reference weights for each reference trajectory.
[0110] Optionally, in the plurality of reference trajectories, the first... Reference weights of each reference trajectory Determined by the following formula:
[0111]
[0112] in, Represents the normalization constant; Represents positive integers; This represents the evaluation index, used to evaluate the performance of the trajectory on the preset target. Indicates the first One reference trajectory; This represents the natural exponential function.
[0113] Optionally, the trajectory reproduction module is further configured to perform the following steps:
[0114] Based on the initial encoding results, determine the target probability distribution;
[0115] The target trajectory probability distribution is sampled multiple times to obtain the multiple reference trajectories;
[0116] The initial encoding result includes: the mean of the trajectory probability distribution. and variance The expression for the target probability distribution is as follows:
[0117]
[0118] Among them, the target probability distribution Used to describe the angles of n active joints at time t under the probability distribution of the trajectory described by the initial encoding result. The probability distribution; Represents the basis matrix that changes with time t; Represents a normal distribution; encoding vector ; This represents the variance of the probability distribution of the angles of n movable joints.
[0119] Optionally, the trajectory probability distribution described by the initial encoding result It is expressed as follows:
[0120]
[0121] The initial encoding result includes: the mean of the trajectory probability distribution. and variance ; Represents the plurality of trajectories to be encoded; encoding vector ; Represents the basis matrix that changes with time t; Represents a normal distribution; Represents the angles of n movable joints; This represents the variance of the probability distribution of the angles of n movable joints.
[0122] Optionally, the n movable joint angles The expression is as follows:
[0123]
[0124] Wherein, the merged vector of the i-th active joint at time t. , This indicates the position of the i-th movable joint at time t. express The rate of change; This represents the basis matrix that changes with time t. express rate of change; encoding vector ; Represents a normal distribution; This indicates Gaussian noise; the superscript T indicates the transpose operation.
[0125] Optionally, the device further includes:
[0126] The second encoding module is used to encode a single trajectory to be encoded using a dynamic motion primitive algorithm when a single trajectory to be encoded is received, so as to obtain the target encoding result corresponding to the single trajectory to be encoded.
[0127] As can be seen from the above technical solutions, this application uses probabilistic motion primitives to model trajectories, and models multiple trajectories at once and learns their distributions to efficiently encode multiple trajectories to be encoded, thereby improving the generalization and expressive power of trajectory encoding. In addition, this application also introduces reference weights to optimize the initial encoding results, making them biased towards trajectories that perform better on the preset target, thereby reducing the pollution of the overall performance of multiple trajectories by poorly performing trajectories, which is conducive to improving the efficiency of subsequent optimization. Thus, this application applies probabilistic motion primitives to the trajectory encoding process, which can encode trajectories into low-dimensional feature vectors containing sufficient trajectory information, thereby ensuring the smooth and efficient execution of trajectory optimization.
[0128] This application also provides an electronic device, see embodiments thereof. Figure 4 , Figure 4 This is a schematic diagram of the electronic device proposed in an embodiment of this application. Figure 4 As shown, the electronic device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus for communication. The memory 110 stores a computer program that can run on the processor 120 to implement the steps in the trajectory encoding method based on motion primitives disclosed in the embodiments of this application.
[0129] This application also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the trajectory encoding method based on motion primitives as disclosed in this application.
[0130] This application also provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the trajectory encoding method based on motion primitives as disclosed in this application.
[0131] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0132] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0133] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, systems, devices, storage media, and program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0134] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0136] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0137] The above provides a detailed description of a trajectory encoding method based on motion primitives provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A trajectory encoding method based on motion primitives, characterized in that, The method includes: When multiple trajectories to be encoded are received, the probabilistic motion primitive algorithm is used to encode the multiple trajectories to be encoded to obtain the initial encoding result corresponding to the multiple trajectories to be encoded. The initial encoding result includes: parameters used to describe the probability distribution of the trajectory. Based on the initial encoding results, the trajectory is reproduced to obtain multiple reference trajectories; Based on the performance of each of the multiple reference trajectories on the preset target, the reference weights of each of the multiple reference trajectories are determined. Based on the multiple reference trajectories and their respective reference weights, the initial encoding result is optimized so that the trajectory probability distribution described by the encoding result is biased towards the reference trajectory with better performance, thereby obtaining the target encoding result corresponding to the multiple trajectories to be encoded. The target encoding results corresponding to the multiple trajectories to be encoded include: the mean of the optimized trajectory probability distribution. and variance The target encoding results corresponding to the multiple trajectories to be encoded are determined by the following formula: Among them, the Reference trajectory Corresponding encoding vector ,matrix Constructed based on the block diagonal matrix and sampling number corresponding to each of the multiple reference trajectories, where the superscript T indicates transpose operation and the superscript -1 indicates matrix inverse operation; Indicates the first Reference weights for each reference trajectory; Among the multiple reference trajectories, the first Reference weights of each reference trajectory Determined by the following formula: in, Represents the normalization constant; Represents positive numbers; This represents the evaluation index, used to evaluate the performance of the trajectory on the preset target. Indicates the first One reference trajectory; This represents the natural exponential function.
2. The method according to claim 1, characterized in that, The process of reproducing the trajectory based on the initial encoding result yields multiple reference trajectories, including: Based on the initial encoding results, determine the target probability distribution; The target trajectory probability distribution is sampled multiple times to obtain the multiple reference trajectories; The initial encoding result includes: the mean of the trajectory probability distribution. and variance The expression for the target probability distribution is as follows: Among them, the target probability distribution Used to describe the angles of n active joints at time t under the probability distribution of the trajectory described by the initial encoding result. The probability distribution; Represents the basis matrix that changes with time t; Represents a normal distribution; encoding vector ; This represents the variance of the probability distribution of the angles of n movable joints.
3. The method according to claim 2, characterized in that, The trajectory probability distribution described by the initial encoding result It is expressed as follows: The initial encoding result includes: the mean of the trajectory probability distribution. and variance ; Represents the plurality of trajectories to be encoded; encoding vector ; Represents the basis matrix that changes with time t; Represents a normal distribution; Represents the angles of n movable joints; This represents the variance of the probability distribution of the angles of n movable joints.
4. The method according to claim 2, characterized in that, The angles of the n movable joints The expression is as follows: Wherein, the merged vector of the i-th active joint at time t. , This indicates the position of the i-th movable joint at time t. express The rate of change; Let represent the basis matrix that changes with time t. express rate of change; encoding vector ; Represents a normal distribution; This indicates Gaussian noise; the superscript T indicates the transpose operation.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: Upon receiving a single trajectory to be encoded, the dynamic motion primitive algorithm is used to encode the single trajectory to obtain the target encoding result corresponding to the single trajectory.
6. A trajectory encoding device based on motion primitives, characterized in that, The device includes: The first encoding module is used to encode the multiple trajectories to be encoded using a probabilistic motion primitive algorithm when multiple trajectories to be encoded are received, so as to obtain the initial encoding result corresponding to the multiple trajectories to be encoded. The initial encoding result includes: parameters used to describe the probability distribution of the trajectory. The trajectory reproduction module is used to reproduce the trajectory based on the initial encoding result and obtain multiple reference trajectories; The weight calculation module is used to determine the reference weight of each of the multiple reference trajectories based on their performance on the preset target. The distribution optimization module is used to optimize the initial encoding result based on the multiple reference trajectories and their respective reference weights, so that the trajectory probability distribution described by the encoding result is biased towards the reference trajectory with good performance, thereby obtaining the target encoding result corresponding to the multiple trajectories to be encoded. The target encoding results corresponding to the plurality of trajectories to be encoded include: the mean of the optimized trajectory probability distribution. and variance The target encoding results corresponding to the multiple trajectories to be encoded are determined by the following formula: Among them, the Reference trajectory Corresponding encoding vector ,matrix Constructed based on the block diagonal matrix and sampling number corresponding to each of the multiple reference trajectories, where the superscript T indicates transpose operation and the superscript -1 indicates matrix inverse operation; Indicates the first Reference weights for each reference trajectory; Among the multiple reference trajectories, the first Reference weights of each reference trajectory Determined by the following formula: in, Represents the normalization constant; Represents positive numbers; This represents the evaluation index, used to evaluate the performance of the trajectory on the preset target. Indicates the first One reference trajectory; This represents the natural exponential function.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the trajectory encoding method based on motion primitives as described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instruction is executed by the processor, it implements the trajectory encoding method based on motion primitives as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Unmanned aerial vehicle circling tracking intelligent control method and device, electronic equipment and storage medium
CN113741519A
Method and system for generating intersection guide line based on conditional variation auto-encoder
CN114140553A