Robot path generation method, nonvolatile readable storage medium and robot

By setting the value of the product in the cost map and performing path adjustment and sparse processing, the problem of path close to obstacles in the prior art is solved, and the safety and global shortening effect of paths are improved.

CN119937533AActive Publication Date: 2025-05-06GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202311407334.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-05-06
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

When the existing robot path planning algorithm optimizes the path length, it is easy to cause the path to be too close to the obstacles, increasing navigation risks, and making it difficult to achieve the global optimal path shortening effect.

Method used

By setting the value of the product in the cost map, the original path is generated according to the preset path planning algorithm, and the safe and final paths are obtained through adjustment and sparse processing to ensure the safety and shortening effect of the path.

Benefits of technology

It improves the safety and global shortening effect of paths, ensures the safe distance between paths and obstacles, and achieves effective shortening of path length.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119937533A_ABST
    Figure CN119937533A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of robots, and discloses a robot path generation method, a nonvolatile readable storage medium and a robot. The method comprises the steps of generating an original path according to a preset path planning algorithm and a preset cost map, adjusting the original path to obtain a safe path, performing sparse processing on the safe path to obtain a sparse path, and generating a final path according to the sparse path and the preset path planning algorithm. According to the embodiment, adjustment is carried out on the basis of the pre-planned original path to obtain the safe path with the cost sum smaller than or equal to the cost sum of the original path, so that the safety of the path can be improved. In addition, based on the security path, the embodiment of the invention performs sparse processing on the security path on the whole, so that the path can be shortened globally, and the path shortening effect is improved. And finally, path planning is carried out based on the existing path points of the sparse path in combination with a preset path planning algorithm, so that the path planning effect can be improved again.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot technology, and in particular to a robot path generation method, a non-volatile readable storage medium and a robot. Background Art

[0002] The robot provided by the related technology can perform path planning based on a graph search algorithm and in combination with a cost map to obtain the shortest path. However, the related technology mainly focuses on shortening the path length. The planned shortest path is close to obstacles, and the cost value of the path is relatively high, which easily increases the navigation risk of the robot. Summary of the invention

[0003] One purpose of the embodiments of the present application is to provide a robot path generation method, a non-volatile readable storage medium and a robot, aiming to solve the technical problem that the paths of related technologies are insufficient in security.

[0004] In a first aspect, an embodiment of the present application provides a path generation method for a robot, comprising:

[0005] Generate an original path according to a preset path planning algorithm and a preset cost map, wherein in the cost map, the cost value of a location farther from an obstacle is smaller, and the cost value of a location closer to an obstacle is larger;

[0006] Adjusting the original path to obtain a safe path, wherein the sum of costs of the safe path is less than or equal to the sum of costs of the original path;

[0007] Performing sparse processing on the security path to obtain a sparse path;

[0008] A final path is generated according to the sparse path and a preset path planning algorithm.

[0009] Optionally, the original path includes a first path point, a last path point, and a plurality of intermediate path points between the first path point and the last path point, and adjusting the original path to obtain a safe path includes:

[0010] Determine a candidate line segment according to the original path, wherein the candidate line segment is defined by at least two of the intermediate path points;

[0011] Determine a candidate path point with a minimum cost value according to the candidate line segment;

[0012] A safe path is generated according to the first path point, a plurality of the candidate path points and the terminal path point.

[0013] Optionally, determining a candidate line segment according to the original path includes:

[0014] Determine a first intermediate path point and a second intermediate path point in sequence on the original path, wherein there is at least one intermediate path point between the first intermediate path point and the second intermediate path point;

[0015] A candidate line segment is determined based on the first intermediate path point and the second intermediate path point.

[0016] Optionally, determining the candidate path point with the minimum cost value according to the candidate line segment includes:

[0017] Sampling a plurality of sampling path points on the candidate line segment;

[0018] The sampled path point with the minimum cost value is determined as the candidate path point.

[0019] Optionally, the performing sparse processing on the security path to obtain a sparse path includes:

[0020] Determine, according to the safe path, a pair of path points that meet the farthest visibility condition as a pair of target path points;

[0021] On the safe path, the path points between each pair of target path points are removed to obtain a sparse path.

