A method and system for path planning based on sampling robot arm

The robot arm path planning space is discretized through the Transformer model and the multi-layer perceptron model, and the cross-attention and autoregressive Transformer are used to generate sampling areas, and the improved RRT algorithm is used to solve the problem of low generalization and scalability in the robot arm path planning. problem, achieving faster optimal path generation and improved production efficiency.

CN117325186BActive Publication Date: 2024-09-13NINGDE SKEQI INTELLIGENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311620923.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2024-09-13
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

The robot arm path planning method in the existing technology lacks scalability and generalization in high-dimensional space, resulting in low efficiency of path planning in different environments.

Method used

The Transformer model is used to discretize the planning space, combined with the multi-layer perceptron model to generate Gaussian distribution, and the sampling area is generated through cross-attention and autoregressive Transformer models, and the robot arm motion path is generated with the improved RRT algorithm.

Benefits of technology

It achieves faster generation of optimal paths in different environments, improves the generalization and scalability of robotic arm path planning, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117325186B
    Figure CN117325186B
Patent Text Reader

Abstract

The present invention discloses a method and system for path planning based on sampling manipulators, including obtaining a discretized vector set #imgabs0# of a planning space through a Transformer model as an encoder, obtaining a Gaussian distribution corresponding to each value in the discretized vector set #imgabs1# through a multi-layer perceptron model decoder, and generating a vector quantization module; combining the discretized vector set #imgabs2# and the Gaussian distribution in the vector quantization module with the starting position, target position, and surrounding environment of a given manipulator to generate a sampling area, and generating a sampling area generation module; based on the sampling area generation module, obtaining a manipulator motion path according to the sampling area, and generating a path planning module. In this way, the optimal path can be generated faster and the generalization and scalability problems in the manipulator path planning can be solved, which can effectively improve the production efficiency of the factory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robotic arms, and in particular to a method and system for path planning of a sampling robotic arm. Background Art

[0002] With the introduction of smart production lines, more and more tasks in new energy factories are completed by robots. However, due to the large size and complex structure of industrial robots, workers working near them may face significant dangers. Therefore, relevant robot manufacturers have designed compliant robotic arms to strictly abide by the production process to prevent safety production problems. The movement of the robotic arm may inevitably collide with external objects or workers, so relevant manufacturers have designed a series of path planning algorithms to avoid obstacles.

[0003] In order to achieve efficient sampling, previous research works have reduced the search space through manually designed heuristic methods or parameterized functions, thereby shortening the planning time. The most advanced planning method currently uses an elliptical area between the starting point and the target point to search for paths, but for high-dimensional spaces, using these heuristic methods for sampling still results in many samples not being used to construct trajectories. Machine learning-based methods use data from existing planning datasets to optimize planning in similar environments. For example, some researchers use Gaussian mixture models (GMM) to learn the distribution of previous path planning, but they do not have good scalability in complex environments.

[0004] Traditional path planning algorithms lack scalability in high-dimensional spaces, and existing path planning methods for sampling robotic arms lack generalization in training scenarios. Therefore, the existing path planning methods for robotic arms in different environments have low generalization and scalability. Summary of the invention

[0005] The embodiments of the present application provide a method and system based on sampling robot path planning, which solves the problems of low generalization and scalability of robot path planning methods for different environments in the prior art, achieves faster generation of the optimal path and solves the problems of generalization and scalability in robot path planning.

[0006] In a first aspect, an embodiment of the present application provides a method for path planning based on a sampling robot arm, comprising:

[0007] S1. Use the Transformer model as an encoder to obtain a discretized vector set of the planning space The discretized vector set Each value in is decoded by a multi-layer perceptron model to obtain the Gaussian distribution corresponding to each value and generate a vector quantization module;

[0008] S2, the discretized vector set in the vector quantization module and generating a sampling area by combining the Gaussian distribution with the starting position, target position, and surrounding environment of the given robot arm, and generating a sampling area generation module;

[0009] S3, based on the sampling area generation module, a robot arm motion path is obtained according to the sampling area, and a path planning module is generated. By improving the RRT algorithm, the sampling area is given Generate the corresponding robot arm path.

