Key point path planning method and device based on distance transformation

Through the key point path planning method based on distance transformation, global key points are screened and connection relationships are constructed, which solves the problem of low robot navigation efficiency and achieves efficient and accurate path planning.

CN120385348APending Publication Date: 2025-07-29WUHAN UNIV OF SCI & TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510683845.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In the prior art, robot navigation efficiency is low, especially in complex environments. The complex generation and processing of traditional Voronoi graph algorithms lead to limited navigation efficiency.

Method used

Based on the distance transformation key point path planning method, by converting the raster map into a distance transformation map, the distance maximum point is extracted as candidate key points, filtering global key points, and building a connection relationship between global key points, and using the algorithm to search for navigation paths.

Benefits of technology

Effectively reduce the amount of data required for path planning, ensure the accuracy and path length of robot navigation, and achieve more efficient path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120385348A_ABST
    Figure CN120385348A_ABST
Patent Text Reader

Abstract

The invention provides a key point path planning method and device based on distance transformation, and the method comprises the steps: converting a grid map of a target region into a distance transformation map based on a distance definition method; a distance maximum value point is extracted from the distance transformation map to serve as a candidate key point, the candidate key point is screened to obtain a global key point, and at least two contact points exist between a circle generated with the global key point as the circle center and the distance value of the global key point as the radius and a grid representing a non-passing area; and constructing a connection relationship between the global key points, and searching and determining a navigation path based on the connection relationship between the global key points by using a # imgabs0 # algorithm. According to the method, the global key points are screened in the distance conversion map, and path search is performed based on the connection relation between the global key points, so that a more efficient robot path planning algorithm is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot navigation, and particularly to a key point path planning method and device based on distance transformation. Background Art

[0002] In the field of autonomous navigation of mobile robots, path planning plays a crucial role in robot navigation, and path planning is the core technology for realizing autonomous navigation. Path planning aims to find a collision-free feasible path connecting the starting point and the target point, which can not only adapt to complex environments, consider dynamic changes, but also find the path with the best obstacle avoidance effect. Traditional global path planning algorithms can be classified into graph search-based algorithms and sampling-based algorithms according to the way they search for paths.

[0003] With the continuous update and iteration of artificial intelligence and machine learning technologies, intelligent algorithms are gradually applied to global path planning. The Voronoi diagram algorithm has been widely used in many scientific fields, and many scientific researchers use the Voronoi algorithm to construct a topological map to reduce the amount of calculation and improve the real-time performance of the movement of mobile robots. The path generated by this method is far from obstacles, thereby reducing the collision risk of the robot during operation.

[0004] Although it can generate a safe path far from obstacles, the generation and processing of the Voronoi diagram are relatively complex, especially in an environment with complex obstacles, which limits the efficiency of robot navigation in the real environment. Summary of the Invention The present invention provides a key point path planning method and device based on distance transformation to solve the defect of low robot navigation efficiency in the prior art and realize a more efficient robot path planning method.

[0005] The present invention provides a key point path planning method based on distance transformation, including: Based on the distance definition method, converting the grid map of the target area into a distance transformation map; Extracting distance maximum points as candidate key points in the distance transformation map, and screening the candidate key points to obtain global key points, wherein a circle centered on the global key point with the distance value of the global key point as the radius has at least two contact points with the grid representing the non-passage area; Constructing the connection relationship between the global key points, and using an algorithm to search and determine the navigation path based on the connection relationship between the global key points.

[0006] A key-point path planning method based on distance transformation provided by the present invention, the step of extracting distance maximum points as candidate key points in the distance transformation map and screening the candidate key points to obtain global key points specifically includes: Traverse the passable area in the distance transformation map using a selection box with a preset side length, and during the traversal, determine the grid with the largest distance value in the selection box as the candidate key point; Generate a circle with the candidate key point as the center and the distance value of the candidate key point as the radius, and determine the candidate key point where the obtained circle has at least two contact points with the grid representing the non-passable area as the global key point.

[0007] A key-point path planning method based on distance transformation provided by the present invention, the step of constructing the connection relationship between the global key points specifically includes: Construct a candidate connection relationship between global key points based on the Bresenham line algorithm, and screen the candidate connection relationship based on a predefined screening rule to obtain the connection relationship between the global key points; Among them, the predefined screening rule includes: In the case where the distance between two global key points is greater than a preset distance threshold, screen out the candidate connection relationship between the two global key points; In the case where the distance between the grid corresponding to the connection line between two global key points and the grid representing the non-passable area is less than a preset safety threshold, screen out the candidate connection relationship between the two global key points.

[0008] A key-point path planning method based on distance transformation provided by the present invention, before the step of constructing the connection relationship between the global key points, further includes: Take the starting point and the target point of the robot as the global key points.

