Multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning
By constructing a deep reinforcement learning model and optimization algorithm, the problem of long learning cycle and unreasonable reward function in the dynamic obstacle avoidance planning of the six-axis collaborative robot is solved, and more efficient dynamic obstacle avoidance planning capabilities and obstacle avoidance strategy iteration are achieved.
Patent Information
- Application Number
- CN202410491083.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-04-23
AI Technical Summary
The existing technology has problems such as long learning cycle, unreasonable construction of reward function, and high computational load due to high dimensionality of state space in the obstacle avoidance planning of six-axis collaborative robots in dynamic environments. It is difficult to effectively improve the dynamic obstacle avoidance capability of the robot.
A multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning is used to build a kinematic model and a collision detection model. A deep reinforcement learning model is designed and irrelevant dynamic Gaussian noise is introduced to optimize the neural network strategy. Through the important sample playback mechanism and Dynamically control Gaussian noise variance, design appropriate state space and reward functions, and optimize deep reinforcement learning models.
It improves the learning efficiency and accuracy of the robot's dynamic obstacle avoidance planning, reduces exploration efforts, improves the real-time performance and obstacle avoidance capabilities of the algorithm, and avoids the learning process from falling into local optimality.
Smart Images

Figure CN118596133A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robot dynamic obstacle avoidance planning, and specifically relates to a multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning. Background Art
[0002] Robots have been widely used in many fields such as automobile production, agricultural harvesting, medical surgery, and space. However, due to the wide range of application fields, new challenges have been brought to robot programming technology. In particular, robots have higher requirements for the real-time performance of algorithms in dynamic obstacle avoidance planning scenarios, and a large number of online collision detections make it more difficult for algorithms to perform obstacle avoidance planning. Traditional path planning algorithms are more difficult to deal with such scenarios. In recent years, reinforcement learning methods have gradually appeared in methods for various complex tasks, which provides a new idea for robot dynamic obstacle avoidance planning. Reinforcement learning is very different from traditional decision-making and planning algorithms. It improves the control level of the intelligent agent over the robot by constantly interacting and learning with the environment. Although reinforcement learning has achieved certain results in robot control planning, most of the current methods focus on obstacle avoidance planning research in dynamic environments such as mobile robots, self-driving cars, and unmanned ships. However, there are relatively few studies on obstacle avoidance planning of six-axis collaborative robots based on deep reinforcement learning algorithms in dynamic environments. In addition, when planning complex scenarios for dynamic obstacle avoidance of six-axis collaborative robots, there are some problems to be solved and optimized in building the deep reinforcement learning model of the intelligent agent, such as the long learning cycle due to the complex environment, the difficulty of convergence caused by unreasonable reward function construction, and the high dimensionality of the state space resulting in excessive computational complexity. Summary of the invention
[0003] In order to solve the deficiencies of the prior art and achieve the purpose of improving the dynamic obstacle avoidance capability of the robot, the present invention adopts the following technical solutions:
[0004] The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning includes the following steps:
[0005] Step 1: Construct a kinematic model of a multi-axis collaborative robot;
[0006] Step 2: Build a collision detection model between the multi-axis collaborative robot and obstacles;
[0007] Step 3: Based on the kinematic model and collision detection model, a deep reinforcement learning model of the multi-axis collaborative robot is constructed; the deep reinforcement learning model includes a deep neural network and a reinforcement learning algorithm. The deep neural network includes a participant neural network and a critic neural network. The participant neural network obtains the state value and outputs the action value. The critic neural network is used to evaluate the value of the action value. The reinforcement learning algorithm introduces irrelevant dynamic neighborhood value Gaussian noise, and the exploration intensity of the action value is adjusted by dynamically controlling the Gaussian noise to optimize the neural network strategy. With the continuous increase of the learning process and the number of explorations, the neural network strategy becomes more and more mature, and the estimation of the optimal action becomes more and more accurate. At this time, the exploration intensity can be reduced to save computing power and time; an importance sample playback mechanism is introduced, and the size of the sample data TD error is used as a standard to measure the importance of the sample, and the importance is sorted to increase the probability of extracting and learning the top-ranked data samples. If the difference δ between the current state, action value and the target state, action value is large, it is concluded that the importance of this sample data is high, and its learning importance is ranked in the front;
[0008] Step 4: Design the state space and action space of the deep reinforcement learning model;
[0009] Step 5: Design the reward function of the deep reinforcement learning model;
[0010] Step 6: Optimize the deep reinforcement learning model.
[0011] Furthermore, in step 1, the robot structure size and the angle of each joint are obtained, and the position and posture of each joint in space are obtained through matrix translation and rotation calculation.
[0012] Furthermore, in step 2, the robot rods are wrapped by a cylindrical bounding box and simplified into spatial line segments, and the obstacles are wrapped by a spherical bounding box. A collision detection model is constructed based on the radii of the cylindrical bounding box and the spherical bounding box, thereby converting the complex spatial relationship between the robot rods and the obstacles into a relative position relationship between the spatial line segments and the sphere.
[0013] Furthermore, the central axis segment of the cylindrical bounding box is L, its endpoints are M1 and M2, and the center of the spherical bounding box is P obs , the radius of the spherical bounding box is r obs , the radius of the cylinder collision model is r, and the collision detection is as follows:
[0014] like and Then the center of the sphere P is obtained by Heron's formula obs The minimum distance to the central axis segment L is:
[0015]
[0016] Where a = |M1-M2|, b = |M1-P obs |,c=|M2-P obs |, t = (a + b + c) / 2;
[0017] like and Then the center of the sphere P obs The minimum distance d to the central axis segment L = |M1P obs |;
[0018] like and Then the center of the sphere P obs The minimum distance d to the central axis segment L = |M2P obs |;
[0019] If drr obs When >0, the robot does not collide with the obstacle, otherwise a collision occurs.
[0020] Furthermore, in step 5, the reward function of the deep reinforcement learning model is as follows:
[0021]
[0022] Among them, ω g and ω i is the weight of the corresponding reward function, d g It represents the Euclidean distance between the target object at the current position and the robot terminal fixture at the current position, d s Indicates the safety distance, d i (t) represents the distance between the ith link and the center point of the obstacle spherical bounding box at time t, which is calculated by the robot and environmental obstacle collision model. i (t-1) represents the distance between the i-th link and the center point of the obstacle spherical bounding box at time t-1. When the difference between the two is greater than 0, it indicates that the robot link is moving away from the obstacle, and the agent will receive a positive reward. Otherwise, it is inferred that the robot is approaching the obstacle, and the agent will receive a negative reward. t Indicates the distance threshold, collision indicates collision;
[0023] ω t .d g The reward function is used to guide the robot gripper to gradually approach the target position;
[0024] (if d i <d s ) The reward function is used when the distance between each link of the robot and the environmental obstacle is less than the safety distance d sWhen the robot is in motion, obstacle avoidance is given priority to ensure that the robot body does not collide with obstacles;
[0025] R g The Euclidean distance between the robot end fixture position and the target position reaches the threshold d t When , it can indicate that the robot terminal fixture has been planned to the target position, giving the agent a positive and large reward;
[0026] R c It is used to give the agent a negative maximum penalty when any link of the robot collides with an obstacle.
[0027] Furthermore, in step 3, by dynamically controlling the Gaussian noise variance σ 2 Controls the intensity of the agent’s exploration: σ 2 The smaller the normal distribution shape, the thinner it is, and the probability that the output action value is close to the target action value a becomes greater, which enhances the nature of development; 2 The larger the normal distribution shape, the greater the probability that the output action value deviates from the target action value a, which enhances the nature of exploration.
[0028] Furthermore, the dynamic control Gaussian noise variance σ 2 The formula is as follows:
[0029]
[0030] The learning process is divided into T stages. In the early stage of learning, from 0 to At this stage, we select a large σ 2 The value is helpful for the exploration and learning of the intelligent agent and increases the probability of obtaining valid samples. As the learning process progresses in multiple stages, the number of samples is gradually guaranteed, and sample data needs to be developed. 2 Gradually reduce and increase the development of samples. Keep constant until T-2 This makes the learning process have a good balance between exploration and development. After T-2 stages, σ 2 decays to 0 but needs to be maintained N e To learn the number of rounds, because the completely greedy algorithm based on limited rounds is still a greedy algorithm with local information, there is still a gap from the optimal solution, so it is necessary for the intelligent agent to retain a certain exploration ability.
[0031] Furthermore, in the reinforcement learning algorithm of step 3, in order to avoid the learning process falling into a local optimum, samples are extracted according to the corresponding probabilities of the respective samples:
[0032]
[0033] in Rank(i) represents the ranking of the i-th sample in all samples, N represents the number of samples, and they are arranged from large to small according to the corresponding δ.
[0034] Furthermore, the robot in step 4 is a six-axis collaborative robot, and the state space of the deep reinforcement learning model includes five parts: the three-dimensional coordinates of the six joints of the six-axis collaborative robot and the difference J between the target position i (x,y,z)-(x t ,y t ,z t ), the difference between the three-dimensional coordinates of the robot's six joints and the position of the dynamic obstacle J i (x,y,z)-(x o ,y o ,z o ), the three-dimensional coordinates of the target position with reference to the robot base coordinate system (x t ,y t ,z t ), the three-dimensional coordinates of the dynamic obstacle with reference to the robot base coordinate system (x o ,y o ,z o ), whether the robot reaches the target position in_goal, the input state is expressed as follows:
[0035] s={J1(x,y,z)-(x t ,y t ,z t ),J2(x,y,z)-(x t ,y t ,z t ),J3(x,y,z)-(x t ,y t ,z t ),
[0036] J4(x,y,z)-(x t ,y t ,z t ),J5(x,y,z)-(x t ,y t ,z t ),J6(x,y,z)-(x t ,y t ,z t ),
[0037] J1(x,y,z)-(x o ,y o ,z o ),J2(x,y,z)-(x o ,yo ,z o ),J3(x,y,z)-(x o ,y o ,z o ),
[0038] J4(x,y,z)-(x o ,y o ,z o ),J5(x,y,z)-(x o ,y o ,z o ),J6(x,y,z)-(x o ,y o ,z o ),
[0039] (x t ,y t ,z t ),(x o ,y o ,z o ),in_goal}.
[0040] The action space of the deep reinforcement learning model is designed as a six-dimensional vector based on the characteristics of the path planning task, and the angular velocities of the six joints of the action robot are output as follows:
[0041] a={ω1,ω2,ω3,ω4,ω5,ω6}.
[0042] Furthermore, the specific process of step 6 is as follows:
[0043] First, a CoppeliaSim simulation environment is built for the deep reinforcement learning model optimization process, and the CoppeliaSim simulation environment is initialized in each planning round;
[0044] Then, the current relevant state in the environment, including the difference between the robot's multiple joint positions and the target position, the difference between the robot's joint positions and the obstacle positions, the target position, the obstacle position, and the target arrival state value, is input into the deep reinforcement learning network model as the state space value state. The target position and the dynamic real-time position of the obstacle are obtained from the simulation environment. On this basis, the remaining state space values are calculated by the kinematic model and the collision detection model.
[0045] Next, the action space value is output from the deep reinforcement learning model to drive the robot movement in the simulation environment. The collision detection model is used to determine whether a collision occurs or whether the planning task is completed. If a collision occurs or the number of planning experiments reaches the maximum number of steps, the task is not completed in this round, and the round ends. The dynamic obstacle avoidance planning task is judged to have failed, a large negative reward is given, and a new round is restarted. If the robot end fixture is successfully planned to the target position, the task is judged to be successfully executed, otherwise proceed to the next step.
[0046] Through the continuous interaction between the intelligent agent and the environment, the parameters of the deep reinforcement learning network model are optimized to continuously improve the dynamic obstacle avoidance planning ability of the robot intelligent agent. When the obstacle avoidance planning ability of the intelligent agent converges, the training process stops to avoid overfitting.
[0047] The advantages and beneficial effects of the present invention are:
[0048] (1) The present invention constructs a robot's kinematic model and an obstacle collision model, designs a deep reinforcement learning model for the robot, and introduces uncorrelated dynamic zero-mean Gaussian noise to improve the exploratory nature of action selection and dynamically control the size of the Gaussian noise variance to maintain the balance between the algorithm exploration process and the development process. Then, an importance sample playback mechanism is introduced to improve the convergence speed of the learning process.
[0049] (2) The present invention constructs a state space, action space and reward function of the robot agent interaction process that fully considers the robot's dynamic obstacle avoidance planning characteristics to promote better learning of the robot agent, and enables the agent to continuously iterate and update its strategy in the CoppeliaSim simulation environment to obtain an intelligent dynamic obstacle avoidance planning strategy. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Flow chart of the method in the embodiment of the present invention.
[0051] Figure 2 Schematic diagram of the structural dimensions of a six-axis collaborative robot in an embodiment of the present invention.
[0052] Figure 3a This is a bounding box model diagram of the robot model in an embodiment of the present invention.
[0053] Figure 3b It is a space segment diagram of the robot model in an embodiment of the present invention.
[0054] Figure 3c This is a diagram of the obstacle enclosing sphere model in an embodiment of the present invention.
[0055] Figure 4a This is one of the schematic diagrams of the relative position distribution of the obstacle surrounding sphere and the cylinder axis in an embodiment of the present invention.
[0056] Figure 4b This is the second schematic diagram of the relative position distribution of the obstacle surrounding sphere and the cylinder axis in an embodiment of the present invention.
[0057] Figure 4c This is the third schematic diagram of the relative position distribution of the obstacle surrounding sphere and the cylinder axis in an embodiment of the present invention.
[0058] Figure 5 Schematic diagram of the dynamic obstacle avoidance planning learning and training process of the six-axis collaborative robot in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0060] like Figure 1 As shown in FIG. 1 , a multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning includes the following steps:
[0061] Step 1: Construct the kinematic model of the six-axis collaborative robot;
[0062] like Figure 2 As shown, the model elements include the known robot structure dimensions and the input angles of each robot joint. The position and posture of each joint in space are calculated by using the translation and rotation of the matrix to construct the robot's kinematic model.
[0063] Step 2: Build a collision detection model between the six-axis collaborative robot and obstacles;
[0064] like Figure 3a As shown in the figure, firstly, the robot rods are wrapped with a cylindrical bounding box and simplified as follows: Figure 3b The space line segment shown, then Figure 3c As shown, the environmental obstacles are wrapped with a spherical bounding box to obtain an obstacle enclosing sphere model, the radius of which is the radius of the spherical bounding box r obs The sum of the radius r of the robot rod converts the complex spatial relationship between the robot rods and obstacles into the relative position relationship between the space line segment and the sphere.
[0065] like Figures 4a to 4c As shown in the figure, three possible positional relationships between each rod and the obstacle bounding box are revealed, where L is the central axis segment of the cylindrical collision model of a single link of the robot, and its endpoints are M1, M2, and P obs is the center of the obstacle spherical bounding box, r obs is the radius of the obstacle spherical bounding box, and r is the radius of the cylindrical collision model. Let a=|M1-M2|, b=|M1-Pobs |,c=|M2-P obs |, then let t = (a + b + c) / 2. If and That is Figure 4a In the case shown, the minimum distance from the center of the bounding box to the central axis segment L is obtained by using Heron's formula:
[0066]
[0067] if and That is Figure 4b In the case shown, the minimum distance d from the center of the bounding box to the central axis segment L is |M1P obs |. If and That is Figure 4c In the case shown, the minimum distance d from the center of the bounding box to the central axis segment L is |M2P obs |. In summary, if drr obs When >0, the robot does not collide with the obstacle, otherwise it is considered to have collided.
[0068] Step 3: Based on the kinematic model and collision detection model, build a deep reinforcement learning model for the six-axis collaborative robot;
[0069] The deep reinforcement learning model consists of a deep neural network and a reinforcement learning algorithm. The deep neural network includes a fully connected network and an activation function. The neural network consists of an input layer, three hidden layers and an output layer. The neural network architecture is shown in Tables 1 and 2. The input of the actor neural network is the state space value s, and the output is the action space value a. The critic neural network is used to evaluate the value of the action value.
[0070] Table 1 Actor neural network architecture
[0071]
[0072] Table 2 Critic neural network architecture
[0073]
[0074]
[0075] The reinforcement learning algorithm selects the DDPG algorithm, and introduces uncorrelated dynamic zero-mean Gaussian noise into the original DDPG algorithm to dynamically control the Gaussian noise variance σ 2 , we can use σ 2 To control the intensity of the agent's exploration: σ 2The smaller the normal distribution shape, the thinner it is, the greater the probability that the output action value is close to a, and more properties are developed; 2 The larger the normal distribution, the "fatter" it is, and the probability that the output action value deviates from a will increase, and the exploration nature will be more. As the learning process and the number of explorations continue to increase, the neural network strategy becomes more and more mature, and the estimation of the optimal action becomes more and more accurate. At this time, the exploration intensity can be reduced to save computing power and time, and the Gaussian noise variance σ can be dynamically controlled. 2 As shown in formula (2).
[0076]
[0077] The learning process is divided into T stages. In the early stage of learning, from 0 to At this stage, a larger value of σ is selected 2 It helps the agent to explore and learn, and increases the probability of obtaining valid samples. As the learning process progresses in multiple stages, the number of samples is gradually guaranteed, and sample data needs to be developed. 2 Gradually reducing can increase the development efforts of the sample, so in Keep constant until T-2 This makes the learning process have a good balance between exploration and development. After T-2 stages, it will not make σ 2 decays to 0 but needs to be maintained (N e is the number of learning rounds), because the completely greedy algorithm based on finite rounds is still a greedy algorithm with local information and there is still a gap from the optimal solution, so it is necessary for the intelligent agent to retain a certain exploration ability.
[0078] In addition, the original DDPG algorithm introduces an important sample playback mechanism, which uses the TD error of sample data as a measure of sample importance and sorts the importance, increasing the probability of extracting and learning the top-ranked data samples. If the difference δ between the current state action value and the target state action value is relatively large, it can be inferred that the importance of this sample data is relatively high, and its learning importance is ranked first. In order to avoid the learning process falling into the local optimum, the samples are extracted according to the corresponding probability of each sample:
[0079]
[0080] in Rank(i) is the ranking of the i-th sample in all samples, arranged from large to small according to the corresponding δ.
[0081] In summary, the improved DDPG algorithm process is shown in Table 3.
[0082] Table 3 Improved DDPG algorithm flow integrating dynamic variance action extraction and key sample playback
[0083]
[0084] Step 4: Design the state space and action space of the deep reinforcement learning model;
[0085] The state space of the deep reinforcement learning model consists of five parts: the three-dimensional coordinates of the six joints of the six-axis collaborative robot and the difference between the target position J i (x, y, z)-(x t ,y t , z t ), the difference between the three-dimensional coordinates of the robot's six joints and the position of the dynamic obstacle J i (x, y, z)-(x o ,y o , z o ), the three-dimensional coordinates of the target position with reference to the robot base coordinate system (x t ,y t , z t ), the three-dimensional coordinates of the dynamic obstacle with reference to the robot base coordinate system (x o ,y o , z o ), whether the robot reaches the target position in_goal, the input state is expressed as follows:
[0086] s={J1(x,y,z)-(x t ,y t , z t ), J2(x, y, z)-(x t ,y t , z t ), J3(x, y, z)-(x t ,y t , z t ),
[0087] J4(x,y,z)-(x t ,y t ,z t ),J5(x,y,z)-(x t ,y t ,z t ),J6(x,y,z)-(x t ,y t ,z t ),
[0088] J1(x,y,z)-(x o ,y o ,z o),J2(x,y,z)-(x o ,y o ,z o ),J3(x,y,z)-(x o ,y o ,z o ),
[0089] J4(x,y,z)-(x o ,y o ,z o ),J5(x,y,z)-(x o ,y o ,z o ),J6(x,y,z)-(x o ,y o ,z o ),
[0090] (x t ,y t ,z t ),(x o ,y o ,z o ),in_goal}(4)
[0091] The action space of the deep reinforcement learning model is designed as a six-dimensional vector based on the characteristics of the path planning task, and the angular velocities of the six joints of the action robot are output as follows:
[0092] a={ω1,ω2,ω3,ω4,ω5,ω6}#(5)
[0093] Step 5: Design the reward function of the deep reinforcement learning model;
[0094] The reward function of the deep reinforcement learning model consists of four parts. The first part is:
[0095] R1=ω t .d g #(6)
[0096] where d g is the Euclidean distance between the target object at its current position and the robot terminal fixture at its current position, which is expressed as follows:
[0097]
[0098] Where (x t ,y t ,z t ) is the coordinate of the target object relative to the robot coordinate system, (x g ,y g ,z g) is the coordinate of the robot’s end fixture. By setting this reward function, the robot fixture can be guided to gradually approach the target position.
[0099] When the distance between each link of the robot and the environmental obstacle is less than a certain safety distance d s When the robot is moving, the obstacle avoidance operation needs to be given priority to ensure that the robot body does not collide with obstacles. To this end, the reward function of the second part needs to be set as follows:
[0100]
[0101] where d i (t) is the distance between the ith link and the center point of the obstacle spherical bounding box at time t, which can be calculated by the collision model between the robot and the environmental obstacle. i (t-1) is the distance between the i-th link and the center point of the obstacle spherical bounding box at time t-1. When the difference between the two is greater than 0, it indicates that the robot link is moving away from the obstacle, and the agent will receive a positive reward. Otherwise, it is inferred that the robot is approaching the obstacle, and the agent will receive a negative reward.
[0102] When the Euclidean distance between the robot end fixture position and the target position reaches a certain threshold d t , it can be shown that the robot terminal fixture has been planned to the target position, and the agent is given a positive maximum reward R g , which is the reward value of the third part. When any link of the robot collides with an obstacle, the agent is given a negative maximum penalty R c , which is the reward value of the fourth part, so the reward function of the robot deep reinforcement learning model is as follows:
[0103]
[0104] where ω g and ω i is the weight of the corresponding reward function.
[0105] Step 6: Optimize the deep reinforcement learning model. After designing the deep reinforcement learning network model, according to the characteristics of the six-axis collaborative robot, design the appropriate state space, action space, and reward function to train the robot's dynamic obstacle avoidance process.
[0106] like Figure 5As shown in the figure, first, the deep reinforcement learning model optimization process builds the CoppeliaSim simulation environment, and the CoppeliaSim simulation environment is initialized for each planning round. Then, the current relevant state in the environment, including the difference between the robot's six joint positions and the target position, the difference between the robot's six joint positions and the obstacle position, the target position, the obstacle position, and the target arrival state value, a total of 5 types of state space values, are input into the deep reinforcement learning network model. The target position and the dynamic real-time position of the obstacle are obtained by the simulation environment. On this basis, the remaining state space values are calculated by the kinematic model and the collision detection model. Then, the action space value is output from the deep reinforcement learning model to drive the robot movement in the simulation environment. The collision detection model is used to determine whether a collision occurs or whether the planning task is completed. If a collision occurs or the number of planning experiments reaches the maximum number of steps, the task is not completed in this round, and the round ends. It is determined that the dynamic obstacle avoidance planning task has failed, and a large negative reward is given and a new round is restarted; if the robot's end fixture is successfully planned to the target position, the task is determined to be executed successfully, otherwise proceed to the next step. Through the continuous interaction between the intelligent agent and the environment, the parameters of the deep reinforcement learning network model are optimized to continuously improve the dynamic obstacle avoidance planning ability of the robot intelligent agent. When the obstacle avoidance planning ability of the intelligent agent converges, the training process stops to avoid overfitting.
[0107] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning, characterized by The steps include: Step 1: Construct a kinematic model of a multi-axis collaborative robot; Step 2: Build a collision detection model between the multi-axis collaborative robot and obstacles; Step 3: Based on the kinematic model and collision detection model, a deep reinforcement learning model of the multi-axis collaborative robot is constructed; the deep reinforcement learning model includes a deep neural network and a reinforcement learning algorithm. The deep neural network includes a participant neural network and a critic neural network. The participant neural network obtains the state value and outputs the action value. The critic neural network is used to evaluate the value of the action value. The reinforcement learning algorithm introduces irrelevant dynamic neighborhood value Gaussian noise, and the exploration intensity of the action value is adjusted by dynamically controlling the Gaussian noise; an importance sample playback mechanism is introduced, and the error size of the sample data is used as a standard to measure the importance of the sample, and the importance is sorted to increase the probability of extracting and learning the top-ranked data samples. If the difference between the current state, action value and the target state, action value is large, then the importance of this sample data is high, and its learning importance is ranked in the front; Step 4: Design the state space and action space of the deep reinforcement learning model; Step 5: Design the reward function of the deep reinforcement learning model; Step 6: Optimize the deep reinforcement learning model.
2. The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning according to claim 1 is characterized in that: In step 1, the robot structure size and the angle of each joint are obtained, and the position and posture of each joint in space are obtained through matrix translation and rotation calculation.
3. The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning according to claim 1 is characterized in that: In the step 2, the robot rod is wrapped by a cylindrical bounding box and simplified into a space line segment, the obstacle is wrapped by a spherical bounding box, and a collision detection model is constructed based on the radius of the cylindrical bounding box and the spherical bounding box.
4. The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning according to claim 3 is characterized in that: The central axis segment of the cylindrical bounding box is L, its endpoints are M1 and M2, and the center of the spherical bounding box is P obs , the radius of the spherical bounding box is r obs , the radius of the cylinder collision model is r, and the collision detection is as follows: like and Then the center of the sphere P is obtained by Heron's formula obs The minimum distance to the central axis segment L is: Where a = |M1-M2|, b = |M1-P obs |,c=|M2-P obs |, t = (a + b + c) / 2; like and Then the center of the sphere P obs The minimum distance d to the central axis segment L = |M1P obs |; like and Then the center of the sphere P obs The minimum distance d to the central axis segment L = |M2P obs |; If drr obs When >0, the robot does not collide with the obstacle, otherwise a collision occurs.
5. The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning according to claim 3 is characterized in that: In step 5, the reward function of the deep reinforcement learning model is as follows: Among them, ω g and ω i is the weight of the corresponding reward function, d g It represents the Euclidean distance between the target object at the current position and the robot terminal fixture at the current position, d s Indicates the safety distance, d i (t) represents the distance between the ith link and the center point of the obstacle spherical bounding box at time t, which is calculated by the robot and environmental obstacle collision model. i (t-1) represents the distance between the i-th link and the center point of the obstacle spherical bounding box at time t-1. When the difference between the two is greater than 0, it indicates that the robot link is moving away from the obstacle, and the agent will receive a positive reward. Otherwise, it is inferred that the robot is approaching the obstacle, and the agent will receive a negative reward. t Indicates the distance threshold, collision indicates collision; ω t .d g The reward function is used to guide the robot gripper to gradually approach the target position; The reward function is used when the distance between each link of the robot and the environmental obstacle is less than the safety distance d s When the obstacle avoidance operation is given priority; R g The Euclidean distance between the robot end fixture position and the target position reaches the threshold d t When , give the agent a positive and large reward; R c It is used to give the agent a negative maximum penalty when any link of the robot collides with an obstacle.
6. The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning according to claim 1, characterized in that: In step 3, by dynamically controlling the Gaussian noise variance σ 2 Controls the intensity of the agent’s exploration: σ 2 The smaller the normal distribution shape, the thinner it is, and the probability that the output action value is close to the target action value becomes greater, which enhances the nature of development; 2 The larger the normal distribution shape, the greater the probability that the output action value deviates from the target action value, which enhances the nature of exploration.
7. The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning according to claim 6 is characterized in that: The dynamically controlled Gaussian noise variance σ 2 The formula is as follows: The learning process is divided into T stages. In the early stage of learning, from 0 to At this stage, we select a large σ 2 As the learning process progresses through multiple stages, σ 2 Gradually reduce and increase the development of samples. Keep constant until T-2 After T-2 stages, let σ 2 Keep N e is the number of learning rounds.
8. The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning according to claim 1, characterized in that: In the reinforcement learning algorithm of step 3, samples are extracted according to the corresponding probabilities of the respective samples: in Rank(i) represents the ranking of the i-th sample in all samples, N represents the number of samples, and they are arranged from large to small according to the corresponding δ.
9. The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning according to claim 1, characterized in that: The robot in step 4 is a six-axis collaborative robot. The state space of the deep reinforcement learning model includes five parts: the three-dimensional coordinates of the six joints of the six-axis collaborative robot and the difference J between the target position i (x,y,z)-(x t ,y t ,z t ), the difference between the three-dimensional coordinates of the robot's six joints and the position of the dynamic obstacle J i (x,y,z)-(x o ,y o ,z o ), the three-dimensional coordinates of the target position with reference to the robot base coordinate system (x t ,y t ,z t ), the three-dimensional coordinates of the dynamic obstacle with reference to the robot base coordinate system (x o ,y o ,z o ), whether the robot reaches the target position in_goal, the input state is expressed as follows: s={J1(x,y,z)-(x t ,y t ,z t ),J2(x,y,z)-(x t ,y t ,z t ),J3(x,y,z)-(x t ,y t ,z t ), J4(x,y,z)-(x t ,y t ,z t ),J5(x,y,z)-(x t ,y t ,z t ),J6(x,y,z)-(x t ,y t ,z t ), J1(x,y,z)-(x o ,y o ,z o ),J2(x,y,z)-(x o ,y o ,z o ),J3(x,y,z)-(x o ,y o ,z o ), J4(x,y,z)-(x o ,y o ,z o ),J5(x,y,z)-(x o ,y o ,z o ),J6(x,y,z)-(x o ,y o ,z o ), (x t ,y t ,z t ),(x o ,y o ,z o ),in_goal} The action space of the deep reinforcement learning model is designed as a six-dimensional vector based on the characteristics of the path planning task, and the angular velocities of the six joints of the action robot are output as follows: a={ω1,ω2,ω3,ω4,ω5,ω6}.
10. The multi-axis collaborative robot dynamic path planning method based on deep reinforcement learning according to claim 1, characterized in that: The specific process of step 6 is as follows: First, a simulation environment is built for the deep reinforcement learning model optimization process, and the simulation environment is initialized for each planning round; Then, the current relevant state in the environment, including the difference between the robot's multiple joint positions and the target position, the difference between the robot's joint positions and the obstacle positions, the target position, the obstacle position, and the target arrival state value, is input into the deep reinforcement learning network model as the state space value. The target position and the dynamic real-time position of the obstacle are obtained from the simulation environment. On this basis, the remaining state space values are calculated by the kinematic model and the collision detection model. Next, the action space value is output from the deep reinforcement learning model to drive the robot movement in the simulation environment. The collision detection model is used to determine whether a collision occurs or whether the planning task is completed. If a collision occurs or the number of planning experiments reaches the maximum number of steps, the task is not completed in this round, and the round ends. The dynamic obstacle avoidance planning task is judged to have failed, a large negative reward is given, and a new round is restarted. If the robot end fixture is successfully planned to the target position, the task is judged to be successfully executed, otherwise proceed to the next step. Through the continuous interaction between the intelligent agent and the environment, the parameters of the deep reinforcement learning network model are optimized. When the obstacle avoidance planning ability of the intelligent agent converges, the training process stops.
Citation Information
Patent Citations
Robot trajectory planning method and device, storage medium and electronic equipment
CN117075617A
Mechanical arm control method and system based on deep reinforcement learning algorithm
CN117140527A
Robot obstacle avoidance path planning method based on deep reinforcement learning
CN117707168A
Learned escape behaviors of a mobile robot
US20220083066A1
Cited By
Overhead line system cantilever maintenance mechanical arm path planning method based on intelligent space division
CN119057789A
Servomotor cylinder inner wall weld joint robot grinding multi-objective optimization method and system based on multi-task reinforcement learning
CN119347749A
A multi-objective optimization method and system for a relay cylinder inner wall welding seam robot based on multi-task reinforcement learning
CN119347749B
Collaborative robot man-machine interaction and anti-collision control method based on admittance
CN119567243A
Intelligent suspension control method combined with deterministic experience tracking, medium and equipment
CN120295144A