[0010] Furthermore, in step S1, it also includes:

[0011] S11, inputting a set of mechanical trajectories through an encoder, wherein the encoder linearly projects each input state in the trajectory into a latent space by learning a pattern in the sequence of mechanical trajectories to obtain a set of latent vectors;

[0012] S12, setting a dictionary set, discretizing each potential vector to obtain a corresponding dictionary value, finding the closest vector in the dictionary set, replacing the vector with the dictionary value, and obtaining a set of vectors;

[0013] S13. Add the set of vectors to the start vector and the end vector to obtain a final set of vectors, and use a multi-layer perceptron model decoder to map the final set of vectors into a set of Gaussian distributions.

[0014] Furthermore, through the multi-layer perceptron model decoder, each dictionary value z output by the encoder is q (z j ) is mapped into a parameterized distribution P(q j θ j ), the parameterized distribution is selected as a Gaussian distribution, and the multilayer perceptron model decoder outputs the mean and covariance matrix of the Gaussian distribution

[0015] Based on each dictionary value z output by the encoder q (z j ), the dictionary value z q (z j ) corresponds to the mean and covariance matrix μ(z q (z j )),∑(z q (z j )).

[0016] Furthermore, the output of the penultimate layer of the multilayer perceptron model decoder is passed through a separate linear layer to obtain μ(z q (zj )) and ∑(z q (z j )); diagonal matrix D j , after passing through the linear layer, it is processed by the soft-plus function.

[0017] Furthermore, in step S2, the sampling area generation module further includes:

[0018] S21, through the cross-attention Transformer model, the starting point and target point of the robot arm are matched {δ s , δ g} and the environment δ are represented as a latent vector M;

[0019] S22, predicting the sampling area through the autoregressive Transformer model to obtain the sampling area corresponding to the planning space dictionary set The index value in Each index value h j , the autoregressive model generates a distribution; as shown in the following formula:

[0020]

[0021] Among them, p i Yes j According to the corresponding probability obtained by the autoregressive Transformer, is the vector corresponding to the dictionary set, M is the potential vector obtained based on the target point pair and the sampling area, π represents the autoregressive Transformer model, and N is the size of the dictionary set.

[0022] Furthermore,

[0023] The cross-attention Transformer model and the autoregression-based Transformer model are trained using cross entropy loss

[0024]

[0025] Among them, δ i (·) is the Kronecker function, (·) is the output of the autoregressive model, is the real index h i The corresponding latent dictionary vector; using the decoder learned from the vector quantization module, each predicted dictionary value is transformed in the planning space Convert to the corresponding Gaussian distribution j represents the number of index values ​​in the sampling generation area generation module.

[0026] Furthermore, the sampling region generation module generates an index sequence according to the cross-attention Transformer model and the autoregressive-based Transformer model and the planning space dictionary set. Since each index takes N values ​​from the planning space dictionary set, the optimal index sequence is obtained as shown in the following formula:

[0027]

[0028] in is the target index and π represents the autoregressive Transformer model.

[0029] Furthermore, in step S3, it also includes:

[0030] Based on the obtained index sequence Then, the decoder model of the vector quantization module is used to calculate the potential dictionary vector corresponding to the index value Generate a set of sampling areas We use the mixed Gaussian model to calculate the sampling area As shown in the following formula.

[0031]

[0032] Further, in the path planning module, the improved RRT algorithm includes:

[0033] Improve the RRT algorithm, the path planning module inputs the starting position q s 、Target position q g , Sampling area Number of cycles k; first, the starting position q s Add the sampling set τ, and in each cycle, from the sampling area Generate a random sampling node q rand , according to q rand And the sampling set τ, find the nearest point q near If q rand With q near If there is a valid path, a link is established, and q rand Add to the set τ and end the current loop;

[0034] Otherwise, a random number is obtained. If it is greater than the threshold b, the target position q is calculated. g Find the closest point q with the sampling set τ gn , if q gn With q g If there is a valid path, a link is established, and q gAdd to the set τ, jump out of the loop, and return to the set τ; if there is no valid path, continue the loop.