[0009] A key-point path planning method based on distance transformation provided by the present invention, the use The step of using an algorithm to search and determine the navigation path based on the connection relationship between the global key points specifically includes: Use The algorithm searches and determines a preliminary path based on the connection relationship between the global key points; Smooth the preliminary path to obtain the navigation path.

[0010] A key-point path planning method based on distance transformation provided by the present invention, the step of smoothing the preliminary path to obtain the navigation path specifically includes: Determine three adjacent global key points on the preliminary path; Replace the path at the initial path turning points of the three global key points with the inscribed circle arc obtained by linking the three global key points.

[0011] The present invention also provides a key point path planning device based on distance transformation, including: A conversion module, configured to convert the grid map of the target area into a distance transformation map based on a distance definition method; An extraction module, configured to extract distance maximum points as candidate key points in the distance transformation map, and screen the candidate key points to obtain global key points, wherein the circle generated with the global key point as the center and the distance value of the global key point as the radius has at least two contact points with the grid representing the non-passage area; A determination module, configured to construct the connection relationship between the global key points, and use an algorithm to search and determine the navigation path based on the connection relationship between the global key points.

[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, it implements the key point path planning method based on distance transformation as described in any one of the above.

[0013] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the key point path planning method based on distance transformation as described in any one of the above.

[0014] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the key point path planning method based on distance transformation as described in any one of the above.

[0015] The key point path planning method and device based on distance transformation provided by the present invention screen global key points in the distance transformation map, search for paths based on the connection relationship between the global key points, obtain the robot navigation path, effectively reduce the amount of data required for path planning, and at the same time ensure the accuracy and path length of robot navigation, realizing a more efficient robot path planning algorithm. Description of the Drawings

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 It is a schematic flowchart of the key point path planning method based on distance transformation provided by the present invention; Figure 2 In (a), it is a simulation environment built during the test of the key point path planning method based on distance transformation provided by the present invention; Figure 2 In (b), it is a three-color grid map corresponding to the simulation environment in the key point path planning method based on distance transformation provided by the present invention; Figure 3 In (a), it is a grid map before preprocessing in the key point path planning method based on distance transformation provided by the present invention; Figure 3 In (b), it is a grid map after preprocessing in the key point path planning method based on distance transformation provided by the present invention; Figure 4 It is a distance transformation map in the key point path planning method based on distance transformation provided by the present invention; Figure 5 In (a), it is a schematic diagram for showing a selection box in the key point path planning method based on distance transformation provided by the present invention; Figure 5 In (b), it is a schematic diagram for showing candidate key points in the key point path planning method based on distance transformation provided by the present invention; Figure 5 In (c), it is a schematic diagram for showing the largest inscribed circle of candidate key points in the key point path planning method based on distance transformation provided by the present invention; Figure 5 In (d), it is a schematic diagram for showing candidate key points after screening by the largest inscribed circle in the key point path planning method based on distance transformation provided by the present invention; Figure 5 In (e), it is a schematic diagram for showing global key points in the key point path planning method based on distance transformation provided by the present invention; Figure 6 It is a schematic diagram for showing global key points extracted from the simulation environment in the key point path planning method based on distance transformation provided by the present invention; Figure 7 It is a schematic diagram for showing the connected grid area determined based on the Bresenham line algorithm in the key point path planning method based on distance transformation provided by the present invention; Figure 8 It is a schematic diagram for showing the screening of candidate connection relationships by the screening rule in the key point path planning method based on distance transformation provided by the present invention; Figure 9It is a schematic diagram for showing the preliminary path obtained by search in the key-point path planning method based on distance transformation provided by the present invention; Figure 10 It is a schematic diagram for showing the path smoothing method in the key-point path planning method based on distance transformation provided by the present invention; Figure 11 It is a schematic structural diagram of the key-point path planning device based on distance transformation provided by the present invention; Figure 12 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners

[0018] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0019] The following combines Figures 1 to 10 to introduce the key-point path planning method based on distance transformation of the present invention. As Figure 1 shown, it includes: Step 101, based on the distance definition method, convert the grid map of the target area into a distance transformation map; The target area is the area where the robot needs to navigate. The robot is pre-controlled to move in the target area to obtain the grid map of the target area.

[0020] In the three-color grid map, the grid cost values of different areas respectively represent their passing attributes: the white passable area is the space where the robot can move freely, and its grid cost value is usually 0; the black obstacle area is the area where the robot cannot pass, and the corresponding grid cost value is usually 1; the gray unknown area represents the place not covered by the sensor, which may contain obstacles or potential dangers. Therefore, the grid cost value is usually represented as -1.