[0022] Optionally, determining, according to the safe path, a pair of path points that meet the farthest visibility condition as a pair of target path points includes:

[0023] Selecting one path point in sequence on the safe path as a first visible path point;

[0024] According to the arrangement order of each path point in the safe path, the second visible path point is traversed in sequence, the line connecting the second visible path point and the first path point does not pass through the obstacle area, and the distance from the second visible path point to the first path point is the longest among the distances from the remaining path points in the safe path to the first path point, and the first visible path point and the second visible path point are a pair of target path points.

[0025] Optionally, traversing the second visible path points in order according to the arrangement order of the path points in the safe path comprises:

[0026] Selecting a path point in sequence after the first visible path point as a reference path point;

[0027] Determining whether a line connecting the first visible path point and the reference path point passes through an obstacle area;

[0028] If not, then select another path point in sequence after the reference path point as a new reference path point;

[0029] If so, a path point before the reference path point is determined to be a second visible path point.

[0030] Optionally, generating a final path according to the sparse path and a preset path planning algorithm includes:

[0031] Constructing a road network according to the sparse path, the road network includes node information and margin information, the node information includes each node of the sparse path, and the margin information includes the distance between any two nodes;

[0032] A shortest path is generated according to the node information, the margin information and a preset path planning algorithm, and the shortest path is the final path.

[0033] In a second aspect, an embodiment of the present application provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores computer executable instructions, and the computer executable instructions are used to enable a robot to execute the above-mentioned robot path generation method.

[0034] In a third aspect, an embodiment of the present application provides a robot, comprising:

[0035] at least one processor; and,

[0036] a memory communicatively connected to the at least one processor; wherein,

[0037] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned robot path generation method.

[0038] In the path generation method of the robot provided in the embodiment of the present application, the original path is generated according to the preset path planning algorithm and the preset cost map, wherein, in the cost map, the cost value of the position farther from the obstacle is smaller, and the cost value of the position closer to the obstacle is larger, the original path is adjusted to obtain a safe path, the sum of the costs of the safe path is less than or equal to the sum of the costs of the original path, the safe path is thinned to obtain a sparse path, and the final path is generated according to the sparse path and the preset path planning algorithm. This embodiment makes adjustments based on the pre-planned original path to obtain a safe path with a sum of costs less than or equal to the sum of the costs of the original path, so that the safety of the path can be improved. In addition, this embodiment performs a thinning process on the safe path as a whole based on the safe path, and the result of the thinning process is to remove the relevant path points to further shorten the path length, thereby being able to globally shorten the path and improve the path shortening effect. Finally, this embodiment performs path planning based on the existing path points of the sparse path in combination with the preset path planning algorithm, so that the path planning effect can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0040] Figure 1 A schematic diagram of a flow chart of a method for generating a path for a robot provided in an embodiment of the present application;

[0041] Figure 2 A schematic diagram of generating a secure path provided in an embodiment of the present application;

[0042] Figure 3 A schematic diagram of generating a sparse path provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of the structure of a path generating device for a robot provided in an embodiment of the present application;

[0044] Figure 5 A schematic diagram of the circuit structure of a robot provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0046] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0047] In the process of implementing this application, the applicant found that the related technology has the deficiencies pointed out in the background technology, and also found that the related technology has at least the following problems. It can be understood that the related technology is the technology discovered by the inventor in the process of implementing this disclosure or in the process of research and development, and the public cannot obtain this technology through reasonable means. Therefore, the related technology does not represent the prior art. The related technology also has at least the following problems: the related technology can perform path post-processing on the shortest path obtained based on the graph search path planning algorithm to further optimize the shortest path, wherein the shortest path includes multiple path points. In a related technology, in order to further shorten the path, the related technology randomly selects three path points in the shortest path, and the three path points are path point pi-1, path point pi and path point pi+1. If there is no obstacle between path point pi-1 and path point pi+1, the related technology removes path point pi, and so on, until all path points of the shortest path are traversed. The path post-processing method provided by the related technology can only obtain the locally optimal path shortening effect, and it is difficult to obtain the globally optimal path shortening effect.