[0035] On the other hand, a system based on sampling robot path planning includes,

[0036] Vector quantization module, used to obtain a discretized vector set of the planning space using the Transformer model as an encoder The discretized vector set Each value in is decoded by a multi-layer perceptron model to obtain the Gaussian distribution corresponding to each value and generate a vector quantization module;

[0037] A sampling region generation module is used to generate a discretized vector set in the vector quantization module. and generating a sampling area by combining the Gaussian distribution with the starting position, target position, and surrounding environment of the given robot arm, and generating a sampling area generation module;

[0038] The path planning module is based on the sampling area generation module and is used to obtain a robot arm motion path according to the sampling area and generate a path planning module.

[0039] By improving the RRT algorithm, the sampling area is given Generate the corresponding robot arm path.

[0040] Beneficial effects:

[0041] 1. The planning space is discretized through the vector quantization module, and then represented as a learnable vector. The autoregressive model is used to learn the optimal sampling area for the given planning problem, and finally the improved RRT algorithm is used to obtain the final path.

[0042] 2. By dividing the large planning space into a set of discrete vectors, and generating the best sampling area based on the environment, starting position, and target position prediction, and using the improved fast search random tree algorithm to generate the path, the optimal path can be generated more quickly and the generalization and scalability problems in the robot path planning can be solved, which can effectively improve the factory's production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flow chart of a method for path planning based on sampling robot arm;

[0044] Figure 2 This is a method architecture diagram for path planning based on sampling robot arm;

[0045] Figure 3 Generates a block diagram for the vector quantization module and sampling area. DETAILED DESCRIPTION

[0046] The embodiments of the present application provide a method and system based on sampling robot path planning, which solves the problems of low generalization and scalability of robot path planning methods for different environments in the prior art, achieves faster generation of the optimal path and solves the problems of generalization and scalability in robot path planning.

[0047] The technical solution in the embodiment of the present application is to solve the above-mentioned crosstalk problem, and the overall idea is as follows:

[0048] It includes a vector quantization module, a sampling area generation module, and a path planning module. The vector quantization module borrows the idea of ​​VQ-VAE, uses the Transformer model to obtain the discretized vector of the planning space, and uses the multi-layer perceptron model to obtain the Gaussian distribution of each discretized vector. The sampling area generation module uses the cross-attention model to learn environmental information, uses the autoregressive model to obtain the sequence with the highest probability, and uses the decoder to obtain the distribution corresponding to each sequence, thereby generating the optimal sampling area for the path planning module. The path planning module uses the sampling area given by the sampling area generation module to generate the optimal path for the robot arm by improving the RTT algorithm.

[0049] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0050] See also Figure 1 and Figure 2 A method for path planning of a sampling robot arm, comprising:

[0051] S1. Use the Transformer model as an encoder to obtain a discretized vector set of the planning space The discretized vector set Each value in is decoded by a multi-layer perceptron model to obtain the Gaussian distribution corresponding to each value and generate a vector quantization module;

[0052] Specifically, the vector quantization module includes:

[0053] S11, inputting a set of mechanical trajectories through an encoder, wherein the encoder linearly projects each input state in the trajectory into a latent space by learning a pattern in the sequence of mechanical trajectories to obtain a set of latent vectors;

[0054] S12, setting a dictionary set, discretizing each potential vector to obtain a corresponding dictionary value, finding the closest vector in the dictionary set, replacing the vector with the dictionary value, and obtaining a set of vectors;

[0055] S13. Add the set of vectors to the start vector and the end vector to obtain a final set of vectors, and use a multi-layer perceptron model decoder to map the final set of vectors into a set of Gaussian distributions P.

[0056] Specifically, the vector quantization module mainly vectorizes the entire planning space by learning the distribution of the data set of existing robot arm trajectories.

[0057] Specifically, if Figure 3 As shown, the present invention draws on the idea of ​​VQ-VAE and uses the Transformer model as the encoder. The input of the encoder is a set of robot arm trajectories. The encoder model transforms each state in the trajectory into a valid representation, a set of latent vectors, by learning the patterns in the trajectory sequence.