[0021] In this embodiment, a simulation environment as shown in (a) of Figure 2 is built for the robot navigation test, and its corresponding three-color grid map is as shown in (b) of Figure 2 .

[0022] In an indoor environment, the unknown area is usually inside the obstacle or in a place where the robot cannot reach. To simplify the data processing and representation of the map, the unknown area is usually regarded as an obstacle area, and its grid cost value is converted from -1 to 1. The corresponding cost value conversion formula is as follows: ; In the formula, cost _ value ( i , j ) represents the cost value after raster conversion with coordinates ([[]] i , j ), grid _ value represents the cost value before the raster conversion.

[0023] After setting the unknown area as the obstacle area, only the passable area and the obstacle area are retained on the map. After performing binary operation on the map, opening operation is carried out, which is achieved by first performing erosion operation and then dilation operation; after the opening operation, the white noise points on the map disappear, the boundary is completely enclosed, and the size and position of the map boundary and obstacles hardly change; finally, the mean filter method is adopted to eliminate the internal noise points of the map and complete the smoothing process of the entire map.

[0024] Among them, a group of raster maps before and after preprocessing are as shown in Figure 3 (a) and (b) in

[0025] On this basis, the raster map of the target area obtained after preprocessing is converted into a distance transformation map through distance transformation.

[0026] Optionally, the distance definition method can be one of the distance algorithms such as Manhattan distance, Chebyshev distance, and Euclidean distance.

[0027] Preferably, in this embodiment, Euclidean distance is used to convert the raster map into a distance transformation map: For the raster map M, ∂M is a specific raster in M, which is the boundary of obstacles and the target area in this embodiment, that is, the raster corresponding to the map boundary. Then, the distance transformation of the raster map M is defined as: ; In the formula, d ([[]] x , y ) is the distance between points x and y . The distance definition method is preferably Euclidean distance in this embodiment: ; Among them, x 1, y 1 and x 2, y 2 are the coordinates of the two points respectively.

[0028] Calculate the distance from the traversable area to the nearest obstacle area through distance transformation. Replace the white traversable area in the preprocessed grid map with the distance value from the corresponding point to the nearest obstacle point to obtain a distance image. Subsequently, when extracting global key points, only focus on the areas with higher brightness. The higher the brightness, the larger the distance transformation value, and the farther away from the obstacle or the map boundary. Then, use the Euclidean distance transformation to obtain the distance transformation map.

[0029] The distance transformation map obtained by processing in the above manner is as Figure 4 shown.

[0030] Step 102: Extract the points with the maximum distance value in the distance transformation map as candidate key points, and screen the candidate key points to obtain global key points. Among them, a circle centered on the global key point with the distance value of the global key point as the radius has at least two contact points with the grid representing the non-traversable area. It can be understood that the white area in the distance transformation map is similar to the skeleton of the Voronoi diagram. Generally, path planning depends on The path planning algorithm based on algorithms such as

[0031] In this embodiment, in order to improve the navigation efficiency of the robot, a more concise navigation path can be obtained based on algorithms. First, screen the global key points based on the white area in the distance transformation map, and implement path planning based on the connection of the global key points.

[0032] Specifically, this screening process is implemented in two steps. The first step is to obtain candidate key points through preliminary screening. Among them, the candidate key points are the points located at the middle position of the traversable area, which are manifested as the points with the largest distance value.

[0033] Refer to Figure 4 After performing distance transformation on the grid map, the distance value at the middle position of the traversable area is the largest and undergoes a mutation here, and the distance values on both sides are approximately equal. That is, select such points with the maximum distance value as candidate key points.

[0034] On this basis, further screen the obtained candidate key points based on the maximum inscribed circle method to obtain global key points.

[0035] The maximum inscribed circle method uses the maximum inscribed circle as a constraint. Taking the grid corresponding to the candidate key point as the center and the distance value of the candidate grid as the radius to draw a circle. If the obtained circle is in contact with the grid area corresponding to another non-traversable area at the same time, it means that the candidate key point is the key point at the center position of the two obstacles.

[0036] Through the above screening method, all the finally obtained global key points are grids with extremely large distance values from obstacles or the map boundary.

[0037] Step 103: Construct the connection relationship between the global key points and use the algorithm to search and determine the navigation path based on the connection relationship between the global key points.

[0038] After determining the global key points, construct the connection relationship between the global key points, and then use the algorithm to search and determine the navigation path based on the constructed connection relationship.

[0039] In this embodiment, the global key points and the connection relationship between the global key points are represented by a weighted undirected graph.

[0040] Specifically, use the weighted adjacency matrix G to represent this graph. Each global key point has a corresponding row and column in the matrix. The value in the matrix represents the weight of the edge between two global key points. The size of the edge weight is the distance between two global key points, and the edge has no directionality. That is, if there is an edge from global key point A to global key point B, there is also an edge from global key point B to global key point A. If there is no connection relationship between two global key points, the corresponding matrix value is infinite. It should be noted in particular that a global key point itself has no connection relationship with itself.

