Six-axis robot obstacle avoidance path planning method and system based on adam optimization algorithm
By applying a method based on the Adam optimization algorithm in robot path planning, the problem of robot obstacle avoidance path planning in complex environments is solved, and efficient path planning and reduced collision rate are achieved.
Patent Information
- Application Number
- CN202510051658.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2045-01-14
AI Technical Summary
Existing robot obstacle avoidance path planning methods are difficult to solve in complex environments or lead to path oscillation. The heuristic search method cannot converge for a long time due to too large search space.
Using the six-axis robot obstacle avoidance path planning method based on the adam optimization algorithm, by obtaining the path endpoint, uniformly interpolate the path key points, sampling based on the preset step size and calculating the number of collision voxels, using the adam optimization algorithm to iteratively solve the loss function to obtain Plan the path.
Even in complex environments, the obstacle avoidance effect of robot path planning can be effectively achieved, improving the robot's operating efficiency and reducing the collision rate on the travel path.
Smart Images

Figure CN119458382A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot operation technology, and more specifically, to a six-axis robot obstacle avoidance path planning method and system based on an Adam optimization algorithm. Background Art
[0002] In robotics, many methods have been applied to solve robot kinematics and collaboration problems. Among them, traditional methods include heuristic search-based algorithms and optimization algorithms. In recent years, optimization algorithms based on gradient descent have gradually attracted attention, especially when dealing with complex nonlinear problems.
[0003] During the process, the robot's obstacle avoidance path is particularly important. The current mainstream obstacle avoidance planning scheme is the RRT+APF artificial potential field method and the heuristic space search method, such as the particle swarm algorithm. However, the artificial field potential often faces the problem of being unable to solve for a long time or path oscillation in a complex environment, and the heuristic search method has a too large search space, resulting in a long time of failure to converge. This problem has yet to be solved. Summary of the invention
[0004] The purpose of the present invention is to provide a six-axis robot obstacle avoidance path planning method and system based on the Adam optimization algorithm, which uses the Adam algorithm to perform gradient descent optimization on the running path. Even in the face of complex application environments, the obstacle avoidance effect can be achieved in the robot's path planning, thereby improving the robot's operating efficiency and reducing the collision rate on the travel path.
[0005] A first aspect of the present invention provides a six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm, comprising the following steps: Obtain the path endpoint corresponding to the current six-axis robot, wherein the path endpoint includes a start point joint value and an end point joint value; Uniformly interpolating between the path endpoints to obtain path key points; Sampling is performed based on a preset step size, and the number of collision voxels is obtained by combining the path endpoints and the path key points; The loss function value is obtained based on the number of collision voxels, and the loss function is iteratively solved using the Adam optimization algorithm to obtain the planned path when the loss is zero.
[0006] In this solution, obtaining the path endpoint corresponding to the current six-axis robot specifically includes: The path endpoint is obtained based on the current working coordinate system of the six-axis robot, where: The starting point joint value is obtained based on the current position coordinates of the robot ; The end point joint value is obtained based on the position coordinates of the robot's destination .
[0007] In this solution, uniform interpolation is performed between the path endpoints to obtain the path key points, specifically including: Performing N uniform interpolations between the starting joint value and the end joint value to obtain the path key point, wherein the path key point is the joint value of the robot executing the target instruction; The calculation formula for obtaining N path key points is as follows: ; in, For the The joint values corresponding to the key points of the path, is the interpolation function, is the number of key points on the path.
[0008] In this solution, the interpolation function The calculation expression is as follows: ,in, is the actual calculated parameter value.
[0009] In this solution, the sampling is performed based on a preset step size, and the number of collision voxels is obtained by combining the path endpoints and the path key points, specifically including: Sampling is performed based on the preset step size, and the loss value is obtained based on the number of collision voxels, where the loss value The calculation formula is as follows: ; in, It is expressed as the number of samples taken between every two key path points. Represented as solving joint and joints The joint space distance, It is to find the number of collision voxels in the collision area between the six-axis robot and the environment when the joint value is J. is the key point of the path, is the number of key points on the path.
[0010] In this solution, the method further includes deleting redundant points on the planned path, wherein if the first When the loss is still zero when the path key point is reached, the current The key points of the path are deleted as the redundant points.
[0011] The second aspect of the present invention further provides a six-axis robot obstacle avoidance path planning system based on the Adam optimization algorithm, comprising a memory and a processor, wherein the memory comprises a six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm, and when the six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm is executed by the processor, the following steps are implemented: Obtain the path endpoint corresponding to the current six-axis robot, wherein the path endpoint includes a start point joint value and an end point joint value; Uniformly interpolating between the path endpoints to obtain path key points; Sampling is performed based on a preset step size, and the number of collision voxels is obtained by combining the path endpoints and the path key points; The loss function value is obtained based on the number of collision voxels, and the loss function is iteratively solved using the Adam optimization algorithm to obtain the planned path when the loss is zero.
[0012] In this solution, obtaining the path endpoint corresponding to the current six-axis robot specifically includes: The path endpoint is obtained based on the current working coordinate system of the six-axis robot, where: The starting point joint value is obtained based on the current position coordinates of the robot ; The end point joint value is obtained based on the position coordinates of the robot's destination .
[0013] In this solution, uniform interpolation is performed between the path endpoints to obtain the path key points, specifically including: Performing N uniform interpolations between the starting joint value and the end joint value to obtain the path key point, wherein the path key point is the joint value of the robot executing the target instruction; The calculation formula for obtaining N path key points is as follows: ; in, For the The joint values corresponding to the key points of the path, is the interpolation function, is the number of key points on the path.
[0014] In this solution, the interpolation function The calculation expression is as follows: ,in, is the actual calculated parameter value.
[0015] In this solution, the sampling is performed based on a preset step size, and the number of collision voxels is obtained by combining the path endpoints and the path key points, specifically including: Sampling is performed based on the preset step size, and the loss value is obtained based on the number of collision voxels, where the loss value The calculation formula is as follows: ; in, It is expressed as the number of samples taken between every two key path points. Represented as solving joint and joints The joint space distance, It is to find the number of collision voxels in the collision area between the six-axis robot and the environment when the joint value is J. is the key point of the path, is the number of key points on the path.
[0016] In this solution, the method further includes deleting redundant points on the planned path, wherein if the first When the loss is still zero when the path key point is reached, the current The key points of the path are deleted as the redundant points.
[0017] The third aspect of the present invention provides a computer-readable storage medium, which includes a six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm. When the six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm is executed by a processor, the steps of the six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm as described in any of the above items are implemented.
[0018] The present invention discloses a six-axis robot obstacle avoidance path planning method and system based on the Adam optimization algorithm, which utilizes the Adam algorithm to perform gradient descent optimization on the running path. Even in the face of complex application environments, the obstacle avoidance effect can be achieved in the robot's path planning, thereby improving the robot's operating efficiency and reducing the collision rate on the travel path. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flow chart of a six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm of the present invention is shown; Figure 2 A schematic diagram of solving a planned path in a six-axis robot obstacle avoidance path planning method based on an Adam optimization algorithm of the present invention is shown; Figure 3 A block diagram of a six-axis robot obstacle avoidance path planning system based on the Adam optimization algorithm of the present invention is shown. DETAILED DESCRIPTION
[0020] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0022] Figure 1 A flow chart of a six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm of the present application is shown.
[0023] like Figure 1 As shown, the present application discloses a six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm, comprising the following steps: S102, obtaining the path endpoints corresponding to the current six-axis robot, wherein the path endpoints include the start joint value and the end joint value; S104, performing uniform interpolation between the path endpoints to obtain path key points; S106, performing sampling based on a preset step length, and obtaining the number of collision voxels in combination with the path endpoints and the path key points; S108, obtaining a loss function value based on the number of collision voxels, and using the Adam optimization algorithm to iteratively solve the loss function to obtain a planned path when the loss is zero.
[0024] It should be noted that, in this embodiment, the present application proposes an obstacle avoidance planning algorithm that directly performs gradient descent optimization on the motion path. Even in the face of a complex environment, it can give a suboptimal solution. The Adam optimization algorithm used is a gradient descent algorithm with an adaptive learning rate. Its application research in robot path planning is not yet widespread, but its ability of fast convergence and global search is very suitable for dealing with complex obstacle avoidance problems.
[0025] Furthermore, a collision-free path is calculated by solving the given starting joint value and the ending joint value. The core is to perform N uniform interpolation points between the starting joint value and the ending joint value as the path key points. The obtained path key points are the joint values of the robot executing the target instructions. The target instructions include PTP instructions, where PTP (Precision Time Protocol) is a network protocol designed to provide high-precision time synchronization. A path consists of multiple PTP instructions and is sampled at a certain step size. The total number of voxels collided by the robot in the process of reaching the end point from the starting point through the path is used as the loss function value, and the loss function is solved using the adam optimization algorithm. When the loss value is equal to 0, it is considered that the function has been solved. Even if the maximum number of iterations is reached, a path with as few collisions as possible can be found as the planned path. Accordingly, the number of collisions on the planned path is the least.
[0026] Specifically, in the actual operation process, the path endpoints corresponding to the current six-axis robot are first obtained, wherein the path endpoints include the starting joint values and the ending joint values, so as to uniformly interpolate between the path endpoints to obtain the path key points, and then sampling is performed based on the preset step size, and the number of collision voxels is obtained in combination with the path endpoints and the path key points. After obtaining the number of collision voxels, the loss function value can be obtained based on the number of collision voxels, and the loss function is iteratively solved using the Adam optimization algorithm to obtain the planned path when the loss is zero. The specific steps will be described in detail in the subsequent instructions.
[0027] According to an embodiment of the present invention, obtaining the path endpoint corresponding to the current six-axis robot specifically includes: The path endpoint is obtained based on the current working coordinate system of the six-axis robot, where: The starting point joint value is obtained based on the current position coordinates of the robot ; The end point joint value is obtained based on the position coordinates of the robot's destination .
[0028] It should be noted that, in this embodiment, how to obtain the path endpoint is specifically described, wherein the path endpoint includes a starting point and an end point, which correspond to the starting point joint value and the end point joint value on the robot. Specifically, the path endpoint is obtained based on the working coordinate system where the current six-axis robot is located, wherein the working coordinate system is the spatial coordinate system in the current robot working environment, so that the starting point joint value is obtained based on the current position coordinates of the robot. , and obtain the end point joint value based on the position coordinates of the robot's destination .
[0029] According to an embodiment of the present invention, uniformly interpolating between the path endpoints to obtain path key points specifically includes: Performing N uniform interpolations between the starting joint value and the end joint value to obtain the path key point, wherein the path key point is the joint value of the robot executing the PTP instruction; The calculation formula for obtaining N path key points is as follows: ; in, For the The joint values corresponding to the key points of the path, is the interpolation function, is the number of key points on the path.
[0030] It should be noted that, in this embodiment, how to obtain the path key points is specifically described, wherein N uniform interpolations are performed between the starting joint value and the end joint value to obtain the path key points. Accordingly, the obtained path key points are the joint values of the robot executing the PTP instruction. A path is composed of multiple PTP instructions, so that the final planned path can be obtained by selecting at different path key points. Specifically, the calculation formula for obtaining the N path key points is as follows: ;in, For the The joint values corresponding to the key points of the path, is the interpolation function, is the number of key points on the path. The above calculation can obtain the joint values corresponding to different key points on the path, so as to facilitate the subsequent solution of the spatial distance between two joints.
[0031] According to an embodiment of the present invention, the interpolation function The calculation expression is as follows: ,in, is the actual calculated parameter value.
[0032] It should be noted that in this embodiment, the Lerp interpolation function is a common function in Unity, which is used to perform linear interpolation between two values. Its function is to interpolate between two values and return a value between the two values. The full name of the Lerp function is Linear Interpolation, that is, linear interpolation. The specific expression is ,in, In order to actually calculate the parameter value, since it is used as an application in this embodiment, the specific process of the interpolation function will not be described in detail here.
[0033] According to an embodiment of the present invention, the sampling based on the preset step size and obtaining the number of collision voxels in combination with the path endpoints and the path key points specifically include: Sampling is performed based on the preset step size, and the loss value is obtained based on the number of collision voxels, where the loss value The calculation formula is as follows: ; in, It is expressed as the number of samples taken between every two key path points. Represented as solving joint and joints The joint space distance, It is to find the number of collision voxels in the collision area between the six-axis robot and the environment when the joint value is J. is the key point of the path, is the number of key points on the path.
[0034] It should be noted that in this embodiment, the preset step size is a fixed step size, usually "0.2". When applied, sampling is first performed based on the preset step size, and the number of voxels collided in each sampling is calculated to obtain the loss value of the current path, where the loss value The calculation formula is as follows: ,in, It is expressed as the number of samples taken between every two key path points. Represented as solving joint and joints The joint space distance, The number of collision voxels in the collision area between the six-axis robot and the environment is calculated. In this embodiment, the voxel accuracy is "5mm". is the key point of the path, is the number of key points on the path. In addition, the collision detection algorithm and the collision voxel number solving algorithm are also applied in this embodiment, so the specific application process is not described in detail.
[0035] Furthermore, when applied, the input feature is the joint value of N key points, that is, N*6-dimensional vector, and the loss value of the loss function is The Adam optimization algorithm is used to numerically solve the function gradient for gradient descent. It converges when the loss is equal to "0", and the final planning path is obtained. In the actual calculation process, there is a situation where the loss is not equal to zero. At this time, when the maximum number of iterations is reached, the corresponding planning path is also solved. Correspondingly, the number of collisions on the planned path is still the least.
[0036] According to an embodiment of the present invention, the method further comprises deleting redundant points on the planned path, wherein if the first When the loss is still zero when the path key point is reached, the current The key points of the path are deleted as the redundant points.
[0037] It should be noted that, in this embodiment, reference Figure 2 , which is a schematic diagram of using the adam optimizer (optimization algorithm) to solve the planned path, wherein the robot is first initialized, specifically including initializing the feature vector and the environment voxel, and then the adam optimizer is used to update until the loss is equal to zero, or the gradient is equal to zero, or the number of iterations reaches the upper limit, and the optimization is terminated, and the redundant points on the current planned path are deleted to complete the solution to obtain the final planned path. Specifically, the specific judgment process for deleting the redundant points on the planned path is: if the first When the loss is still zero when the path key point is reached, the current The key points of the path are deleted as the redundant points, which does not affect the path optimization and can also reduce unnecessary travel.
[0038] Figure 3 A block diagram of a six-axis robot obstacle avoidance path planning system based on the Adam optimization algorithm of the present invention is shown.
[0039] like Figure 3 As shown, the present invention discloses a six-axis robot obstacle avoidance path planning system based on the Adam optimization algorithm, including a memory and a processor, wherein the memory includes a six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm, and when the six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm is executed by the processor, the following steps are implemented: Obtain the path endpoint corresponding to the current six-axis robot, wherein the path endpoint includes a start point joint value and an end point joint value; Uniformly interpolating between the path endpoints to obtain path key points; Sampling is performed based on a preset step size, and the number of collision voxels is obtained by combining the path endpoints and the path key points; The loss function value is obtained based on the number of collision voxels, and the loss function is iteratively solved using the Adam optimization algorithm to obtain the planned path when the loss is zero.
[0040] It should be noted that, in this embodiment, the present application proposes an obstacle avoidance planning algorithm that directly performs gradient descent optimization on the motion path. Even in the face of a complex environment, it can give a suboptimal solution. The Adam optimization algorithm used is a gradient descent algorithm with an adaptive learning rate. Its application research in robot path planning is not yet widespread, but its ability of fast convergence and global search is very suitable for dealing with complex obstacle avoidance problems.
[0041] Furthermore, a collision-free path is calculated by solving the given starting joint value and the ending joint value. The core is to perform N uniform interpolation points between the starting joint value and the ending joint value as the path key points. The obtained path key points are the joint values of the robot executing the PTP instruction. A path is composed of multiple PTP instructions and is sampled at a certain step size. The total number of voxels collided by the robot in the process of reaching the end point from the starting point through the path is taken as the loss function value, and the loss function is solved using the adam optimization algorithm. When the loss value is equal to 0, it is considered that the function has been solved. Even if the maximum number of iterations is reached, a path with as few collisions as possible can be found as the planned path. Accordingly, the number of collisions on the planned path is the least.
[0042] Specifically, in the actual operation process, the path endpoints corresponding to the current six-axis robot are first obtained, wherein the path endpoints include the starting joint values and the ending joint values, so as to uniformly interpolate between the path endpoints to obtain the path key points, and then sampling is performed based on the preset step size, and the number of collision voxels is obtained in combination with the path endpoints and the path key points. After obtaining the number of collision voxels, the loss function value can be obtained based on the number of collision voxels, and the loss function is iteratively solved using the Adam optimization algorithm to obtain the planned path when the loss is zero. The specific steps will be described in detail in the subsequent instructions.
[0043] According to an embodiment of the present invention, obtaining the path endpoint corresponding to the current six-axis robot specifically includes: The path endpoint is obtained based on the current working coordinate system of the six-axis robot, where: The starting point joint value is obtained based on the current position coordinates of the robot ; The end point joint value is obtained based on the position coordinates of the robot's destination .
[0044] It should be noted that, in this embodiment, how to obtain the path endpoint is specifically described, wherein the path endpoint includes a starting point and an end point, which correspond to the starting point joint value and the end point joint value on the robot. Specifically, the path endpoint is obtained based on the working coordinate system where the current six-axis robot is located, wherein the working coordinate system is the spatial coordinate system in the current robot working environment, so that the starting point joint value is obtained based on the current position coordinates of the robot. , and obtain the end point joint value based on the position coordinates of the robot's destination .
[0045] According to an embodiment of the present invention, uniformly interpolating between the path endpoints to obtain path key points specifically includes: Performing N uniform interpolations between the starting joint value and the end joint value to obtain the path key point, wherein the path key point is the joint value of the robot executing the PTP instruction; The calculation formula for obtaining N path key points is as follows: ; in, For the The joint values corresponding to the key points of the path, is the interpolation function, is the number of key points on the path.
[0046] It should be noted that, in this embodiment, how to obtain the path key points is specifically described, wherein N uniform interpolations are performed between the starting joint value and the end joint value to obtain the path key points. Accordingly, the obtained path key points are the joint values of the robot executing the PTP instruction. A path is composed of multiple PTP instructions, so that the final planned path can be obtained by selecting at different path key points. Specifically, the calculation formula for obtaining the N path key points is as follows: ;in, For the The joint values corresponding to the key points of the path, is the interpolation function, is the number of key points on the path. The above calculation can obtain the joint values corresponding to different key points on the path, so as to facilitate the subsequent solution of the spatial distance between two joints.
[0047] According to an embodiment of the present invention, the interpolation function The calculation expression is as follows: ,in, is the actual calculated parameter value.
[0048] It should be noted that in this embodiment, the Lerp interpolation function is a common function in Unity, which is used to perform linear interpolation between two values. Its function is to interpolate between two values and return a value between the two values. The full name of the Lerp function is Linear Interpolation, that is, linear interpolation. The specific expression is ,in, In order to actually calculate the parameter value, since it is used as an application in this embodiment, the specific process of the interpolation function will not be described in detail here.
[0049] According to an embodiment of the present invention, the sampling based on the preset step size and obtaining the number of collision voxels in combination with the path endpoints and the path key points specifically include: Sampling is performed based on the preset step size, and the loss value is obtained based on the number of collision voxels, where the loss value The calculation formula is as follows: ; in, It is expressed as the number of samples taken between every two key path points. Represented as solving joint and joints The joint space distance, It is to find the number of collision voxels in the collision area between the six-axis robot and the environment when the joint value is J. is the key point of the path, is the number of key points on the path.
[0050] It should be noted that in this embodiment, the preset step size is a fixed step size, usually "0.2". When applied, sampling is first performed based on the preset step size, and the number of voxels collided in each sampling is calculated to obtain the loss value of the current path, where the loss value The calculation formula is as follows: ,in, It is expressed as the number of samples taken between every two key path points. Represented as solving joint and joints The joint space distance, The number of collision voxels in the collision area between the six-axis robot and the environment is calculated. In this embodiment, the voxel accuracy is "5mm". is the key point of the path, is the number of key points on the path. In addition, the collision detection algorithm and the collision voxel number solving algorithm are also applied in this embodiment, so the specific application process is not described in detail.
[0051] Furthermore, when applied, the input feature is the joint value of N key points, that is, N*6-dimensional vector, and the loss value of the loss function is The Adam optimization algorithm is used to numerically solve the function gradient for gradient descent. It converges when the loss is equal to "0", and the final planning path is obtained. In the actual calculation process, there is a situation where the loss is not equal to zero. At this time, when the maximum number of iterations is reached, the corresponding planning path is also solved. Correspondingly, the number of collisions on the planned path is still the least.
[0052] According to an embodiment of the present invention, the method further comprises deleting redundant points on the planned path, wherein if the first When the loss is still zero when the path key point is reached, the current The key points of the path are deleted as the redundant points.
[0053] It should be noted that, in this embodiment, reference Figure 2 , which is a schematic diagram of using the adam optimizer (optimization algorithm) to solve the planned path, wherein the robot is first initialized, specifically including initializing the feature vector and the environment voxel, and then the adam optimizer is used to update until the loss is equal to zero, or the gradient is equal to zero, or the number of iterations reaches the upper limit, and the optimization is terminated, and the redundant points on the current planned path are deleted to complete the solution to obtain the final planned path. Specifically, the specific judgment process for deleting the redundant points on the planned path is: if the first When the loss is still zero when the path key point is reached, the current The key points of the path are deleted as the redundant points, which does not affect the path optimization and can also reduce unnecessary travel.
[0054] The third aspect of the present invention provides a computer-readable storage medium, which includes a six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm. When the six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm is executed by a processor, the steps of the six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm as described in any of the above items are implemented.
[0055] The present invention discloses a six-axis robot obstacle avoidance path planning method and system based on the Adam optimization algorithm, which utilizes the Adam algorithm to perform gradient descent optimization on the running path. Even in the face of complex application environments, the obstacle avoidance effect can be achieved in the robot's path planning, thereby improving the robot's operating efficiency and reducing the collision rate on the travel path.
[0056] In the several 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0057] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; 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 present embodiment.
[0058] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0059] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0060] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm, characterized in that: The following steps are involved: Obtain the path endpoint corresponding to the current six-axis robot, wherein the path endpoint includes a start point joint value and an end point joint value; Uniformly interpolating between the path endpoints to obtain path key points; Sampling is performed based on a preset step size, and the number of collision voxels is obtained by combining the path endpoints and the path key points; The loss function value is obtained based on the number of collision voxels, and the loss function is iteratively solved using the Adam optimization algorithm to obtain the planned path when the loss is zero.
2. According to claim 1, a six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm is characterized in that: The step of obtaining the path endpoint corresponding to the current six-axis robot specifically includes: The path endpoint is obtained based on the current working coordinate system of the six-axis robot, where: The starting point joint value is obtained based on the current position coordinates of the robot ; The end point joint value is obtained based on the position coordinates of the robot's destination .
3. The six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm according to claim 2 is characterized in that: The uniform interpolation between the path endpoints to obtain the path key points specifically includes: Performing N uniform interpolations between the starting joint value and the end joint value to obtain the path key point, wherein the path key point is the joint value of the robot executing the target instruction; The calculation formula for obtaining N path key points is as follows: ; in, For the The joint values corresponding to the key points of the path, is the interpolation function, is the number of key points on the path.
4. The six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm according to claim 3 is characterized in that: The interpolation function The calculation expression is as follows: ,in, is the actual calculated parameter value.
5. The six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm according to claim 4 is characterized in that: The sampling based on the preset step size and obtaining the number of collision voxels in combination with the path endpoints and the path key points specifically include: Sampling is performed based on the preset step size, and the loss value is obtained based on the number of collision voxels, where the loss value The calculation formula is as follows: ; in, It is expressed as the number of samples taken between every two key path points. Represented as solving joint and joints The joint space distance, It is to find the number of collision voxels in the collision area between the six-axis robot and the environment when the joint value is J. is the key point of the path, is the number of key points on the path.
6. The six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm according to claim 5 is characterized in that: The method includes deleting redundant points on the planned path, wherein if the first When the loss is still zero when the path key point is reached, the current The key points of the path are deleted as the redundant points.
7. A six-axis robot obstacle avoidance path planning system based on the Adam optimization algorithm, characterized in that: The invention comprises a memory and a processor, wherein the memory comprises a six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm, and the six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm is executed by the processor to implement the following steps: Obtain the path endpoint corresponding to the current six-axis robot, wherein the path endpoint includes a start point joint value and an end point joint value; Uniformly interpolating between the path endpoints to obtain path key points; Sampling is performed based on a preset step size, and the number of collision voxels is obtained by combining the path endpoints and the path key points; The loss function value is obtained based on the number of collision voxels, and the loss function is iteratively solved using the Adam optimization algorithm to obtain the planned path when the loss is zero.
8. The six-axis robot obstacle avoidance path planning system based on the Adam optimization algorithm according to claim 7 is characterized in that: The step of obtaining the path endpoint corresponding to the current six-axis robot specifically includes: The path endpoint is obtained based on the current working coordinate system of the six-axis robot, where: The starting point joint value is obtained based on the current position coordinates of the robot ; The end point joint value is obtained based on the position coordinates of the robot's destination .
9. The six-axis robot obstacle avoidance path planning system based on the Adam optimization algorithm according to claim 8, characterized in that: The uniform interpolation between the path endpoints to obtain the path key points specifically includes: Performing N uniform interpolations between the starting joint value and the end joint value to obtain the path key point, wherein the path key point is the joint value of the robot executing the target instruction; The calculation formula for obtaining N path key points is as follows: ; in, For the The joint values corresponding to the key points of the path, is the interpolation function, is the number of key points on the path.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm. When the six-axis robot obstacle avoidance path planning method program based on the Adam optimization algorithm is executed by the processor, the steps of the six-axis robot obstacle avoidance path planning method based on the Adam optimization algorithm as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Curvature-continuous path planning method, system and equipment
CN112904858A
Blood bank mechanical arm collision-free path planning method based on neural network
CN117067220A
Mechanical arm path planning method based on improved fast expansion random tree
CN117182902A
Mechanical arm obstacle avoidance path planning method and system and medium
CN118578403A
Mobile robot fusion path planning method based on Voronoi skeleton
CN118915716A