[0058] For each input state q j , the encoder model linearly projects it into the latent space R d , we get z j . Set a dictionary set It contains N variables, Represents the entire planning space. For each vector z in the latent space j , we need to discretize it to get the corresponding dictionary value. According to formula 1, find the vector closest to it in the dictionary set Make a substitution.

[0059]

[0060] in is with q j The most relevant vector.

[0061] Add the start and end vector z s and z g For a set of robot arm input trajectories, the encoder output is ultimately a set of vector sets

[0062] Use the multi-layer perceptron (MLP) model as the decoder and transform each z output by the encoder q (z j ) is mapped into a parameterized distribution P(q j θ j ), the present invention selects the parameterized distribution as a Gaussian distribution, and the decoder outputs the mean and covariance matrix of the Gaussian distribution Because z q (z i ) is the dictionary value mentioned above, and the corresponding mean and covariance matrix is ​​μ(zq (z j )),∑(z q (z j )), for simplicity in the following text, μ is used j and∑ j In order to ensure that the covariance matrix remains positive during training, Formula 2 is used to decompose it into the product of a lower triangular matrix and its transpose.

[0063]

[0064] Where L j is a lower triangular matrix, D j The present invention obtains μ by passing the output of the penultimate MLP (multi-layer perceptron) layer of the decoder model through a separate linear layer. j and L j , while for D j , after the linear layer, it is also processed by a soft-plus function to ensure that its value is positive. The soft-plus function is a smooth nonlinear function, which is similar to ReLU (rectified linear unit), but has a continuous gradient at values ​​close to zero, which helps to alleviate the problem of gradient disappearance or gradient explosion during training.

[0065] The reconstruction loss of the present invention is shown in Formula 3.

[0066]

[0067] Where λ is a constant, is the expectation, and the second term in the formula prevents the distribution from overfitting each batch of data, because smaller batches will not cover the entire planning space.

[0068] By inputting different robot arm trajectories for training, we can finally obtain a discretized vector set of the entire planning space. As well as the distribution corresponding to each value in the set, it provides corresponding data for the query of the subsequent sampling area generation module.

[0069] S2, the discretized vector set in the vector quantization module and generating a sampling area by combining the Gaussian distribution with the starting position, target position, and surrounding environment of the given robot arm, and generating a sampling area generation module;

[0070] Specifically, the sampling area generation module generates a sampleable area from the starting position to the target position for the given robot starting position, target position, surrounding environment, and the planning space dictionary set obtained by the vector quantization module, and the distribution corresponding to each value in the dictionary set. It contains two models, a Transformer model based on cross-attention and a Transformer model based on autoregressive.

[0071] Among them, the Transformer model based on cross attention is used to transform the robot arm starting position and target position pair {δ s , δ g} and the environment δ are represented as a potential vector M. Specifically, it first generates the code of the surrounding environment by extracting features from the point cloud in For the start and goal states, linear projection is used to obtain δ s , δ g , in the cross attention model, δ is used as the key variable, δ s , δ g As the query variable, to finally generate the potential vector M.

[0072] The autoregressive Transformer model π(·) is used to predict the sampling area and obtain the sampling area corresponding to the planning space dictionary set The index value in For each index value h j , the autoregressive model will output a distribution as shown in Formula 4.

[0073]

[0074] Among them, p i is the corresponding probability of hj according to the autoregressive Transformer, z is the vector corresponding to the dictionary set, M is the potential vector obtained according to the target point pair and the environment, and pi represents the autoregressive Transform model. The sum of all pi is equal to 1, that is, the sum of probabilities is 1, and N is the size of the dictionary set.

[0075] The two models in this module will be trained using cross entropy loss, as shown in Formula 5.

[0076]

[0077] Among them, δ i (·) is the Kronecker function, π(·) is the output of the autoregressive model, is the real index h iThe corresponding latent dictionary vector. Using the decoder learned from the vector quantization module, we can transform each predicted dictionary value in the planning space Convert to the corresponding Gaussian distribution j represents the number of index values ​​in the sampling generation area generation module.