[0048] The embodiment of the present application can not only achieve the purpose of making the final planned path safer, but also can globally shorten the path length again. For example, the embodiment of the present application is based on the safe path, and the safe path is thinned out as a whole. The result of the thinning process is to remove related path points to further shorten the path length, thereby globally shortening the path and improving the path shortening effect. Finally, the present embodiment performs path planning based on the existing path points of the sparse path in combination with the graph search path planning algorithm, so that the path length can be globally shortened again.

[0049] The present application embodiment provides a method for generating a path for a robot. Figure 1 ,The path generation method of the robot includes the following steps:

[0050] S11: Generate an original path according to a preset path planning algorithm and a preset cost map.

[0051] In this step, the cost map is a map that adds navigation auxiliary information to the original map to facilitate the robot's path planning and navigation. The original map is a map generated by the robot according to the preset map construction algorithm. Among them, the cost map is a rasterized map, and the cost map is configured with cost values ​​corresponding to each grid. In the cost map, the farther the location from the obstacle, the smaller the cost value, and the closer the location to the obstacle, the larger the cost value. The cost value can be customized by the designer based on engineering experience, such as the cost value is 0 / 1 / 254 / 255, etc.

[0052] The preset path planning algorithm includes a graph search path planning algorithm, and the graph search path planning algorithm includes an A* algorithm, a Dijkstra algorithm, etc. In this embodiment, a path is planned on a preset cost map according to the preset path planning algorithm, thereby obtaining an original path.

[0053] S12: Adjust the original path to obtain a safe path, where the total cost of the safe path is less than or equal to the total cost of the original path.

[0054] In this step, the total cost of the safe path is the sum of the cost values ​​of each path point on the safe path, and the total cost of the original path is the sum of the cost values ​​of each path point on the original path. Since the total cost of the safe path is less than or equal to the total cost of the original path, the safety of the safe path will be higher than the safety of the original path. In general, this embodiment makes adjustments based on the pre-planned original path to obtain a safe path with a total cost less than or equal to the total cost of the original path, which can improve the safety of the path.

[0055] S13: Perform sparse processing on the safe path to obtain a sparse path.

[0056] In this step, the thinning process is an operation of removing relevant path points in the safe path. The number of path points in the sparse path is less than the number of path points in the safe path, which also means that when the path points are connected in sequence to generate a path, the path length of the sparse path will be shorter than the path length of the safe path. Based on the safe path, this embodiment performs a thinning process on the safe path as a whole. The result of the thinning process is to remove relevant path points to further shorten the path length, thereby being able to globally shorten the path and improve the path shortening effect.

[0057] S14: Generate a final path according to the sparse path and the preset path planning algorithm.

[0058] In this step, generating the final path according to the sparse path and the preset path planning algorithm includes: generating the shortest path according to the sparse path and the preset path planning algorithm, and the shortest path is the final path. When generating the shortest path, the related technology uses the starting point and the target point, combined with the A* algorithm or the Dijkstra algorithm to search for the shortest path on the cost map. However, this embodiment is based on the existing path points of the sparse path, combined with the preset path planning algorithm for path planning. In other words, the path points of the sparse path are deterministic and need to be processed. This embodiment plans the shortest path based on the existing path points of the sparse path. This method has a higher planning efficiency and is conducive to further improving the path planning effect.

[0059] In some embodiments, the original path includes a starting path point, an ending path point, and multiple intermediate path points between the starting path point and the ending path point. Adjusting the original path to obtain a safe path includes the following steps: determining a candidate line segment based on the original path, the candidate line segment being defined by at least two intermediate path points, determining a candidate path point with a minimum cost based on the candidate line segment, and generating a safe path based on the starting path point, multiple candidate path points, and the ending path point.

[0060] For example, the path point set P of the original path = {p0, p1, p2, ..., p i ,...,p m-2 ,p m-1}, where p0 is the first path point, p m-1 is the end path point, p i is the i-th intermediate path point. The first path point is the first path point of the original path, and the last path point is the last path point of the original path. i The position can be expressed as p i (x i ,y i ), i is greater than or equal to 2.

