Multi-objective point path planning method, device, self-mobile device and robot
Through genetic algorithm combined with multi-objective point path planning, the robot path sequence is optimized, and the problems of poor globality and high computational complexity in the existing technology are solved, which improves the robot's motion efficiency and reduces power consumption.
Patent Information
- Application Number
- CN201911334990.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-23
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2039-12-23
AI Technical Summary
The existing path planning algorithms have poor globality, easy to fall into local optimality, and high computational complexity in robot multi-target planning, resulting in low motion efficiency and increased power consumption of robots.
Genetic algorithm is used to combine multi-target path planning, and the final path sequence is optimized by obtaining the path distance between the target point and the starting point and the nearest target point, and generating the initial path sequence, and performing cross-calculation and preset operations.
The rationality of the arrival order of multi-target points and the robot's movement efficiency are improved, and the possibility of the robot taking repetitive routes is reduced, thereby reducing power consumption.
Smart Images

Figure CN113093717B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent navigation, and specifically relates to a multi-goal point path planning method, a multi-goal point path planning device, a self-mobile device, and a robot. Background Art
[0002] Robot path planning is an important research field of robot technology. In addition to being used in aspects such as factory automation, construction, and agriculture, it also has broad application prospects in aspects such as life services. There are many path planning methods, such as the A* algorithm, the artificial potential field method, the fuzzy inference method, the ant colony algorithm, and the genetic algorithm. Although using the A* algorithm has a very fast search speed for relatively simple maps and can also find the optimal path, its global performance is poor, and the robot is prone to falling into an infinite loop when the system is not properly selected; using the artificial potential field method is convenient for low-level real-time control, but it lacks global information and has the problem of local optimal values; the greatest advantage of using the fuzzy inference method is its very good real-time performance, but the design of the fuzzy membership function and the formulation of fuzzy control rules mainly rely on human experience; although using the ant colony algorithm has strong global performance and can obtain better optimal solutions, it is prone to falling into local optima.
[0003] The genetic algorithm introduces concepts such as selection, crossover, and mutation in Darwin's theory of biological evolution, and performs genetic evolution operations on a population composed of multiple encoded individuals. During the evolution process, it can search different regions of the solution space in parallel. Due to its advantages such as parallelism, robustness, and flexibility, it is widely used in the path planning of robots. Summary of the Invention
[0004] The present application provides a multi-goal point path planning method to solve the defects existing in the prior art. The present application also simultaneously applies for a multi-goal point path planning device, a self-mobile device, and a robot.
[0005] The present application provides a multi-goal point path planning method, including:
[0006] Obtain goal points;
[0007] Sort the goal points according to the path distances between each goal point and the starting point to obtain a first path sequence;
[0008] Sort the goal points according to the path distances of each goal point from the first goal point to obtain a second path sequence; the first goal point is the goal point with the shortest path distance from the starting point;
[0009] Use the first path sequence and the second path sequence as the initial individuals of the genetic algorithm, and use the genetic algorithm to obtain the final path sequence.
[0010] Optionally, sorting the respective target points according to the path distances between the respective target points and the starting point to obtain a first path sequence, includes:
[0011] Obtaining the path distances between the respective target points and the starting point;
[0012] Sorting the respective target points in ascending order according to the path distances corresponding to the respective target points to obtain the first path sequence.
[0013] Optionally, sorting the respective target points according to the path distances of the respective target points from a first target point to obtain a second path sequence, includes:
[0014] Obtaining the path distances of the respective target points from the first target point;
[0015] Sorting the target points in ascending order according to the path distances corresponding to the respective target points to obtain the second path sequence.
[0016] Optionally, using the first path sequence and the second path sequence as initial individuals of a genetic algorithm, and using the genetic algorithm to obtain a final path sequence, includes:
[0017] Calculating a first path cost of the first path sequence and a second path cost of the second path sequence respectively;
[0018] Comparing the first path cost and the second path cost, and determining the path sequence with a smaller cost value as the final path sequence.
[0019] Optionally, further includes:
[0020] Performing a crossover operation on the first path sequence and the second path sequence to obtain a third path sequence corresponding to the first path sequence and a fourth path sequence corresponding to the second path sequence;
[0021] The using the first path sequence and the second path sequence as initial individuals of a genetic algorithm, and using the genetic algorithm to obtain a final path sequence, includes:
[0022] Calculating a first path cost of the first path sequence and a second path cost of the second path sequence respectively; and calculating a third path cost of the third path sequence and a fourth path cost of the fourth path sequence respectively;
[0023] Comparing the first path cost, the second path cost, the third path cost and the fourth path cost, and determining the path sequence with a smaller cost value as the final path sequence.
[0024] Optionally, performing a crossover operation on the first path sequence and the second path sequence to obtain a third path sequence corresponding to the first path sequence and a fourth path sequence corresponding to the second path sequence includes:
[0025] Obtaining a first target point sorting difference segment and a second target point sorting difference segment corresponding to each other in the first path sequence and the second path sequence;
[0026] Obtaining a first consecutive target point sub-segment in the first target point sorting difference segment and a second consecutive target point sub-segment in the second target point sorting difference segment; the consecutive target points of the first consecutive target point sub-segment and the second consecutive target point sub-segment are the same;
[0027] Cross-interchanging the second consecutive target point sub-segment with the target points at the corresponding positions in the first target point sorting difference segment, and replacing the duplicate target points other than the first consecutive target point sub-segment with the non-appearing target points to obtain the third path sequence;
[0028] Cross-interchanging the first consecutive target point sub-segment with the target points at the corresponding positions in the second target point sorting difference segment, and replacing the duplicate target points other than the second consecutive target point sub-segment with the non-appearing target points to obtain the fourth path sequence.
[0029] Optionally, further including: performing a crossover operation on the first path sequence and the second path sequence to obtain a third path sequence corresponding to the first path sequence and a fourth path sequence corresponding to the second path sequence;
[0030] Performing a preset operation on the third path sequence and the fourth path sequence to respectively obtain a fifth path sequence corresponding to the third path sequence and a sixth path sequence corresponding to the fourth path sequence;
[0031] Using the first path sequence and the second path sequence as the initial individuals of the genetic algorithm, and using the genetic algorithm to obtain the final path sequence includes:
[0032] Respectively calculating a first path cost of the first path sequence and a second path cost of the second path sequence; and respectively calculating a third path cost of the third path sequence and a fourth path cost of the fourth path sequence; and respectively calculating a fifth path cost of the fifth path sequence and a sixth path cost of the sixth path sequence;
[0033] Compare the first path cost, the second path cost, the third path cost, the fourth path cost, the fifth path cost, and the sixth path cost, and determine the path sequence with a smaller cost value as the final path sequence.
[0034] Optionally, the preset operations on the third path sequence and the fourth path sequence respectively obtain a fifth path sequence corresponding to the third path sequence and a sixth path sequence corresponding to the fourth path sequence, including:
[0035] Randomly transform at least one target point in the third path sequence, and use an unappeared target point to replace the repeated target points other than the at least one transformed target point, to obtain a fifth path sequence corresponding to the third path sequence; and
[0036] Randomly transform at least one target point in the fourth path sequence, and use an unappeared target point to replace the repeated target points other than the at least one transformed target point, to obtain a sixth path sequence corresponding to the fourth path sequence.
[0037] The present application also provides a multi-target point path planning device, including:
[0038] An acquisition unit, configured to acquire target points;
[0039] An initial path sequence acquisition unit, configured to sort the target points according to the path distances between the respective target points and the starting point to obtain a first path sequence; sort the target points according to the path distances between the respective target points and the first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point;
[0040] A final path sequence acquisition unit, configured to use the first path sequence and the second path sequence as the initial individuals of a genetic algorithm, and use the genetic algorithm to obtain a final path sequence.
[0041] The present application also provides a self-moving device, including: a depth sensor and a processor;
[0042] The depth sensor is configured to acquire target points;
[0043] The processor is configured to sort the target points according to the path distances between the respective target points and the starting point to obtain a first path sequence; sort the target points according to the path distances between the respective target points and the first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point; use the first path sequence and the second path sequence as the initial individuals of a genetic algorithm, and use the genetic algorithm to obtain a final path sequence.
[0044] The present application also provides a robot, including: a depth sensor and a processor;
[0045] The depth sensor is used to obtain target points;
[0046] The processor is used to sort the target points according to the path distances between the respective target points and a starting point to obtain a first path sequence; sort the target points according to the path distances of the respective target points from a first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point; use the first path sequence and the second path sequence as the initial individuals of a genetic algorithm, and use the genetic algorithm to obtain a final path sequence.
[0047] Compared with the prior art, the present application has the following advantages:
[0048] The present application provides a multi-target point path planning method, including: obtaining target points; sorting the target points according to the path distances between the respective target points and a starting point to obtain a first path sequence; sorting the target points according to the path distances of the respective target points from a first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point; use the first path sequence and the second path sequence as the initial individuals of a genetic algorithm, and use the genetic algorithm to obtain a final path sequence. The method provided by the present application does not directly apply the genetic algorithm, but combines the genetic algorithm with multi-target point path planning. When performing the selection operation, two sequences with relatively strong reliability are directly selected as the initial individuals, saving the complex process of calculating all possible initial sortings; this method is more reasonable than the method of reaching the target points in a given order, improving the rationality of the arrival order of multi-target points and the movement efficiency of the robot, reducing the possibility of the robot taking repeated routes, and thus reducing the power consumption of the robot. Description of the Drawings
[0049] Figure 1 is a flowchart of a multi-target point path planning method provided by the first embodiment of the present application;
[0050] Figure 2 is a schematic diagram of a scenario of a self-mobile device for multi-target point path planning provided by the first embodiment of the present application;
[0051] Figure 3 is a schematic diagram of performing a crossover operation on a first path sequence and a second path sequence provided by the first embodiment of the present application;
[0052] Figure 4 is a block diagram of units of a multi-target point path planning device provided by the second embodiment of the present application;
[0053] Figure 5 It is a schematic structural diagram of a self - moving device provided by the third embodiment of the present application. Specific implementation manners
[0054] Many specific details are set forth in the following description in order to provide a thorough understanding of the embodiments of the present application. However, the embodiments of the present application can be implemented in many other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the embodiments of the present application. Therefore, the embodiments of the present application are not limited by the specific implementations disclosed below.
[0055] The first embodiment of the present application provides a multi - target - point path planning method. The application subject of this method can be a self - moving device. This method is applied to the multi - target - point path planning during the driving process of the self - moving device to find a shortest driving path for the self - moving device during driving. The self - moving device can be a cleaning robot in the field of cleaning equipment, or a mobile service robot for shopping and inspection in shopping malls, supermarkets, and stores. In this embodiment, a shopping robot is taken as an example for illustration. Of course, the self - moving device can also be an autonomously movable device applied in other fields, and all these self - moving devices fall within the scope of protection of the present application. As Figure 1 shown, Figure 1 It is a flowchart of the multi - target - point path planning method provided by the first embodiment of the present application. The method includes the following steps.
[0056] Step S101, obtain target points.
[0057] In the method of this embodiment, it mainly introduces that in the inspection scenario of a shopping robot in a shopping mall, for different distribution structures of goods shelves in the shopping mall, the shopping robot can set target points to pass through these goods shelves, so as to plan the driving path during the work of the shopping robot. Taking the inspection of goods as an example, when the shopping robot inspects goods, it needs to pass through various goods shelves. In order to achieve the inspection of all goods shelves, obviously, target points need to be set near the corresponding goods shelves, and the shopping robot can complete the inspection of the goods on the goods shelves through these target points. Combining Figure 2 shown, Figure 2 It is a schematic diagram of the scenario for the multi - target - point path planning of the self - moving device. As Figure 2As shown, the goods shelf A is in a "seven-shaped" configuration. If the sweeping robot wants to completely inspect the goods shelf A, it needs to pass through target point 5 and target point 1. For example, when inspecting goods shelf B, it needs to pass through the corresponding target point 6; for goods shelf C, it needs to pass through the corresponding target points 3 and 4; for goods shelf D, it needs to pass through the corresponding target point 2. Of course, there can be many corresponding target points for the above-mentioned goods shelves. In order to facilitate the understanding of the solution of this embodiment, only a few target points are schematically selected for marking in this embodiment. Among them, in the space coordinate system, each target point corresponds to an X-axis direction coordinate, a Y-axis direction coordinate, and an angle parameter corresponding to the sweeping robot. Obtaining the target points means obtaining the coordinate parameters corresponding to each target point and encoding each target point using a genetic algorithm.
[0058] Step S102: Sort the target points according to the path distances between each target point and the starting point to obtain a first path sequence.
[0059] After obtaining the respective coordinate parameters corresponding to the target points in step S101, the target points will be sorted according to the path distances between each target point and the starting point to obtain a first path sequence. Here, the starting point in this embodiment is the starting point of the sweeping robot, and this point can also be used as the final end point after the sweeping robot passes through multiple target points. As Figure 2 shown, the sweeping robot takes the starting point 0 as both the starting point and the final end point, that is, the sweeping robot starts from the starting point 0, passes through each target point, and then returns to the position of the starting point 0. The path distance refers to the path length of the sweeping robot traveling between each target point. This path length can be the connection of multiple straight-line paths or the connection of multiple curved paths.
[0060] Specifically, first obtain the path distances between each target point and the starting point, that is, obtain the path distance between target point 1 and starting point 0 as S1, the path distance between target point 2 and starting point 0 as S2, the path distance between target point 3 and starting point 0 as S3, the path distance between target point 4 and starting point 0 as S4, the path distance between target point 5 and starting point 0 as S5, and the path distance between target point 6 and starting point 0 as S6. In this embodiment, the Dijkstra algorithm or the Floyd-Warshall algorithm can be used to obtain the path distance between two points. Since these two algorithms are not the focus of this embodiment, they will not be described repeatedly here.
[0061] Then, according to the path distances corresponding to each target point, sort each target point in ascending order to obtain the first path sequence. In this embodiment, the path distance S5 is less than the path distance S1, which is less than the path distance S3, which is less than the path distance S2, which is less than the path distance S6, which is less than the path distance S4. Thus, the sorting of each target point is obtained, that is, target point 5 - target point 1 - target point 3 - target point 2 - target point 6 - target point 4. And corresponding to the genetic algorithm, the first path sequence can be used as the initial individual in the initial population, and the first path sequence can be expressed as X1 = {x5, x1, x3, x2, x6, x4}.
[0062] Step S103: Sort each target point according to the path distance between each target point and the first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point.
[0063] After sorting each target point according to the path distance between each target point and the starting point in step S102 to obtain the first path sequence, then sort each target point according to the path distance between each target point and the first target point to obtain the second path sequence. Among them, the first target point is the target point with the shortest path distance from the starting point. Corresponding to step S102, when the path distance between target point 5 and the starting point 0 is the smallest, the current starting point is the starting point 0, then the first target point is target point 5. Each target point includes the first target point. That is to say, for the first target point, the path distance between each target point and the first target point is the path distance between the first target point and the first target point, and this path distance is 0.
[0064] In this step, first obtain the path distance between each target point and the first target point, that is, obtain the path distance between target point 1 and target point 5 as S1-1, the path distance between target point 2 and target point 5 as S2-2, the path distance between target point 3 and target point 5 as S3-3, the path distance between target point 4 and target point 5 as S4-4, the path distance between target point 5 and target point 5 as S5-5, and the path distance between target point 6 and target point 5 as S6-6. Similarly, the path distance between two points obtained in this step can use the Dijkstra algorithm or the Floyd-Warshall algorithm. Since these two algorithms are not the focus of this embodiment, no repeated description is made here.
[0065] Then, according to the path distances corresponding to each target point, sort the target points in ascending order to obtain the second path sequence. In this embodiment, the path distance S5-5 is less than the path distance S2-2, which is less than the path distance S3-3, which is less than the path distance S6-6, which is less than the path distance S4-4, which is less than the path distance S1-1. Thus, the sorting of each target point is obtained, that is, target point 5 - target point 2 - target point 3 - target point 6 - target point 4 - target point 1. And corresponding to the genetic algorithm, the second path sequence can also be used as the initial individual in the initial population, and the second path sequence can be expressed as X2 = {x5, x2, x3, x6, x4, x1}.
[0066] Step S104, using the first path sequence and the second path sequence as the initial individuals of the genetic algorithm, use the genetic algorithm to obtain the final path sequence.
[0067] After obtaining the first path sequence and the second path sequence through step S102 and step S103 respectively, then use the genetic algorithm to obtain the final path sequence. Among them, the final path sequence is the sorting of each target point corresponding to the shortest path that the sweeping robot needs to travel from the starting point 0 through each target point.
[0068] Specifically, in this embodiment, first, calculate the first path cost of the first path sequence and the second path cost of the second path sequence respectively. Among them, the path cost refers to the sum of the center connection distances of the grids passed through. Combining the inspection scenario of the sweeping robot in the shopping mall, given n target points, on the premise of ensuring that the sweeping robot finally reaches the nth point, the remaining n - 1 points can be traversed in any order. Let the path cost be f(C), and let d(c i , c i+1 ) represent the center connection distance of the grid passed through between the i-th target point and the (i + 1)-th target point, then the path cost can be expressed as
[0069]
[0070] Corresponding to the first path sequence X1 = {x5, x1, x3, x2, x6, x4} of this embodiment, the calculation formula for the first path cost is:[[]]
[0071] f(C1) = ∑d(c0, c5) + d(c5, c1) + d(c1, c3) + d(c3, c2) + d(c2, c6) + d(c6, c4)
[0072] Correspondingly, for the second path sequence X2 = {x5, x2, x3, x6, x4, x1}, the calculation formula for the second path cost is:[[]]
[0073] f(C2) = ∑d(c5, c5) + d(c5, c2) + d(c2, c3) + d(c3, c6) + d(c6, c4) + d(c4, c1)
[0074] Therefore, the first path cost and the second path cost are calculated respectively according to the above formula. Then, the first path cost and the second path cost are compared, and the path sequence with the smaller cost value is determined as the final path sequence.
[0075] Furthermore, in this embodiment, it further includes: performing a crossover operation on the first path sequence and the second path sequence to obtain a third path sequence corresponding to the first path sequence and a fourth path sequence corresponding to the second path sequence.
[0076] Specifically, first, obtain the first target point sorting difference segment and the second target point sorting difference segment corresponding in the first path sequence and the second path sequence. Among them, in combination with the foregoing, the first path sequence can be expressed as X1 = {x5, x1, x3, x2, x6, x4}, and the second path sequence can be expressed as X2 = {x5, x2, x3, x6, x4, x1}. Then the first target point sorting difference segment is correspondingly expressed as x1, x3, x2, x6, x4, and the second target point sorting difference segment is correspondingly expressed as x2, x3, x6, x4, x1. Secondly, obtain the first consecutive target point sub-segment in the first target point sorting difference segment and the second consecutive target point sub-segment in the second target point sorting difference segment, where the consecutive target points of the first consecutive target point sub-segment and the second consecutive target point sub-segment are the same. In this embodiment, the first consecutive target point sub-segment and the second consecutive target point sub-segment are specifically x6, x4. Then, cross-exchange the second consecutive target point sub-segment with the target points at the corresponding positions in the first target point sorting difference segment, and replace the repeated target points other than the first consecutive target point sub-segment with the target points that do not appear to obtain the third path sequence.
[0077] Specifically, as shown in Figure 3 The two target points corresponding to the second consecutive target point sub-segment x6, x4 at the corresponding positions in the first target point sorting difference segment are x2, x6. Exchange the second consecutive target point sub-segment x6, x4 with the two target points x2, x6, that is, form a transition sequence X 1-1 = {x5, x1, x3, x6, x4, x4}. Then, the target point that does not appear in this transition sequence is x2, and the repeated target point other than the first consecutive target point sub-segment in this transition sequence is x4. Therefore, replace the last x4 in the transition sequence with x2, and further obtain the third path sequence as X3 = {x5, x1, x3, x6, x4, x2}.
[0078] Similarly, cross - swap the first continuous target point sub - segment with the target points at the corresponding positions in the second target point sorting difference segment, and replace the repeated target points outside the second continuous target point sub - segment with the non - appearing target points to obtain the fourth path sequence. Specifically, as shown in Figure 3 Figure Figure 3 , the two target points of the first continuous target point sub - segment x6, x4 at the corresponding positions in the second target point sorting difference segment are x4, x1. Swap the first continuous target point sub - segment x6, x4 with the two target points x4, x1, that is, form the transition sequence X 2-2 ={x5, x2, x3, x6, x6, x4}. Then, the non - appearing target point in this transition sequence is x1, and the repeated target point outside the second continuous target point sub - segment in this transition sequence is x6. Thus, replace the x6 at the third position from the right in the transition sequence with x1, and further obtain the fourth path sequence as X4 = {x5, x2, x3, x1, x6, x4}.
[0079] After obtaining the third path sequence and the fourth path sequence, calculate the third path cost of the third path sequence and the fourth path cost of the fourth path sequence respectively. The methods for calculating the third path cost and the fourth path cost are the same as the method for calculating the first path cost described above, so no repetitive description is made here. Among them, the calculation formula for the third path cost is:
[0080] f(C3)=∑d(c0, c5)+d(c5, c1)+d(c1, c3)+d(c3, c6)+d(c6, c4)+d(c4, c2)
[0081] Correspondingly, the calculation formula for the fourth path cost is:
[0082] f(C4)=∑d(c5, c5)+d(c5, c2)+d(c2, c3)+d(c3, c1)+d(c1, c6)+d(c6, c4)
[0083] Thus, calculate the third path cost and the fourth path cost respectively according to the above formulas. Then, combine the above - mentioned first path cost and second path cost, compare the first path cost, the second path cost, the third path cost and the fourth path cost, and determine the path sequence with the smaller cost value as the final path sequence.
[0084] Furthermore, in this embodiment, it further includes: performing a preset operation on the third path sequence and the fourth path sequence to obtain a fifth path sequence corresponding to the third path sequence and a sixth path sequence corresponding to the fourth path sequence respectively.
[0085] Specifically, first, randomly transform at least one target point in the third path sequence. The third path sequence is X3 = {x5, x1, x3, x6, x4, x2}. Then randomly transform one target point in this sequence. For example, transform the target point x3 at the third position from the left in the third path sequence into the target point x2, that is, form a transition sequence X 3-3 = {x5, x1, x2, x6, x4, x2}. Then, use the unappeared target point to replace the repeated target points other than the at least one target point that has been transformed, and obtain the fifth path sequence corresponding to the third path sequence. Specifically, in the transition sequence, the unappeared target point is x3, and the repeated target point other than the at least one target point that has been transformed is x2 at the first position from the right in the transition sequence. Then replace x2 with x3, so as to obtain the fifth path sequence X5 = {x5, x1, x2, x6, x4, x3}.
[0086] Similarly, randomly transform at least one target point in the fourth path sequence. The fourth path sequence is X4 = {x5, x2, x3, x1, x6, x4}. Then randomly transform one target point in this sequence. For example, transform the target point x1 at the third position from the right in the fourth path sequence into x4, that is, form a transition sequence X 4-4 = {x5, x2, x3, x4, x6, x4}. Then, use the unappeared target point to replace the repeated target points other than the at least one target point that has been transformed, and obtain the sixth path sequence corresponding to the fourth path sequence. Specifically, in the transition sequence, the unappeared target point is x1, and the repeated target point other than the at least one target point that has been transformed is x4 at the first position from the right in the transition sequence. Then replace x4 with x1, so as to obtain the sixth path sequence X6 = {x5, x2, x3, x4, x6, x1}.
[0087] After obtaining the fifth path sequence and the sixth path sequence, calculate the fifth path cost of the fifth path sequence and the sixth path cost of the sixth path sequence respectively. The methods for calculating the fifth path cost and the sixth path cost are the same as the method for calculating the first path cost described above, so no repetitive description is made here. Among them, the calculation formula for the fifth path cost is:
[0088] f(C5) = ∑d(c0, c5)+d(c5, c1)+d(c1, c2)+d(c2, c6)+d(c6, c4)+d(c4, c3)
[0089] Correspondingly, the calculation formula for the sixth path cost is:
[0090] f(C6) = ∑d(c5, c5)+d(c5, c2)+d(c2, c3)+d(c3, c4)+d(c4, c6)+d(c6, c1)
[0091] Thus, the fifth path cost and the sixth path cost are calculated respectively according to the above formula. Then, combining the above first path cost and second path cost, as well as the third path cost and fourth path cost, compare the first path cost, second path cost, third path cost, fourth path cost, fifth path cost and sixth path cost, and determine the path sequence with the smaller cost value as the final path sequence.
[0092] The first embodiment of the present application provides a multi-objective point path planning method, including: obtaining target points; sorting the target points according to the path distances between each target point and the starting point to obtain a first path sequence; sorting the target points according to the path distances of each target point from the first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point; using the first path sequence and the second path sequence as the initial individuals of the genetic algorithm, and using the genetic algorithm to obtain the final path sequence. The method provided by the first embodiment of the present application does not directly apply the genetic algorithm, but combines the genetic algorithm with multi-objective point path planning. When performing the selection operation, two sequences with stronger reliability are directly selected as the initial individuals, saving the complex process of calculating all possible initial sorting; this method is more reasonable than the method of reaching the target points in a given order, improving the rationality of the multi-objective point arrival order and the movement efficiency of the robot, reducing the possibility of the robot taking repeated routes, and thus reducing the power consumption of the robot.
[0093] The above first embodiment provides a multi-objective point path planning method. Correspondingly, the second embodiment of the present application provides a multi-objective point path planning device. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple. For the details of the relevant technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the device embodiment is only illustrative.
[0094] Please refer to Figure 4 to understand this embodiment, Figure 4 which is the unit block diagram of the device provided for this embodiment. As Figure 4 shown, the multi-objective point path planning device includes:
[0095] An obtaining unit 401, configured to obtain target points;
[0096] An initial path sequence obtaining unit 402, configured to sort the target points according to the path distances between each target point and the starting point to obtain a first path sequence; sort the target points according to the path distances of each target point from the first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point;
[0097] The final path sequence obtaining unit 403 is configured to use the first path sequence and the second path sequence as the initial individuals of a genetic algorithm, and obtain a final path sequence by using the genetic algorithm.
[0098] The device provided in the second embodiment of the present application does not directly apply the genetic algorithm, but combines the genetic algorithm with multi-objective point path planning. When performing the selection operation, it directly selects two sequences with relatively strong reliability as the initial individuals, saving the complex process of calculating all possible initial orderings; this method is more reasonable than the method of reaching the target points in a given order, improving the rationality of the multi-objective point arrival order and the movement efficiency of the robot, reducing the possibility of the robot taking a repeated route, and thus reducing the power consumption of the robot.
[0099] In the above embodiments, a multi-objective point path planning method and a multi-objective point path planning device are provided. In addition, the third embodiment of the present application also provides a self-mobile device. Since the self-mobile device embodiment is basically similar to the method embodiment, the description is relatively simple. For the details of the relevant technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the self-mobile device embodiment is only illustrative. The self-mobile device embodiment is as follows:
[0100] Please refer to Figure 5 to understand this embodiment, Figure 5 which is a schematic diagram of the self-mobile device provided for this embodiment.
[0101] The present embodiment provides a self-mobile device 500, including: a depth sensor 501 and a processor 502;
[0102] The depth sensor 501 is configured to obtain target points;
[0103] The processor 502 is configured to sort each target point according to the path distance between each target point and the starting point to obtain a first path sequence; sort each target point according to the path distance between each target point and the first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point; use the first path sequence and the second path sequence as the initial individuals of a genetic algorithm, and obtain a final path sequence by using the genetic algorithm. Wherein, in this embodiment, the self-mobile device may be a cleaning robot in the field of cleaning equipment, or a sweeping robot in a shopping mall or supermarket, or a store patrol robot.
[0104] In the above embodiments, a multi-objective point path planning method and a multi-objective point path planning device are provided. In addition, in the fourth embodiment of the present application, a robot is further provided, and the robot can be a cleaning robot, an inspection robot, a greeting robot, or the like. Since the robot embodiment is basically similar to the method embodiment, the description is relatively simple. For the details of the relevant technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the robot embodiment is only illustrative. The embodiments of the robot are as follows:
[0105] This embodiment provides a robot, including: a depth sensor and a processor; the depth sensor is used to acquire target points; the processor is used to sort the target points according to the path distances between the target points and the starting point to obtain a first path sequence; sort the target points according to the path distances of the target points from the first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point; use the first path sequence and the second path sequence as the initial individuals of the genetic algorithm, and use the genetic algorithm to obtain the final path sequence.
[0106] The above self-mobile device can achieve better use effects than existing self-mobile devices in different scenarios. The following gives specific application scenarios for illustration.
[0107] Application Scenario 1
[0108] The self-mobile device is a cleaning robot. When the cleaning robot is cleaning the ground, the depth sensor installed inside the cleaning robot acquires target points, and the target points are the target points corresponding to the areas near objects such as sofas, tables, and chairs that can be passed through. The processor inside the cleaning robot will first set its own location as the starting point and the final end point. Secondly, it sorts the target points according to the path distances between the target points and the starting point to obtain a first path sequence, sorts the target points according to the path distances of the target points from the first target point to obtain a second path sequence, then performs a crossover operation on the first path sequence and the second path sequence to obtain a third path sequence corresponding to the first path sequence and a fourth path sequence corresponding to the second path sequence. Then, perform a preset operation on the third path sequence and the fourth path sequence to obtain a fifth path sequence corresponding to the third path sequence and a sixth path sequence corresponding to the fourth path sequence respectively; then calculate the corresponding first path cost, second path cost, third path cost, fourth path cost, fifth path cost, and sixth path cost and compare them, and determine the path sequence with a smaller cost value as the final path sequence, that is, determine the order of the shortest path for traveling through the target points. By adopting this method, the problem that the cleaning robot has many repeated paths and poor running efficiency when cleaning the ground, thus increasing the power consumption of the cleaning robot, can be solved.
[0109] Application Scenario 2
[0110] The self - moving device is a shopping robot. When the shopping robot scans the goods on the shelves, it obtains target points through a depth sensor installed inside the shopping robot. These target points are the target points corresponding to areas near objects such as shelves and counters that can be passed through. First, the processor inside the shopping robot sets its own location as the starting point and the final end point. Secondly, it sorts the target points according to the path distances between each target point and the starting point to obtain the first path sequence. Then, it sorts the target points according to the path distances of each target point from the first target point to obtain the second path sequence. Next, it performs a crossover operation on the first path sequence and the second path sequence to obtain the third path sequence corresponding to the first path sequence and the fourth path sequence corresponding to the second path sequence. Then, it performs a preset operation on the third path sequence and the fourth path sequence to obtain the fifth path sequence corresponding to the third path sequence and the sixth path sequence corresponding to the fourth path sequence respectively. Then, it calculates the corresponding first path cost, second path cost, third path cost, fourth path cost, fifth path cost, and sixth path cost and compares them. It determines the path sequence with a smaller cost value as the final path sequence, that is, determines the order of the shortest path for passing through the target points. By using this method, it can solve the problem that the shopping robot has many repeated paths and poor operating efficiency when scanning the goods on the shelves, thus increasing the power consumption of the shopping robot.
[0111] Application Scenario 3
[0112] The self - moving device is an inspection robot. When the inspection robot inspects a store, it obtains target points through a depth sensor installed inside the inspection robot. The target points are the target points corresponding to the vicinity of detection points A, detection point B, etc. The processor inside the inspection robot first sets its own location as the starting point and the final end point. Secondly, it sorts the target points according to the path distances between each target point and the starting point to obtain the first path sequence. Then it sorts the target points according to the path distances of each target point from the first target point to obtain the second path sequence. Then it performs a cross - operation on the first path sequence and the second path sequence to obtain a third path sequence corresponding to the first path sequence and a fourth path sequence corresponding to the second path sequence. Then it performs a preset operation on the third path sequence and the fourth path sequence to obtain a fifth path sequence corresponding to the third path sequence and a sixth path sequence corresponding to the fourth path sequence respectively. Then it calculates the corresponding first path cost, second path cost, third path cost, fourth path cost, fifth path cost and sixth path cost and makes a comparison, and determines the path sequence with a smaller cost value as the final path sequence, that is, determines the order of the shortest path for traveling through the target points. By adopting this method, it can solve the problem that the inspection robot has many repeated paths and poor operation efficiency when inspecting a store, thus increasing the power consumption of the inspection robot.
[0113] Although this application is disclosed above with preferred embodiments, it is not used to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the protection scope of this application should be subject to the scope defined by the claims of this application.
Claims
1. A multi-objective point path planning method, characterized in that, Including: Obtain target points; Sort the target points according to the path distances between each target point and the starting point to obtain a first path sequence; Sort the target points according to the path distances of each target point from a first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point; Use the first path sequence and the second path sequence as the initial individuals of a genetic algorithm, and use the genetic algorithm to obtain a final path sequence.
2. The multi-objective point path planning method according to claim 1, wherein The step of sorting the target points according to the path distances between each target point and the starting point to obtain a first path sequence includes: Obtain the path distances between each target point and the starting point; Sort the target points in ascending order according to the corresponding path distances to obtain the first path sequence.
3. The multi-objective point path planning method according to claim 1, wherein The step of sorting the target points according to the path distances of each target point from the first target point to obtain a second path sequence includes: Obtain the path distances of each target point from the first target point; Sort the target points in ascending order according to the corresponding path distances to obtain the second path sequence.
4. The multi-objective point path planning method according to claim 1, wherein The step of using the first path sequence and the second path sequence as the initial individuals of a genetic algorithm and using the genetic algorithm to obtain a final path sequence includes: Calculate the first path cost of the first path sequence and the second path cost of the second path sequence respectively; Compare the first path cost and the second path cost, and determine the path sequence with the smaller cost value as the final path sequence.
5. The multi-objective point path planning method according to claim 1, characterized in that It also includes: Perform a crossover operation on the first path sequence and the second path sequence to obtain a third path sequence corresponding to the first path sequence and a fourth path sequence corresponding to the second path sequence; The step of using the first path sequence and the second path sequence as the initial individuals of a genetic algorithm and using the genetic algorithm to obtain a final path sequence includes: Calculate the first path cost of the first path sequence and the second path cost of the second path sequence respectively; and calculate the third path cost of the third path sequence and the fourth path cost of the fourth path sequence respectively; Compare the first path cost, the second path cost, the third path cost and the fourth path cost, and determine the path sequence with the smaller cost value as the final path sequence.
6. The multi-objective point path planning method according to claim 5, wherein The step of performing a crossover operation on the first path sequence and the second path sequence to obtain a third path sequence corresponding to the first path sequence and a fourth path sequence corresponding to the second path sequence includes: Obtain the first target point sorting difference segment and the second target point sorting difference segment corresponding to each other in the first path sequence and the second path sequence; Obtain the first continuous target point sub-segment in the first target point sorting difference segment and the second continuous target point sub-segment in the second target point sorting difference segment; the continuous target points in the first continuous target point sub-segment and the second continuous target point sub-segment are the same; Cross-interchange the second consecutive target point sub-segment with the target points at the corresponding positions in the first target point sorting difference segment, and replace the repeated target points outside the first consecutive target point sub-segment with the non-appearing target points to obtain the third path sequence; Cross-interchange the first consecutive target point sub-segment with the target points at the corresponding positions in the second target point sorting difference segment, and replace the repeated target points outside the second consecutive target point sub-segment with the non-appearing target points to obtain the fourth path sequence.
7. The multi-objective point path planning method according to claim 1, characterized in that Further comprising: Perform a crossover operation on the first path sequence and the second path sequence to obtain a third path sequence corresponding to the first path sequence and a fourth path sequence corresponding to the second path sequence; Perform a preset operation on the third path sequence and the fourth path sequence to respectively obtain a fifth path sequence corresponding to the third path sequence and a sixth path sequence corresponding to the fourth path sequence; Using the first path sequence and the second path sequence as the initial individuals of the genetic algorithm, and using the genetic algorithm to obtain the final path sequence, including: Calculate respectively the first path cost of the first path sequence and the second path cost of the second path sequence; and calculate respectively the third path cost of the third path sequence and the fourth path cost of the fourth path sequence; and calculate respectively the fifth path cost of the fifth path sequence and the sixth path cost of the sixth path sequence; Compare the first path cost, the second path cost, the third path cost, the fourth path cost, the fifth path cost and the sixth path cost, and determine the path sequence with the smaller cost value as the final path sequence.
8. The multi-objective point path planning method according to claim 7, characterized in that, The performing a preset operation on the third path sequence and the fourth path sequence to respectively obtain a fifth path sequence corresponding to the third path sequence and a sixth path sequence corresponding to the fourth path sequence includes: Randomly transform at least one target point in the third path sequence, and replace the repeated target points other than the at least one transformed target point with non-appearing target points to obtain a fifth path sequence corresponding to the third path sequence; and Randomly transform at least one target point in the fourth path sequence, and replace the repeated target points other than the at least one transformed target point with non-appearing target points to obtain a sixth path sequence corresponding to the fourth path sequence.
9. A multi-target point path planning device, characterized in that, Comprising: An acquisition unit for acquiring target points; An initial path sequence acquisition unit for sorting the respective target points according to the path distances between the respective target points and the starting point to obtain a first path sequence; sorting the respective target points according to the path distances of the respective target points from the first target point to obtain a second path sequence; the first target point being the target point with the shortest path distance from the starting point; A final path sequence acquisition unit for using the first path sequence and the second path sequence as the initial individuals of the genetic algorithm and using the genetic algorithm to obtain the final path sequence.
10. A self - moving device, characterized in that, Comprising: A depth sensor and a processor; The depth sensor is used to obtain target points; The processor is configured to sort the target points according to the path distances between the respective target points and the starting point to obtain a first path sequence; sort the target points according to the path distances of the respective target points from the first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point; Using the first path sequence and the second path sequence as the initial individuals of a genetic algorithm, a final path sequence is obtained by using the genetic algorithm.
11. A robot, characterized in that, Comprising: A depth sensor and a processor; The depth sensor is used to obtain target points; The processor is configured to sort the target points according to the path distances between the respective target points and the starting point to obtain a first path sequence; sort the target points according to the path distances of the respective target points from the first target point to obtain a second path sequence; the first target point is the target point with the shortest path distance from the starting point; Using the first path sequence and the second path sequence as the initial individuals of a genetic algorithm, a final path sequence is obtained by using the genetic algorithm.
Citation Information
Patent Citations
A TSP problem path planning method
CN109948865A