[0041] Suppose there are n global key points, then the adjacency matrix G is a symmetric matrix. If there is a connection relationship between any global key point k-1 and global key point k, set the values of G[k][k-1] and G[k-1][k] to Dk, otherwise it is infinite.

[0042] On this basis, the problem of robot path planning is transformed into searching for a path in the connection relationship of global key points without considering other nodes except global key points. Using the algorithm to search the connection relationship of global key points, the search result can be used as the finally determined navigation path.

[0043] It should be particularly noted that for conventional path planning, the skeleton extracted by the skeleton extraction algorithm is selected for optimization. For example, the skeleton points or the path of the skeleton are optimized to make the extracted skeleton smoother and straighter. However, regardless of the subsequent optimization effect, to optimize the navigation path by optimizing the skeleton, skeleton extraction needs to be performed before path search to generate a skeleton graph, and this process will increase the running implementation of the algorithm, thus affecting the real-time performance of robot navigation.

[0044] Therefore, in this embodiment, global key points are selected and filtered, and path search is performed based on the connection relationships of the global key points. The amount of data is smaller, and the planned path can also meet the accuracy requirements of navigation.

[0045] The present invention obtains a robot navigation path by filtering global key points in a distance transformation map and performing path search based on the connection relationships between the global key points, effectively reducing the amount of data required for path planning, and at the same time ensuring the accuracy and path length of robot navigation, realizing a more efficient robot path planning algorithm.

[0046] In the key point path planning method based on distance transformation of the present invention, the step of extracting distance maximum value points as candidate key points in the distance transformation map and filtering the candidate key points to obtain global key points specifically includes: Use a selection box with a preset side length to traverse the passable area in the distance transformation map, and during the traversal process, determine the grid with the largest distance value in the selection box as the candidate key point; In order to quickly filter out the distance maximum value points in the distance transformation map, in this embodiment, first define the data structure of each grid in the distance transformation map as: ; In the formula, x and y are the coordinates of the grid, representing the position of the grid; distance represents the distance value of the grid, and flag is the flag bit of the grid, with the initial value set to -1.

[0047] It can be understood that in the distance transformation map, black grids represent obstacles or map boundaries, that is, non-passable areas, and white grids represent passable areas. The distance value of each grid is determined according to the result of distance transformation.

[0048] Use the selection box to traverse the passable area in a rolling manner, as shown in (a) of Figure 5 , and then compare the distance values of all white grids in each selection box, and mark the grid with the largest distance value as blue, correspondingly set the flag value to 1, and mark the other grids that have been compared as gray, correspondingly set the flag value to 0.

[0049] After the traversal is completed, the grids with the flag value of 1 and displayed as blue are the selected candidate key points, as shown in (b) of Figure 5 . When solving the local maximum value of distance in this way, the flag bit flag of the grid will be determined first, which can improve the efficiency of the solution.

[0050] In this embodiment, a square selection box is used for traversal. The side length of the selection box is a preset empirical value.

[0051] Generate a circle with the candidate key point as the center and the distance value of the candidate key point as the radius, and determine the candidate key point where the obtained circle has at least two contact points with the grid representing the non-passable area as the global key point.

[0052] Furthermore, all candidate key points are screened based on the principle of the maximum inscribed circle constraint.

[0053] Specifically, generate a circle with the blue grid of each candidate key point as the center and the distance value of the corresponding grid as the radius in turn. If this circle has two or more contact points, that is, tangent points, with the black grid, then retain the candidate key point and set the flag value to 2; otherwise, set the flag value to 0.

[0054] Take Figure 5 the circles generated by the four candidate key points A, B, C, and D shown in (c) as an example. It can be seen that the circles generated by points A and B have at least two tangent points with the non-passable area, and they are the grids located in the middle of the passable area; while the circles generated by points C and D have only one tangent point with the non-passable area, indicating that they are the distance maximum value points closer to one of the boundaries of the non-passable area, rather than the points where the entire non-passable area is in the most central position. Therefore, retain points A and B and screen out points C and D.

[0055] Screen the candidate key points in the above manner, and the retained candidate key points are as shown in Figure 5 (d). It is not difficult to find that Figure 5 among the candidate key points retained in (d), there will be some candidate key points with adjacent distances. These candidate key points can all meet the maximum inscribed circle constraint conditions, but the distances are adjacent. When constructing the connection relationship, it will increase the unnecessary computational load. Therefore, in this embodiment, two distance thresholds d1 and d2 are also set to further screen the retained candidate key points.

