Robotic arm obstacle avoidance trajectory planning method, device and electronic equipment
By using a combination method of Gaussian hybrid model and virtual force trajectory in robotic arm path planning, the problem of robotic arm trajectory planning under unknown obstacle information is solved, and effective obstacle avoidance and trajectory shape adjustment under unknown obstacle information is achieved.
Patent Information
- Application Number
- CN202310035842.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-10
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-01-10
AI Technical Summary
In the application scenarios of unknown obstacle information, it is difficult to effectively plan the obstacle avoidance trajectory of the robotic arm, and the trajectory shape adjustment range is small, so it is impossible to effectively avoid obstacles.
By obtaining the forward virtual force trajectory and the reverse virtual force trajectory, the maximum likelihood function of the intermediate Gaussian mixed model is determined, and the weight of the model parameters is introduced after the model converges, the target Gaussian mixed model is obtained to plan the obstacle avoidance trajectory of the robotic arm .
In the application scenario of unknown obstacle information, a trajectory that meets obstacle avoidance requirements can be effectively planned, with a large adjustment range, and can better avoid obstacles.
Smart Images

Figure CN115958606B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot arm path planning, and more specifically, to a robot arm obstacle avoidance trajectory planning method, device, electronic device and computer-readable storage medium. Background Art
[0002] Dynamic Movement Primitive (DMP) is a robot arm teaching learning method that can use a second-order model to extract the information of a single teaching trajectory and encode the teaching trajectory into a virtual force. In this way, for a new task, the starting point and end point information of the teaching trajectory can be modified, and the virtual force can be applied to the second-order model to migrate the teaching trajectory to the new task and obtain a new trajectory with the same shape as the teaching trajectory.
[0003] Gaussian mixed regression-Dynamic movement primitives (GMRDMP) is a method that combines DMP with the probability model Gaussian mixed model (GMM). It uses DMP to extract virtual force information for each teaching trajectory, and uses the expectation maximization (EM) algorithm to train a GMM to learn multiple trajectory information. In this way, for a new task, a virtual force trajectory can be restored using Gaussian mixed regression (GMR), and then the virtual force trajectory can be brought into the DMP model to obtain the trajectory of the new task.
[0004] Therefore, there is a solution in the related art that uses GMP DMP to obtain the trajectory of a new task. However, in this solution, GMPDMP can only obtain the trajectory of a new task based on known obstacle information. Since the camera angle set at the obstacle avoidance site is limited or the robot arm does not have the function of collecting relevant information, it is not convenient to obtain obstacle information, which results in GMP DMP being unsuitable for application scenarios with unknown obstacle information. Moreover, this solution adjusts the trajectory shape of the new task based on several parameters of the DMP model, which makes the adjustment range of the trajectory shape small, and thus cannot avoid obstacles well. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a robot arm obstacle avoidance trajectory planning method, device, electronic device and computer-readable storage medium, so that the obstacle avoidance trajectory of a new task meets the obstacle avoidance requirements in an application scenario with unknown obstacle information, and it has a large adjustment range and can better avoid obstacles.
[0006] In the first aspect, an embodiment of the present application provides a method for planning a robot arm's obstacle avoidance trajectory, the method comprising: obtaining a forward virtual force trajectory and a reverse virtual force trajectory; wherein the forward virtual force trajectory is obtained based on the initial teaching trajectory of the robot arm, and the reverse virtual force trajectory is obtained based on the position information of the new task; according to the forward virtual force trajectory and the reverse virtual force trajectory, the maximum likelihood function of the intermediate Gaussian mixture model is determined; when the function value of the maximum likelihood function meets the model convergence requirement, the weights corresponding to the model parameters of the intermediate Gaussian mixture model are introduced; according to the weights corresponding to the model parameters, the target model parameters of the target Gaussian mixture model are obtained, and the obstacle avoidance trajectory of the robot arm performing the new task is planned through the target Gaussian mixture model. In this way, the obstacle avoidance trajectory of the new task can meet the obstacle avoidance requirements in the application scenario of unknown obstacle information, and it has a large adjustment range, which can better avoid obstacles.
[0007] Optionally, the method of obtaining the forward virtual force trajectory and the reverse virtual force trajectory includes: determining the corresponding multiple initial virtual force trajectories based on the calculation formula corresponding to the dynamic motion primitive method and multiple teaching trajectories; using the maximum expectation algorithm to process the multiple initial virtual force trajectories to obtain an initial Gaussian mixture model; using Gaussian mixture regression to restore the intermediate virtual force trajectory from the initial Gaussian mixture model, and substituting the intermediate virtual force trajectory and the position information of the new task into the calculation formula to obtain the forward trajectory of the end effector of the robot arm; when the forward trajectory does not meet the obstacle avoidance requirements, substituting the forward trajectory into the calculation formula to obtain the forward virtual force trajectory. In this way, the forward trajectory of the robot arm when performing a new task can be obtained through the DMP calculation formula based on the known multiple teaching trajectories.
[0008] Optionally, the method of obtaining the forward virtual force trajectory and the reverse virtual force trajectory further includes: obtaining the position information of the new task; the position information includes the starting point information and the end point information; obtaining the straight line path corresponding to the new task according to the starting point information and the end point information, and uniformly sampling the straight line path to obtain the reverse teaching trajectory; substituting the reverse teaching trajectory into the calculation formula to obtain the reverse virtual force trajectory. In this way, the model parameters of the intermediate Gaussian mixture model can be made more accurate, so as to be more conducive to planning an obstacle avoidance trajectory that meets the obstacle avoidance requirements.
[0009] Optionally, the determining of the maximum likelihood function of the intermediate Gaussian mixture model according to the forward virtual force trajectory and the reverse virtual force trajectory includes: determining a preference parameter; the preference parameter characterizes the virtual force trajectory corresponding to the obstacle avoidance trajectory to be close to the forward virtual force trajectory or the reverse virtual force trajectory; and improving the initial maximum likelihood function according to the preference parameter to obtain the maximum likelihood function in the intermediate Gaussian mixture model. In this way, the initial maximum likelihood function can be improved by the preference parameter to assign the corresponding preference degree to the forward virtual force trajectory and the reverse virtual force trajectory, so that the virtual force trajectory corresponding to the obstacle avoidance trajectory can be located between the two, and then can better avoid obstacles.
[0010] Optionally, the expression of the maximum likelihood function includes: Wherein, λ represents the preference parameter, and the value range of λ is [0, 1]; P represents the probability density function, Characterize the model parameters of the intermediate Gaussian mixture model, F M+1 Characterize the positive virtual force trajectory, F M+2 In this way, the shape of the obstacle avoidance trajectory can be adjusted by combining the preference parameter and the model parameter weight value of the intermediate Gaussian mixture model through the expression of the maximum likelihood function, so that the obstacle avoidance trajectory has a larger adjustment range and can better avoid obstacles.
[0011] Optionally, the model parameters corresponding to the intermediate Gaussian mixture model are determined based on the following steps: based on the model parameters of the initial Gaussian mixture model, the probability that the forward virtual force trajectory and the reverse virtual force trajectory are respectively from the Kth sub-model of the initial Gaussian mixture model is calculated; the expectation, variance and probability of occurrence of each sub-model in the initial Gaussian mixture model are iteratively calculated to obtain the model parameters of the intermediate Gaussian mixture model. In this way, the model parameters of the intermediate Gaussian mixture model can be calculated according to the EM algorithm based on the model parameters of the initial Gaussian mixture model. At this time, the intermediate Gaussian mixture model has converged and can then be used to introduce the weights of the model parameters to obtain the target Gaussian mixture model.
[0012] Optionally, planning the obstacle avoidance trajectory of the robot arm performing the new task through the target Gaussian mixture model includes: adjusting the weights of the model parameters within a preset adjustment interval to obtain a trajectory cluster that changes continuously and is consistent with the shape of the teaching trajectory; and determining the trajectory in the trajectory cluster that meets the obstacle avoidance requirements as the obstacle avoidance trajectory. In this way, after the robot arm moves based on any trajectory that meets the obstacle avoidance requirements, it can better avoid obstacles in application scenarios with unknown obstacle information and successfully complete the new task.
[0013] In the second aspect, an embodiment of the present application provides a robot arm obstacle avoidance trajectory planning device, the device comprising: an obtaining module, used to obtain a forward virtual force trajectory and a reverse virtual force trajectory; wherein the forward virtual force trajectory is obtained based on the initial teaching trajectory of the robot arm, and the reverse virtual force trajectory is obtained based on the position information of the new task; a maximum likelihood function determination module, used to determine the maximum likelihood function of the intermediate Gaussian mixture model according to the forward virtual force trajectory and the reverse virtual force trajectory; an introduction module, used to introduce the weights corresponding to the model parameters of the intermediate Gaussian mixture model when the function value of the maximum likelihood function meets the model convergence requirements; an obstacle avoidance trajectory determination module, used to obtain the target model parameters of the target Gaussian mixture model according to the weights corresponding to the model parameters, and plan the obstacle avoidance trajectory of the robot arm to perform the new task through the target Gaussian mixture model. In this way, the obstacle avoidance trajectory of the new task can meet the obstacle avoidance requirements in the application scenario of unknown obstacle information, and it has a large adjustment range and can avoid obstacles better.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are performed.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the method provided in the first aspect are performed.
[0016] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A flowchart of a robot arm obstacle avoidance trajectory planning method provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of a virtual force trajectory distribution involved in an embodiment of the present application;
[0020] Figure 3 A structural block diagram of a robot arm obstacle avoidance trajectory planning device provided in an embodiment of the present application;
[0021] Figure 4 A schematic diagram of the structure of an electronic device for executing a robot arm obstacle avoidance trajectory planning method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0023] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0024] It should be noted that the embodiments in this application or the technical features in the embodiments may be combined if there is no conflict.
[0025] In the related art, there are problems that GMP DMP is not suitable for application scenarios with unknown obstacle information, and obstacles cannot be avoided well due to the small adjustment range of the trajectory shape of the new task; in order to solve this problem, the present application provides a robot arm obstacle avoidance trajectory planning method, device, electronic device and computer-readable storage medium; further, the intermediate Gaussian mixture model is trained by an improved expected maximum algorithm, and after the intermediate Gaussian mixture model converges, the weight of the model parameters is introduced to plan the trajectory of the new task. The trajectory can meet the obstacle avoidance requirements in the application scenario of unknown obstacle information, and has a large adjustment range, which can avoid obstacles well.
[0026] In some application scenarios, the above-mentioned robot arm obstacle avoidance trajectory planning method can be applied to a server, terminal or cloud platform that can perform information exchange and data calculation. In these application scenarios, the above-mentioned server, terminal or cloud platform can be pre-communicated with the robot arm to control the robot arm to perform related operations based on control instructions. The above-mentioned control instructions may, for example, include instructions for the robot arm to move according to the obstacle avoidance trajectory.
[0027] The defects existing in the solutions in the above-mentioned related technologies are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above-mentioned problems and the solutions proposed in the embodiments of the present invention below for the above-mentioned problems should all be the contributions made by the inventor to the present invention during the process of the present invention.
[0028] Please refer to Figure 1 , which shows a flow chart of a robot arm obstacle avoidance trajectory planning method provided by an embodiment of the present application. Figure 1 As shown, the robot arm obstacle avoidance trajectory planning method includes the following steps 101 to 104.
[0029] Step 101, obtaining a forward virtual force trajectory and a reverse virtual force trajectory; wherein the forward virtual force trajectory is obtained based on the teaching trajectory of the robot arm, and the reverse virtual force trajectory is obtained based on the position information of the new task;
[0030] The above-mentioned positive virtual force trajectory can be regarded as a virtual force trajectory obtained by DMP, for example. That is, it can be obtained by the initial teaching trajectory of the robot arm. In some application scenarios, the above-mentioned initial teaching trajectory can include a manual teaching trajectory, for example.
[0031] The reverse virtual force trajectory can be regarded as a virtual force trajectory not obtained through DMP, and in some application scenarios, the reverse virtual force trajectory can be obtained through the position information of the new task. The position information can include, for example, the coordinate information of multiple positions that the new task must pass through during the movement process.
[0032] Step 102, determining a maximum likelihood function of an intermediate Gaussian mixture model according to the forward virtual force trajectory and the reverse virtual force trajectory;
[0033] The Gaussian mixture model is a model that decomposes things into several models based on Gaussian probability density functions (normal distribution curves). Then, the intermediate Gaussian mixture model can be regarded as a model that decomposes the forward virtual force trajectory and the reverse virtual force trajectory into several models based on Gaussian probability density functions.
[0034] In some application scenarios, after obtaining the forward virtual force trajectory and the reverse virtual force trajectory, the maximum likelihood function of the intermediate Gaussian mixture model can be determined based on the two. In these application scenarios, for example, the function of obtaining the logarithm of the Gaussian probability density function can be used as the maximum likelihood function.
[0035] Step 103, when the function value of the maximum likelihood function meets the model convergence requirement, introducing the weights corresponding to the model parameters of the intermediate Gaussian mixture model;
[0036] In some application scenarios, after determining the maximum likelihood function of the intermediate Gaussian mixture model, the intermediate Gaussian mixture model can be trained to converge the intermediate Gaussian mixture model. In these application scenarios, the intermediate Gaussian mixture model can be considered to have converged when the function value of the maximum likelihood function meets the model convergence requirement. The above-mentioned model convergence requirement may, for example, include a function value less than a preset convergence threshold (e.g., 0.05, 0.1, etc., which can be essentially regarded as a numerical value of a model parameter that changes less with the iterative calculation of the maximum likelihood function).
[0037] After the intermediate Gaussian mixture model converges, the weights corresponding to the model parameters of the intermediate Gaussian mixture model can be introduced. The above model parameters may include, for example, the expectation, variance, and probability of occurrence of each sub-model of the intermediate Gaussian mixture model in the intermediate Gaussian mixture model. In some application scenarios, the model parameters introduced with weights may be, for example, the expectation of each sub-model.
[0038] Step 104 , obtaining target model parameters of a target Gaussian mixture model according to weights corresponding to the model parameters, and planning an obstacle avoidance trajectory for the robotic arm to perform the new task through the target Gaussian mixture model.
[0039] In some application scenarios, after determining the weights corresponding to the model parameters of the intermediate Gaussian mixture model, the target model parameters corresponding to the target Gaussian mixture model can be obtained according to the weights corresponding to the model parameters. For example, when the model parameters introduced with the weights are the expectations of each sub-model, the expectation of each sub-model can be multiplied by the corresponding weight to obtain the expectations of each sub-model in the target Gaussian mixture model.
[0040] After obtaining the target model parameters, it can be regarded as determining the target Gaussian mixture model, and then the target Gaussian mixture model can be used to determine the obstacle avoidance trajectory of the new task.
[0041] In this embodiment, an intermediate Gaussian mixture model can be obtained by training the expected maximum algorithm, and after the intermediate Gaussian mixture model converges, the weights of its model parameters can be introduced to obtain a target Gaussian mixture model, so as to use the target Gaussian mixture model to plan the obstacle avoidance trajectory of the robot arm performing a new task. In this way, when the feedback information (such as the mechanical quantity returned by the force sensor) transmitted back when the robot arm performs a new task is detected, the weight value of the model parameter can be adjusted according to the feedback information to achieve the purpose of adjusting the obstacle avoidance trajectory. Therefore, this embodiment can plan the obstacle avoidance trajectory of the robot arm performing a new task without obtaining obstacle information in advance.
[0042] Furthermore, since the target model parameters are obtained based on the weights corresponding to the model parameters of the intermediate Gaussian mixture model, when the weight values are adjusted, the outer neighboring area of the obstacle avoidance trajectory planned based on the target Gaussian mixture model can be acted on. Therefore, the obstacle avoidance trajectory has a large adjustment range.
[0043] That is, this embodiment can make the obstacle avoidance trajectory of the new task meet the obstacle avoidance requirements in the application scenario of unknown obstacle information, and it has a large adjustment range and can avoid obstacles better.
[0044] In some optional implementations, the step of obtaining the forward virtual force trajectory and the reverse virtual force trajectory in step 101 includes the following sub-steps:
[0045] Sub-step 1011, determining a plurality of corresponding initial virtual force trajectories based on a calculation formula corresponding to the dynamic motion primitive method and a plurality of teaching trajectories;
[0046] In some application scenarios, when obtaining the positive virtual force trajectory, it can be obtained based on the calculation formula corresponding to the dynamic motion primitive method (hereinafter referred to as the DMP calculation formula). The DMP calculation formula can be Among them, X = [x, y, z] is the position variable of the end effector of the robot arm, τ, α, β are constants, and X f is the desired position of the end effector of the robot arm, F(s)=[f x (s),f y (s),f z (s)] T is the virtual force to be solved, and s is the normalized time variable. s satisfies the first-order system. And, Among them, a s is a constant, the initial value of s can be 1, it can decrease monotonically from 1, and finally converge to 0.
[0047] In these application scenarios, M teaching trajectories of length N may be obtained at equal time intervals. The teaching trajectory may be expressed, for example, as:
[0048] Substituting the teaching trajectory into the above DMP calculation formula, a corresponding plurality of initial virtual force trajectories are obtained. The initial virtual force trajectory can be expressed as:
[0049] Sub-step 1012, using a maximum expectation algorithm to process the multiple initial virtual force trajectories to obtain an initial Gaussian mixture model;
[0050] After determining multiple initial virtual force trajectories, they can be processed using the maximum expectation algorithm (i.e., EM algorithm) to obtain a Gaussian mixture model (i.e., initial Gaussian mixture model) containing K Gaussian distributions using the maximum expectation algorithm. In some application scenarios, the value corresponding to the above K may include, for example, 3, 5, and the like. The above initial Gaussian mixture model may be expressed, for example, as: Among them, u k The expectation of each sub-model can be characterized, Σ k The variance of each sub-model can be characterized, π k It can represent the probability of occurrence in the model, and k can represent the number of sub-models.
[0051] Sub-step 1013, using Gaussian mixture regression to restore the intermediate virtual force trajectory from the initial Gaussian mixture model, and substituting the intermediate virtual force trajectory and the position information of the new task into the calculation formula to obtain the forward trajectory of the end effector of the robot arm;
[0052] After obtaining the initial Gaussian mixture model, Gaussian mixture regression can be further used to restore a force trajectory from the initial Gaussian mixture model. This trajectory can also be regarded as the above-mentioned intermediate virtual force trajectory, which can be expressed as F recover .
[0053] Then, the intermediate virtual force trajectory and the position information of the new task can be substituted into the DMP calculation formula to obtain the trajectory of the end effector of the robot arm. This trajectory can also be regarded as the forward trajectory mentioned above, which can be expressed as D M+1 In some application scenarios, the position information of the new task may be, for example, the starting point coordinates and the end point coordinates corresponding to the new task. In this way, the starting point coordinates and the end point coordinates may be substituted into the DMP calculation formula and integrated to obtain the trajectory of the end effector of the robot arm.
[0054] Sub-step 1014, when the forward trajectory does not meet the obstacle avoidance requirement, substitute the forward trajectory into the calculation formula to obtain the forward virtual force trajectory.
[0055] In some application scenarios, after obtaining the forward trajectory of the end effector of the robotic arm, the robotic arm can be controlled to move according to the forward trajectory. If the movement of the robotic arm meets the obstacle avoidance requirements, the forward trajectory can be determined as the obstacle avoidance trajectory of the new task.
[0056] In other application scenarios, if the motion of the robot arm does not meet the obstacle avoidance requirements, the forward trajectory can be substituted into the DMP calculation formula to calculate the forward virtual force trajectory through the DMP calculation formula, which can be expressed as F M+1 .
[0057] When determining whether the movement of the robot arm meets the obstacle avoidance requirements, for example, a motion image can be captured by a camera to make a judgment by viewing the motion image; for example, force information collected by a force sensor installed on the robot arm can be used to determine whether an obstacle is encountered.
[0058] In this implementation, the forward trajectory of the robot arm when performing a new task can be obtained through the DMP calculation formula based on the known multiple teaching trajectories.
[0059] In some optional implementations, the step of obtaining the forward virtual force trajectory and the reverse virtual force trajectory in step 101 may further include the following sub-steps:
[0060] Sub-step 1015, obtaining the location information of the new task; the location information includes the starting point information and the end point information;
[0061] In some application scenarios, when obtaining the reverse virtual force trajectory, the position information of the new task may be obtained first, and the position information may include the starting point coordinates and the end point coordinates corresponding to the new task.
[0062] Sub-step 1016, obtaining a straight line path corresponding to the new task according to the starting point information and the end point information, and uniformly sampling the straight line path to obtain a reverse teaching trajectory;
[0063] After obtaining the starting point coordinates and the end point coordinates of the new task, the straight line path between the two coordinates can be determined, and then the straight line path can be uniformly sampled with equal steps to obtain a new teaching trajectory for the new task. The new teaching trajectory can also be regarded as the above-mentioned reverse teaching trajectory, which can be expressed as D M+2 .
[0064] Sub-step 1017, substituting the reverse teaching trajectory into the calculation formula to obtain the reverse virtual force trajectory.
[0065] After obtaining the reverse teaching trajectory, the reverse teaching trajectory can be substituted into the DMP calculation formula to calculate the corresponding new virtual force trajectory through DMP. The new virtual force trajectory is also the reverse virtual force trajectory mentioned above, which can be expressed as F M+2 .
[0066] In this implementation, the corresponding straight path can be determined by the position information of the new task, and the straight path can be regarded as the optimal path for executing the new task. Therefore, the reverse teaching trajectory determined based on the straight path can be regarded as the optimal trajectory for the robot to execute the new task. After the reverse virtual force trajectory and the forward virtual force trajectory obtained based on the straight path are used to determine the maximum likelihood function of the intermediate Gaussian mixture model, the model parameters of the intermediate Gaussian mixture model can be made more accurate, so as to be more conducive to planning an obstacle avoidance trajectory that meets the obstacle avoidance requirements.
[0067] In some optional implementations, the step 102 described above of determining the maximum likelihood function of the intermediate Gaussian mixture model according to the forward virtual force trajectory and the reverse virtual force trajectory includes the following sub-steps:
[0068] Sub-step 1021, determining a preference parameter; the preference parameter represents a virtual force trajectory corresponding to the obstacle avoidance trajectory that is close to the forward virtual force trajectory or the reverse virtual force trajectory;
[0069] In some application scenarios, when determining the maximum likelihood function, a preference parameter may be determined. The preference parameter may make the virtual force trajectory corresponding to the obstacle avoidance trajectory approach the positive virtual force trajectory or the negative virtual force trajectory. For example, Figure 2 As shown, the preference parameters can make the virtual force trajectory 203 corresponding to the obstacle avoidance trajectory approach the positive virtual force trajectory 201 or the reverse virtual force trajectory 202. In this way, the preference parameters can make the obstacle avoidance trajectory approach the positive trajectory or the reverse teaching trajectory.
[0070] In some application scenarios, the value corresponding to the preference parameter can be selected as 0, 0.5, or 1, for example. This allows the obstacle avoidance trajectory to coincide with the forward trajectory or the reverse teaching trajectory, or not to be biased towards any trajectory, so that the obstacle avoidance trajectory is more suitable for the actual application scenario. At this time, the corresponding model parameters may include:
[0071] Sub-step 1022, improving the initial maximum likelihood function according to the preference parameters to obtain the maximum likelihood function in the intermediate Gaussian mixture model.
[0072] The above-mentioned initial maximum likelihood function is a function obtained by taking the logarithm of the likelihood function, and its variable may be the above-mentioned forward virtual force trajectory.
[0073] After the preference parameter is determined, the initial maximum likelihood function can be improved according to the preference parameter. That is, the variable reverse virtual force trajectory is added to the initial maximum likelihood function, and the corresponding preference degrees are assigned to the forward virtual force trajectory and the reverse virtual force trajectory. For example, the forward virtual force trajectory and the reverse virtual force trajectory are assigned the same preference degree (that is, the preference parameter at this time is 0.5).
[0074] In this implementation, the initial maximum likelihood function can be improved by preference parameters to assign preference degrees corresponding to the forward virtual force trajectory and the reverse virtual force trajectory, so that the virtual force trajectory corresponding to the obstacle avoidance trajectory can be located between the two, thereby better avoiding obstacles.
[0075] In some optional implementations, the expression of the maximum likelihood function includes: Wherein, λ represents the preference parameter, and the value range of λ is [0, 1]; P represents the probability density function, The model parameters (θ = {π k ,μ k ,Σ k ,k=1,2,…,K}),F M+1 Characterize the positive virtual force trajectory, F M+2 Characterize the reverse virtual force trajectory.
[0076] In some application scenarios, the expression of the maximum likelihood function can be used to calculate the function value of the maximum likelihood function to determine whether the intermediate Gaussian mixture model converges.
[0077] In these application scenarios, the shape of the obstacle avoidance trajectory can be adjusted by adjusting the value of the preference parameter. In this way, the shape of the obstacle avoidance trajectory can be adjusted by combining the preference parameter and the model parameter weight value of the intermediate Gaussian mixture model through the expression of the maximum likelihood function, so that the obstacle avoidance trajectory has a larger adjustment range and can better avoid obstacles.
[0078] In some optional implementations, the model parameters corresponding to the intermediate Gaussian mixture model are determined based on the following steps: based on the model parameters of the initial Gaussian mixture model, calculating the probability that the forward virtual force trajectory and the reverse virtual force trajectory respectively come from the Kth sub-model of the initial Gaussian mixture model; iteratively calculating the expectation, variance and probability of occurrence of each sub-model in the initial Gaussian mixture model to obtain the model parameters of the intermediate Gaussian mixture model.
[0079] In some application scenarios, the model parameters of the intermediate Gaussian mixture model can be calculated by the EM algorithm. Specifically, based on the model parameters of the initial Gaussian mixture model, the probability that the forward virtual force trajectory and the reverse virtual force trajectory come from the Kth sub-model of the initial Gaussian mixture model can be calculated respectively. The model parameters of each sub-model can be iteratively calculated to obtain the model parameters of the intermediate Gaussian mixture model. It should be noted that the EM algorithm has convergence. In some application scenarios, when the model parameters of each sub-model change little during several consecutive iterative calculations, it can be regarded as the convergence of the intermediate Gaussian mixture model.
[0080] In these application scenarios, the model parameters of the intermediate Gaussian mixture model (i.e., calculation The process of calculation can be realized through the following process:
[0081] (1) Initialization parameters; for example, the number of iterative calculation steps can be initialized to 1; that is, if t represents the number of steps, then t = 1; and π can be initialized k The value of
[0082] (2) Find the expected steps;
[0083] Specifically, at this time, t=t+1 can be set, and the probability λ that the forward virtual force trajectory and the reverse virtual force trajectory come from the Kth sub-model of the initial Gaussian mixture model can be obtained. The calculation formula may include: Among them, φ represents the Gaussian distribution density function of the kth sub-model.
[0084] (3) Find the maximum step;
[0085] Specifically, at this time, the calculation formulas of each model parameter of the intermediate Gaussian mixture model may include:
[0086]
[0087]
[0088] In this implementation, the model parameters of the intermediate Gaussian mixture model can be calculated according to the EM algorithm based on the model parameters of the initial Gaussian mixture model. At this time, the intermediate Gaussian mixture model has converged and can then be used to introduce the weights of the model parameters to obtain the target Gaussian mixture model.
[0089] In some application scenarios, if the value of the preference parameter is 0.5, the target model parameters corresponding to the above target Gaussian mixture model can be:
[0090] In some optional implementations, the obstacle avoidance trajectory of the robotic arm performing the new task through the target Gaussian mixture model as described in step 103 above includes: adjusting the weights of the model parameters within a preset adjustment range to obtain a trajectory cluster that changes continuously and is consistent with the shape of the taught trajectory; and determining the trajectory in the trajectory cluster that meets the obstacle avoidance requirements as the obstacle avoidance trajectory.
[0091] In some application scenarios, after obtaining the model parameters of the target Gaussian mixture model, the obstacle avoidance trajectory can be adjusted by adjusting the weight value. Specifically, the weight value can be adjusted within a preset adjustment interval to obtain a trajectory cluster that changes continuously and is consistent with the shape of the taught trajectory. The above preset adjustment interval can include, for example, [-2, 2].
[0092] In these application scenarios, after obtaining the above trajectory cluster, the trajectory in the trajectory cluster that meets the obstacle avoidance requirements can be determined as the obstacle avoidance trajectory. In this way, after the robot arm moves based on any trajectory that meets the obstacle avoidance requirements, it can better avoid obstacles in application scenarios with unknown obstacle information and successfully complete new tasks.
[0093] Please refer to Figure 3 , which shows a structural block diagram of a robot arm obstacle avoidance trajectory planning device provided in an embodiment of the present application. The robot arm obstacle avoidance trajectory planning device can be a module, program segment or code on an electronic device. It should be understood that the device is similar to the above Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here.
[0094] Optionally, the above-mentioned robot arm obstacle avoidance trajectory planning device includes a seeking module 301, a maximum likelihood function determination module 302, an introduction module 303 and an obstacle avoidance trajectory determination module 304. Wherein, the seeking module 301 is used to seek the forward virtual force trajectory and the reverse virtual force trajectory; wherein, the forward virtual force trajectory is obtained based on the initial teaching trajectory of the robot arm, and the reverse virtual force trajectory is obtained based on the position information of the new task; the maximum likelihood function determination module 302 is used to determine the maximum likelihood function of the intermediate Gaussian mixture model according to the forward virtual force trajectory and the reverse virtual force trajectory; the introduction module 303 is used to introduce the weights corresponding to the model parameters of the intermediate Gaussian mixture model when the function value of the maximum likelihood function meets the model convergence requirement; the obstacle avoidance trajectory determination module 304 is used to obtain the target model parameters of the target Gaussian mixture model according to the weights corresponding to the model parameters, and plan the obstacle avoidance trajectory of the robot arm to perform the new task through the target Gaussian mixture model.
[0095] Optionally, the obtaining module 301 is further used to: determine the corresponding multiple initial virtual force trajectories based on the calculation formula corresponding to the dynamic motion primitive method and multiple teaching trajectories; use the maximum expectation algorithm to process the multiple initial virtual force trajectories to obtain an initial Gaussian mixture model; use Gaussian mixture regression to restore the intermediate virtual force trajectory from the initial Gaussian mixture model, and substitute the intermediate virtual force trajectory and the position information of the new task into the calculation formula to obtain the forward trajectory of the end effector of the robot arm; when the forward trajectory does not meet the obstacle avoidance requirements, substitute the forward trajectory into the calculation formula to obtain the forward virtual force trajectory.
[0096] Optionally, the obtaining module 301 is also used to: obtain position information of the new task; the position information includes starting point information and end point information; obtain a straight line path corresponding to the new task according to the starting point information and the end point information, and uniformly sample the straight line path to obtain a reverse teaching trajectory; substitute the reverse teaching trajectory into the calculation formula to obtain the reverse virtual force trajectory.
[0097] Optionally, the maximum likelihood function determination module 302 is further used to: determine a preference parameter; the preference parameter characterizes the virtual force trajectory corresponding to the obstacle avoidance trajectory to approach the forward virtual force trajectory or the reverse virtual force trajectory; and improve the initial maximum likelihood function according to the preference parameter to obtain the maximum likelihood function in the intermediate Gaussian mixture model.
[0098] Optionally, the expression of the maximum likelihood function includes: Wherein, λ represents the preference parameter, and the value range of λ is [0, 1]; P represents the probability density function, Characterize the model parameters of the intermediate Gaussian mixture model, F M+1 Characterize the positive virtual force trajectory, F M+2 Characterize the reverse virtual force trajectory.
[0099] Optionally, the model parameters corresponding to the intermediate Gaussian mixture model are determined based on the following steps: based on the model parameters of the initial Gaussian mixture model, calculating the probability that the forward virtual force trajectory and the reverse virtual force trajectory come from the Kth sub-model of the initial Gaussian mixture model respectively; iteratively calculating the expectation, variance and probability of occurrence of each sub-model in the initial Gaussian mixture model to obtain the model parameters of the intermediate Gaussian mixture model.
[0100] Optionally, the obstacle avoidance trajectory determination module 304 is further used to: adjust the weights of the model parameters within a preset adjustment interval to obtain a trajectory cluster that changes continuously and is consistent with the shape of the taught trajectory; and determine the trajectory in the trajectory cluster that meets the obstacle avoidance requirements as the obstacle avoidance trajectory.
[0101] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system or device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0102] Please refer to Figure 4 , Figure 4 A schematic diagram of the structure of an electronic device for executing a robot arm obstacle avoidance trajectory planning method provided in an embodiment of the present application, the electronic device may include: at least one processor 401, such as a CPU, at least one communication interface 402, at least one memory 403 and at least one communication bus 404. Among them, the communication bus 404 is used to realize direct connection and communication between these components. Among them, the communication interface 402 of the device in the embodiment of the present application is used to communicate signals or data with other node devices. The memory 403 can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 403 can optionally be at least one storage device located away from the aforementioned processor. Computer-readable instructions are stored in the memory 403. When the computer-readable instructions are executed by the processor 401, the electronic device can execute the above-mentioned Figure 1 The method process is shown.
[0103] Understandably, Figure 4 The structure shown is for illustration only, and the electronic device may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown. Figure 4 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0104] The present application embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the following can be performed: Figure 1 The method process in the method embodiment shown is executed by the electronic device.
[0105] An embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments. For example, the method may include: obtaining a forward virtual force trajectory and a reverse virtual force trajectory; wherein the forward virtual force trajectory is obtained based on an initial teaching trajectory of the robotic arm, and the reverse virtual force trajectory is obtained based on position information of a new task; according to the forward virtual force trajectory and the reverse virtual force trajectory, a maximum likelihood function of an intermediate Gaussian mixture model is determined; when the function value of the maximum likelihood function meets the model convergence requirement, weights corresponding to model parameters of the intermediate Gaussian mixture model are introduced; according to the weights corresponding to the model parameters, target model parameters of the target Gaussian mixture model are obtained, and the obstacle avoidance trajectory of the robotic arm to perform the new task is planned through the target Gaussian mixture model.
[0106] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0107] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0108] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0109] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0110] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A robot arm obstacle avoidance trajectory planning method, characterized in that: include: Obtaining a forward virtual force trajectory and a reverse virtual force trajectory; wherein the forward virtual force trajectory is obtained based on an initial teaching trajectory of the robot arm, and the reverse virtual force trajectory is obtained based on position information of a new task; Determining a maximum likelihood function of an intermediate Gaussian mixture model according to the forward virtual force trajectory and the reverse virtual force trajectory; When the function value of the maximum likelihood function meets the model convergence requirement, introducing weights corresponding to the model parameters of the intermediate Gaussian mixture model; Obtaining target model parameters of a target Gaussian mixture model according to weights corresponding to the model parameters, and planning an obstacle avoidance trajectory for the robotic arm to perform the new task through the target Gaussian mixture model; The obtaining of the forward virtual force trajectory and the reverse virtual force trajectory comprises: Based on the calculation formula corresponding to the dynamic motion primitive method and the multiple teaching trajectories, the corresponding multiple initial virtual force trajectories are determined; The multiple initial virtual force trajectories are processed using a maximum expectation algorithm to obtain an initial Gaussian mixture model; Using Gaussian mixture regression to restore an intermediate virtual force trajectory from the initial Gaussian mixture model, and substituting the intermediate virtual force trajectory and position information of the new task into the calculation formula to obtain a forward trajectory of the end effector of the robot arm; When the forward trajectory does not meet the obstacle avoidance requirement, substituting the forward trajectory into the calculation formula to obtain the forward virtual force trajectory; Acquire the location information of the new task; the location information includes the starting point information and the end point information; Obtaining a straight line path corresponding to the new task according to the starting point information and the end point information, and uniformly sampling the straight line path to obtain a reverse teaching trajectory; Substitute the reverse teaching trajectory into the calculation formula to obtain the reverse virtual force trajectory.
2. The method according to claim 1, characterized in that Determining the maximum likelihood function of the intermediate Gaussian mixture model according to the forward virtual force trajectory and the reverse virtual force trajectory includes: Determining a preference parameter; wherein the preference parameter indicates that the virtual force trajectory corresponding to the obstacle avoidance trajectory is close to the positive virtual force trajectory or the reverse virtual force trajectory; The initial maximum likelihood function is improved according to the preference parameters to obtain the maximum likelihood function in the intermediate Gaussian mixture model.
3. The method according to claim 2, characterized in that The expression of the maximum likelihood function includes: Wherein, λ represents the preference parameter, and the value range of λ is [0, 1]; P represents the probability density function, Characterize the model parameters of the intermediate Gaussian mixture model, F M+1 Characterize the positive virtual force trajectory, F M+2 Characterize the reverse virtual force trajectory.
4. The method according to claim 2 or 3, characterized in that: The model parameters corresponding to the intermediate Gaussian mixture model are determined based on the following steps: Based on the model parameters of the initial Gaussian mixture model, calculating the probability that the forward virtual force trajectory and the reverse virtual force trajectory are respectively from the Kth sub-model of the initial Gaussian mixture model; The expectation and variance of each sub-model and the probability of occurrence in the initial Gaussian mixture model are iteratively calculated to obtain the model parameters of the intermediate Gaussian mixture model.
5. The method according to any one of claims 1 to 3, characterized in that: The step of planning the obstacle avoidance trajectory of the robotic arm for performing the new task by using the target Gaussian mixture model includes: Adjusting the weights of the model parameters within a preset adjustment interval to obtain a trajectory cluster that changes continuously and is consistent with the shape of the taught trajectory; A trajectory in the trajectory cluster that meets the obstacle avoidance requirement is determined as the obstacle avoidance trajectory.
6. A robot arm obstacle avoidance trajectory planning device, characterized in that: include: The obtaining module is used to obtain a forward virtual force trajectory and a reverse virtual force trajectory; wherein the forward virtual force trajectory is obtained based on the initial teaching trajectory of the robot arm, and the reverse virtual force trajectory is obtained based on the position information of the new task; the obtaining of the forward virtual force trajectory and the reverse virtual force trajectory includes: determining a plurality of corresponding initial virtual force trajectories based on a calculation formula corresponding to a dynamic motion primitive method and a plurality of teaching trajectories; processing the plurality of initial virtual force trajectories using a maximum expectation algorithm to obtain an initial Gaussian mixture model; restoring an intermediate virtual force trajectory from the initial Gaussian mixture model using Gaussian mixture regression, Substitute the intermediate virtual force trajectory and the position information of the new task into the calculation formula to obtain the forward trajectory of the end effector of the robot arm; when the forward trajectory does not meet the obstacle avoidance requirement, substitute the forward trajectory into the calculation formula to obtain the forward virtual force trajectory; obtain the position information of the new task; the position information includes the starting point information and the end point information; obtain the straight line path corresponding to the new task according to the starting point information and the end point information, and uniformly sample the straight line path to obtain the reverse teaching trajectory; substitute the reverse teaching trajectory into the calculation formula to obtain the reverse virtual force trajectory; A maximum likelihood function determination module, used to determine the maximum likelihood function of the intermediate Gaussian mixture model according to the forward virtual force trajectory and the reverse virtual force trajectory; An introduction module, used for introducing weights corresponding to model parameters of the intermediate Gaussian mixture model when the function value of the maximum likelihood function meets the model convergence requirement; The obstacle avoidance trajectory determination module is used to obtain the target model parameters of the target Gaussian mixture model according to the weights corresponding to the model parameters, and to plan the obstacle avoidance trajectory of the robotic arm to perform the new task through the target Gaussian mixture model.
7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 5 is executed.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is performed.
Citation Information
Patent Citations
Robot simulation learning method based on dynamic system model
CN109702744A
Mechanical arm motion planning method for intelligent manufacturing
CN110640736A