[0061] In this embodiment, multiple candidate line segments can be determined according to the original path. The candidate line segments can be expressed as l i-1·i+1 , where the multiple candidate line segments are l 1·3 , l 2·4 , l 3·5 , l 4·6 ……. Candidate line segment l 0·2 The candidate path point with the minimum cost is p'1, ​​and the candidate line segment l 1·3 The corresponding candidate path point with the minimum cost value is p'2, and so on, multiple candidate path points can be obtained. The first path point, multiple candidate path points and the terminal path point can form a safe path.

[0062] Based on the original path, this embodiment can traverse the candidate path points with the minimum cost value corresponding to each candidate line segment segment by segment, so as to generate a safe path with a total cost less than or equal to the total cost of the original path without excessively deforming the original path.

[0063] In some embodiments, determining a candidate line segment based on the original path includes: sequentially determining a first intermediate path point and a second intermediate path point on the original path, there being at least one intermediate path point between the first intermediate path point and the second intermediate path point, and determining the candidate line segment based on the first intermediate path point and the second intermediate path point, that is, the two endpoints of the candidate line segment are the first intermediate path point and the second intermediate path point, respectively.

[0064] For example, this embodiment takes the first intermediate path point p1 as the first intermediate path point, the third intermediate path point p3 as the second intermediate path point, and the first intermediate path point p1 and the second intermediate path point p3 are separated by the intermediate path point p2. This embodiment passes through the first intermediate path point p1 and the second intermediate path point p3 to obtain the candidate line segment l 1·3 , this embodiment determines the candidate line segment l 1·3 The candidate path point with the minimum cost value is obtained. After that, the second intermediate path point p2 is used as the first intermediate path point, and the fourth intermediate path point p4 is used as the second intermediate path point. The first intermediate path point p2 and the second intermediate path point p4 are separated by the intermediate path point p3. The candidate line segment l is obtained by performing the first intermediate path point p2 and the second intermediate path point p4. 2·4 , this embodiment further determines the candidate line segment l 2·4 The corresponding candidate path points with the minimum cost value, and so on, are not described here.

[0065] In some embodiments, determining a candidate path point with a minimum cost value based on a candidate line segment includes the following steps: sampling a plurality of sampled path points on the candidate line segment, and determining the sampled path point with a minimum cost value as a candidate path point.

[0066] The sampling method for sampling multiple sampling path points may be a uniform sampling method or a random sampling method, and the sampling path points are path points obtained by sampling on the candidate line segments.

[0067] Sampling a plurality of sampling path points on the candidate line segment includes: taking the path point corresponding to the first end or the second end of the candidate line segment as a starting point, and sampling a preset number of candidate path points along the direction of the candidate line segment according to a preset sampling step length.

[0068] Determining the sampling path point with the minimum cost value as the candidate path point includes: screening out the sampling path point with the minimum cost value from multiple sampling path points, and the sampling path point with the minimum cost value is the candidate path point.

[0069] See also Figure 2 , the path point set P of the original path l0 is P = {p0, p1, p2, p3, p4, p5, p6, p7}. In this embodiment, the first path point p0 is first added to the path point set P' = {p0} of the safe path. In this embodiment, the candidate line segment l is determined based on the intermediate path points p1 and p3. 1·3 , determine the candidate line segment l based on the intermediate path point p2 and the intermediate path point p4 2·4 , determine the candidate line segment l based on the intermediate path point p3 and the intermediate path point p5 3·5 , determine the candidate line segment l based on the intermediate path point p4 and the intermediate path point p6 4·6 , candidate line segment l 1·3The candidate path point with the minimum cost is p'1, ​​and the candidate line segment l 2·4 The candidate path point with the minimum cost is p'2, and the candidate line segment l 3·5 The candidate path point with the minimum cost is p'3, and the candidate line segment l 4·6 The corresponding candidate path point with the minimum cost value is p'4.

[0070] This embodiment puts candidate path point p'1, ​​candidate path point p'2, candidate path point p'3, candidate path point p'4 and terminal path point p7 into the path point set of the safe path, and obtains the path point set P'={p0,p'1,p'2,p'3,p'4,p7} of the safe path l1.

[0071] This embodiment can sample multiple path points on the candidate line segment to determine the path point with the minimum cost value as the candidate path point, so that a safer path with higher security can be found reliably and accurately.