[0078] The above is the training process of the sampling area generation module. For a new path planning problem, such as Figure 1 The prediction process shown in the figure, this module generates an index sequence based on the above two models and the planning space dictionary set Since each index can take N values ​​in the planning space dictionary set, we need to maximize the probability of sequence H to obtain the optimal index sequence, as shown in Formula 6.

[0079]

[0080] in is the target index, and π is the probability obtained by Formula 4.

[0081] In the index sequence with the maximum probability Finally, we use the decoder model of the vector quantization module to calculate the potential vector corresponding to the index value Generate a set of distributions We use the mixed Gaussian model to calculate the distribution As shown in Formula 7.

[0082]

[0083] In this way, each index value has its corresponding sampling area. According to the maximum probability sequence, we can get a set of sampling areas from the starting position to the target position in the planning space.

[0084] S3. Based on the sampling area generation module, a robot arm motion path is obtained according to the sampling area, and a path planning module is generated.

[0085] Specifically, the path planning module improves the RRT algorithm, and the path planning module inputs the starting position q s 、Target position q g , Sampling area Number of cycles k; first, the starting position q s Add the sampling set τ, and in each cycle, from the sampling area Generate a random sampling node q rand , according to q rand And the sampling set τ, find the nearest point q near If q rand With q nearIf there is a valid path, a link is established, and q rand Add to the set τ and end the current loop;

[0086] Otherwise, a random number is obtained. If it is greater than the threshold b, the target position q is calculated. g Find the nearest point q with the sampling set τ gn , if q gn With q g If there is a valid path, a link is established, and q g Add to the set τ, jump out of the loop, and return to the set τ; if there is no valid path, continue the loop.

[0087] Unlike the traditional RRT algorithm, this solution does not simply extend the current node by a small distance, but checks whether there is a valid path between the current node and the sampled node; if there is a valid path, a link is established. It can generate the optimal path faster and solve the generalization and scalability problems in the robot path planning, which can effectively improve the production efficiency of the factory.

[0088] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product 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.

[0089] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0090] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0092] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0093] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method based on sampling robot path planning, characterized in that: include S1. Use the Transformer model as an encoder to obtain a discretized vector set of the planning space The discretized vector set Each value in is decoded by a multi-layer perceptron model to obtain the Gaussian distribution corresponding to each value and generate a vector quantization module; S2, the discretized vector set in the vector quantization module and generating a sampling area by combining the Gaussian distribution with the starting position, target position, and surrounding environment of the given robot arm, and generating a sampling area generation module; Through the cross-attention Transformer model, the starting point and target point of the robot arm are matched {δ s , δ g } and the environment δ are represented as a latent vector M; The sampling area is predicted by the autoregressive Transformer model to obtain the sampling area corresponding to the planning space dictionary set The index value in Each index value h j , the autoregressive model generates a distribution; As shown in the following formula: Among them, p i Yes j According to the corresponding probability obtained by the autoregressive Transformer, is the vector corresponding to the dictionary set, M is the potential vector obtained based on the target point pair and the sampling area, π represents the autoregressive Transformer model, and N is the size of the dictionary set; S3, based on the sampling area generation module, a robot arm motion path is obtained according to the sampling area, and a path planning module is generated. By improving the RRT algorithm, the sampling area is given Generate the corresponding robot arm path.

2. A method based on sampling robot path planning according to claim 1, characterized in that: In step S1, it also includes: S11, inputting a set of mechanical trajectories through an encoder, wherein the encoder linearly projects each input state in the trajectory into a latent space by learning a pattern in the sequence of mechanical trajectories to obtain a set of latent vectors; S12, setting a dictionary set, discretizing each potential vector to obtain a corresponding dictionary value, finding the closest vector in the dictionary set, replacing the vector with the dictionary value, and obtaining a set of vectors; S13. Add the set of vectors to the start vector and the end vector to obtain a final set of vectors, and use a multi-layer perceptron model decoder to map the final set of vectors into a set of Gaussian distributions.