[0056] Among them, the distance value d1 is used to judge whether the distance between the retained candidate key point and the non-passable area is too close. Therefore, if the distance value of the retained candidate key point is greater than d1, then retain the candidate key point; otherwise, screen it out. The distance value d2 is used to avoid generating multiple key points within a short distance. Calculate the distance between two retained candidate key points and screen out some of the retained candidate key points until there are no groups of key points with a distance less than d2 among the remaining candidate key points.

[0057] After screening in the above manner, the retained candidate key points are used as the determined global key points, as shown in Figure 5 (e).

[0058] In this embodiment, the global key points screened based on the simulation environment such as Figure 2 are as shown in Figure 6as shown by the green origin points therein.

[0059] In the key point path planning method based on distance transformation of the present invention, the step of constructing the connection relationship between the global key points specifically includes: Constructing a candidate connection relationship between the global key points based on the Bresenham line algorithm, and screening the candidate connection relationship based on a predefined screening rule to obtain the connection relationship between the global key points; Wherein, the predefined screening rule includes: In the case where the distance between two global key points is greater than a preset distance threshold, screening out the candidate connection relationship between the two global key points; In the case where the distance between the grid corresponding to the connection line between two global key points and the grid representing the non - passing area is less than a preset safety threshold, screening out the candidate connection relationship between the two global key points.

[0060] After determining the global key points, the connection relationship between them can be constructed based on the global key points.

[0061] In this embodiment, first, according to the Bresenham line algorithm, the grid corresponding to the connection line between two global key points is determined. As Figure 7 shown, the Bresenham line algorithm takes all the grids covered by the connection line between two grid points as the grid area corresponding to the connection line between the two grid points, that is, the constructed candidate connection relationship.

[0062] It can be understood that due to the existence of obstacles, there is not a connection relationship between all global key points. Therefore, in this embodiment, through the predefined screening rule, the candidate connection relationship is screened to determine the global key points with a truly existing connection relationship and the connection relationship between them.

[0063] One of the predefined screening rules is that if the distance between the grid area covered by the connection line of two global key points and the non - passing area is less than the preset safety threshold, it is determined that there is no connection relationship between these two global key points, and the candidate connection relationship between these two global key points is screened out. As Figure 8 the red line and the green line in [Figure] are the candidate connection relationships that need to be deleted. Among them, the preset safety threshold is an empirical value.

[0064] The second one is that if the distance between two global key points exceeds the preset distance threshold d3, it is also determined that there is no connection relationship between these two global key points to reduce the calculation amount. As Figure 8 the black line in [Figure] is the candidate connection relationship that needs to be deleted. Among them, the preset distance threshold is an empirical value.

[0065] After completing the screening through the above - mentioned screening rules, the connection relationship between the global key points can be determined.

[0066] In the key-point path planning method based on distance transformation of the present invention, before the step of constructing the connection relationship between the global key points, the following steps are further included: Taking the starting point and the target point of the robot as the global key points.

[0067] Before performing robot navigation, it is also necessary to take the starting point and the target point of the robot as global key points, and together with the globally key points obtained by screening, construct the connection relationship.

[0068] By taking the starting point and the target point of the robot as global key points, the robot position can also be incorporated into the search path, so as to obtain a more accurate path search result.

[0069] It can be understood that the global key points and the connection relationship between the key points screened and constructed based on the distance transformation map can be fixedly retained. Before robot navigation, its starting point and target point are added to the global key points, and then the connection relationship between the global key points is updated to reduce the calculation amount and improve the real-time performance.

[0070] In the key-point path planning method based on distance transformation of the present invention, the step of using the algorithm to search and determine the navigation path based on the connection relationship between the global key points specifically includes: Using the algorithm to search and determine a preliminary path based on the connection relationship between the global key points;

[0071] As Figure 9 shown, the red dots s and g respectively represent the starting point and the target point, and the points a to e and their connecting lines are the global key points and the connection relationship between them determined by the search, that is, the path obtained by screening. It is not difficult to find that the path screened by using the algorithm based on the global key points and the connection relationship between the global key points has multiple turning points, and such turning points are likely to reduce the movement efficiency of the robot during the actual navigation process and may have a negative impact on the stability of the robot.

[0072] Therefore, in this embodiment, the path obtained by the algorithm search is used as the preliminary path, and then the turning points of the preliminary path are smoothed to obtain the navigation path finally for the robot navigation.

[0073] It can be understood that the turning point is the intersection point of two connecting lines, and it can also be considered as the position of the remaining global key points except the starting point and the target point.

[0074] In the key-point path planning method based on distance transformation of the present invention, the step of smoothing the preliminary path to obtain the navigation path specifically includes: Determine three adjacent global key points on the preliminary path; Replace the path at the turning point of the preliminary path of the three global key points with the inscribed circle arc obtained by connecting the three global key points.

