Path planning method and device, equipment and storage medium
By dividing and updating multiple motion paths until the iteration end condition is met, the candidate motion path is determined as the target path, and the local optimal solution and instability problems of path planning in the prior art are solved, and the quality of path planning is improved and success rate.
Patent Information
- Application Number
- CN202411361185.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing path planning methods are prone to falling into local optimal solutions, with strong instability and randomness, making it difficult to find the optimal path in an environment with obstacles.
By obtaining multiple motion paths, it is divided into a first path group, a second path group and a third path group, and updates based on the path length until the iteration end condition is satisfied, and a candidate motion path is determined as the target path.
The quality, efficiency and success rate of path planning are improved, ensuring that the planned paths are better, more stable and have higher success rate, and avoiding local optimal solutions and random problems.
Smart Images

Figure CN119104065A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of path planning, and in particular to a path planning method, device, equipment and storage medium. Background Art
[0002] With the advancement of artificial intelligence technology, robotics technology is also constantly developing and innovating. Some intelligent algorithms have been introduced into robotics technology to achieve tasks such as unmanned return and unmanned driving. Robots are highly intelligent machine systems that integrate multiple functions, such as path planning and processing. Path planning for mobile robots refers to how to find an optimal path from a given starting point to an end point in a working environment with obstacles, so that the robot can safely and non-contactably bypass all obstacles during movement.
[0003] At present, for existing path planning research, mobile robots mainly use A* algorithm, grid method, visibility graph method, artificial potential field method, free space method and other methods for path planning. Existing path planning methods are prone to fall into local optimal solutions and have problems such as instability and strong randomness. Summary of the invention
[0004] Embodiments of the present invention provide a path planning method, apparatus, device and storage medium, which can improve the quality, efficiency and success rate of path planning.
[0005] In a first aspect, an embodiment of the present invention provides a path planning method, including:
[0006] Obtain multiple motion paths of mobile machine equipment from the starting point to the target point;
[0007] Dividing the plurality of motion paths into a first path group, a second path group and a third path group according to the path length of each of the motion paths; wherein the first path group includes a first motion path, the second path group includes a second motion path, and the third path group includes a third motion path;
[0008] updating the second motion path and the third motion path to obtain an updated second path group and an updated third path group;
[0009] determining a candidate motion path based on the path length of the first motion path, the path length of the second motion path in the updated second path group, and the path length of the third motion path in the updated third path group;
[0010] Determine whether an iteration end condition is met, if so, use the candidate motion path as the target motion path, if not, return to execute the operation of updating the second motion path and the third motion path until the iteration end condition is met.
[0011] In a second aspect, an embodiment of the present invention further provides a path planning device, the device comprising:
[0012] A motion path acquisition module is used to acquire multiple motion paths of a mobile machine device from a starting point to a target point;
[0013] A motion path division module, configured to divide the plurality of motion paths into a first path group, a second path group and a third path group according to the path length of each of the motion paths; wherein the first path group includes a first motion path, the second path group includes a second motion path, and the third path group includes a third motion path;
[0014] A motion path updating module, used for updating the second motion path and the third motion path to obtain an updated second path group and an updated third path group;
[0015] a candidate motion path determination module, configured to determine a candidate motion path based on the path length of the first motion path, the path length of the second motion path in the updated second path group, and the path length of the third motion path in the updated third path group;
[0016] The condition judgment module is used to judge whether the iteration end condition is met. If so, the candidate motion path is used as the target motion path. If not, the operation of updating the second motion path and the third motion path is returned until the iteration end condition is met.
[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the path planning method described in the embodiment of the present invention.
[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the path planning method described in the embodiment of the present invention when executed.
[0022] The embodiment of the present invention discloses a path planning method, device, equipment and storage medium, including: obtaining multiple motion paths of a mobile machine device from a starting point to a target point; dividing the multiple motion paths into a first path group, a second path group and a third path group according to the path length of each motion path; updating the second motion path and the third motion path to obtain an updated second path group and an updated third path group; determining a candidate motion path based on the path length of the first motion path, the path length of the second motion path in the updated second path group and the path length of the third motion path in the updated third path group; judging whether an iteration end condition is met, if so, taking the candidate motion path as the target motion path, if not meeting the iteration end condition, returning to perform the operation of updating the second motion path and the third motion path until the iteration end condition is met. The technical solution provided in this embodiment can improve the quality, efficiency and success rate of path planning. And compared with the prior art, the path planned by this solution is better, more stable and has a higher success rate, which solves the problems that the existing path planning method is prone to fall into a local optimal solution, instability, strong randomness, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flow chart of a path planning method in Embodiment 1 of the present invention;
[0024] Figure 2 A grid image provided by an embodiment of the present invention;
[0025] Figure 3 A turning point optimization diagram provided by an embodiment of the present invention;
[0026] Figure 4 is a flow chart of a path planning method in Embodiment 2 of the present invention;
[0027] Figure 5 is a schematic diagram of the structure of a path planning device in Embodiment 3 of the present invention;
[0028] Figure 6 It is a structural schematic diagram of an electronic device in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0029] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0030] Embodiment 1
[0031] Figure 1 This is a flow chart of a path planning method provided in the first embodiment of the present invention. This embodiment is applicable to the case of planning a path. The method can be executed by a path planning device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server. Specifically, it includes the following steps:
[0032] S110: Acquire multiple motion paths of the mobile device from a starting point to a target point.
[0033] In this embodiment, the mobile machine device may be a mobile robot. Optionally, the environment in which the mobile machine device is located is mapped into a grid map, wherein the grid map is composed of a plurality of square grids, and the grid map contains a plurality of obstacles. Figure 2 The grid diagram provided by the embodiment of the present invention is as follows: Figure 2 As shown, the red grid represents an obstacle, and each grid in the grid map is marked with a serial number from left to right and from bottom to top, such as 1, 2, 3..., among which the grids with obstacles are not marked with serial numbers.
[0034] In this embodiment, the motion path can be composed of a plurality of trajectory points connected in sequence, wherein the plurality of trajectory points include a starting point, at least one intermediate point and a target point, and the number of trajectory points contained in each motion path is the same. The starting point and the target point can be understood as two grids in a grid map, and the two grids can be recorded as a starting grid and a target grid, and the intermediate point can also be understood as a grid in a grid map, i.e., an intermediate grid. The motion path can be understood as the path that a mobile machine device passes through from a starting grid to a target grid, and the path can be composed of a starting grid, at least one intermediate grid and a target grid connected in sequence.
[0035] For example, Figure 2 As shown, assuming that the starting point is the grid with sequence number 75 and the target point is the grid with sequence number 10, multiple motion paths of the mobile device from the grid with sequence number 75 to the grid with sequence number 10 are obtained; wherein each motion path cannot contain obstacles. Optionally, the method of obtaining multiple motion paths of the mobile device from the starting point to the target point can be: randomly generating multiple motion paths from the starting point to the target point.
[0036] S120. Divide the plurality of motion paths into a first path group, a second path group, and a third path group according to the path length of each motion path.
[0037] In this embodiment, one implementation method of dividing multiple motion paths into a first path group, a second path group, and a third path group according to the path length of each motion path can be described as: for each motion path, obtaining the position coordinates of multiple trajectory points in the motion path; determining the path length of the motion path according to the position coordinates; dividing a first set number of motion paths with shorter path lengths into the first path group, dividing a second set number of motion paths with longer path lengths into the third path group, and dividing the remaining motion paths into the second path group.
[0038] Continuing with the above description, the method for determining the path length of the motion path according to the position coordinates may be: calculating the distance between two adjacent trajectory points according to the position coordinates to obtain multiple distances; and taking the sum of the multiple distances as the path length of the motion path. The distance between the two adjacent trajectory points may be the Euclidean distance.
[0039] Furthermore, the motion paths in the first path group are all recorded as first motion paths, that is, the first path group includes the first motion path; the motion paths in the second path group are all recorded as second motion paths, that is, the second path group includes the second motion path; the motion paths in the third path group are all recorded as third motion paths, that is, the third path group includes the third motion path. The first motion path in the first path group can be understood as a better path among multiple motion paths, that is, a motion path with a shorter path length; the third motion path in the third path group can be understood as a worse path among multiple motion paths, that is, a motion path with a longer path length; the second motion path in the second path group can be understood as a suboptimal path among multiple motion paths, that is, the remaining motion paths excluding the better path and the worse path.
[0040] S130: Update the second motion path and the third motion path to obtain an updated second path group and an updated third path group.
[0041] In this embodiment, the updated second path group includes an updated second motion path, and the updated third path group includes an updated third motion path.
[0042] In this embodiment, a first implementation manner of updating the second motion path to obtain an updated second path group can be described as the following steps:
[0043] a1) encoding the second motion path to obtain an encoded second motion path;
[0044] In this embodiment, the coding can be understood as binary coding. Since each second motion path is composed of a plurality of trajectory points, and each trajectory point has been marked with a serial number in step S110, each second motion path can be represented by the serial number of the trajectory point.
[0045] Exemplarily, taking a second motion path as an example, the serial numbers of multiple trajectory points in the second motion path are binary-coded to obtain the coded second motion path, for example: 0101.
[0046] b1) Using a cross operator updating method to update the encoded second motion path, to obtain an updated second path group.
[0047] Exemplarily, it is assumed that the second path group contains 20 second motion paths, which are recorded as: path 1, path 2, ..., path 20. For path 1, a second motion path is randomly selected from the remaining 19 second motion paths except path 1. It is assumed that the selected second motion path is path 20. It is assumed that the encoded path 1 and path 20 are respectively: 0101 and 1010. Then the crossover operator update method is used to update the encoded path 1 in the following manner: select the starting position and the end position of the crossover, for example, the starting position is the third digit and the end position is the fourth digit, then the two coding segments are crossed, path 1 is updated to 0110, and the updated path 1 is decoded, that is, converted into a decimal representation. Similar to the above scheme, for path 2, a second motion path is randomly selected from the remaining 19 second motion paths except path 2, and the encoded path 2 is updated using the crossover operator update method. Similarly, for other second motion paths, the above scheme is also used to update them, so that the updated second motion path can be obtained, thereby obtaining the updated second path group.
[0048] Since the sequence numbers of the track points in the decoded second motion path are updated, the second motion path is updated, and the updated second motion path is composed of a plurality of new track points.
[0049] In this embodiment, a second implementation method for updating the second motion path to obtain an updated second path group may be: using a particle swarm algorithm to update the position coordinates of multiple trajectory points in the second motion path to obtain updated position coordinates; connecting the new trajectory points corresponding to the updated position coordinates in sequence as the updated second motion path to obtain an updated second path group.
[0050] Continuing with the above description, the third implementation method of updating the second motion path to obtain the updated second path group can be: using a particle swarm algorithm to update a third set number of second motion paths, and using a crossover operator update method to update the remaining second motion paths to obtain the updated second path group. Exemplarily, assuming that there are m second motion paths, the third set number can be m*P% second motion paths, and the number of remaining second motion paths is m*(1-P%). Wherein, the value of P% is a value between [0, 1].
[0051] In this embodiment, one implementation manner of updating the third motion path to obtain an updated third path group can be described as the following steps:
[0052] a2) encoding the third motion path to obtain an encoded third motion path;
[0053] In this embodiment, the encoding may be binary encoding, and similar to the encoding of the second motion path, the serial numbers of the plurality of trajectory points in the third motion path are binary encoded to obtain the encoded third motion path, for example: 101111001. Each encoded third motion path is composed of binary characters.
[0054] b2) Using a mutation operator update method to update the encoded third motion path to obtain an updated third path group.
[0055] In this embodiment, the encoded third motion path is updated by a mutation operator update method, and the updated third path group can be obtained by: obtaining a set mutation position; mutating the characters at the set mutation position in the encoded third motion path to obtain a mutated third motion path; decoding the mutated third motion path, and using the decoded third motion path as the updated third motion path to obtain an updated third path group.
[0056] For example, take an encoded third motion path as an example: 101111001, change the character "0" at the second position to "1", change the character "1" at the fifth position to "0", and change the character "1" at the sixth position to "0", then the mutated third motion path is: 111100001, and decode the mutated third motion path, that is, convert it into decimal representation. Among them, since the sequence number of the trajectory point in the decoded third motion path is updated, the third motion path is updated, and the updated third motion path is composed of a plurality of new trajectory points.
[0057] Furthermore, each third motion path is updated by using the above mutation operator updating method to obtain an updated third motion path, thereby obtaining an updated third path group.
[0058] S140 : Determine a candidate motion path based on the path length of the first motion path, the updated path length of the second motion path in the second path group, and the updated path length of the third motion path in the third path group.
[0059] Optionally, one implementation method of determining the candidate motion path based on the path length of the first motion path, the path length of the second motion path in the updated second path group, and the path length of the third motion path in the updated third path group can be described as: taking the motion path with the shortest path length among the first motion path, the second motion path in the updated second path group, and the third motion path in the updated third path group as the candidate motion path.
[0060] Optionally, if in step S130, the particle swarm algorithm is used to update the second motion path, an updated second path group is obtained. The updating method of the particle swarm algorithm can be: the second motion path is continuously iteratively updated according to the set number of iterations until the number of iterations is reached and the updating ends. In the process of updating using the particle swarm algorithm, a global optimal solution, that is, an optimal motion path, is generated, that is, a motion path with the shortest path length. Further, in this embodiment, another implementation method of determining the candidate motion path based on the path length of the first motion path, the path length of the second motion path in the updated second path group, and the path length of the third motion path in the updated third path group can be described as: the first motion path is updated according to the path length of the first motion path, the path length of the second motion path, and the path length of the third motion path to obtain an updated first path group; the first motion path in the updated first path group and the motion path with the shortest path length in the global optimal solution are used as candidate motion paths.
[0061] S150, determining whether an iteration end condition is satisfied; if satisfied, taking the candidate motion path as the target motion path; if not satisfied, returning to execute the operation of updating the second motion path and the third motion path until the iteration end condition is satisfied.
[0062] In this embodiment, the iteration end condition may be the number of iterations, and judging whether the iteration end condition is satisfied may be understood as judging whether the number of iterations is satisfied. The target motion path may be understood as the motion path of the mobile device from the starting point to the target point that is finally planned.
[0063] Following the above description, after the candidate motion path is used as the target motion path, the target motion path may be further operated as follows: a key point deletion method is used to delete the trajectory points in the target motion path to obtain an updated target motion path. The key point deletion method may be a continuous three-node deletion method.
[0064] For example, it is assumed that the target motion path consists of n trajectory points, namely (x1, x2, x3, ..., x n-1 ,x n ), first, for (x1, x2, x3), connect the two trajectory points x1 and x3 into a line (x1, x3), and determine whether there is an obstacle on the straight line. If there is an obstacle, do not process the three trajectory points (x1, x2, x3); if there is no obstacle, compare the lengths of (x1, x3) and (x1, x2, x3). If the length of (x1, x3) is smaller, delete the trajectory point x2, and the target motion path will become (x1, x3, …, x3). n-1 ,x n ). Similarly, for (x1, x3, x4), follow the above steps to decide whether to delete the trajectory point x3. Similar to the above steps, the trajectory points in the target motion path are deleted to obtain an updated target motion path.
[0065] Furthermore, in the process of the mobile device moving along the updated target motion path, in order to prevent the mobile device from hitting obstacles at the turning points and to make the path at the turning points flatter, the turning points in the updated target motion path are optimized. Specifically, the turning points in the updated target motion path are optimized by performing a distance processing and a b-spline path smoothing processing at the turning points on the updated target motion path.
[0066] For example, Figure 3 The turning point optimization diagram provided by the embodiment of the present invention is as follows: Figure 3 As shown in the figure, for the handling of the turning point, obstacles will be touched at the turning points p1 and p2. The handling method is to add a track point in the grid on the diagonal line, such as p3 and p4. Therefore, the problem of touching obstacles can be handled by adding track points. In order to make the path of the mobile machine device smoother when bypassing the turning point, points p3 and p4 are smoothed. Specifically, a b-spline curve can be used to smooth them.
[0067] The technical solution of this embodiment obtains multiple motion paths of the mobile machine equipment from the starting point to the target point; divides the multiple motion paths into a first path group, a second path group and a third path group according to the path length of each motion path; updates the second motion path and the third motion path to obtain an updated second path group and an updated third path group; determines the candidate motion path based on the path length of the first motion path, the path length of the second motion path in the updated second path group and the path length of the third motion path in the updated third path group; judges whether the iteration end condition is met, if so, the candidate motion path is used as the target motion path, if not, returns to execute the operation of updating the second motion path and the third motion path until the iteration end condition is met. The above technical solution can improve the quality, efficiency and success rate of path planning. And compared with the prior art, the path planned by this solution is better, more stable and has a higher success rate, which solves the problems that the existing path planning method is prone to fall into local optimal solutions, instability, and strong randomness.
[0068] Embodiment 2
[0069] Figure 4 This is a flow chart of a path planning method provided in Embodiment 2 of the present invention. Based on the above embodiment, the method includes the following steps:
[0070] S210: Acquire multiple motion paths of the mobile device from the starting point to the target point.
[0071] In this embodiment, the number of trajectory points in the multiple motion paths is determined by a preset path planning method, which is a preset one-time path planning method, such as the Dijkstra algorithm. Exemplarily, if the Dijkstra algorithm is used for one-time path planning, and the number of trajectory points in the shortest path determined by one-time path planning is S, then the number of trajectory points of each of the multiple motion paths obtained is S.
[0072] S220: Group the multiple motion paths to obtain multiple motion path groups.
[0073] Each motion path group includes a preset number of motion paths.
[0074] Exemplarily, assuming that there are 30 motion paths and the preset number is 5, the 30 motion paths are grouped to obtain 6 motion path groups, wherein each motion path group includes 5 motion paths.
[0075] S230: For each motion path in each motion path group, determine, according to the path length, information on the influence relationship between the motion path and other motion paths in the motion path group to which the motion path belongs.
[0076] In this embodiment, the influence relationship information between a motion path and other motion paths in its motion path group is determined by an improved five-element ring algorithm, wherein the influence relationship information is used to characterize the relationship between a motion path and other motion paths in its motion path group. A motion path group is equivalent to a five-element ring, and the five motion paths in the motion path group are equivalent to the gold, water, wood, fire, and earth elements in the five-element ring. The influence relationship information between the motion path and other motion paths in its motion path group can be understood as the force between the motion path and other motion paths in its motion path group. The path length of the motion path is equivalent to the mass of the elements in the five-element ring.
[0077] Furthermore, the original five-element ring algorithm may have a situation where a large number eats a small number, which will make the algorithm convergence worse or even fail to converge. Therefore, the five-element ring algorithm is improved, and the improved five-element ring algorithm will not have such a situation. A new expression of the force is proposed. Assume that m1, m2, m3, m4, and m5 represent the mass of gold, water, wood, fire, and earth elements respectively. Take the wood element as an example to illustrate m i and F i The relationship between.
[0078] Following the above description, F3 is divided into four parts. The first part of the force is represented by F 3·1 , is the "life" force exerted by the water element on it, this force will make the wood element stronger, so this force is positive. If m2≥m3, the wood element will be stronger, and the smaller m3 is or the larger m2 is, the stronger F is. 3·1 However, when the wood element is stronger than its parent element (i.e. m2<m3), its parent element will be damaged, so F 3·1 The sign of will be reversed to negative. To prevent m2 from being too large or m3 from being too small, 3·1 Modify to the following formula:
[0079] F 3·1 =ln[1+exp[β1(m2-m3)]]+α
[0080] Where α is the balance factor, β1 is the scaling factor, α=-ln2, The force of the second part is denoted as F 3·2 This part of the force comes from the "gram" force of the gold element, which weakens the wood element, so the force is negative. If m1≥m3, the wood element will become weaker. The smaller m3 is or the larger m1 is, the stronger F is. 3·2 If the wood element itself is stronger than the gold element (i.e. m1<m3), then F 3·2 The sign of F will be reversed to a positive value.3·2 It is expressed as the following formula:
[0081] F 3·2 =-ln[1+exp[β2(m1-m3)]]-α
[0082] in,
[0083] Similarly, the force in the third part is expressed as F 3·3 This part of the force comes from the "life" force that the wood element exerts on the fire element. When exerting the "life" force on the child element, it consumes its own energy, so this force is negative. The fourth part of the force is recorded as F 3·4 , which is the "gram" force exerted by the wood element on the earth element. It also consumes its own energy, so this force is also negative. 3·3 and F 3·4 It can be expressed as the following formula:
[0084] F 3·3 =-ln[1+exp[β3(m3-m4)]]-α, F 3·4 =-ln[1+exp[β4(m3-m5)]]-α
[0085] in,
[0086] In the original Five Elements Ring algorithm, the formula of F3 may have a situation where the large number eats the small number, which will make the algorithm convergence worse or even fail to converge. After the improvement, this situation will not occur. Now the four forces represented by F3 are superimposed, but considering that the effects of the four forces in F3 are not consistent, ω1, ω2, ω3 and ω4 are used as the weights of the four parts, and the range can be [20,100]. F3 is expressed as: F3=ω1F 3·1 +ω2F 3·2 +ω3F 3·3 +ω4F 3·4 .
[0087] Now expand F3 to F i , then we get the following formula:
[0088] F i =ω1F i·1 +ω2F i·2 +ω3F i·3 +ω4F i·4
[0089]
[0090] Based on the above improved five-element ring algorithm, for example, taking a certain motion path group as an example, assuming that the 5 motion paths in the motion path group are L1, L2, L3, L4, L5, and the path lengths of the 5 motion paths are m1, m2, m3, m4, m5 respectively. Taking motion path L3 as an example, the influence relationship information F between motion path L3 and other motion paths in the motion path group to which it belongs is determined according to the path length by the following formula: L3 :
[0091] F L3 =ω1*{ln[1+exp[β1(m2-m3)]]+α}+ω2*{-ln[1+exp[β2(m1-m3)]]-α}
[0092] +ω3*{-ln[1+exp[β3(m3-m4)]]-α}+ω4*{-ln[1+exp[β4(m3-m5)]]-α}, where ω1, ω2, ω3 and ω4 are set weights, ln(·) is a logarithmic function, and exp(·) is an exponential function. And, and
[0093] Further, for other motion paths: L1, L2, L4, L5, the above method is also used to determine the influence relationship information F between the motion path and other motion paths in the motion path group to which it belongs. L1 、F L2 、F L4 、F L5 .
[0094] In summary, for each motion path in each motion path group, the influence relationship information between the motion path and other motion paths is finally obtained, that is, one motion path corresponds to one piece of influence relationship information F.
[0095] S240: Divide the motion paths into a first path group, a second path group, and a third path group based on the influence relationship information.
[0096] In this embodiment, for dividing the motion paths into a first path group, a second path group, and a third path group based on the influence relationship information, one implementation manner can be described as the following steps:
[0097] a3) dividing the motion paths in each motion path group whose influence relationship information is greater than a set threshold and whose path length is the shortest in each motion path group into a first path group;
[0098] In this embodiment, the threshold is set to be a threshold set in advance. Exemplarily, assuming that the threshold is set to be e and the influence relationship information is F. Then, in each motion path group, the motion paths with F>e and the shortest path length are divided into the first path group.
[0099] b3) dividing the motion paths in each motion path group whose influence relationship information is greater than a set threshold and except for the motion path with the shortest path length in each motion path group into a second path group;
[0100] Exemplarily, in each motion path group, the motion paths with F>e and other than the motion path with the shortest path length are divided into the second path group.
[0101] c3) dividing the motion paths in each motion path group whose influence relationship information is less than or equal to a set threshold into a third path group.
[0102] Exemplarily, the motion paths with F<=e in each motion path group are divided into a third path group.
[0103] Optionally, the threshold can be set to 0.
[0104] S250: Determine an initial motion path of the mobile device from the starting point to the target point based on a preset path planning method as a global optimal path.
[0105] In this embodiment, the preset path planning method is a preset one-time path planning method, such as the Dijkstra algorithm. Optionally, the Dijkstra algorithm is used to determine the initial motion path of the mobile machine device from the starting point to the target point, and the initial motion path is used as a global optimal path, wherein the initial motion path is the shortest path determined by the Dijkstra algorithm. Currently, all motion paths are: multiple motion paths obtained at the beginning and the initial motion path determined by the Dijkstra algorithm.
[0106] S260: For each second motion path in the second path group, determine the first motion path in the motion path group to which the second motion path belongs as a local optimal path.
[0107] In this embodiment, the first motion path is a motion path in the motion path group whose influence relationship information is greater than a set threshold and whose path length is the shortest. Exemplarily, it is assumed that there are 7 second motion paths in the second path group, namely: K1, K2, K3, K4, K5, K6, K7, wherein K1 and K2 are from the motion path group Z1, and K3, K4, K5, K6, K7 are from the motion path groups Z2, Z3, Z4, Z5, Z6, respectively. For the second motion path K1, the first motion path in the motion path group Z1 to which it belongs is determined as the local optimal path; for the second motion path K2, the first motion path in the motion path group Z1 to which it belongs is determined as the local optimal path; for the second motion path K3, the first motion path in the motion path group Z2 to which it belongs is determined as the local optimal path; for the second motion path K4, the first motion path in the motion path group Z3 to which it belongs is determined as the local optimal path; for the second motion path K5, the first motion path in the motion path group Z4 to which it belongs is determined as the local optimal path; for the second motion path K6, the first motion path in the motion path group Z5 to which it belongs is determined as the local optimal path; for the second motion path K7, the first motion path in the motion path group Z6 to which it belongs is determined as the local optimal path.
[0108] S270 , based on the global optimal path and the local optimal path, adopt a particle swarm algorithm to iteratively update the second motion path to obtain an updated second path group and a new global optimal path.
[0109] In this embodiment, the particle swarm algorithm originates from the study of the foraging behavior of bird flocks. Each particle replaces each individual in the bird flock. It contains two attributes: position and speed. Among them, the local optimal solution is the optimal solution searched by each particle, and the global optimal solution is the optimal solution among all particles. In this embodiment, a particle represents a second motion path. The local optimal solution can be understood as the local optimal path, and the global optimal solution can be understood as the global optimal path. Since the particle swarm algorithm is a continuous iterative process, the local optimal path and the global optimal path will continue to change.
[0110] In this embodiment, based on the global optimal path and the local optimal path, the particle swarm algorithm is used to iteratively update the second motion path as follows: for each second motion path, the first position coordinates of the trajectory point in the global optimal path and the second position coordinates of the trajectory point in the local optimal path are obtained; based on the first position coordinates and the second position coordinates, the particle swarm algorithm is used to iteratively update the position coordinates of the trajectory point in the second motion path.
[0111] Exemplarily, the expression of the particle swarm algorithm is as follows:
[0112]
[0113] Among them, w5 is the inertia factor, c1 and c2 are learning factors, and r1 and r2 are random numbers between [0,1]. i (t) represents the local optimal solution of the tth generation, gbest i (t) represents the global optimal solution of the tth generation. i (t) represents the speed of the second motion path of the ith generation, x i (t) represents the position of the i-th second motion path of the t-th generation.
[0114] Following the above description, the particle swarm algorithm is used to iteratively update the second motion path. The steps are as follows:
[0115] 1) Randomly generate the speed of each second motion path and set the number of iterations to T. For the 0th generation (t=0), let pbest i (0) is the local optimal path determined in step S260, gbest i (0) is the global optimal path determined in step S250;
[0116] 2) Calculate the speed and position of the next generation second motion path through the expression of the above particle swarm algorithm;
[0117] 3) Compare the path length of each second motion path with the path length of its corresponding local optimal path. If the path length of the current second motion path is less than the path length of its corresponding local optimal path, update the position of the local optimal path to the position of the current second motion path.
[0118] 4) Compare the path length of each second motion path with the path length of the global optimal path. If the path length of the current second motion path is less than the path length of the global optimal path, update the position of the global optimal path to the position of the current second motion path.
[0119] 5) Repeat steps 2) to 4) until the number of iterations is met.
[0120] S280: Update the third motion path to obtain an updated third path group.
[0121] S290: Update the first motion path according to the path length of the first motion path, the path length of the second motion path, and the path length of the third motion path to obtain an updated first path group.
[0122] In this embodiment, the path length of the second motion path is the updated path length of the second motion path in the second path group; the path length of the third motion path is the updated path length of the third motion path in the third path group.
[0123] Furthermore, the first motion path is updated according to the path length of the first motion path, the path length of the second motion path and the path length of the third motion path, and the method for obtaining the updated first path group can be: for each first motion path, the path length of the first motion path is compared with the path length of the second motion path and the path length of the third motion path in the motion path group to which it belongs; the motion paths among the second motion path and the third motion path whose path lengths are shorter than the first motion path are taken as candidate paths; the motion path with the shortest path length among the candidate paths is taken as the updated first motion path, to obtain the updated first path group.
[0124] S2100: Use the first moving path in the updated first path group and the moving path with the shortest path length in the new global optimal path as candidate moving paths.
[0125] S2110, determining whether an iteration end condition is satisfied; if so, taking the candidate motion path as the target motion path; if not, returning to execute the operation of updating the second motion path and the third motion path until the iteration end condition is satisfied.
[0126] The technical solution of this embodiment is to group multiple motion paths to obtain multiple motion path groups; for each motion path in each motion path group, determine the influence relationship information between the motion path and other motion paths in the motion path group to which it belongs according to the path length; divide the motion paths into a first path group, a second path group and a third path group according to the influence relationship information; for each second motion path in the second path group, determine the first motion path in the motion path group to which it belongs as a local optimal path; based on the global optimal path and the local optimal path, use the particle swarm algorithm to iteratively update the second motion path to obtain an updated second path group and a new Global optimal path; update the third motion path to obtain an updated third path group; update the first motion path according to the path length of the first motion path, the path length of the second motion path and the path length of the third motion path to obtain an updated first path group; use the first motion path in the updated first path group and the motion path with the shortest path length in the new global optimal path as candidate motion paths; if the iteration end condition is met, use the candidate motion path as the target motion path, if the iteration end condition is not met, return to execute the operation of updating the second motion path and the third motion path until the iteration end condition is met. The technical solution provided in this embodiment can improve the quality, efficiency and success rate of path planning. And compared with the prior art, the path planned by this solution is better, more stable and has a higher success rate.
[0127] Embodiment 3
[0128] Figure 5 A schematic diagram of the structure of a path planning device provided in Embodiment 3 of the present invention is shown in FIG. Figure 5 As shown, the device comprises:
[0129] A motion path acquisition module 310 is used to acquire multiple motion paths of a mobile device from a starting point to a target point;
[0130] A motion path division module 320, configured to divide the plurality of motion paths into a first path group, a second path group and a third path group according to the path length of each of the motion paths; wherein the first path group includes a first motion path, the second path group includes a second motion path, and the third path group includes a third motion path;
[0131] A motion path updating module 330, configured to update the second motion path and the third motion path to obtain an updated second path group and an updated third path group;
[0132] a candidate motion path determination module 340, configured to determine a candidate motion path based on the path length of the first motion path, the path length of the second motion path in the updated second path group, and the path length of the third motion path in the updated third path group;
[0133] The condition judgment module 350 is used to judge whether the iteration end condition is met. If so, the candidate motion path is used as the target motion path. If not, the operation of updating the second motion path and the third motion path is returned until the iteration end condition is met.
[0134] Optionally, the motion path division module 320 may specifically include:
[0135] A motion path grouping unit, used for grouping the plurality of motion paths to obtain a plurality of motion path groups; wherein each motion path group contains a preset number of motion paths;
[0136] an influence relationship information determining unit, configured to determine, for each motion path in each motion path group, influence relationship information between the motion path and other motion paths in the motion path group to which the motion path belongs according to the path length;
[0137] A path division unit is used to divide the motion path into a first path group, a second path group and a third path group based on the influence relationship information.
[0138] Optionally, the path division unit may be specifically used for:
[0139] The motion paths in each motion path group whose influence relationship information is greater than a set threshold and whose path length is the shortest in each motion path group are divided into a first path group;
[0140] The influence relationship information in each motion path group is greater than a set threshold and the motion paths other than the motion path with the shortest path length in each motion path group are divided into a second path group;
[0141] The motion paths in each motion path group whose influence relationship information is less than or equal to a set threshold are divided into a third path group.
[0142] Optionally, the motion path updating module 330 may be specifically used for:
[0143] Determine the initial motion path of the mobile machine device from the starting point to the target point based on a preset path planning method as a global optimal path;
[0144] For each second motion path in the second path group, determining the first motion path in the motion path group to which the second motion path belongs as a local optimal path;
[0145] Based on the global optimal path and the local optimal path, the second motion path is iteratively updated using a particle swarm algorithm to obtain an updated second path group and a new global optimal path.
[0146] Optionally, the motion path updating module 330 may be specifically used for:
[0147] encoding the second motion path to obtain an encoded second motion path;
[0148] The encoded second motion path is updated by using a cross operator updating method to obtain an updated second path group.
[0149] Optionally, the motion path updating module 330 may be specifically used for:
[0150] Encoding the third motion path to obtain an encoded third motion path;
[0151] The encoded third motion path is updated by using a mutation operator updating method to obtain an updated third path group.
[0152] Optionally, the candidate motion path determination module 340 may be specifically configured to:
[0153] updating the first motion path according to the path length of the first motion path, the path length of the second motion path, and the path length of the third motion path to obtain an updated first path group;
[0154] The first moving path in the updated first path group and the moving path with the shortest path length in the new global optimal path are taken as candidate moving paths.
[0155] The above device can execute the methods provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not described in detail in this embodiment, please refer to the methods provided by all the above embodiments of the present invention.
[0156] Embodiment 4
[0157] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0158] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0159] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0160] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a path planning method.
[0161] In some embodiments, the path planning method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the path planning method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the path planning method in any other appropriate manner (e.g., by means of firmware).
[0162] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0163] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0164] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0165] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0166] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0167] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0168] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0169] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A path planning method, characterized in that: include: Obtain multiple motion paths of mobile machine equipment from the starting point to the target point; Dividing the plurality of motion paths into a first path group, a second path group and a third path group according to the path length of each of the motion paths; wherein the first path group includes a first motion path, the second path group includes a second motion path, and the third path group includes a third motion path; updating the second motion path and the third motion path to obtain an updated second path group and an updated third path group; determining a candidate motion path based on the path length of the first motion path, the path length of the second motion path in the updated second path group, and the path length of the third motion path in the updated third path group; Determine whether an iteration end condition is met, if so, use the candidate motion path as the target motion path, if not, return to execute the operation of updating the second motion path and the third motion path until the iteration end condition is met.
2. The method according to claim 1, characterized in that The plurality of motion paths are divided into a first path group, a second path group, and a third path group according to the path length of each of the motion paths, including: Grouping the plurality of motion paths to obtain a plurality of motion path groups; wherein each motion path group includes a preset number of motion paths; For each motion path in each motion path group, determining, according to the path length, information on an influence relationship between the motion path and other motion paths in the motion path group to which the motion path belongs; The motion paths are divided into a first path group, a second path group and a third path group based on the influence relationship information.
3. The method according to claim 2, characterized in that Dividing the motion paths into a first path group, a second path group, and a third path group based on the influence relationship information includes: The motion paths in each motion path group whose influence relationship information is greater than a set threshold and whose path length is the shortest in each motion path group are divided into a first path group; The influence relationship information in each motion path group is greater than a set threshold and the motion paths other than the motion path with the shortest path length in each motion path group are divided into a second path group; The motion paths in each motion path group whose influence relationship information is less than or equal to a set threshold are divided into a third path group.
4. The method according to claim 1, characterized in that: Updating the second motion path to obtain an updated second path group includes: Determine the initial motion path of the mobile machine device from the starting point to the target point based on a preset path planning method as a global optimal path; For each second motion path in the second path group, determining the first motion path in the motion path group to which the second motion path belongs as a local optimal path; Based on the global optimal path and the local optimal path, the second motion path is iteratively updated using a particle swarm algorithm to obtain an updated second path group and a new global optimal path.
5. The method according to claim 1, characterized in that Updating the second motion path to obtain an updated second path group includes: encoding the second motion path to obtain an encoded second motion path; The encoded second motion path is updated by using a cross operator updating method to obtain an updated second path group.
6. The method according to claim 1, characterized in that Updating the third motion path to obtain an updated third path group includes: Encoding the third motion path to obtain an encoded third motion path; The encoded third motion path is updated by using a mutation operator updating method to obtain an updated third path group.
7. The method according to claim 4, characterized in that Determining a candidate motion path based on the path length of the first motion path, the updated path length of the second motion path in the second path group, and the updated path length of the third motion path in the third path group includes: updating the first motion path according to the path length of the first motion path, the path length of the second motion path, and the path length of the third motion path to obtain an updated first path group; The first moving path in the updated first path group and the moving path with the shortest path length in the new global optimal path are taken as candidate moving paths.
8. A path planning device, characterized in that: include: A motion path acquisition module is used to acquire multiple motion paths of a mobile machine device from a starting point to a target point; A motion path division module, configured to divide the plurality of motion paths into a first path group, a second path group and a third path group according to the path length of each of the motion paths; wherein the first path group includes a first motion path, the second path group includes a second motion path, and the third path group includes a third motion path; A motion path updating module, used for updating the second motion path and the third motion path to obtain an updated second path group and an updated third path group; a candidate motion path determination module, configured to determine a candidate motion path based on the path length of the first motion path, the path length of the second motion path in the updated second path group, and the path length of the third motion path in the updated third path group; The condition judgment module is used to judge whether the iteration end condition is met. If so, the candidate motion path is used as the target motion path. If not, the operation of updating the second motion path and the third motion path is returned until the iteration end condition is met.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the path planning method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the path planning method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Vehicle path planning method, path planning device, electronic equipment and storage medium
CN116384869A
Path planning method and device and automatic inspection equipment
CN116858247A
Path planning method and device, vehicle and storage medium
CN116952234A
Cited By
Track determination method and device, computer equipment and storage medium
CN120558238A