3. The method based on sampling robot path planning according to claim 2, characterized in that: Also includes, Through the multi-layer perceptron model decoder, each dictionary value z output by the encoder q (z j ) is mapped into a parameterized distribution P(q j θ j ), the parameterized distribution is selected as a Gaussian distribution, and the multilayer perceptron model decoder outputs the mean and covariance matrix of the Gaussian distribution Based on each dictionary value z output by the encoder q (z j ), the dictionary value z q (z j ) corresponds to the mean and covariance matrix μ(z q (z j )),∑(z q (z j )).

4. The method based on sampling robot path planning according to claim 3, characterized in that: Also includes, The output of the penultimate layer of the multilayer perceptron model decoder is passed through a single linear layer to obtain μ(z q (z j )) and ∑(z q (z j )); diagonal matrix D j , after passing through the linear layer, it is processed by the soft-plus function.

5. The method based on sampling robot path planning according to claim 1, characterized in that: include, The cross-attention Transformer model and the autoregression-based Transformer model are trained using cross-entropy loss. Among them, δ i (·) is the Kronecker function, π(·) is the output of the autoregressive model, is the real index h i The corresponding latent dictionary vector; using the decoder learned from the vector quantization module, each predicted dictionary value is transformed in the planning space Convert to the corresponding Gaussian distribution j represents the number of index values ​​in the sampling generation area generation module.

6. The method based on sampling robot path planning according to claim 5, characterized in that: include, The sampling region generation module generates an index sequence according to the cross-attention Transformer model and the autoregressive-based Transformer model and the planning space dictionary set. Since each index takes N values ​​from the planning space dictionary set, the optimal index sequence is obtained as shown in the following formula: in is the target index and π represents the autoregressive Transformer model.

7. The method based on sampling robot path planning according to claim 6, characterized in that: In step S3, it also includes: Based on the obtained index sequence Then, the decoder model of the vector quantization module is used to calculate the potential dictionary vector corresponding to the index value Generate a set of sampling areas The mixed Gaussian model is used to calculate the sampling area As shown in the following formula:

8. The method based on sampling robot path planning according to claim 1, characterized in that: In the path planning module, the improved RRT algorithm includes: Improve the RRT algorithm, the path planning module inputs the starting position q s 、Target position q g , Sampling area Number of cycles k; first, the starting position q s Add the sampling set τ, and in each cycle, from the sampling area Generate a random sampling node q rand , according to q rand And the sampling set τ, find the nearest point q near If q rand With q near If there is a valid path, a link is established, and q rand Add to the set τ and end the current loop; Otherwise, a random number is obtained. If it is greater than the threshold b, the target position q is calculated. g Find the nearest point q with the sampling set τ gn , if q gn With q g If there is a valid path, a link is established, and q g Add to the set τ, jump out of the loop, and return to the set τ; if there is no valid path, continue the loop.

9. A system based on sampling robot path planning, characterized in that: include, Vector quantization module, used to obtain a discretized vector set of the planning space using the Transformer model as an encoder The discretized vector set Each value in is decoded by the multi-layer perceptron model to obtain the Gaussian distribution corresponding to each value; A sampling region generation module is used to generate a discretized vector set in the vector quantization module. and generating a sampling area by combining the Gaussian distribution with the starting position, target position, and surrounding environment of the given robot arm, and generating a sampling area generation module; Through the cross-attention Transformer model, the starting point and target point of the robot arm are matched {δ s , δ g } and the environment δ are represented as a latent vector M; The sampling area is predicted by the autoregressive Transformer model to obtain the sampling area corresponding to the planning space dictionary set The index value in Each index value h j , the autoregressive model generates a distribution; As shown in the following formula: Among them, p i Yes j According to the corresponding probability obtained by the autoregressive Transformer, is the vector corresponding to the dictionary set, M is the potential vector obtained based on the target point pair and the sampling area, π represents the autoregressive Transformer model, and N is the size of the dictionary set; The path planning module is based on the sampling area generation module, which is used to obtain a robot arm motion path according to the sampling area, and give the sampling area by improving the RRT algorithm. Generate the corresponding robot arm path.