[0072] In some embodiments, the safe path is thinned to obtain a sparse path, including the following steps: according to the safe path, a pair of path points that meet the farthest visible condition are determined as a pair of target path points, and the path points between each pair of target path points are removed on the safe path to obtain a sparse path. This embodiment can downsample the safe path according to the farthest visible condition, so that relevant path points in the safe path can be removed, which is conducive to ensuring that the safe path can be thinned and the loss of some path points related to the obstacle area due to sparseness can be avoided, which is conducive to maintaining the safety of the thinned safe path.

[0073] In some embodiments, determining a pair of path points that meet the farthest visibility condition based on the safe path as a pair of target path points includes: selecting a path point on the safe path in sequence as a first visible path point, traversing the second visible path point in sequence according to the arrangement order of the path points in the safe path, the line connecting the second visible path point and the first path point does not pass through the obstacle area, and the distance from the second visible path point to the first path point is the longest among the distances from the remaining path points in the safe path to the first path point, and the first visible path point and the second visible path point are a pair of target path points.

[0074] In some embodiments, according to the arrangement order of each path point in the safe path, traversing the second visible path point in sequence includes: selecting a path point in sequence after the first visible path point as a reference path point, determining whether the line connecting the first visible path point and the reference path point passes through an obstacle area, if not, selecting another path point in sequence after the reference path point as a new reference path point, returning to the step of determining whether the line connecting the first visible path point and the reference path point passes through an obstacle area, if so, determining a path point before the reference path point as the second visible path point.

[0075] The obstacle area may be the area occupied by the obstacle on the cost map or the area after the area occupied by the obstacle on the cost map is expanded.

[0076] For example, see Figure 3 , the path point set P' of the safe path l1 = {p0,p'1,p'2,p'3,p'4,...,p k-1 ,p k ,...,p j In this embodiment, the path point p0 is first selected as the first visible path point, and the path point p'1 is selected as the reference path point after the first visible path point p0.

[0077] Since the line connecting the first visible path point p0 and the reference path point p'1 does not pass through the obstacle area, the present embodiment selects path point p'2 as a new reference path point in sequence after the reference path point. Since the line connecting the first visible path point p0 and the reference path point p'2 does not pass through the obstacle area, the present embodiment selects path point p'3 as a new reference path point in sequence after the reference path point, and so on.

[0078] Since the first visible path point p0 and the reference path point p k The line connecting the first visible path point p0 and the reference path point p k This embodiment determines that at the reference path point p k A previous path point p k-1 is the second visible path point. Therefore, in this embodiment, the first visible path point p0 and the second visible path point p are removed from the safe path. k-1 Then, the second visible path point p k-1 As the new first visible path point, continue the above process until the entire safe path l1 is traversed, and finally a sparse path is obtained.

[0079] In some embodiments, generating the shortest path based on sparse paths and a preset path planning algorithm includes the following steps: constructing a road network based on the sparse paths, generating the shortest path based on the road network and a preset path planning algorithm, and the shortest path is the final path.

[0080] Generating the shortest path according to the road network and the preset path planning algorithm includes: generating the shortest path according to the node information, the margin information and the preset path planning algorithm.

[0081] The road network includes node information and margin information. The node information includes each node of the sparse path (i.e., sparse path points), and the margin information includes the distance between any two nodes. The expression of the road network is G =<V,E> , where G represents the road network, V represents the nodes of the road network, and E represents the margin of the road network. The margin represents the connection relationship between nodes. The specific operation of generating margin information based on sparse paths is as follows:

[0082] From v0 to vn-1, loop through V. For the current node vi, loop through vi+1 to vn-1. For any node vj (j∈i+1, i+2, ..., n-1), if the line between vi and vj does not pass through the obstacle area, then the connection relationship vij between node vi and node vj is recorded as the Euclidean distance between the two, otherwise it is recorded as positive infinity. The final road network margin E is an n*n adjacency matrix, and any element eij in the matrix represents the relationship between nodes vi and vj (the elements on the diagonal are 0).

[0083] The specific operations for generating the shortest path based on the road network and the preset path planning algorithm are as follows:

[0084] 1). For any node vi in ​​the road network G, define the variable f_cost to store the cumulative path search cost of the node vi from the starting point v0, initialized to positive infinity. Define the variable g_cost to represent the heuristic cost between the node vi and the end point vn-1, initialized to 0. Define the variable cost to represent the total cost of the node vi, initialized to 0. Define the variable closed_cost and initialize it to positive infinity to represent the cost of the node vi in ​​the closed set (the closed set is a term in the A* algorithm. For a certain node vi, if the shortest path from the starting point v0 to vi has been found, the cost of the path will be assigned to closed_cost. Therefore, for any node, as long as its closed_cost is positive infinity, it means that the shortest path connecting it and v0 has not been found, otherwise it means that it has been found). Define the variable map_cost to represent the cost of the node vi in ​​the grid map (value range 0-255). Define the variable father_node to represent the parent node of the node vi, initialized to empty.

[0085] 2). Initialize the path search process. Define the priority queue queue, which is used to store nodes, and the priority queue queue can be sorted in ascending order according to the cost of each node (the first element in the queue is the node with the smallest cost). During the path search process, first set the path search cost f_cost of node v0 to 0, and put node v0 into the priority queue queue. Define the cycle count variable cycle, initialized to 0. Define the cycle count threshold as cycle_threshold, and initialize it to the number of nodes n.

[0086] 3). If the priority queue queue is not empty and the cycle is less than the cycle_threshold, the value of the cycle is increased by 1 and the following steps are executed:

[0087] 4). Assign the first element in the priority queue queue to the variable top, and remove the first element in the priority queue queue from the priority queue queue. If the variable closed_cost of top is not positive infinity, it means that top is in the closed set (which means the shortest path connecting the starting point v0 and top has been found), then return to step 3, otherwise assign the search cost of top to the variable closed_cost of top, and go to step 5.

[0088] 5). If top is equal to node vn-1, it means that the shortest path connecting the starting point v0 and vn-1 has been found, then the loop ends and goes to path connection step 7, otherwise go to step 6.

[0089] 6). The role of step 6 is to expand its neighboring nodes based on node vi. The specific implementation is: traverse all nodes in the road network G except vi. Without loss of generality, for any node vj, if the connection relationship vij between node vi and node vj is less than positive infinity, it means that the two are visible, then the cost of expanding from node vj to vj is calculated as: V = vi.f_cost + vij + vj.map_cost. If V is less than vj.f_cost, it means that the connection from vi to vj is shorter, then V is assigned to vj.f_cost, and the parent node of vj is assigned to vi. In addition, calculate the heuristic cost g_cost from node vj to the end point vn-1 (which can be calculated according to Euclidean distance, Manhattan distance, etc.). Update the total cost cost of vj to vj.cost = vj.f_cost + vj.g_cost. And put the node vj into the priority queue queue. And return to step 3 to continue the loop.

[0090] 7). After the above steps, the shortest connection between v0 and vn-1 has been found. The method to obtain the shortest path is as follows. Define the final path as P, initialize the current node v as node vn-1, put v into path P, and assign v.father to v, and continue to put v into P until v's father node is the starting point v0. Finally, put the starting point v0 into P, then P is the shortest path connecting the starting point v0 and vn-1.

[0091] This embodiment performs path planning based on the existing path points of the sparse path in combination with a preset path planning algorithm. The path points of the sparse path need to be processed deterministically. This embodiment plans the shortest path based on the existing path points of the sparse path. This planning method has a high planning efficiency and is conducive to further improving the path planning effect.

[0092] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present application, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0093] As another aspect of the embodiments of the present application, the embodiments of the present application provide a path generation device for a robot. The path generation device for the robot may be a software module, which includes a number of instructions stored in a memory, and a processor may access the memory and call the instructions for execution to complete the path generation method for the robot described in the above embodiments.

[0094] In some embodiments, the path generation device of the robot can also be constructed by hardware devices, for example, the path generation device of the robot can be constructed by one or more chips, and each chip can work in coordination with each other to complete the path generation method of the robot described in each of the above embodiments. For another example, the path generation device of the robot can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components.

