Vehicle path generation method based on Dynamic Voronoi diagram and related device
Through the path generation method based on Dynamic Voronoi graph, the environmental adaptability and computing efficiency problems of path planning in automatic parking scenes are solved, real-time adjustment and efficient generation of paths are realized, ensuring the safe and smooth driving of the vehicle.
Patent Information
- Application Number
- CN202510366153.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-25
AI Technical Summary
The existing path planning technology has weak environmental adaptability in automatic parking scenarios, making it difficult to adjust paths in real time, and has low computing efficiency, resulting in poor vehicle driving and increased system energy consumption.
Using the vehicle path generation method based on Dynamic Voronoi graph, we use a new binary raster map, update the distance map DM, determine whether the raster belongs to a generalized Voronoi graph, generate Voronoi edges, and obtain the vehicle path, and respond to environmental changes in real time.
Real-time adjustment of paths in dynamic environments is realized, the efficiency and security of path planning is improved, redundant calculations are reduced, and the continuity and smoothness of paths are ensured.
Smart Images

Figure CN120368992A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent driving, and relates to a vehicle path generation method and related device based on a Dynamic Voronoi diagram. Background Art
[0002] There is no doubt that intelligent driving technology will become the key core technology of the automotive industry in the near future. Although the current technology still has some flaws, the maturity of technology is not achieved overnight, but requires multiple rounds of market-oriented iterative upgrades. After more than 10 years of development, many vehicle manufacturers have mass-produced and installed autonomous driving function modules for some vehicle models.
[0003] Path planning is an important part of the field of autonomous driving, aiming to plan a safe, efficient, and comfortable driving path for autonomous vehicles. Especially in the automatic parking scenario, the importance of path planning is particularly prominent. Automatic parking requires the vehicle to be able to perceive the surrounding environment in real time and accurately, especially the distance information between the vehicle and the nearest obstacle. This is because, during the parking process, the distance between the vehicle and the obstacle is often very close, and any small error may lead to a collision accident.
[0004] However, the actual parking environment has a high degree of dynamics and uncertainty. Existing obstacles may change due to the movement of other vehicles, the walking of pedestrians, etc.; originally existing obstacles may disappear, such as a parked vehicle driving away; at the same time, new obstacles may also appear. Existing path planning technologies face many challenges when dealing with narrow area scenarios. The existing path planning algorithms have weak adaptability when dealing with dynamic environments and are difficult to adjust the planned path in a timely manner according to the real-time changes of obstacles, easily resulting in problems such as unreasonable path planning and unsmooth vehicle driving. At the same time, the existing calculation efficiency is low. When dealing with complex path planning problems, it requires a large amount of computing resources and time, which not only affects the parking efficiency but also increases the energy consumption and cost of the system. Summary of the Invention
[0005] The purpose of the present invention is to provide a vehicle path generation method and related device based on a Dynamic Voronoi diagram to solve the technical problems of poor environmental adaptability and low calculation efficiency in existing path planning technologies.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a vehicle path generation method based on a Dynamic Voronoi diagram, including the following steps:
[0008] Create a binary grid map without any obstacles, input the collected binary grid map, and perform data initialization of the grid map;
[0009] Add or remove obstacles in the grid map after data initialization is completed, and set the grid status;
[0010] Update the distance map DM according to the change of the grid status;
[0011] Based on the updated distance map DM, determine whether the grid belongs to the generalized Voronoi diagram to obtain the PruneQueue queue;
[0012] Traverse the grids in the PruneQueue queue to obtain the sortedPruneQueue queue; prune the grids in the sortedPruneQueue queue to obtain the Voronoi edges, and generate the vehicle path according to the Voronoi edges.
[0013] Further, the step of creating a binary grid map without any obstacles, inputting the collected binary grid map, and performing data initialization of the grid map specifically includes:
[0014] Create a binary grid map without any obstacles and input the collected binary grid map;
[0015] If a grid in the input binary grid map is occupied by an obstacle, continue to determine whether all 8 neighboring grids of this grid are occupied by obstacles;
[0016] If all 8 neighboring grids of this grid are occupied by obstacles, it is considered that the grid is inside the obstacle, then set the nearest obstacle of this grid to this grid; set the Voronoi status of this grid to Occupied, and set the Queueing status of this grid to FwProcessed, where FwProcessed means that the Lower action will not be triggered;
[0017] If not all 8 neighboring grids of this grid are occupied by obstacles, it is considered that the grid is on the boundary of the obstacle, set the Voronoi status of this grid to Occupied, add an obstacle corresponding to this grid, and set the Queueing status of this grid to FwQueued, and add this grid to the Open queue.
[0018] Further, the step of adding or removing obstacles in the grid map after data initialization is completed and setting the grid status specifically includes:
[0019] Set the raster map as a two-dimensional boolean array; when there is a new obstacle at a certain raster in the raster map, set the boolean value at that raster to true; and set the nearest obstacle of that raster to the raster at that location; set the Queueing status at that raster to FwQueued, where FwQueued represents adding the raster to the Open queue;
[0020] When an obstacle is removed at a certain raster in the raster map, set the boolean value at that raster to false; and set the nearest obstacle of that raster to no obstacle, add the raster coordinates to the Open queue, and set the Queueing status at that raster to BwQueued; set the needsRaise of that raster to true, where needsRaise represents whether the Raise action needs to be executed.
[0021] Further, the step of updating the distance map DM according to the change of the raster status specifically includes:
[0022] Add the raster with the changed status to the Open queue, and then traverse the Open queue;
[0023] If the Queueing status at the raster is not FwProcessed, execute the Raise action or the Lower action starting from the raster at that location;
[0024] If the Queueing status at the raster is FwProcessed, skip this raster and traverse the next raster in the Open queue;
[0025] Judge whether the needsRaise of the raster element popped from the Open queue is true. If it is true, it means that the Raise action needs to be executed.
[0026] Further, the execution process of the Raise action is as follows:
[0027] When the needsRaise of the raster is true, start to execute the Raise action; traverse the 8 neighboring rasters of that raster, then set the needsRaise of that raster to false, and set the Queueing status of that raster to BwProcessed;
[0028] When traversing the 8 neighboring rasters, if the needsRaise of one of the neighboring rasters is true, do not perform any processing on that neighboring raster; if the neighboring raster originally had the nearest obstacle and the needsRaise is false, further judge whether the nearest obstacle of that neighboring raster still exists;
[0029] If the nearest obstacle of the neighboring grid still exists, set the Queueing state of the neighboring grid to FwQueued and add the neighboring grid to the Open queue; if the nearest obstacle of the neighboring grid does not exist, set the Queueing state of the neighboring grid to FwQueued, add the neighboring grid to the Open queue, update the distance from the neighboring grid to the nearest obstacle to infinity, and set the needsRaise of the neighboring grid to true.
[0030] Further, the execution process of the Lower action is as follows:
[0031] When the needsRaise of the grid is false and an obstacle is currently detected at the position of the nearest obstacle grid of the grid, start to execute the Lower action;
[0032] Set the Queueing state of the grid to FwProcessed and the Voronoi state to Occupied, and then traverse the 8 neighboring grids of the grid;
[0033] Let the coordinates of the neighboring grid nc in the grid map be (nx, ny), the coordinates of the nearest obstacle of the grid in the grid map be (x_obs, y_obs), and the distance from the neighboring grid nc to its nearest obstacle be d_n. Assume:
[0034]
[0035] Δd_n = new_d_n - d_n
[0036] If Δd n = 0 and the neighboring grid nc has no nearest obstacle, or Δd n < 0, add the neighboring grid nc to the Open queue, set the Queueing state of the neighboring grid to FwQueued, and update the nearest obstacle of the neighboring grid to the nearest obstacle of the grid;
[0037] If Δd n > 0, continue to judge whether the grid and the neighboring grid nc belong to the generalized Voronoi diagram.
[0038] Further, the step of judging whether a grid belongs to the generalized Voronoi diagram based on the updated distance map DM to obtain the PruneQueue queue specifically includes:
[0039] Judge whether the grid c and the neighboring grid nc meet the prerequisite conditions for belonging to the generalized Voronoi diagram; the prerequisite conditions for belonging to the generalized Voronoi diagram include:
[0040] A) At least one of grid c and its neighboring grid nc does not have a nearest obstacle adjacent to it;
[0041] B) The nearest obstacle of neighboring grid nc exists;
[0042] C) The nearest obstacles of grid c and neighboring grid nc are different;
[0043] D) The nearest obstacles of grid c and neighboring grid nc are not adjacent;
[0044] After grid c and neighboring grid nc fully meet the above four judgment conditions A), B), C), and D), determine which one of grid c and neighboring grid nc will be added to the PruneQueue queue to be pruned; the PruneQueue queue stores Voronoi points that meet the Voronoi conditions;
[0045] Let the coordinates of neighboring grid nc in the grid map be (nx, ny); the coordinates of the nearest obstacle of neighboring grid nc in the grid map be (nx_obs, ny_obs), and the distance from neighboring grid nc to its nearest obstacle be d_n;
[0046] The coordinates of grid c in the grid map are (x, y), the coordinates of the nearest obstacle of grid c in the grid map are (x_obs, y_obs), and the distance from grid c to its nearest obstacle is d. Then, assume:
[0047]
[0048] When Δd < Δd_n and grid c does not have a nearest obstacle adjacent to it, add grid c to the PruneQueue queue to be pruned; at the same time, add the neighboring grids of grid c in the VoronoiKeep or VoronoiPrune state to the PruneQueue queue;
[0049] When Δd_n < Δd and neighboring grid nc does not have a nearest obstacle adjacent to it, add neighboring grid nc to the PruneQueue queue, and at the same time, add the neighboring grids of neighboring grid nc in the VoronoiKeep or VoronoiPrune state to the PruneQueue queue.
[0050] Furthermore, the steps of traversing the grids in the PruneQueue queue to obtain the sortedPruneQueue queue, pruning the grids in the sortedPruneQueue queue to obtain Voronoi edges, and generating a vehicle path based on the Voronoi edges specifically include:
[0051] Traverse the grids in the PruneQueue, and judge the grids popped from the PruneQueue in sequence. If the grid is not in the Occupied state, add the grid to the sortedPruneQueue;
[0052] Judge whether the 4 adjacent grids above, below, left, and right of the grid need to be added to the sortedPruneQueue;
[0053] If the state of the right grid r of the grid is Occupied, and the states of the 4 grids above, below, left, and right of the right grid r are not Occupied, reset the state of the right grid r to FreeQueued, and add the right grid r to the sortedPruneQueue;
[0054] If the state of the left grid l of the grid is Occupied, and the states of the 4 grids above, below, left, and right of the left grid l are not Occupied, reset the state of the left grid l to FreeQueued, and add the left grid l to the sortedPruneQueue;
[0055] If the state of the upper grid t of the grid is Occupied, and the states of the 4 grids above, below, left, and right of the upper grid t are not Occupied, reset the state of the upper grid t to FreeQueued, and add the upper grid t to the sortedPruneQueue;
[0056] If the state of the lower grid b of the grid is Occupied, and the states of the 4 grids above, below, left, and right of the lower grid b are not Occupied, reset the state of the lower grid b to FreeQueued, and add the lower grid b to the sortedPruneQueue;
[0057] Traverse whether the state of the grid s in the sortedPruneQueue is FreeQueued or VoronoiRetry. If the state of the grid s is neither FreeQueued nor VoronoiRetry, break out of this loop; if the state of the grid s is FreeQueued or VoronoiRetry, perform grid pattern matching to judge whether pruning, retention, or retry is required;
[0058] If the matching result is Pruned, reset the state of the grid s to VoronoiPrune and prune the grid;
[0059] If the matching result is Keep, reset the status of the grid s to VoronoiKeep, keep the grid s, and the grid s will form the edge of the Voronoi diagram.
[0060] If the matching result is Retry, reset the status of the grid s to VoronoiRetry and put it back into the queue PruneQueue.
[0061] When traversing to the last layer, the queue sortedPruneQueue is already empty at this time, and at the same time, it is judged whether the queue PruneQueue is non-empty; if it is non-empty, traverse PruneQueue and add the grids in it to the queue sortedPruneQueue, then traverse the grids in the queue sortedPruneQueue, and judge again whether pruning, keeping or retrying is needed until traversing sortedPruneQueue to the last layer, both the queue sortedPruneQueue and PruneQueue are empty, the pruning ends, the Voronoi edges are obtained, and the vehicle path is generated according to the Voronoi edges.
[0062] Further, the step of performing grid mode matching and judging whether pruning, keeping or retrying is needed specifically includes:
[0063] Let VoroCount be the statistics of all adjacent grids of grid s, and VoroCountFour be the statistics of the 4 neighbor grids of grid s above, below, left and right.
[0064] When the Voronoi status of the adjacent grids of grid s is VoronoiKeep, FreeQueued, VoronoiRetry or Free, set it to the logical value 1 and increment VoroCount by 1; when the adjacent grids with these statuses are located above, below, left and right of grid s, increment VoroCountFour by 1.
[0065] When the Voronoi status of the adjacent grids of grid s is Occupied or VoronoiPrune, set it to the logical value 0, and at this time, VoroCount and VoroCountFour remain unchanged.
[0066] 1) When VoroCountFour = 1 and VoroCount = 1, the matching result of grid s at this time is Keep, and grid s is kept.
[0067] 2) When VoroCountFour = 1 and VoroCount = 2, the matching result of grid s at this time is Keep, and grid s is kept.
[0068] 3) When VoroCountFour = 1 and VoroCount = 3, the matching result of grid s at this time is Pruned, and grid s is pruned;
[0069] 4) When VoroCountFour = 1 and VoroCount = 4, the matching result of grid s at this time is Pruned, and grid s is pruned;
[0070] 5) When VoroCountFour = 1 and VoroCount = 5, the matching result of grid s at this time is Pruned, and grid s is pruned;
[0071] When VoroCountFour = 2, if the logical values of two of the four adjacent grids above, below, left, and right of grid s are 1, and the logical values of the other two adjacent grids are 0; and among the remaining four adjacent grids of grid s, the logical values of the grids adjacent to these two adjacent grids with logical value 1 are 0 at the same time, and the logical values of the remaining three adjacent grids are 0 or 1, the matching result is Keep, grid s is retained, and the status of grid s is changed to VoronoiKeep;
[0072] If the logical values of two non - adjacent grids among the four adjacent grids above, below, left, and right of grid s are 1, and the logical values of the other two non - adjacent grids are 0, and the logical values of the remaining four adjacent grids are 0 or 1, the matching result is Keep, grid s is retained, and the status of grid s is changed to VoronoiKeep;
[0073] 6) When VoroCountFour = 2 and VoroCount = 2,
[0074] a. If the logical values of two adjacent grids among the four adjacent grids above, below, left, and right of grid s are 1, and the logical values of the remaining four adjacent grids of grid s are all 0, the matching result of grid s at this time is Keep, and grid s is retained;
[0075] b. If the logical values of two non - adjacent grids among the four adjacent grids above, below, left, and right of grid s are 1, and the logical values of the remaining four adjacent grids are all 0, the matching result of grid s at this time is Keep, and the grid is retained;
[0076] 7) When VoroCountFour = 2 and VoroCount = 3,
[0077] a. If there are two adjacent grids among the four adjacent grids (above, below, left, and right) of grid s with a logical value of 1, and the logical value of the grid that is adjacent to both of these two adjacent grids with a logical value of 1 among the remaining four adjacent grids of grid s is 0, and there is 1 grid with a logical value of 1 among the remaining 3 adjacent grids, then the matching result of grid s is Keep, and grid s is retained;
[0078] b. If there are two non - adjacent grids among the four adjacent grids (above, below, left, and right) of grid s with a logical value of 1, and there is 1 grid with a logical value of 1 among the remaining 4 adjacent grids, then the matching result of grid s is Keep, and grid s is retained;
[0079] 8) When VoroCountFour = 2 and VoroCount = 4,
[0080] a. If there are two adjacent grids among the four adjacent grids (above, below, left, and right) of grid s with a logical value of 1, and the logical value of the grid that is adjacent to both of these two adjacent grids with a logical value of 1 among the remaining four adjacent grids of grid s is 0, and there are 2 grids with a logical value of 1 among the remaining 3 adjacent grids, then the matching result of grid s is Keep, and grid s is retained;
[0081] b. If there are two non - adjacent grids among the four adjacent grids (above, below, left, and right) of grid s with a logical value of 1, and there are 2 grids with a logical value of 1 among the remaining 4 adjacent grids, then the matching result of grid s is Keep, and grid s is retained;
[0082] 9) When VoroCountFour = 2 and VoroCount = 5,
[0083] a. If there are two adjacent grids among the four adjacent grids (above, below, left, and right) of grid s with a logical value of 1, and the logical value of the grid that is adjacent to both of these two adjacent grids with a logical value of 1 among the remaining four adjacent grids of grid s is 0, and the logical values of the remaining 3 adjacent grids are all 1, then the matching result of grid s is Keep, and grid s is retained;
[0084] b. If there are two non - adjacent grids among the four adjacent grids (above, below, left, and right) of grid s with a logical value of 1, and there are 3 grids with a logical value of 1 among the remaining 4 adjacent grids, then the matching result of grid s is Keep, and grid s is retained;
[0085] 10) When VoroCountFour = 2 and VoroCount = 6, if there are two non - adjacent grids among the four adjacent grids (above, below, left, and right) of grid s with a logical value of 1, and the logical values of the remaining 4 adjacent grids are all 1, then the matching result of grid s is Keep, and grid s is retained;
[0086] 11) When VoroCountFour = 2 and VoroCount = 3, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of the grids that are adjacent to these two adjacent grids with logical value 1 at the same time are 1, and the logical values of the remaining 3 adjacent grids are all 0. At this time, the matching result of grid s is Pruned, and grid s is pruned;
[0087] 12) When VoroCountFour = 2 and VoroCount = 4, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of the grids that are adjacent to these two adjacent grids with logical value 1 at the same time are 1, and among the remaining 3 adjacent grids, the logical value of 1 grid is 1. At this time, the matching result of grid s is Pruned, and grid s is pruned;
[0088] 13) When VoroCountFour = 2 and VoroCount = 5, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of the grids that are adjacent to these two adjacent grids with logical value 1 at the same time are 1, and among the remaining 3 adjacent grids, the logical values of 2 grids are 1. At this time, the matching result of grid s is Pruned, and grid s is pruned;
[0089] 14) When VoroCountFour = 2 and VoroCount = 6, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and all the remaining 4 adjacent grids of grid s are 1. At this time, the matching result of grid s is Pruned, and grid s is pruned;
[0090] 15) When VoroCountFour = 3 and VoroCount = 3, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and the logical values of the remaining 4 adjacent grids of grid s are all 0. At this time, the matching result of grid s is Keep, and grid s is retained;
[0091] 16) When VoroCountFour = 3 and VoroCount = 4, that is, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical value of 1 grid is 1. At this time, the matching result of grid s is Keep, and grid s is retained;
[0092] 17) When VoroCountFour = 3 and VoroCount = 5, that is, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of 2 grids are 1. At this time, it is impossible to determine whether pruning is required and further judgment is needed. Return the matching result as Retry for retry;
[0093] 18) When VoroCountFour = 3 and VoroCount = 6, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of 3 grids are 1. At this time, it is impossible to determine whether pruning is required and further judgment is needed. Return the matching result as Retry for retry;
[0094] 19) When VoroCountFour = 3 and VoroCount = 7, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and all the remaining 4 adjacent grids of grid s are 1. At this time, it is impossible to determine whether pruning is required and further judgment is needed. Return the matching result as Retry for retry;
[0095] 20) When VoroCountFour = 4 and VoroCount = 4, that is, all the 4 adjacent grids above, below, left, and right of grid s have a logical value of 1, and the logical values of all the remaining 4 adjacent grids of grid s are 0. At this time, the matching result of grid s is Keep to keep grid s;
[0096] 21) When VoroCountFour = 4 and VoroCount = 5, that is, all the 4 adjacent grids above, below, left, and right of grid s have a logical value of 1, and among the remaining 4 adjacent grids of grid s, the logical value of 1 grid is 1. At this time, it is impossible to determine whether pruning is required and further judgment is needed. Return the matching result as Retry for retry;
[0097] 22) When VoroCountFour = 4 and VoroCount = 6, that is, all the 4 adjacent grids above, below, left, and right of grid s have a logical value of 1, and among the remaining 4 adjacent grids of grid s, the logical values of 2 grids are 1. At this time, it is impossible to determine whether pruning is required and further judgment is needed. Return the matching result as Retry for retry;
[0098] 23) When VoroCountFour = 4 and VoroCount = 7, that is, all the 4 adjacent grids above, below, left, and right of grid s have a logical value of 1, and among the remaining 4 adjacent grids of grid s, the logical values of 3 grids are 1. At this time, it is impossible to determine whether pruning is required and further judgment is needed. Return the matching result as Retry for retry;
[0099] 24) When VoroCountFour = 4 and VoroCount = 8, that is, the 4 adjacent grids above, below, left, and right of grid s are all logical value 1, and the remaining 4 adjacent grids of grid s are all 1. At this time, it is impossible to determine whether pruning is required and further judgment is needed. Return the matching result as Retry and retry.
[0100] In a second aspect, the present invention provides a vehicle path generation system based on a Dynamic Voronoi diagram, including:
[0101] An initialization module for creating a binary grid map without any obstacles, inputting the collected binary grid map, and performing data initialization of the grid map;
[0102] An obstacle setting module for adding or removing obstacles in the grid map after data initialization is completed and setting the grid state;
[0103] A DM update module for updating the distance map DM according to the change of the grid state;
[0104] A judgment module for judging whether a grid belongs to a generalized Voronoi diagram based on the updated distance map DM to obtain a PruneQueue queue;
[0105] A pruning module for traversing the grids in the PruneQueue queue to obtain a sortedPruneQueue queue; pruning the grids in the sortedPruneQueue queue to obtain Voronoi edges, and generating a vehicle path according to the Voronoi edges.
[0106] In a third aspect, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.
[0107] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0108] Compared with the prior art, the present invention has the following beneficial effects:
[0109] The present invention discloses a vehicle path generation method and related device based on a Dynamic Voronoi diagram. Based on the already generated Voronoi diagram, a new Voronoi diagram can be quickly generated. After further smoothing and optimizing the Voronoi lines, a path conforming to vehicle kinematics can be output. The present invention can respond to environmental changes in real time (such as temporary construction, traffic control, or sudden obstacles), ensuring the timeliness and safety of path planning. Combining with the real-time update mechanism of the distance map (DM), the generation of the generalized Voronoi diagram can be dynamically adjusted to avoid the problem of the failure of traditional static path planning in a dynamic environment. Finally, pruning is performed to significantly reduce redundant calculations and ensure path continuity and smoothness. Description of the Drawings
[0110] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0111] Figure 1 It is a flowchart of the method of the present invention;
[0112] Figure 2 It is a schematic diagram of the system of the present invention;
[0113] Figure 3 It is a parking scene map input in the embodiment of the present invention;
[0114] Figure 4 It is a Voronoi diagram output in the embodiment of the present invention;
[0115] Figure 5 It is a schematic diagram of adjacent grids in the embodiment of the present invention;
[0116] Figure 6 It is the first case of grid matching in the embodiment of the present invention;
[0117] Figure 7 It is the second case of grid matching in the embodiment of the present invention;
[0118] Figure 8 It is the third case of grid matching in the embodiment of the present invention;
[0119] Figure 9 It is the fourth case of grid matching in the embodiment of the present invention;
[0120] Figure 10 It is the fifth case of grid matching in the embodiment of the present invention;
[0121] Figure 11 This is the sixth case of grid matching in the embodiments of the present invention;
[0122] Figure 12 This is the seventh case of grid matching in the embodiments of the present invention;
[0123] Figure 13 This is the eighth case of grid matching in the embodiments of the present invention;
[0124] Figure 14 This is the ninth case of grid matching in the embodiments of the present invention;
[0125] Figure 15 This is the tenth case of grid matching in the embodiments of the present invention;
[0126] Figure 16 This is the eleventh case of grid matching in the embodiments of the present invention;
[0127] Figure 17 This is the twelfth case of grid matching in the embodiments of the present invention;
[0128] Figure 18 This is the thirteenth case of grid matching in the embodiments of the present invention;
[0129] Figure 19 This is the fourteenth case of grid matching in the embodiments of the present invention;
[0130] Figure 20 This is the fifteenth case of grid matching in the embodiments of the present invention;
[0131] Figure 21 This is the sixteenth case of grid matching in the embodiments of the present invention;
[0132] Figure 22 This is the seventeenth case of grid matching in the embodiments of the present invention;
[0133] Figure 23 This is the eighteenth case of grid matching in the embodiments of the present invention;
[0134] Figure 24 This is the nineteenth case of grid matching in the embodiments of the present invention;
[0135] Figure 25 This is the twentieth case of grid matching in the embodiments of the present invention;
[0136] Figure 26 This is the twenty - first case of grid matching in the embodiments of the present invention;
[0137] Figure 27 This is the twenty - second case of grid matching in the embodiments of the present invention;
[0138] Figure 28This is the twenty-third case of grid matching in the embodiment of the present invention;
[0139] Figure 29 This is the twenty-fourth case of grid matching in the embodiment of the present invention. Specific embodiments
[0140] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other.
[0141] The following detailed descriptions are all exemplary descriptions, aiming to provide further details of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as commonly understood by those of ordinary skill in the art to which this application belongs. The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention.
[0142] See Figure 1, embodiments of the present invention disclose a vehicle path generation method based on a Dynamic Voronoi diagram. The Voronoi diagram is a method of dividing a plane proposed by the Ukrainian mathematician Georgy Voronoi. This method divides the plane into several sub-regions according to a given set of seed points. All points within each sub-region are closer to the seed point of that sub-region than to any other seed point. Currently, there are mainly two algorithms for generating Voronoi diagrams: the incremental algorithm and the divide-and-conquer algorithm. The incremental algorithm initially sets each point as a Voronoi region. For each newly inserted point, calculate its distances to all existing points, assign it to the Voronoi region of the closest point, and update the boundaries of the Voronoi region. The divide-and-conquer algorithm initially considers the entire space as a Voronoi region and determines whether the number of points contained in the region is less than a certain threshold (such as 3 points). If less than the threshold, directly calculate the Voronoi diagram of this region; otherwise, divide the region into two smaller sub-regions along the perpendicular bisector and recursively calculate the Voronoi diagrams of each sub-region, and then merge the Voronoi diagrams of the two smaller sub-regions. The map used in the vehicle parking scenario is provided by a perception system (such as lidar or camera). When a new obstacle appears in the map, start from the grid at the boundary of the obstacle and gradually update the attached information of the grid outward (including the coordinates and distance of the nearest obstacle, which may be closer to the new obstacle). Set the update of the state of these grids as a process of decreasing distance, denoted as Lower. When an old obstacle disappears from the map, then the grids that previously used the old obstacle as the nearest obstacle will no longer have a nearest obstacle, and it is necessary to update the attached information of these grids (including the coordinates and distance of the nearest obstacle, and the distance is set to infinity). Set the update of the state of these grids as a process of increasing distance, denoted as Raise. The movement of an obstacle can be decomposed into the disappearance of the obstacle at the original position and the appearance of the obstacle at the new position.
[0143] Two enumeration types are defined in the present invention: QueueingState (i.e., the Queueing state) and VoronoiState (i.e., the Voronoi state).
[0144] typedef enum{FwNotQueued = 1, FwQueued = 2, FwProcessed = 3, BwQueued = 4,
[0145] BwProcessed = 5}QueueingState;
[0146] typedef enum{VoronoiKeep = -4, FreeQueued = -3, VoronoiRetry = -2, VoronoiPrune
[0147] = -1, Free = 0, Occupied = 1} VoronoiState;
[0148] Among them, the enumeration value FwNotQueued in the enumeration type QueueingState represents that the grid is not in the Open queue, FwQueued represents that the grid is in the Open queue (Lower trigger), FwProcessed represents that the Lower action will not be triggered, BwQueued represents that the grid is in the Open queue (Raise trigger), and BwProcessed represents that the Raise action will not be triggered.
[0149] The enumeration value VoronoiKeep in the enumeration type VoronoiState represents that the grid is a part of the Voronoi diagram; FreeQueued represents that the grid has been added to the SortedPruneQueue; VoronoiRetry means that the grid will be put back into the PruneQueue; VoronoiPrune means that the grid will be pruned; Free represents that the grid is not occupied by an obstacle; Occupied represents that the grid is occupied by an obstacle and cannot form a Voronoi diagram.
[0150] The specific implementation process of the method of the present invention is as follows:
[0151] S1. Create a binary grid map without any obstacles, input the collected binary grid map, and perform data initialization of the grid map;
[0152] The algorithm in the present invention is implemented based on a grid map. The grid map can be understood as decomposing the local map where the vehicle is located into many identical small squares. The shorter the side length of the small square, the higher the accuracy, but the number of small squares will increase. First, a binary grid map where none of the grids are occupied by any obstacles is newly created. Then, the user inputs a collected binary grid map. If a certain grid in the input binary grid map is occupied by an obstacle, it is then continued to determine whether all 8 neighboring grids of this grid are occupied by obstacles. If this grid and its 8 neighboring grids are all occupied by obstacles, it is considered that this grid is inside the obstacle. Then, the nearest obstacle of this grid is set to this grid (that is, the distance to the nearest obstacle is 0), the Voronoi state of this grid is set to Occupied; the Queueing state of this grid is set to FwProcessed (representing that the Lower action will not be triggered). Because this grid is inside the obstacle, it means that its 8 neighboring grids are also occupied by obstacles, and the information related to the nearest obstacle of its 8 neighboring grids will not be updated. To give a simple example, this grid is equivalent to a person's eyes being covered all the time. Whether it is covered with a towel first and then a tissue or something else, the result for the person's eyes is that they can't see anything all the time, and the obstacle is right in front of them. If not all of the 8 neighboring grids of this grid are occupied by obstacles, it is considered that this grid is on the boundary of the obstacle (the Lower action will be triggered). The Voronoi state of this grid is set to Occupied, an obstacle is added at this grid (see S2), and the Queueing state of this grid is set to FwQueued (FwQueued represents adding the grid to the Open queue), and this grid is added to the Open queue. Because this grid is at the boundary of the obstacle, it means that some of its 8 neighboring grids are not occupied by obstacles, and the information related to the nearest obstacle of these neighboring grids may be updated, that is, some of these neighboring grids may be the closest to the obstacle at this grid, and the information related to the nearest obstacle will be updated.
[0153] S2. Add or remove obstacles in the grid map after data initialization is completed, and set the grid state;
[0154] If there is a new obstacle at a certain grid in the grid map (assumed to be a two-dimensional boolean array), then the boolean value at this grid is set to true (i.e., 1), the nearest obstacle of this grid is set to this grid (at this time, the distance to the nearest obstacle is 0), the Voronoi state of this grid is set to Occupied, the coordinates of this grid are added to the Open queue, and the Queueing state of this grid is set to FwQueued (FwQueued represents adding this grid to the Open queue).
[0155] If an obstacle is removed from a grid in the grid map, the Boolean value at that grid is set to false (i.e., 0), the nearest obstacle at that grid is set to no obstacle, the grid coordinates are added to the Open queue, the Queueing state at that grid is set to BwQueued (BwQueued means the grid is in the Open queue), and the needsRaise (representing whether the Raise action needs to be executed) at that grid is set to true. Since the obstacle is cleared, the nearest obstacle at that grid needs to be updated to be farther than the original one.
[0156] S3. Update the distance map DM according to the change of the grid state;
[0157] First, add the grid where the state change (occupied to unoccupied or unoccupied to occupied) occurs to the Open priority queue, and then traverse the Open priority queue. If the Queueing state at the grid is not FwProcessed, execute the Raise action or the Lower action starting from that grid; if the Queueing state at the grid is FwProcessed, skip that grid and traverse the next grid in the Open queue. Determine whether the needsRaise of the grid element popped from the Open priority queue is true. If it is true, it means the Raise action needs to be executed.
[0158] Specifically, the Raise action includes:
[0159] When the `needsRaise` (indicating whether the Raise action needs to be performed) of a grid is true, the Raise action starts. Since this grid is surrounded by 8 neighboring grids in total, traverse the 8 neighboring grids of this grid. After traversing the 8 neighboring grids of this grid, set the `needsRaise` (indicating whether the Raise action needs to be performed) of this grid to false, that is, no longer perform Raise for this grid, and set the Queueing state of this grid to BwProcessed (using BwProcessed to represent that all 8 neighboring grids of the grid have undergone Raise). When traversing the 8 neighboring grids, if the `needsRaise` (indicating whether the Raise action needs to be performed) of a neighboring grid is true, no processing will be done to this neighboring grid; if the neighboring grid originally had a nearest obstacle and the `needsRaise` (indicating whether the Raise action needs to be performed) is false, then further determine whether the nearest obstacle of this neighboring grid still exists. If the nearest obstacle of this neighboring grid still exists, set the Queueing state of this neighboring grid to FwQueued, and add this neighboring grid to the Open priority queue; if the nearest obstacle of this neighboring grid does not exist, set the Queueing state of this neighboring grid to FwQueued, add this neighboring grid to the Open priority queue, update the distance from this neighboring grid to the nearest obstacle to infinity, and set the `needsRaise` (indicating whether the Raise action needs to be performed) of this neighboring grid to true.
[0160] Specifically, the Lower action includes:
[0161] When the `needsRaise` (indicating whether the Raise action needs to be performed) of a grid is false and an obstacle is currently detected at the position of the nearest obstacle grid of this grid, the Lower action starts. First, set the Queueing state of this grid to FwProcessed and the Voronoi state to Occupied, and then traverse the 8 neighboring grids of this grid.
[0162] Let the coordinates of the neighboring grid nc in the grid map be (nx, ny), the coordinates of the nearest obstacle of this grid in the grid map be (x_obs, y_obs), and the distance from the neighboring grid nc to its nearest obstacle be d_n. Assume
[0163]
[0164] Δd_n = new_d_n - d_n
[0165] If Δd n= 0 (i.e., the distance from the nearest obstacle of the neighboring grid nc to this grid is equal to the distance from the nearest obstacle of the neighboring grid nc to itself) and the neighboring grid nc has no nearest obstacle, or Δd n < 0 (i.e., the distance from the nearest obstacle of the neighboring grid nc to this grid is closer than the distance from the nearest obstacle of the neighboring grid nc to itself), then add the neighboring grid nc to the Open priority queue, set the Queueing status of the neighboring grid to FwQueued, and update the nearest obstacle of the neighboring grid to the nearest obstacle of this grid.
[0166] If Δd n > 0 (i.e., the distance from the nearest obstacle of the neighboring grid nc to this grid is farther than the distance from the nearest obstacle of the neighboring grid nc to itself), then continue to determine whether this grid and the neighboring grid nc belong to the Generalized Voronoi Diagram (abbreviated as GVD).
[0167] S4. Based on the updated distance map DM, determine whether the grid belongs to the Generalized Voronoi Diagram to obtain the PruneQueue queue;
[0168] First, determine whether the grid c and the neighboring grid nc meet the following 4 judgment conditions. If any of the judgment conditions is not met, it is impossible to determine whether c and nc belong to the Generalized Voronoi Diagrams (abbreviated as GVD). The 4 judgment conditions are as follows:
[0169] A) At least one of the grid c and the neighboring grid nc has no nearest obstacle adjacent to it, that is, at least one of them is at a distance greater than 1 from its nearest obstacle.
[0170] B) The nearest obstacle of the neighboring grid nc exists;
[0171] C) The nearest obstacles of the grid c and the neighboring grid nc are different;
[0172] D) The nearest obstacles of the grid c and the neighboring grid nc are not adjacent; that is, the distance between them must be greater than 1; if they are adjacent, they belong to the same obstacle, and at this time, it is impossible to determine whether c and nc belong to the GVD.
[0173] When all of the above 4 judgment conditions are met, then design the following algorithm to determine which of c and nc will be added to the PruneQueue queue to be pruned. The PruneQueue queue stores the Voronoi points that meet the Voronoi conditions.
[0174] Let the coordinates of the grid nc in the grid map be (nx, ny), the coordinates of the nearest obstacle to the neighboring grid nc in the grid map be (nx_obs, ny_obs), and the distance from the neighboring grid nc to its nearest obstacle be d_n;
[0175] The coordinates of the grid c in the grid map are (x, y), the coordinates of the nearest obstacle to the grid c in the grid map are (x_obs, y_obs), and the distance from the grid c to its nearest obstacle is d. Then let
[0176]
[0177] There are the following two cases:
[0178] 1. If Δd < Δd_n and c is not adjacent to its nearest obstacle, then add c to the PruneQueue queue to be pruned; at the same time, add the neighboring grids of c that meet the conditions (i.e., in the VoronoiKeep or VoronoiPrune state) to the PruneQueue queue; because the points belonging to the GVD must be the closest to the surrounding obstacles.
[0179] 2. If Δd_n < Δd and nc is not adjacent to its nearest obstacle, then add nc to the PruneQueue queue; at the same time, add the neighboring grids of nc that meet the conditions (i.e., in the VoronoiKeep or VoronoiPrune state) to the PruneQueue queue.
[0180] S5. Traverse the grids in the PruneQueue queue to obtain the sortedPruneQueue queue; prune the grids in the sortedPruneQueue queue to obtain the Voronoi edges, and generate the vehicle path according to the Voronoi edges.
[0181] Background: If a road is exactly in the middle of two rows of room obstacles, the width of the road is constant and is the sum of an even number of grid widths, then only the two middle rows of grids can be selected as candidate Voronoi edges because the two middle rows of grids are equidistant from the obstacles on both sides. For example, if the grid width is 0.5 meters and the road width is 4 meters, then the road width is equal to the sum of 8 grid widths. At this time, only the 4th and 5th grids in the middle can be selected as candidate Voronoi edges. And finally, only one grid can be selected as the final Voronoi edge, and this is when pruning is involved.
[0182] The main purpose of pruning is to reduce the Voronoi edges with a width of two grids to those with a width of one grid, and at the same time, set the grids sandwiched by the two Voronoi edges as alternatives. That is, perform pruning operations on the Voronoi points in the PruneQueue to obtain precise and accurate Voronoi edges with a single-pixel width. There are the following two steps:
[0183] The first step: Traverse the grids in the PruneQueue, and determine whether each grid in the queue container and its four adjacent grids above, below, left, and right need to be added to the sortedPruneQueue.
[0184] First, determine whether the grid popped from the queue in sequence needs to be added to the sortedPruneQueue. If the grid is not in the Occupied state, add the grid to the sortedPruneQueue. The specific implementation steps are as follows:
[0185] 1 st : If the state of the grid is Occupied (indicating that the grid is occupied by an obstacle), then the grid definitely does not belong to the Voronoi edge and cannot be added to the sortedPruneQueue, and this loop is exited;
[0186] 2 nd : If the state of the grid is FreeQueued (indicating that the grid has been added to the sortedPruneQueue), then this loop is exited, and the grid will be processed when traversing the sortedPruneQueue in the second step;
[0187] 3 rd : If the state of the grid is neither Occupied nor FreeQueued, then reset the state of the grid to FreeQueued and add the grid to the sortedPruneQueue.
[0188] Next, determine whether the four adjacent grids above, below, left, and right of the grid need to be added to the sortedPruneQueue. Use s to represent the grid, l to represent the grid immediately to the left of the grid, r to represent the grid immediately to the right of the grid, t to represent the grid immediately above the grid, and b to represent the grid immediately below the grid, as shown in Figure 5 shown.
[0189] 1. If the state of the right grid r is Occupied, and the states of the four grids above, below, left, and right of r are not Occupied, then reset the state of r to FreeQueued and add the grid r to the sortedPruneQueue;
[0190] 2. If the status of the left grid l is Occupied and the statuses of the four grids above, below, left, and right of l are not Occupied, then reset the status of l to FreeQueued and add grid l to the queue sortedPruneQueue.
[0191] 3. If the status of the upper grid t is Occupied and the statuses of the four grids above, below, left, and right of t are not Occupied, then reset the status of t to FreeQueued and add grid t to the queue sortedPruneQueue.
[0192] 4. If the status of the lower grid b is Occupied and the statuses of the four grids above, below, left, and right of b are not Occupied, then reset the status of b to FreeQueued and add grid b to sortedPruneQueue.
[0193] Step 2: Traverse the grids in the queue sortedPruneQueue to determine whether to prune, keep, or retry.
[0194] First, determine whether the status of the grid is FreeQueued or VoronoiRetry. If the status of the grid is neither FreeQueued nor VoronoiRetry, then break out of this loop. If the status of the grid is FreeQueued or VoronoiRetry, then perform grid pattern matching. See the following specific introduction for how to match the grid pattern. There are 3 types of matching results: Pruned, Keep, Retry.
[0195] 1. If the matching result is Pruned, then reset the status of the grid to VoronoiPrune, that is, prune the grid.
[0196] 2. If the matching result is Keep, then reset the status of the grid to VoronoiKeep, that is, keep the grid, and the grid will form the edge of the Voronoi diagram.
[0197] 3. If the matching result is Retry, then reset the status of the grid to VoronoiRetry and put it back into the queue PruneQueue.
[0198] When traversing to the last layer, the queue sortedPruneQueue is actually empty at this time. At the same time, it is judged whether the queue PruneQueue is non-empty. If it is non-empty, traverse PruneQueue and add the grids (all the grids here need to be retried) to the queue sortedPruneQueue. After adding the grids in the non-empty queue PruneQueue to sortedPruneQueue, the queue sortedPruneQueue will no longer be empty. After that, it will continue to traverse the grids in the queue sortedPruneQueue and judge again whether pruning, retention or retry is needed. Until a certain traversal of sortedPruneQueue reaches the last layer, both the queue sortedPruneQueue and PruneQueue are empty, indicating that there are no more grids in the VoronoiRetry state. At this time, the traversal of the queue sortedPruneQueue ends. At the same time, it also means that the pruning process ends, and the Voronoi edges are obtained. Further, the vehicle path can be generated according to the Voronoi edges.
[0199] After the traversal in the above two steps, each non-Occupied state grid in the queue PruneQueue and the grids in the FreeQueued state among its 4 adjacent grids (up, down, left, and right) are finally converted into grids in the VoronoiPrune or VoronoiKeep state.
[0200] In a feasible implementation manner of the present invention, the matching of the grid patterns specifically includes:
[0201] Since the grid s plays a connecting role, otherwise it will cause the Voronoi edge to break. In this part, the states of the 8 adjacent grids around the grid s are used to judge whether to retain, prune or retry the grid s. Let VoroCount be the statistics of all adjacent grids of the grid s, and VoroCountFour be the statistics of the 4 neighbor grids (up, down, left, and right) of the grid s. Obviously, VoroCount includes VoroCountFour.
[0202] When the Voronoi state of the adjacent grid of the grid s is VoronoiKeep, FreeQueued, VoronoiRetry, or Free, it is set to the logical value 1, and VoroCount is incremented by 1; when the adjacent grids with these states are located above, below, left, or right of the s grid, VoroCountFour is incremented by 1.
[0203] When the Voronoi states of the adjacent grids of grid s are Occupied or VoronoiPrune, set it to the logical value 0. At this time, VoroCount and VoroCountFour remain unchanged.
[0204] Based on the numbers of VoroCountFour and VoroCount, it can be divided into the following 24 cases:
[0205] 1) When VoroCountFour = 1 and VoroCount = 1, that is, only one of the four adjacent grids (above, below, left, and right) of grid s has a logical value of 1, and the logical values of the remaining adjacent grids are all 0. There is a total of 1 case, as shown in Figure 6 , at this time, the matching result of grid s is Keep, that is, keep grid s.
[0206] 2) When VoroCountFour = 1 and VoroCount = 2, that is, only one of the four adjacent grids (above, below, left, and right) of grid s has a logical value of 1, and only 1 of the remaining 4 adjacent grids has a logical value of 1. There are a total of 2 cases, as shown in Figure 7 , at this time, the matching result of grid s is Keep, that is, keep grid s.
[0207] 3) When VoroCountFour = 1 and VoroCount = 3, that is, only one of the four adjacent grids (above, below, left, and right) of grid s has a logical value of 1, and 2 of the remaining 4 adjacent grids have logical values of 1. There are a total of 4 cases, as shown in Figure 8 , at this time, the matching result of grid s is Pruned, that is, prune grid s.
[0208] 4) When VoroCountFour = 1 and VoroCount = 4, that is, only one of the four adjacent grids (above, below, left, and right) of grid s has a logical value of 1, and 3 of the remaining 4 adjacent grids have logical values of 1. There are a total of 2 cases, as shown in Figure 9 , at this time, the matching result of grid s is Pruned, that is, prune grid s.
[0209] 5) When VoroCountFour = 1 and VoroCount = 5, that is, only one of the four adjacent grids (above, below, left, and right) of grid s has a logical value of 1, and the logical values of the remaining 4 adjacent grids are all 1. There is a total of 1 case, as shown in Figure 10 (a), at this time, the matching result of grid s is Pruned, that is, prune grid s.
[0210] When VoroCountFour = 2, if among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1 and the logical values of the other two adjacent grids are 0. And among the remaining 4 adjacent grids of grid s, the logical value of the grid that is adjacent to both of these two adjacent grids with logical value 1 is 0, and the logical values of the remaining 3 adjacent grids can be 0 or 1. There are 4 major categories, as shown in Figure 10 (b), (c), (d), (e). In this case, it should be discussed in different situations. The matching results of these 4 major categories are Keep, that is, keep grid s and change the state of grid s to VoronoiKeep.
[0211] If among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two non - adjacent grids are 1 and the logical values of the other two non - adjacent grids are 0. The logical values of the remaining 4 adjacent grids can be 0 or 1. There are 2 major categories, as shown in Figure 10 (f), (g). In this case, it should be discussed in different situations. The matching results of these 2 major categories are Keep, that is, keep grid s and change the state of grid s to VoronoiKeep.
[0212] 6) When VoroCountFour = 2 and VoroCount = 2,
[0213] If among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and the logical values of the remaining 4 adjacent grids of grid s are all 0. There is 1 case, as shown in Figure 11 (a). At this time, the matching result of grid s is Keep, that is, keep grid s.
[0214] If among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two non - adjacent grids are 1, and the logical values of the remaining 4 adjacent grids are all 0. There is 1 case, as shown in Figure 11 (b). At this time, the matching result of grid s is Keep, that is, keep grid s.
[0215] 7) When VoroCountFour = 2 and VoroCount = 3,
[0216] If among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical value of the grid that is adjacent to both of these two adjacent grids with logical value 1 is 0, and among the remaining 3 adjacent grids, the logical value of 1 grid is 1. There are 2 cases, as shown in Figure 12 (a), (b). At this time, the matching result of grid s is Keep, that is, keep grid s.
[0217] If there are two non - adjacent grids among the four upper, lower, left, and right adjacent grids of grid s with a logical value of 1, and there is 1 grid with a logical value of 1 among the remaining four adjacent grids. There is a total of 1 case, see Figure 12 (c), at this time, the matching result of grid s is Keep, that is, grid s is retained.
[0218] 8) When VoroCountFour = 2 and VoroCount = 4,
[0219] If there are two adjacent grids among the four upper, lower, left, and right adjacent grids of grid s with a logical value of 1, and the grid that is adjacent to both of these two grids with a logical value of 1 among the remaining four adjacent grids of grid s has a logical value of 0, and there are 2 grids with a logical value of 1 among the remaining 3 adjacent grids. There are a total of 2 cases, see Figure 13 (a), (b), at this time, the matching result of grid s is Keep, that is, grid s is retained.
[0220] If there are two non - adjacent grids among the four upper, lower, left, and right adjacent grids of grid s with a logical value of 1, and there are 2 grids with a logical value of 1 among the remaining four adjacent grids. There are a total of 3 cases, see Figure 13 (c), (d), (e), at this time, the matching result of grid s is Keep, that is, grid s is retained.
[0221] 9) When VoroCountFour = 2 and VoroCount = 5,
[0222] If there are two adjacent grids among the four upper, lower, left, and right adjacent grids of grid s with a logical value of 1, and the grid that is adjacent to both of these two grids with a logical value of 1 among the remaining four adjacent grids of grid s has a logical value of 0, and the logical values of the remaining 3 adjacent grids are all 1. There is a total of 1 case, see Figure 14 (a), at this time, the matching result of grid s is Keep, that is, grid s is retained.
[0223] If there are two non - adjacent grids among the four upper, lower, left, and right adjacent grids of grid s with a logical value of 1, and there are 3 grids with a logical value of 1 among the remaining four adjacent grids. There is a total of 1 case, see Figure 14 (b), at this time, the matching result of grid s is Keep, that is, grid s is retained.
[0224] 10) When VoroCountFour = 2 and VoroCount = 6, if there are two non - adjacent grids among the four upper, lower, left, and right adjacent grids of grid s with a logical value of 1, and the logical values of the remaining four adjacent grids are all 1. There is a total of 1 case, see Figure 15 , at this time, the matching result of grid s is Keep, that is, grid s is retained.
[0225] 11) When VoroCountFour = 2 and VoroCount = 3, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of the grids that are adjacent to both of these two adjacent grids with logical value 1 are 1, and the logical values of the remaining 3 adjacent grids are all 0. There is a total of 1 case, see Figure 16 , at this time, the matching result of grid s is Pruned, that is, prune grid s.
[0226] 12) When VoroCountFour = 2 and VoroCount = 4, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of the grids that are adjacent to both of these two adjacent grids with logical value 1 are 1, and among the remaining 3 adjacent grids, the logical value of 1 grid is 1. There are a total of 2 cases, see Figure 17 , at this time, the matching result of grid s is Pruned, that is, prune grid s.
[0227] 13) When VoroCountFour = 2 and VoroCount = 5, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of the grids that are adjacent to both of these two adjacent grids with logical value 1 are 1, and among the remaining 3 adjacent grids, the logical values of 2 grids are 1. There are a total of 2 cases, see Figure 18 , at this time, the matching result of grid s is Pruned, that is, prune grid s.
[0228] 14) When VoroCountFour = 2 and VoroCount = 6, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and all the remaining 4 adjacent grids of grid s are 1. There is a total of 1 case, see Figure 19 (a), at this time, the matching result of grid s is Pruned, that is, prune grid s.
[0229] If among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1. And among the remaining 4 adjacent grids of grid s, the logical values of the grids that are adjacent to both of these two adjacent grids with logical value 1 are 0. There is a total of 1 major category, see Figure 19 (b), and this should be discussed in different cases.
[0230] 15) When VoroCountFour = 3 and VoroCount = 3, that is, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and the logical values of all the remaining 4 adjacent grids of grid s are 0. There is a total of 1 case, see Figure 20 , at this time, the matching result of grid s is Keep, that is, keep grid s.
[0231] 16) When VoroCountFour = 3 and VoroCount = 4, that is, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical value of 1 grid is 1. There are 2 cases in total, as shown in Figure 21 , at this time, the matching result of grid s is Keep, that is, grid s is retained.
[0232] 17) When VoroCountFour = 3 and VoroCount = 5, that is, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of 2 grids are 1. There are 4 cases in total, as shown in Figure 22 , at this time, there are many grids that may be retained around grid s, and it is impossible to determine whether pruning is required. Further judgment is needed, and the returned matching result is Retry, that is, retry.
[0233] 18) When VoroCountFour = 3 and VoroCount = 6, that is, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and among the remaining 4 adjacent grids of grid s, the logical values of 3 grids are 1. There are 2 cases in total, as shown in Figure 23 , at this time, there are many grids that may be retained around grid s, and it is impossible to determine whether pruning is required. Further judgment is needed, and the returned matching result is Retry, that is, retry.
[0234] 19) When VoroCountFour = 3 and VoroCount = 7, that is, among the 4 adjacent grids above, below, left, and right of grid s, the logical values of 3 adjacent grids are 1, and all the remaining 4 adjacent grids of grid s are 1. There are 2 cases in total, as shown in Figure 24 , at this time, there are many grids that may be retained around grid s, and it is impossible to determine whether pruning is required. Further judgment is needed, and the returned matching result is Retry, that is, retry.
[0235] 20) When VoroCountFour = 4 and VoroCount = 4, that is, all the 4 adjacent grids above, below, left, and right of grid s have a logical value of 1, and the logical values of all the remaining 4 adjacent grids of grid s are 0. There is 1 case in total, as shown in Figure 25 , at this time, the matching result of grid s is Keep, that is, grid s is retained. Grid s plays a connecting role here and is indispensable, otherwise the Voronoi edge will break.
[0236] 21) When VoroCountFour = 4 and VoroCount = 5, that is, the 4 adjacent grids above, below, left, and right of grid s are all with a logical value of 1, and among the remaining 4 adjacent grids of grid s, 1 grid has a logical value of 1. There is a total of 1 case, as shown in Figure 26 , at this time, there are many grids that may be retained around grid s, and it is impossible to determine whether pruning is required. Further judgment is needed, and the matching result is returned as Retry, that is, retry.
[0237] 22) When VoroCountFour = 4 and VoroCount = 6, that is, the 4 adjacent grids above, below, left, and right of grid s are all with a logical value of 1, and among the remaining 4 adjacent grids of grid s, 2 grids have a logical value of 1. There are a total of 2 cases, as shown in Figure 27 , at this time, there are many grids that may be retained around grid s, and it is impossible to determine whether pruning is required. Further judgment is needed, and the matching result is returned as Retry, that is, retry.
[0238] 23) When VoroCountFour = 4 and VoroCount = 7, that is, the 4 adjacent grids above, below, left, and right of grid s are all with a logical value of 1, and among the remaining 4 adjacent grids of grid s, 3 grids have a logical value of 1. There is a total of 1 case, as shown in Figure 28 , at this time, there are many grids that may be retained around grid s, and it is impossible to determine whether pruning is required. Further judgment is needed, and the matching result is returned as Retry, that is, retry.
[0239] 24) When VoroCountFour = 4 and VoroCount = 8, that is, the 4 adjacent grids above, below, left, and right of grid s are all with a logical value of 1, and all the remaining 4 adjacent grids of grid s are 1. There is a total of 1 case, as shown in Figure 29 , at this time, there are many grids that may be retained around grid s, and it is impossible to determine whether pruning is required. Further judgment is needed, and the matching result is returned as Retry, that is, retry.
[0240] So far, all scenarios encountered in grid pattern matching have been described.
[0241] In the embodiment of the present invention, based on the Voronoi diagram that has been generated, a new Voronoi diagram can be quickly generated. After further smoothing and optimizing the Voronoi line, a path that conforms to vehicle kinematics can be output; see Figure 3 , input the parking scenario map, Figure 3 In Figure 4As shown, the blue network lines are the calculated Voronoi lines, and it can be seen that these lines are far from the surrounding obstacles. After smooth optimization, the Voronoi lines can be used as the driving paths of the vehicle.
[0242] See Figure 2 , an embodiment of the present invention discloses a vehicle path generation system based on a Dynamic Voronoi diagram, including an initialization module, an obstacle setting module, a DM update module, a judgment module, and a pruning module.
[0243] Among them, the initialization module is used to create a binary grid map without any obstacles, input the collected binary grid map, and perform data initialization of the grid map; the obstacle setting module is used to add or remove obstacles in the grid map after the data initialization is completed, and set the grid state; the DM update module is used to update the distance map DM according to the change of the grid state; the judgment module is used to judge whether the grid belongs to the generalized Voronoi diagram based on the updated distance map DM, and obtain the PruneQueue queue; the pruning module is used to traverse the grids in the PruneQueue queue to obtain the sortedPruneQueue queue; prune the grids in the sortedPruneQueue queue to obtain Voronoi edges, and generate vehicle paths according to the Voronoi edges.
[0244] In an embodiment of the present invention, a computer device is provided. The computer device includes a processor and a memory. The memory is used to store a computer program. The computer program includes program instructions. The processor is used to execute the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the vehicle path generation method based on the Dynamic Voronoi diagram.
[0245] The present invention also provides a storage medium, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a computer device, used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, and the operating system of the terminal is stored in this storage space. Moreover, one or more instructions suitable for being loaded and executed by the processor are stored in this storage space. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. One or more instructions stored in the computer-readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the method for generating a vehicle path based on a Dynamic Voronoi diagram in the above embodiments.
[0246] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0247] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or multiple flows and / or blocks
[0248] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions in Figure 1 one or more of the flowsFigure 1 The functions specified in one or more boxes.
[0249] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing in the process Figure 1 One process or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes.
[0250] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.
Claims
1. A vehicle path generation method based on the Dynamic Voronoi diagram, characterized in that, The steps include: Create a binary grid map without any obstacles, input the collected binary grid map, and perform data initialization of the grid map; Add or remove obstacles in the grid map after data initialization is completed, and set the grid status; Update the distance map DM according to the change of the grid status; Based on the updated distance map DM, determine whether the grid belongs to the generalized Voronoi diagram to obtain the PruneQueue queue; Traverse the grids in the PruneQueue queue to obtain the sortedPruneQueue queue; prune the grids in the sortedPruneQueue queue to obtain the Voronoi edges, and generate the vehicle path according to the Voronoi edges.
2. The vehicle path generation method based on the Dynamic Voronoi diagram according to claim 1, wherein The step of creating a binary grid map without any obstacles, inputting the collected binary grid map, and performing data initialization of the grid map specifically includes: Create a binary grid map without any obstacles and input the collected binary grid map; If a certain grid in the input binary grid map is occupied by an obstacle, continue to judge whether all 8 neighboring grids of this grid are occupied by obstacles; If all 8 neighboring grids of this grid are occupied by obstacles and it is considered that this grid is inside the obstacle, then set the nearest obstacle of this grid to this grid; set the Voronoi status of this grid to Occupied, and set the Queueing status of this grid to FwProcessed, where FwProcessed means that the Lower action will not be triggered; If not all 8 neighboring grids of this grid are occupied by obstacles and it is considered that this grid is on the boundary of the obstacle, set the Voronoi status of this grid to Occupied, add an obstacle to this grid correspondingly, set the Queueing status of this grid to FwQueued, and add this grid to the Open queue.
3. A vehicle path generation method based on a Dynamic Voronoi diagram according to claim 1, characterized in that The step of adding or removing obstacles in the grid map after data initialization is completed, and setting the grid status specifically includes: Set the grid map as a two-dimensional boolean array; when there is a new obstacle at a certain grid in the grid map, set the boolean value of this grid to true; and set the nearest obstacle of this grid to this grid; set the Queueing status of this grid to FwQueued, where FwQueued means adding the grid to the Open queue; When an obstacle is removed from a certain grid in the grid map, set the boolean value of this grid to false; and set the nearest obstacle of this grid to no obstacle, add the grid coordinates to the Open queue, and set the Queueing status of this grid to BwQueued; set the needsRaise of this grid to true, where needsRaise means whether the Raise action needs to be executed.
4. A vehicle path generation method based on a Dynamic Voronoi diagram according to claim 1, characterized in that The step of updating the distance map DM according to the change of the grid status specifically includes: Add the grid with changed state to the Open queue, and then traverse the Open queue; If the Queueing state at the grid is not FwProcessed, perform the Raise action or the Lower action starting from the grid; If the Queueing state at the grid is FwProcessed, skip this grid and traverse the next grid in the Open queue; Judge whether the needsRaise of the grid element popped from the Open queue is true. If it is true, it means that the Raise action needs to be performed.
5. A vehicle path generation method based on a Dynamic Voronoi diagram according to claim 4, characterized in that, The execution process of the Raise action is as follows: When the needsRaise of the grid is true, start to perform the Raise action; traverse the 8 neighboring grids of this grid, then set the needsRaise of this grid to false, and set the Queueing state of this grid to BwProcessed; When traversing the 8 neighboring grids, if the needsRaise of one of the neighboring grids is true, do not perform any processing on this neighboring grid; if the neighboring grid originally had the nearest obstacle and needsRaise is false, further judge whether the nearest obstacle of this neighboring grid still exists; If the nearest obstacle of this neighboring grid still exists, set the Queueing state of this neighboring grid to FwQueued, and add this neighboring grid to the Open queue; if the nearest obstacle of this neighboring grid does not exist, set the Queueing state of this neighboring grid to FwQueued, add this neighboring grid to the Open queue, update the distance from this neighboring grid to the nearest obstacle to infinity, and set the needsRaise of this neighboring grid to true.
6. The vehicle path generation method based on the Dynamic Voronoi diagram according to claim 4, wherein, The execution process of the Lower action is as follows: When the needsRaise of the grid is false and an obstacle is detected to occupy the position of the nearest obstacle grid of this grid, start to perform the Lower action; Set the Queueing state of this grid to FwProcessed, the Voronoi state to Occupied, and then traverse the 8 neighboring grids of this grid; Let the coordinates of the neighboring grid nc in the grid map be (nx, ny), the coordinates of the nearest obstacle of this grid in the grid map be (x_obs, y_obs), and the distance from the neighboring grid nc to its nearest obstacle be d_n. Let: Δd_n = new_d_n - d_n If Δd n = 0 and there is no nearest obstacle in the neighboring grid nc, or Δd n < 0, then add the neighboring grid nc to the Open queue, set the Queueing status of the neighboring grid to FwQueued, and update the nearest obstacle of the neighboring grid to the nearest obstacle of this grid; If Δd n > 0, continue to determine whether this grid and the neighboring grid nc belong to the generalized Voronoi diagram.
7. A vehicle path generation method based on the Dynamic Voronoi diagram according to claim 1, characterized in that The steps of judging whether the grid belongs to the generalized Voronoi diagram based on the updated distance map DM to obtain the PruneQueue queue specifically include: Judge whether the grid c and the neighboring grid nc meet the prerequisite conditions for belonging to the generalized Voronoi diagram; the prerequisite conditions for belonging to the generalized Voronoi diagram include: A) At least one of the grid c and the neighboring grid nc does not have a nearest obstacle adjacent to it; B) The nearest obstacle of the neighboring grid nc exists; C) The nearest obstacles of the grid c and the neighboring grid nc are different; D) The nearest obstacle of grid c and the nearest obstacle of the neighboring grid nc are not adjacent; After grids c and neighboring grid nc both satisfy the above four judgment conditions A), B), C), and D), it is determined which of grid c and neighboring grid nc will be added to the PruneQueue queue to be pruned; the PruneQueue queue stores Voronoi points that meet the Voronoi conditions; Let the coordinates of the neighboring grid nc in the grid map be (nx, ny); the coordinates of the nearest obstacle of the neighboring grid nc in the grid map are (nx_obs, ny_obs), and the distance from the neighboring grid nc to its nearest obstacle is d_n; The coordinates of grid c in the grid map are (x, y), the coordinates of the nearest obstacle of grid c in the grid map are (x_obs, y_obs), and the distance from grid c to its nearest obstacle is d. Then set: When Δd < Δd_n and grid c is not adjacent to its nearest obstacle, add grid c to the PruneQueue queue to be pruned; at the same time, add the neighboring grids of grid c in the VoronoiKeep or VoronoiPrune state to the PruneQueue queue; When Δd_n < Δd and the neighboring grid nc is not adjacent to its nearest obstacle, add the neighboring grid nc to the PruneQueue queue, and at the same time add the neighboring grids of the neighboring grid nc in the VoronoiKeep or VoronoiPrune state to the PruneQueue queue.
8. A vehicle path generation method based on a Dynamic Voronoi diagram according to claim 1, characterized in that The steps of traversing the grids in the PruneQueue queue to obtain the sortedPruneQueue queue; pruning the grids in the sortedPruneQueue queue to obtain Voronoi edges and generating a vehicle path based on the Voronoi edges specifically include: Traverse the grids in the queue PruneQueue, and judge the grids popped from the queue PruneQueue in sequence. If the grid is not in the Occupied state, add the grid to the queue sortedPruneQueue; Judge whether the 4 adjacent grids above, below, left, and right of the grid need to be added to the queue sortedPruneQueue; If the status of the right grid r of the grid is Occupied, and the status of the 4 grids above, below, left, and right of the right grid r is not Occupied, reset the status of the right grid r to FreeQueued and add the right grid r to the queue sortedPruneQueue; If the status of the left grid l of the grid is Occupied, and the status of the 4 grids above, below, left, and right of the left grid l is not Occupied, reset the status of the left grid l to FreeQueued and add the left grid l to the queue sortedPruneQueue; If the status of the upper grid t of the grid is Occupied, and the statuses of the four grids above, below, left, and right of the upper grid t are not Occupied, then reset the status of the upper grid t to FreeQueued, and add the upper grid t to the queue sortedPruneQueue; If the status of the lower grid b of the grid is Occupied, and the statuses of the four grids above, below, left, and right of the lower grid b are not Occupied, then reset the status of the lower grid b to FreeQueued, and add the lower grid b to sortedPruneQueue; Traverse the queue sortedPruneQueue to check if the status of the grid s is FreeQueued or VoronoiRetry. If the status of the grid s is neither FreeQueued nor VoronoiRetry, then break out of this loop; if the status of the grid s is FreeQueued or VoronoiRetry, then perform grid pattern matching to determine whether pruning, retention, or retry is required; If the matching result is Pruned, then reset the status of the grid s to VoronoiPrune and prune the grid; If the matching result is Keep, then reset the status of the grid s to VoronoiKeep, retain the grid s, and the grid s will form the edge of the Voronoi diagram; If the matching result is Retry, then reset the status of the grid s to VoronoiRetry and put it back into the queue PruneQueue; When traversing to the last layer, at this time the queue sortedPruneQueue is already empty, and at the same time check if the queue PruneQueue is non-empty; if it is non-empty, then traverse PruneQueue and add the grids in it to the queue sortedPruneQueue, then traverse the grids in the queue sortedPruneQueue and determine again whether pruning, retention, or retry is required. Until traversing sortedPruneQueue to the last layer, both the queue sortedPruneQueue and PruneQueue are empty, the pruning ends, the Voronoi edges are obtained, and the vehicle path is generated according to the Voronoi edges.
9. A vehicle path generation method based on a Dynamic Voronoi diagram according to claim 8, wherein, The step of performing grid pattern matching to determine whether pruning, retention, or retry is required specifically includes: Let VoroCount be the count of all adjacent grids of the grid s, and VoroCountFour be the count of the four neighbor grids above, below, left, and right of the grid s; When the Voronoi status of the adjacent grids of the grid s is VoronoiKeep, FreeQueued, VoronoiRetry, or Free, set it to the logical value 1 and increment VoroCount by 1; when the adjacent grids with these statuses are located above, below, left, or right of the s grid, increment VoroCountFour by 1; When the Voronoi status of the adjacent grids of grid s is Occupied or VoronoiPrune, set it to the logical value 0. At this time, VoroCount and VoroCountFour remain unchanged; 1) When VoroCountFour = 1 and VoroCount = 1, the matching result of grid s at this time is Keep, and grid s is retained; 2) When VoroCountFour = 1 and VoroCount = 2, the matching result of grid s at this time is Keep, and grid s is retained; 3) When VoroCountFour = 1 and VoroCount = 3, the matching result of grid s at this time is Pruned, and grid s is pruned; 4) When VoroCountFour = 1 and VoroCount = 4, the matching result of grid s at this time is Pruned, and grid s is pruned; 5) When VoroCountFour = 1 and VoroCount = 5, the matching result of grid s at this time is Pruned, and grid s is pruned; When VoroCountFour = 2, if the logical values of two adjacent grids among the upper, lower, left, and right 4 adjacent grids of grid s are 1, and the logical values of the other two adjacent grids are 0; and among the remaining 4 adjacent grids of grid s, the logical values of the grids adjacent to these two adjacent grids with logical value 1 are 0, and the logical values of the remaining 3 adjacent grids are 0 or 1, the matching result is Keep, grid s is retained, and the status of grid s is changed to VoronoiKeep; If the logical values of two non - adjacent grids among the upper, lower, left, and right 4 adjacent grids of grid s are 1, and the logical values of the other two non - adjacent grids are 0, and the logical values of the remaining 4 adjacent grids are 0 or 1, the matching result is Keep, grid s is retained, and the status of grid s is changed to VoronoiKeep; 6) When VoroCountFour = 2 and VoroCount = 2, a. If the logical values of two adjacent grids among the upper, lower, left, and right 4 adjacent grids of grid s are 1, and the logical values of the remaining 4 adjacent grids of grid s are all 0, the matching result of grid s at this time is Keep, and grid s is retained; b. If the logical values of two non - adjacent grids among the upper, lower, left, and right 4 adjacent grids of grid s are 1, and the logical values of the remaining 4 adjacent grids are all 0, the matching result of grid s at this time is Keep, and the grid is retained; 7) When VoroCountFour = 2 and VoroCount = 3, a. If the logical values of two adjacent grids among the upper, lower, left, and right 4 adjacent grids of grid s are 1, and among the remaining 4 adjacent grids of grid s, the logical value of the grid adjacent to these two adjacent grids with logical value 1 is 0, and the logical value of 1 grid among the remaining 3 adjacent grids is 1, the matching result of grid s at this time is Keep, and grid s is retained; b. If there are two non - adjacent grid cells among the four adjacent grid cells (above, below, left, and right) of grid cell s with a logical value of 1, and there is 1 grid cell with a logical value of 1 among the remaining four adjacent grid cells, the matching result of grid cell s is Keep, and grid cell s is retained; 8) When VoroCountFour = 2 and VoroCount = 4, a. If there are two adjacent grid cells among the four adjacent grid cells (above, below, left, and right) of grid cell s with a logical value of 1, and the grid cell that is adjacent to both of these two grid cells with a logical value of 1 among the remaining four adjacent grid cells of grid cell s has a logical value of 0, and there are 2 grid cells with a logical value of 1 among the remaining 3 adjacent grid cells, the matching result of grid cell s is Keep, and grid cell s is retained; b. If there are two non - adjacent grid cells among the four adjacent grid cells (above, below, left, and right) of grid cell s with a logical value of 1, and there are 2 grid cells with a logical value of 1 among the remaining four adjacent grid cells, the matching result of grid cell s is Keep, and grid cell s is retained; 9) When VoroCountFour = 2 and VoroCount = 5, a. If there are two adjacent grid cells among the four adjacent grid cells (above, below, left, and right) of grid cell s with a logical value of 1, and the grid cell that is adjacent to both of these two grid cells with a logical value of 1 among the remaining four adjacent grid cells of grid cell s has a logical value of 0, and the logical values of the remaining 3 adjacent grid cells are all 1, the matching result of grid cell s is Keep, and grid cell s is retained; b. If there are two non - adjacent grid cells among the four adjacent grid cells (above, below, left, and right) of grid cell s with a logical value of 1, and there are 3 grid cells with a logical value of 1 among the remaining four adjacent grid cells, the matching result of grid cell s is Keep, and grid cell s is retained; 10) When VoroCountFour = 2 and VoroCount = 6, if there are two non - adjacent grid cells among the four adjacent grid cells (above, below, left, and right) of grid cell s with a logical value of 1, and the logical values of the remaining four adjacent grid cells are all 1, the matching result of grid cell s is Keep, and grid cell s is retained; 11) When VoroCountFour = 2 and VoroCount = 3, there are two adjacent grid cells among the four adjacent grid cells (above, below, left, and right) of grid cell s with a logical value of 1, and the grid cell that is adjacent to both of these two grid cells with a logical value of 1 among the remaining four adjacent grid cells of grid cell s has a logical value of 1, and the remaining 3 adjacent grid cells are all 0, the matching result of grid cell s is Pruned, and grid cell s is pruned; 12) When VoroCountFour = 2 and VoroCount = 4, there are two adjacent grid cells among the four adjacent grid cells (above, below, left, and right) of grid cell s with a logical value of 1, and the grid cell that is adjacent to both of these two grid cells with a logical value of 1 among the remaining four adjacent grid cells of grid cell s has a logical value of 1, and there is 1 grid cell with a logical value of 1 among the remaining 3 adjacent grid cells, the matching result of grid cell s is Pruned, and grid cell s is pruned; 13) When VoroCountFour = 2 and VoroCount = 5, among the four adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and among the remaining four adjacent grids of grid s, the logical values of the grids that are adjacent to both of these two adjacent grids with logical value 1 are 1, and among the remaining three adjacent grids, the logical values of two grids are 1. At this time, the matching result of grid s is Pruned, and grid s is pruned; 14) When VoroCountFour = 2 and VoroCount = 6, among the four adjacent grids above, below, left, and right of grid s, the logical values of two adjacent grids are 1, and all the remaining four adjacent grids of grid s are 1. At this time, the matching result of grid s is Pruned, and grid s is pruned; 15) When VoroCountFour = 3 and VoroCount = 3, among the four adjacent grids above, below, left, and right of grid s, the logical values of three adjacent grids are 1, and the logical values of all the remaining four adjacent grids of grid s are 0. At this time, the matching result of grid s is Keep, and grid s is retained; 16) When VoroCountFour = 3 and VoroCount = 4, that is, among the four adjacent grids above, below, left, and right of grid s, the logical values of three adjacent grids are 1, and the logical value of one grid among the remaining four adjacent grids of grid s is 1. At this time, the matching result of grid s is Keep, and grid s is retained; 17) When VoroCountFour = 3 and VoroCount = 5, that is, among the four adjacent grids above, below, left, and right of grid s, the logical values of three adjacent grids are 1, and the logical values of two grids among the remaining four adjacent grids of grid s are 1. At this time, it is impossible to determine whether pruning is required, and further judgment is needed. The returned matching result is Retry, and retry; 18) When VoroCountFour = 3 and VoroCount = 6, among the four adjacent grids above, below, left, and right of grid s, the logical values of three adjacent grids are 1, and the logical values of three grids among the remaining four adjacent grids of grid s are 1. At this time, it is impossible to determine whether pruning is required, and further judgment is needed. The returned matching result is Retry, and retry; 19) When VoroCountFour = 3 and VoroCount = 7, among the four adjacent grids above, below, left, and right of grid s, the logical values of three adjacent grids are 1, and all the remaining four adjacent grids of grid s are 1. At this time, it is impossible to determine whether pruning is required, and further judgment is needed. The returned matching result is Retry, and retry; 20) When VoroCountFour = 4 and VoroCount = 4, that is, all the four adjacent grids above, below, left, and right of grid s have logical value 1, and the logical values of all the remaining four adjacent grids of grid s are 0. At this time, the matching result of grid s is Keep, and grid s is retained; 21) When VoroCountFour = 4 and VoroCount = 5, that is, the 4 adjacent grids above, below, left, and right of grid s are all with a logical value of 1, and 1 of the remaining 4 adjacent grids of grid s has a logical value of 1. At this time, it is impossible to determine whether pruning is required, and further judgment is needed. The matching result returned is Retry, and retry. 22) When VoroCountFour = 4 and VoroCount = 6, that is, the 4 adjacent grids above, below, left, and right of grid s are all with a logical value of 1, and 2 of the remaining 4 adjacent grids of grid s have a logical value of 1. At this time, it is impossible to determine whether pruning is required, and further judgment is needed. The matching result returned is Retry, and retry. 23) When VoroCountFour = 4 and VoroCount = 7, that is, the 4 adjacent grids above, below, left, and right of grid s are all with a logical value of 1, and 3 of the remaining 4 adjacent grids of grid s have a logical value of 1. At this time, it is impossible to determine whether pruning is required, and further judgment is needed. The matching result returned is Retry, and retry. 24) When VoroCountFour = 4 and VoroCount = 8, that is, the 4 adjacent grids above, below, left, and right of grid s are all with a logical value of 1, and all of the remaining 4 adjacent grids of grid s are 1. At this time, it is impossible to determine whether pruning is required, and further judgment is needed. The matching result returned is Retry, and retry.
10. A vehicle path generation system based on a Dynamic Voronoi diagram, characterized in that, It includes: An initialization module for creating a binary grid map without any obstacles, inputting the collected binary grid map, and initializing the data of the grid map. An obstacle setting module for adding or removing obstacles in the grid map after data initialization and setting the grid status. A DM update module for updating the distance map DM according to the change of the grid status. A judgment module for judging whether the grid belongs to the generalized Voronoi diagram based on the updated distance map DM to obtain the PruneQueue queue. A pruning module for traversing the grids in the PruneQueue queue to obtain the sortedPruneQueue queue; pruning the grids in the sortedPruneQueue queue to obtain the Voronoi edges, and generating the vehicle path according to the Voronoi edges.
11. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-9.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1-9.