[0075] Since the global key points are connected by straight lines, when performing smoothing processing, there is no need to process the straight line part, and only the path near the key points needs to be smoothed.

[0076] A smoothing strategy in this embodiment is: Take the global key points on the preliminary path as the key point set {Pi|i = 0, 1, 2,..., n}, where P0 represents the starting point and Pn represents the target point.

[0077] Starting from the starting point P0, connect adjacent key points (P0, P1), (P1, P2), and calculate the angle between two adjacent line segments. If the angle is greater than or equal to the set angle threshold, the turning angle required for the robot to pass is relatively small and no smoothing processing is required. If it is less than or equal to the set angle threshold, the turning angle required for the robot to pass is relatively large and smoothing processing is required.

[0078] The specific method of smoothing processing is to use the inscribed circle of a triangle and replace the turning part with an arc to achieve the purpose of smoothing the path. Specifically, as Figure 10 shown, for the turning angle that needs to be smoothed, take the global key point B corresponding to the turning angle and the two adjacent left and right global key points A and C to construct a triangle. Make the inscribed circle of △ABC as circle Q, and circle Q is tangent to the two preliminary paths AB and BC corresponding to the turning angle at points E and F respectively. Take to replace the paths corresponding to the original EB and BF, and realize the path smoothing at the position of the turning angle B.

[0079] Through the above method, the smoothing processing of the preliminary path can be realized, and a safer and more efficient navigation path more suitable for robot navigation can be obtained.

[0080] Next, the key-point path planning device based on distance transformation provided by the present invention will be described. The key-point path planning device based on distance transformation described below can be mutually corresponding and referred to the key-point path planning method described above.

[0081] As Figure 11 shown, the key-point path planning device based on distance transformation includes a conversion module 1101, an extraction module 1102, and a determination module 1103; A conversion module 1101, configured to convert the grid map of the target area into a distance transformation map based on a distance definition method; The target area is the area where the robot needs to navigate. The robot is pre-controlled to move in the target area to obtain the grid map of the target area.

[0082] In the three-color grid map, the grid cost values of different areas respectively represent their passing attributes: the white passable area is the space where the robot can move freely, and its grid cost value is usually 0; the black obstacle area is the area where the robot cannot pass, and the corresponding grid cost value is usually 1; the gray unknown area represents the place not covered by the sensor, which may contain obstacles or potential dangers, so the grid cost value is usually represented as -1.

[0083] In this embodiment, a simulation environment as shown in (a) of Figure 2 is built for the robot navigation test, and its corresponding three-color grid map is as shown in (b) of Figure 2 .

[0084] In an indoor environment, the unknown area is usually located inside the obstacle or in a place where the robot cannot reach. To simplify the data processing and representation of the map, the unknown area is usually regarded as an obstacle area, and its grid cost value is converted from -1 to 1. The corresponding cost value conversion formula is as follows: ; In the formula, cost _ value ( i , j ) represents the cost value after conversion of the grid with coordinates ([[]] i , j ), grid _ value represents the cost value before conversion of this grid.

[0085] After setting the unknown area as the obstacle area, the map only retains the passable area and the obstacle area. After performing a binary operation on the map, an opening operation is carried out, which is achieved by first performing an erosion operation and then a dilation operation; after the opening operation, the white noise points on the map disappear, the boundary is completely closed, and the size and position of the map boundary and obstacles hardly change; finally, the mean filter method is used to eliminate the internal noise points of the map and complete the smoothing process of the entire map.

[0086] Among them, a set of grid maps before and after preprocessing are as shown in (a) and (b) of Figure 3 .

[0087] On this basis, the grid map of the target area obtained after preprocessing is converted into a distance transformation map through distance transformation.

[0088] Optionally, the distance definition method may be one of distance algorithms such as Manhattan distance, Chebyshev distance, and Euclidean distance.

[0089] Preferably, in this embodiment, Euclidean distance is used to convert the grid map into a distance transformation map: For the grid map M, ∂M is a specific grid in M, which is the boundary of obstacles and the target area in this embodiment, that is, the grid corresponding to the grid map boundary. Then, the distance transformation of the grid map M is defined as: ; In the formula, d ( x , y ) is the distance between point x and y . The distance definition method is preferably Euclidean distance in this embodiment: ; Among them, x 1. y 1 and x 2. y 2 are the coordinates of the two points respectively.

[0090] By calculating the distance transformation, the distance from the passable area to the nearest obstacle area can be obtained. The white passable area in the preprocessed grid map is replaced by the distance value from the corresponding point to the nearest obstacle point to obtain a distance image. Subsequently, when extracting global key points, only the areas with higher brightness need to be concerned. The higher the brightness, the larger the distance transformation value, and the farther away from the obstacle or the map boundary. Then, the distance transformation map is obtained by using Euclidean distance transformation.