[0095] See also Figure 4 The robot path generation device 400 includes an original path generation module 41, a safety path generation module 42, a sparse path generation module 43 and a final path generation module 44.

[0096] The original path generation module 41 is used to generate the original path according to the preset path planning algorithm and the preset cost map, wherein, in the cost map, the farther the location is from the obstacle, the smaller the cost value is, and the closer the location is to the obstacle, the larger the cost value is. The safe path generation module 42 is used to adjust the original path to obtain a safe path, and the sum of the costs of the safe path is less than or equal to the sum of the costs of the original path. The sparse path generation module 43 is used to perform sparse processing on the safe path to obtain a sparse path. The final path generation module 44 is used to generate the final path according to the sparse path and the preset path planning algorithm.

[0097] This embodiment makes adjustments based on the pre-planned original path to obtain a safe path whose total cost is less than or equal to the total cost of the original path, which can improve the safety of the path. In addition, based on the safe path, this embodiment performs a sparse processing on the safe path as a whole. The result of the sparse processing is to remove related path points to further shorten the path length, thereby being able to globally shorten the path and improve the path shortening effect. Finally, this embodiment performs path planning based on the existing path points of the sparse path in combination with a preset path planning algorithm, which can further improve the path planning effect.

[0098] In some embodiments, the original path includes a starting path point, an ending path point, and multiple intermediate path points between the starting path point and the ending path point. The safe path generation module 42 is specifically used to: determine candidate line segments based on the original path, the candidate line segments are jointly defined by at least two intermediate path points, determine candidate path points with minimum cost values ​​based on the candidate line segments, and generate a safe path based on the starting path point, multiple candidate path points, and the ending path point.

[0099] In some embodiments, the safe path generation module 42 is also specifically used to: determine a first intermediate path point and a second intermediate path point in sequence on the original path, there is at least one intermediate path point between the first intermediate path point and the second intermediate path point, and determine a candidate line segment based on the first intermediate path point and the second intermediate path point.

[0100] In some embodiments, the safe path generation module 42 is further specifically used to: sample multiple sampling path points on the candidate line segment, and determine the sampling path point with the minimum cost value as the candidate path point.

[0101] In some embodiments, the sparse path generation module 43 is specifically used to: determine a pair of path points that meet the farthest visibility condition according to the safe path as a pair of target path points, and remove the path points between each pair of target path points on the safe path to obtain a sparse path.

[0102] In some embodiments, the sparse path generation module 43 is also specifically used to: select a path point on the safe path in sequence as a first visible path point, and traverse the second visible path point in sequence according to the arrangement order of each path point in the safe path, the line connecting the second visible path point and the first path point does not pass through the obstacle area, and the distance from the second visible path point to the first path point is the longest among the distances from the remaining path points in the safe path to the first path point, and the first visible path point and the second visible path point are a pair of target path points.

[0103] In some embodiments, the sparse path generation module 43 is also specifically used to: select a path point in sequence after the first visible path point as a reference path point, determine whether the line connecting the first visible path point and the reference path point passes through the obstacle area, if not, then select another path point in sequence after the reference path point as a new reference path point, if so, determine a path point before the reference path point as the second visible path point.

[0104] In some embodiments, the final path generation module 44 is specifically used to: construct a road network based on sparse paths, the road network includes node information and margin information, the node information includes each node of the sparse path, the margin information includes the distance between any two nodes, and generate the shortest path based on the node information, margin information and a preset path planning algorithm, and the shortest path is the final path.

[0105] It should be noted that the path generation device of the robot can execute the path generation method of the robot provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in the embodiment of the path generation device of the robot, please refer to the path generation method of the robot provided in the embodiment of the present application.

[0106] See also Figure 5 , Figure 5 The circuit structure diagram of a robot provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the robot 500 includes one or more processors 51 and a memory 52. Figure 5 A processor 51 is taken as an example.

[0107] The processor 51 and the memory 52 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0108] The memory 52 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the path generation method of the robot in the embodiment of the present application. The processor 91 executes various functional applications and data processing of the path generation device of the robot by running the non-volatile software programs, instructions and modules stored in the memory 52, that is, realizes the path generation method of the robot provided in the above method embodiment and the functions of each module or unit of the above device embodiment.