[0091] The distance transformation map obtained by processing in the above manner is as shown in Figure 4 .

[0092] The extraction module 1102 is configured to extract the distance maximum points in the distance transformation map as candidate key points, and screen the candidate key points to obtain global key points, where a circle generated with the global key point as the center and the distance value of the global key point as the radius has at least two contact points with the grids representing the non-passable area; It can be understood that the white area in the distance transformation map is similar to the skeleton of the Voronoi diagram. Generally, path planning depends on path planning algorithms such as to plan the most concise path based on the skeleton.

[0093] In this embodiment, in order to improve the navigation efficiency of the robot, it can be based on The algorithm obtains a more concise navigation path. First, global key points are screened based on the white areas in the distance transformation map, and path planning is achieved by connecting the global key points.

[0094] Specifically, this screening process is implemented in two steps. In the first step, candidate key points are obtained through preliminary screening. Among them, the candidate key points are the points located at the middle positions of the passable areas, which are represented as the points with the largest distance values.

[0095] Refer to Figure 4 , after performing distance transformation on the grid map, the distance values at the middle positions of the passable areas are the largest and change abruptly here, and the distance values on both sides are approximately equal. That is, such points with extremely large distance values are screened as candidate key points.

[0096] On this basis, further screening is performed among the obtained candidate key points based on the maximum inscribed circle method to obtain global key points.

[0097] The maximum inscribed circle method uses the maximum inscribed circle as a constraint. Taking the grid corresponding to the candidate key point as the center and the distance value of the candidate grid as the radius to draw a circle. If the obtained circle touches the grid area corresponding to another non-passable area at the same time, it means that the candidate key point is the key point at the center positions of two obstacles.

[0098] Through the above screening method, the finally obtained global key points are all grids with extremely large distance values from obstacles or the map boundary.

[0099] The determination module 1103 is used to construct the connection relationship between the global key points and uses the algorithm to search and determine the navigation path based on the connection relationship between the global key points.

[0100] After determining the global key points, construct the connection relationship between the global key points, and then use the algorithm to search and determine the navigation path based on the constructed connection relationship.

[0101] In this embodiment, the global key points and the connection relationship between the global key points are represented by a weighted undirected graph.

[0102] Specifically, the graph is represented by a weighted adjacency matrix G. Each global key point has a corresponding row and column in the matrix. The value in the matrix represents the weight of the edge between two global key points. The weight of the edge is the distance between the two global key points, and the edge has no directionality. That is, if there is an edge from global key point A to global key point B, then there is also an edge from global key point B to global key point A. If there is no connection relationship between two global key points, the corresponding matrix value is infinite. It should be noted in particular that a global key point itself does not have a connection relationship with itself.

[0103] Assume there are n global key points, then the adjacency matrix G is a symmetric matrix of size n×n. If there is a connection relationship between any two global key points k-1 and k, set the values of G[k][k-1] and G[k-1][k] to Dk, otherwise set them to infinity.

[0104] On this basis, the problem of robot path planning is transformed into searching for a path among the connection relationships of global key points, without considering other nodes except global key points. By using an algorithm to search the connection relationships of global key points, the search result can be used as the finally determined navigation path.

[0105] It should be specifically noted that for conventional path planning, the skeleton extracted by the skeleton extraction algorithm is selected for optimization. For example, the skeleton points or the path of the skeleton are optimized to make the extracted skeleton smoother and straighter. However, regardless of the subsequent optimization effect, to optimize the navigation path by using the optimized skeleton, skeleton extraction needs to be performed before path search to generate a skeleton graph, and this process will increase the running time of the algorithm, thus affecting the real-time performance of robot navigation.

[0106] Therefore, in this embodiment, global key points are selected and path search is performed based on the connection relationships of global key points. The data volume is smaller, and the planned path can also meet the accuracy requirements of navigation.

[0107] The present invention screens global key points in the distance transformation map, performs path search based on the connection relationships between global key points, obtains the robot navigation path, effectively reduces the data volume required for path planning, and at the same time ensures the accuracy and path length of robot navigation, realizing a more efficient robot path planning algorithm.

[0108] Figure 12 An example of the physical structure diagram of an electronic device is shown in Figure 12As shown in the figure, the electronic device may include: a processor 1210, a communications interface 1220, a memory 1230, and a communication bus 1240. Among them, the processor 1210, the communications interface 1220, and the memory 1230 communicate with each other through the communication bus 1240. The processor 1210 can call the logical instructions in the memory 1230 to execute the key point path planning method based on distance transformation. The method includes: based on the distance definition method, converting the grid map of the target area into a distance transformation map; extracting the points with maximum distance in the distance transformation map as candidate key points, and screening the candidate key points to obtain global key points. Among them, the circle generated with the global key point as the center and the distance value of the global key point as the radius has at least two contact points with the grid representing the non-passage area; constructing the connection relationship between the global key points, and using an algorithm to search and determine the navigation path based on the connection relationship between the global key points.