[0109] The memory 52 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 52 may optionally include a memory remotely arranged relative to the processor 51, and these remote memories may be connected to the processor 51 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0110] The program instructions / modules are stored in the memory 52 , and when executed by the one or more processors 51 , the robot path generation method in any of the above method embodiments is executed.

[0111] The present application also provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Figure 5 A processor 51 in the embodiment may enable the one or more processors to execute the path generation method of the robot in any of the above method embodiments.

[0112] An embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a robot, the robot executes any one of the robot path generation methods described.

[0113] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. 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 application.

Claims

1. A robot path generation method, characterized in that: include: Generate an original path according to a preset path planning algorithm and a preset cost map, wherein in the cost map, the cost value of a location farther from an obstacle is smaller, and the cost value of a location closer to an obstacle is larger; Adjusting the original path to obtain a safe path, wherein the sum of costs of the safe path is less than or equal to the sum of costs of the original path; Performing sparse processing on the security path to obtain a sparse path; A final path is generated according to the sparse path and a preset path planning algorithm.

2. The method according to claim 1, characterized in that The original path includes a first path point, a last path point, and a plurality of intermediate path points between the first path point and the last path point, and adjusting the original path to obtain a safe path includes: Determine a candidate line segment according to the original path, wherein the candidate line segment is defined by at least two of the intermediate path points; Determine a candidate path point with a minimum cost value according to the candidate line segment; A safe path is generated according to the first path point, a plurality of the candidate path points and the terminal path point.

3. The method according to claim 2, characterized in that Determining the candidate line segment according to the original path includes: Determine a first intermediate path point and a second intermediate path point in sequence on the original path, wherein there is at least one intermediate path point between the first intermediate path point and the second intermediate path point; A candidate line segment is determined based on the first intermediate path point and the second intermediate path point.

4. The method according to claim 2, characterized in that: The determining of the candidate path point with the minimum cost value according to the candidate line segment comprises: Sampling a plurality of sampling path points on the candidate line segment; The sampled path point with the minimum cost value is determined as the candidate path point.

5. The method according to any one of claims 1 to 4, characterized in that: The performing sparse processing on the security path to obtain a sparse path includes: Determine, according to the safe path, a pair of path points that meet the farthest visibility condition as a pair of target path points; On the safe path, the path points between each pair of target path points are removed to obtain a sparse path.

6. The method according to claim 5, characterized in that The step of determining, according to the safe path, a pair of path points that meet the farthest visible condition as a pair of target path points comprises: Selecting one path point in sequence on the safe path as a first visible path point; According to the arrangement order of each path point in the safe path, the second visible path point is traversed in sequence, the line connecting the second visible path point and the first path point does not pass through the obstacle area, and the distance from the second visible path point to the first path point is the longest among the distances from the remaining path points in the safe path to the first path point, and the first visible path point and the second visible path point are a pair of target path points.

7. The method according to claim 6, characterized in that The step of sequentially traversing the second visible path points according to the arrangement order of the path points in the safe path comprises: Selecting a path point in sequence after the first visible path point as a reference path point; Determining whether a line connecting the first visible path point and the reference path point passes through an obstacle area; If not, then select another path point in sequence after the reference path point as a new reference path point; If so, a path point before the reference path point is determined to be a second visible path point.

8. The method according to any one of claims 1 to 4, characterized in that: Generating a final path according to the sparse path and a preset path planning algorithm comprises: Constructing a road network according to the sparse path, the road network includes node information and margin information, the node information includes each node of the sparse path, and the margin information includes the distance between any two nodes; A shortest path is generated according to the node information, the margin information and a preset path planning algorithm, and the shortest path is the final path.

9. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a robot to execute the robot path generation method according to any one of claims 1 to 8.

10. A robot, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the path generation method for the robot according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Autonomous mobile robot and path navigation and path planning method and system thereof

    CN112526988A

  • Mobile robot path planning and optimizing method based on cost potential field

    CN112904842A

  • Path optimization method and device, robot and storage medium

    CN112987724A

  • Path navigation method

    CN113124875A

  • Robot path planning method and device and robot

    CN113759905A