[0109] In addition, when the logical instructions in the above-mentioned memory 1230 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0110] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the key point path planning method based on distance transformation provided by the above-mentioned various methods. The method includes: based on the distance definition method, converting the grid map of the target area into a distance transformation map; extracting the points with maximum distance in the distance transformation map as candidate key points, and screening the candidate key points to obtain global key points. Among them, the circle generated with the global key point as the center and the distance value of the global key point as the radius has at least two contact points with the grid representing the non-passage area; constructing the connection relationship between the global key points, and using The algorithm searches and determines a navigation path based on the connection relationships between the global key points.

[0111] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a key point path planning method based on distance transformation provided by the above-mentioned various methods. The method includes: based on a distance definition method, converting a grid map of a target area into a distance transformation map; extracting distance maximum points as candidate key points in the distance transformation map, and screening the candidate key points to obtain global key points, wherein a circle generated with the global key point as the center and the distance value of the global key point as the radius has at least two contact points with the grid representing a non-passable area; constructing the connection relationships between the global key points, and using The algorithm searches and determines a navigation path based on the connection relationships between the global key points.

[0112] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0113] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing 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.

[0114] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A key point path planning method based on distance transformation, characterized in that including: Based on a distance definition method, converting a grid map of a target area into a distance transformation map; Extracting distance maximum points as candidate key points in the distance transformation map, and screening the candidate key points to obtain global key points, wherein a circle generated with a global key point as the center and the distance value of the global key point as the radius has at least two contact points with the grids representing non-passable areas; Construct the connection relationship between the global key points and use the algorithm to search and determine the navigation path based on the connection relationship between the global key points.

2. The key point path planning method based on distance transformation according to claim 1, wherein The step of extracting distance maximum points as candidate key points in the distance transformation map and screening the candidate key points to obtain global key points specifically includes: Using a selection box with a preset side length to traverse the passable area in the distance transformation map, and during the traversal, determining the grid with the maximum distance value in the selection box as the candidate key point; Generating a circle with a candidate key point as the center and the distance value of the candidate key point as the radius, and determining the candidate key point whose circle has at least two contact points with the grids representing non-passable areas as the global key point.

3. The key point path planning method based on distance transformation according to claim 1, wherein The step of constructing the connection relationship between the global key points specifically includes: Constructing a candidate connection relationship between global key points based on the Bresenham line algorithm, and screening the candidate connection relationship based on a predefined screening rule to obtain the connection relationship between the global key points; wherein, the predefined screening rule includes: When the distance between two global key points is greater than a preset distance threshold, screening out the candidate connection relationship between the two global key points; When the distance between the grids corresponding to the line connecting two global key points and the grids representing non-passable areas is less than a preset safety threshold, screening out the candidate connection relationship between the two global key points.

4. The key point path planning method based on distance transformation according to claim 1, characterized in that Before the step of constructing the connection relationship between the global key points, it further includes: Regarding the starting point and the target point of the robot as the global key points.

5. The key point path planning method based on distance transformation according to any one of claims 1-4, characterized in that The use The step of searching and determining a navigation path by the algorithm based on the connection relationship between the global key points specifically includes: Use The algorithm searches and determines a preliminary path based on the connection relationships between the global key points; Smoothing the preliminary path to obtain the navigation path.

6. The key point path planning method based on distance transformation according to claim 5, wherein The step of smoothing the preliminary path to obtain the navigation path specifically includes: Determining three adjacent global key points on the preliminary path; Replacing the path at the turning point of the preliminary path of the three global key points with the inscribed circular arc obtained by linking the three global key points.

7. A key point path planning device based on distance transformation, characterized in that, including: A conversion module for converting a grid map of a target area into a distance transformation map based on a distance definition method; An extraction module for extracting distance maximum points as candidate key points in the distance transformation map, and screening the candidate key points to obtain global key points, wherein a circle generated with a global key point as the center and the distance value of the global key point as the radius has at least two contact points with the grids representing non-passable areas; A determination module, configured to build connection relationships between the global key points and use an algorithm to search and determine a navigation path based on the connection relationships between the global key points.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the key point path planning method based on distance transformation according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the key point path planning method based on distance transformation according to any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the key point path planning method based on distance transformation according to any one of claims 1 to 6.

Citation Information

Cited By

  • Road network generation method, device and equipment

    CN120873307A