Robot path planning method and device, robot, and storage medium
By generating a set of secants and grouping them based on the number of intersections, the high computational complexity and segmentation complexity problems of the bow-shaped path planning algorithm in complex environments are solved, and efficient global coverage path planning is achieved.
Patent Information
- Application Number
- CN202110778102.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-09
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-07-09
AI Technical Summary
The existing bow-shaped full coverage path planning algorithm has high computational complexity in complex environments, is prone to local optimality, and has high segmentation complexity, making it difficult to ensure global consistency.
By generating a set of secant lines, grouping them based on the number of intersections between the secant lines and the contour of the area to be cleaned, and selecting a secant line set with a small number of groups as the bow scanning path, the complexity of segmentation and sorting is reduced.
It reduces the complexity of path planning, improves computational efficiency, and ensures the consistency of global coverage and the simplicity of path planning.
Smart Images

Figure CN115599081B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a robot path planning method and device, a robot, and a storage medium. Background Art
[0002] At present, bow-shaped full coverage path planning has gradually become a common algorithm for household cleaning robots and has been widely used, achieving good results and economic value. At the same time, it can be extended to a mutually perpendicular double-bow-shaped full coverage path planning method, becoming a basic solution in the cleaning field. The main solutions for bow-shaped full coverage path planning are:
[0003] The full coverage path planning method based on breadth search gradually searches for the cleanable area with the current point as the center. After searching the largest area, a new planning point is formed, and the final cleaning plan is formed by repeating the process. This plan is complex and computationally intensive, and it is easy to fall into local optimality in complex environments.
[0004] The full coverage path planning scheme based on segmentation is based on the full coverage path planning scheme of breadth search. By dividing the complex area into independent small blocks and then planning the small blocks, the scheme effectively solves the local optimal problem. However, the scheme has the problem of high segmentation complexity and difficulty. At the same time, there is still the problem of sorting the coverage path planning generated within the segmented blocks, and there is still a certain degree of uncertainty. At the same time, after the scheme is connected, the intervals of the bow-shaped coverage may be different globally, making it difficult to ensure consistency. Summary of the Invention
[0005] The embodiments of the present application provide a path planning method for a robot to reduce the complexity of path planning.
[0006] An embodiment of the present application provides a robot path planning method, the method comprising:
[0007] For each of the set directions, determine a set of cut lines generated at intervals along the direction and covering the area to be cleaned;
[0008] Determining the number of groups in the secant line set according to a preset grouping rule based on the number of intersections between each secant line in the secant line set and the contour of the area to be cleaned, wherein the preset grouping rule is: dividing secant lines with the same number of consecutive intersections into one group;
[0009] A secant line set with a grouping number smaller than a set value or a minimum grouping number is selected, and the portion of the secant lines in the selected secant line set in the area to be cleaned is used as the bow scanning path.
[0010] In one embodiment, after determining, for each of the set directions, a set of cut lines generated at intervals along the direction and covering the area to be cleaned, the method further comprises:
[0011] For each secant set, based on the number of intersections between each secant in the secant set and the outline of the area to be cleaned, a secant set with a minimum total number of intersections or less than a preset value is selected; wherein the selected secant set is used for grouping.
[0012] In one embodiment, for each of the set directions, determining a set of cut lines that are generated at intervals along the direction and cover the area to be cleaned includes:
[0013] According to the edge points around the outline of the area to be cleaned and the direction corresponding to each edge point, multiple secants with intersections with the outline of the area to be cleaned are generated from each edge point in the corresponding direction at preset intervals to obtain a set of secants corresponding to each direction.
[0014] In one embodiment, the step of generating a plurality of cutting lines starting from each edge point and in a corresponding direction at predetermined intervals and having intersections with the contour of the area to be cleaned includes:
[0015] For any edge point, according to the direction corresponding to the edge point, secant lines having at least two intersection points with the outline of the area to be cleaned are generated at preset intervals to obtain a set of secant lines corresponding to the direction.
[0016] In one embodiment, selecting a set of secants with a grouping number smaller than a set value or a minimum grouping number, and using the portion of the secants in the selected set of secants in the area to be cleaned as the bow scanning path includes:
[0017] If the number of groups of the selected secant line set is 1, the portion of the secant lines in the selected secant line set in the area to be cleaned is used as the bow scanning path.
[0018] In one embodiment, selecting a set of secants with a grouping number smaller than a set value or a minimum grouping number, and using the portion of the secants in the selected set of secants in the area to be cleaned as the bow scanning path includes:
[0019] If the number of groups of the selected secant line set is not 1, determining the number of partitions of the area where the secant line of each group is located according to the number of intersections between each secant line of each group in the secant line set and the outline of the area to be cleaned;
[0020] Partition the outline of the area to be cleaned according to the number of partitions in the area where the secant line of each group is located, and assign a corresponding secant line to each partition;
[0021] According to the current position of the robot, different partitions are sorted in order, and the part of the secant line of each partition with a sequence in the area to be cleaned is used as the bow scanning path.
[0022] In one embodiment, before sorting the different partitions according to the current position of the robot, the method further includes:
[0023] Based on the distances between the endpoints of the boundary tangent lines of adjacent partitions, adjacent partitions with the closest distance or a distance less than a threshold are merged into one partition.
[0024] The present application also provides a robot path planning device, comprising:
[0025] A cutting line generating module is used to determine, for each of the set directions, a set of cutting lines that are generated at intervals along the direction and cover the area to be cleaned;
[0026] a secant grouping module for determining the number of groups in the secant set according to a preset grouping rule based on the number of intersections between each secant in the secant set and the contour of the area to be cleaned, wherein the preset grouping rule is: dividing secant lines with the same number of consecutive intersections into one group;
[0027] The path selection module is used to select a set of secants with a grouping number less than a set value or a minimum grouping number, and use the part of the secants in the selected secant set in the area to be cleaned as the bow scanning path.
[0028] The present application also provides a robot, comprising:
[0029] processor;
[0030] a memory for storing processor-executable instructions;
[0031] Wherein, the processor is configured to execute the above-mentioned robot path planning method.
[0032] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to complete the above-mentioned robot path planning method.
[0033] The technical solution provided by the above embodiment generates, for each direction, a set of secants covering the area to be cleaned at intervals along the direction, and grouped all the secants in the secant set based on the number of intersections between each secant and the outline of the area to be cleaned to obtain the number of groups. Finally, a secant set with a small number of groups is selected, and the part of each secant in the secant set within the area to be cleaned is used as the bow scanning path, thereby reducing the time complexity caused by the breadth search for cleanable points. Since there is no need to first divide the area into several small blocks and then plan them separately, the problem of difficult segmentation is solved, and the problem of complex sorting after segmentation is also solved. It can be seen that the solution provided by the embodiment of the present application reduces the amount of calculation and improves the efficiency of path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments of the present application.
[0035] Figure 1 A schematic diagram of the hardware architecture of a robot provided in an embodiment of the present application;
[0036] Figure 2 This is a flow chart of a robot path planning method provided in an embodiment of the present application;
[0037] Figure 3A 、 Figure 3B 、 Figure 3C This is a schematic diagram of determining the surrounding edge points based on the outline of the area to be cleaned, provided by an embodiment of the present application;
[0038] Figure 4A 、 Figure 4B 、 Figure 4C 、 Figure 4D Schematic diagram of four secant line advancing directions provided in the embodiment of the present application;
[0039] Figure 5A 、 Figure 5B 、 Figure 5C 、 Figure 5D is a schematic diagram of four secant line sets provided in an embodiment of the present application;
[0040] Figure 6 This is a schematic diagram of the process of generating a secant provided by an embodiment of the present application;
[0041] Figure 7A 、 Figure 7B 、 Figure 7C Schematic diagram of the change in the number of intersections of different secant directions provided in an embodiment of the present application;
[0042] Figure 8 yes Figure 2 Detailed flow chart of step S230 in the embodiment;
[0043] Figure 9A 、 Figure 9B This is a schematic diagram of partitioning for different secant generation schemes provided in the embodiments of the present application;
[0044] Figure 10A 、 Figure 10B 、 Figure 10C This is a schematic diagram of the process of allocating secants to different partitions provided by an embodiment of the present application;
[0045] Figure 11A 、 Figure 11B 、 Figure 11C 、 Figure 11D This is a schematic diagram of the principle of partition merging provided in an embodiment of the present application;
[0046] Figure 12A 、 Figure 12B This is a schematic diagram of the principle of partition sorting provided by an embodiment of the present application;
[0047] Figure 13A 、 Figure 13B It is a contour diagram and edge point schematic diagram provided by the embodiment of the present application;
[0048] Figure 14A 、 Figure 14B 、 Figure 14C 、 Figure 14D The embodiment of the present application provides a set of secant lines corresponding to four secant directions;
[0049] Figure 15 This is a block diagram of a robot path planning device according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0051] Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0052] Figure 1 A schematic diagram of the hardware architecture of a robot provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the robot 100 may include a processor 110 and a memory 120 for storing executable instructions of the processor 110; the processor 110 is configured to execute the robot path planning method provided in an embodiment of the present application.
[0053] The processor 110 can be a device including a central processing unit (CPU), a graphics processing unit (GPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities. It can process data from other components in the robot and control other components in the robot to perform desired functions.
[0054] The memory 120 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the robot path planning method described below. The computer-readable storage medium may also store various applications and various data, such as various data used and / or generated by the application.
[0055] The present application is a robot suitable for work scenarios that require full traversal of a certain area. Common robots include service robots, sweeping robots, mopping robots, sweeping and mopping robots, window cleaning robots, etc. This solution can be widely used in this field. At the same time, the solution takes into account both computational efficiency and ease of implementation.
[0056] Figure 2 This is a flow chart of a robot path planning method provided by an embodiment of the present application. Figure 2 As shown, the method includes the following steps S210-S230.
[0057] Step S210 : For each of the set directions, determine a set of cutting lines that are generated at intervals along the direction and cover the area to be cleaned.
[0058] The direction can be set to include: from left to right, from right to left, from top to bottom, from bottom to top. A secant set can be generated for each direction, so there can be four secant sets for four directions.
[0059] Taking the direction from left to right as an example, the secant line set includes multiple secant lines arranged from left to right, and the intervals between adjacent secant lines can be equal, thereby ensuring uniformity between the bow sweep paths.
[0060] The area to be cleaned refers to the area in the robot's environment that has unobstructed coverage and indicates that it needs to be cleaned. It can be scanned in advance by the robot, or the user can independently define the area to be cleaned.
[0061] In one embodiment, based on the surrounding edge points of the outline of the area to be cleaned and the direction corresponding to each edge point, multiple cutting lines having intersections with the outline of the area to be cleaned can be generated from each edge point in the corresponding direction at preset intervals to obtain a set of cutting lines corresponding to each direction.
[0062] like Figure 3A As shown in , the robot obtains discrete data points as the contour of the area to be cleaned by following the edge or map data. Figure 3B As shown, by establishing the "Northeast Sky" coordinate system, the absolute position of each point in the coordinate system is given, and through these absolute position information, the points where the maximum and minimum values of the X axis and the maximum and minimum values of the Y axis are obtained. Figure 3C As shown, these points are defined as the extreme left point (Xmin, Y1), the extreme right point (Xmax, Y2), the uppermost point (X1, Ymax), and the lowermost point (X1, Ymin). The above extreme left point, extreme right point, uppermost point, and lowermost point can be considered as the surrounding edge points.
[0063] Each edge point has a corresponding direction (i.e., the secant line direction), and each of the four edge points has only one bow-shaped planning direction, such as Figure 4A As shown, the secant direction of the extreme left point is from left to right, such as Figure 4B As shown, the secant direction of the extreme right point is from right to left, such as Figure 4C As shown, the direction of the secant line of the uppermost point is from top to bottom, such as Figure 4D As shown, the direction of the secant line at the lowest point is from bottom to top.
[0064] The preset spacing refers to the distance between adjacent cutting lines, that is, the bow-shaped cleaning spacing D sweep All secant lines can be generated according to the secant direction and the preset spacing. The generation condition is that the line has an intersection point with the outer contour figure.
[0065] like Figure 5A As shown, it is the set of secant lines corresponding to the extreme left point; Figure 5B As shown, this is the set of secant lines corresponding to the extreme right point, such as Figure 5C As shown, it is the set of secants corresponding to the top point, such as Figure 5D As shown, this is the set of secant lines corresponding to the lowest point.
[0066] In one embodiment, in order to reduce the number of secants and simplify the calculation, each secant has at least two intersections with the contour of the area to be cleaned. The specific process of generating secants can be as follows: Figure 6As shown, obtain the environmental contour data and the data for the contour's outermost point. For any edge point, plan a secant line based on the direction corresponding to the edge point, starting from the edge point and using the sweep width as the distance. Determine whether the number of intersections of the secant line is divisible by 2. If not, recalculate. If so, determine whether the number of intersections of the secant line is equal to 0. If so, terminate. If not, generate a secant line, move one sweep width, and continue planning the next secant line. Therefore, each secant line has 2n intersections with the contour, where n is greater than 1.
[0067] Step S220: determining the number of groups in the secant set according to a preset grouping rule based on the number of intersections between each secant in the secant set and the contour of the area to be cleaned, wherein the preset grouping rule is: grouping secants with the same number of consecutive intersections into one group.
[0068] For example, for a set of secants, if three consecutive secants have 2 intersections with the outline of the area to be cleaned, then these three secants are grouped together. If three consecutive secants have 4 intersections with the outline of the area to be cleaned, then these three secants are grouped together. In other words, secants with the same number of consecutive intersections are grouped together. Ultimately, all secants in a set can be divided into a fractional number of groups.
[0069] like Figure 7A The secant set shown in , searches all secants from left to right, and each secant has 2 intersections with the contour, that is, the value of n is always 1, so these secant sets are a group. Figure 7B The secant set shown in the figure is searched from top to bottom. The number of intersections between each secant and the contour increases from 2 to 4 and finally to 2. That is, the value of n increases from 1 to 2 and finally to 1. The secant set is divided into 3 groups. Figure 7C The secant line set shown in the figure searches all secant lines from bottom to top. The number of intersections between each secant line and the contour decreases from 4 to 2, that is, the value of n decreases from 2 to 1. The secant line set is divided into 2 groups.
[0070] In one embodiment, to reduce computational complexity, before step S220, for each secant set, a secant set having a minimum total number of intersections or less than a preset value may be selected based on the number of intersections between each secant in the secant set and the contour of the area to be cleaned. The secant set grouped in step S220 may be the secant set having a minimum total number of intersections or less than the preset value.
[0071] There are four secant sets corresponding to the four secant directions (left to right, right to left, top to bottom, and bottom to top). For each secant set, the total number of intersections between all secants in the set and the contour can be calculated based on the number of intersections between each secant in the set and the contour. The secant set with the fewest intersections can then be selected. Figure 5AThere are 28 intersection points shown. Figure 5B There are 30 intersection points in total. Figure 5C There are 28 intersection points in total. Figure 5D There are 28 intersection points. Figure 5A 、 Figure 5C 、 Figure 5D , as candidate cut line sets, participate in the calculation in step S220 to determine the number of groups for each cut line set.
[0072] Step S230: Select a secant line set with a grouping number smaller than a set value or a minimum grouping number, and use the portion of the secant lines in the selected secant line set in the area to be cleaned as the bow scanning path.
[0073] It should be noted that since the more groups there are, the more partitions there are. During the path planning process, the connecting routes between partitions often require a lot of planning, which means that the robot's movement process is longer and the trajectory is more complicated. Therefore, it is necessary to select the results with fewer groups to enter the next step.
[0074] Figure 7A The number of groups in the set of cut lines shown is 1, Figure 7B The number of groups in the shown set of cuts is 3, Figure 7C The number of groups in the cut set shown is 2, so we can select the cut set with the smallest number of groups, that is, select Figure 7A The part of each secant line in the secant line set that is within the contour is the bow sweep path. The bow sweep path can be considered as the robot's cleaning route or movement route. Alternatively, select a secant line set with a group size of less than 2, that is, select Figure 7C The secant line set shown in FIG5 is a secant line set, and the portion of each secant line in the secant line set that is within the contour is the bow sweep path. The bow sweep path can be considered as the robot's cleaning route or movement route.
[0075] The technical solution provided by the above embodiment is, for each direction, to generate a set of secants covering the area to be cleaned at intervals along the direction, and based on the number of intersections of each secant with the outline of the area to be cleaned, all the secants in the secant set are grouped to obtain the number of groups, and finally a secant set with a small number of groups is selected, and the part of each secant in the secant set within the area to be cleaned is used as the bow scanning path, thereby reducing the time complexity caused by the breadth search for cleanable points. Since there is no need to first divide the area into several small blocks and then plan them separately, the problem of difficult segmentation is solved, and the problem of complex sorting after segmentation is also solved. It can be seen that the solution provided by the embodiment of the present application reduces the amount of calculation and improves the efficiency of path planning.
[0076] In one embodiment, if the secant line set with the least number of groups selected in step S230 has a group number of 1, the portion of the secant lines in the secant line set in the area to be cleaned may be used as the bow scanning path.
[0077] In another embodiment, if the cut line set with the least number of groups selected in step S230 has a number of groups other than 1, such as 2, 3, etc., Figure 8 As shown, the following steps S240 to S260 can be performed.
[0078] Step S240: determining the number of partitions of the area where the secant line of each group is located according to the number of intersections between each secant line of each group in the secant line set and the outline of the area to be cleaned;
[0079] For example, if a set of cut lines is divided into 3 groups, and the number of intersection points of each cut line in the first group is 2 (i.e., 2n, where n=1), then the number of partitions of the region where the cut lines of the first group are located can be 1, i.e., one partition. If the number of intersection points of each cut line in the second group is 4 (i.e., 2n, where n=2), then the number of partitions of the region where the cut lines of the second group are located can be 2, i.e., two partitions. If the number of intersection points of each cut line in the third group is 2 (i.e., 2n, where n=1), then the number of partitions of the region where the cut lines of the third group are located is 1, i.e., one partition.
[0080] like Figure 9A As shown, each secant in the secant set has 2 intersection points with the contour (ie, n=1), and all secants are divided into one group. Since n=1, there is only one partition. Figure 9B The number of intersections of the secant lines shown in the figure increases from 2 to 4 to 2 from top to bottom, i.e. n increases from 1 to 2 to 1. n = 1 represents one partition, and n = 2 represents two partitions. Figure 9B The set of secants shown can be divided into 4 partitions.
[0081] Step S250: partitioning the outline of the area to be cleaned according to the number of partitions in the area where the cutting line of each group is located, and allocating a corresponding cutting line to each partition.
[0082] Since each cut line has 2n intersection points, it can be distributed from left to right, or from right to left, or from top to bottom, or from bottom to top. At this time, the distribution strategy can be determined according to the actual direction of the cut line. Figure 10A As shown, each intersection point of blocks 2 and 3 is intersected by the same secant line to form their own intersection points, through the allocation method from left to right or from right to left, as shown in Figure 10B As shown, the first region is first assigned two, and then the remaining two intersection points are assigned to another region, as shown in Figure 10C The final distribution result is shown in Figure 2. Similarly, the distribution from right to left can be performed with the same result.
[0083] Step S260: different partitions are sorted in order according to the current position of the robot, and the part of the secant line of each partition with a sequence in the area to be cleaned is used as the bow scanning path.
[0084] In order to avoid the robot taking a detour, the partition where the robot is located can be cleaned first, and then the adjacent partitions and farther partitions can be cleaned. Therefore, each partition can be sorted, and the part of the secant line of each sorted partition within the area to be cleaned is the bow sweeping path.
[0085] In one embodiment, before step S260, adjacent partitions with the shortest distance or a distance less than a threshold may be merged into one partition based on the distance between the endpoints of the boundary cut lines of the adjacent partitions.
[0086] by Figure 9B As shown, there may be small partitions, such as partition 4. These partitions can be merged into other partitions for integrated planning. At this time, they need to be merged according to certain principles.
[0087] First, extract the boundary cuts of each partition, such as Figure 11A As shown. The direction of the secant line of this secant line set is as follows Figure 11B As shown, the lowermost secant of partition 1 is compared with the uppermost secant of partition 2, or the lowermost secant of partition 1 is compared with the uppermost secant of partition 3. The comparison method is: the distance between the two secants D = Dsweep (bow sweep distance), and the distance between the secant endpoints needs to be minimum.
[0088] Specifically, the secant line moves from top to bottom, such as Figure 11C As shown, we can select from left to right, taking the leftmost point of the lowest secant of partition 1 as the starting point, and calculate the closest distance a between the starting point and the uppermost secant of partition 2 adjacent to partition 1, and the closest distance c between the starting point and the uppermost secant of partition 3 adjacent to partition 1. If a is less than c, partitions 1 and 2 can be merged. When calculating partition 3, the lowest secant has no adjacent area, so it becomes an independent new area; the lowest secant of partition 2 is adjacent to partition 4, and through calculation, it can be merged. Therefore, the final merging result can be obtained as follows Figure 11D As shown, it eventually becomes 2 partitions.
[0089] At this point, the robot has completed the calculation of the full coverage path planning, and then it can sort several partitions according to its own position, such as Figure 12A As shown in , if the robot is in zone 1, the zones are sorted from 1 to 2, i.e., zone 1 is cleaned first and then zone 2. Figure 12B As shown in the figure, if the robot is in partition 2, the partition order is 2 to 1, that is, the robot cleans partition 2 first and then partition 1, forming the optimal path planning solution.
[0090] The following is an example of a specific application scenario.
[0091] Figure 13A It is the trajectory graph generated by the robot along the edge in the environment. First, find 4 edge points such as Figure 13B Afterwards, for each edge point and the direction of the secant corresponding to the edge point, a secant is generated at a preset interval, as shown in Figure 14A 、 Figure 14B 、 Figure 14C 、 Figure 14D It is the set of secant lines corresponding to the four secant directions.
[0092] In order to reduce the amount of calculation, the secant set with the least number of intersections can be selected as the subsequent input. Figure 14A There are 22 intersection points in total. Figure 14B There are 22 intersection points in total. Figure 14C There are 22 intersection points in total. Figure 14D There are 22 intersection points, referred to as A, B, C, and D. Therefore, there are four secant solutions A, B, C, and D that can be used to proceed to the next step.
[0093] In plan A, all secants are searched from left to right, and the number of intersections between each secant and the contour can be expressed as 2n. The value of n in plan A is always 1, and the number of groups is 1; in plan B, all secants are searched from right to left, and the number of intersections between each secant and the contour can be expressed as 2n. The value of n in plan B is also always 1, so the number of groups is 1; in plan C, all secants are searched from top to bottom, and the number of intersections between each secant and the contour can be expressed as 2n. Therefore, the value of n ranges from 2 to 3 and finally to 1, so the number of groups is 3; in plan D, all secants are searched from bottom to top, and the number of intersections between each secant and the contour can be expressed as 2n. Therefore, the value of n ranges from 1 to 3 to 2, so the number of groups is 3.
[0094] Since the more groups there are, the more small partitions there are. During the path planning process, the connecting routes between partitions often require more planning, which means that the robot's movement process is longer and the trajectory is more complicated. Therefore, it is necessary to select the results with fewer groups to enter the next stage. Plans A and B enter the next stage, and plans C and D are removed due to the large number of groups.
[0095] Since both schemes A and B have only one group and one partition, there is no need for subsequent aggregation, merging, and sorting. The secant lines within the contours of schemes A and B can be directly used as the robot's bow scanning path.
[0096] In the embodiment of the present application, the external contour and the secant line, and the contour and the secant line form certain intersections, which directly form the endpoints of the bow-shaped path, directly solving the problem of large breadth search calculation amount without the need for search; at the same time, if a single secant line forms multiple path intersections with the contour, then the area can be divided to form small area cleaning blocks, solving the problem of the complexity of small area segmentation; at the same time, through multi-endpoint aggregation, the room segmentation problem can be further solved, forming a bow-shaped full coverage path planning solution suitable for complex environments, which can effectively improve cleaning efficiency and coverage.
[0097] The following is an embodiment of the device of the present application, which can be used to implement the path planning method embodiment of the robot described above. For details not disclosed in the embodiment of the device of the present application, please refer to the path planning method embodiment of the robot of the present application.
[0098] Figure 15 This is a block diagram of a robot path planning device according to an embodiment of the present application, as shown in FIG. Figure 15 As shown, the device includes: a cut line generation module 1510, a cut line grouping module 1520 and a path selection module 1530.
[0099] The cutting line generating module 1510 is configured to determine, for each of the set directions, a set of cutting lines that are generated at intervals along the direction and cover the area to be cleaned.
[0100] The secant grouping module 1520 is used to determine the number of groups in the secant set according to the number of intersections between each secant in the secant set and the outline of the area to be cleaned according to a preset grouping rule. The preset grouping rule is: grouping secants with the same number of consecutive intersections into one group.
[0101] The path selection module 1530 is used to select a set of secants with a grouping number less than a set value or a minimum grouping number, and use the part of the secants in the selected secant set in the area to be cleaned as the bow scanning path.
[0102] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned robot path planning method, and will not be repeated here.
[0103] In several embodiments provided in this application, the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a portion of code, and the module, program segment, or a portion of code contains one or more executable instructions for implementing the specified logical functions. In some alternative implementations, the functions marked in the boxes may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, may be implemented using a dedicated hardware-based system that performs the specified functions or actions, or may be implemented using a combination of dedicated hardware and computer instructions.
[0104] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0105] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
Claims
1. A robot path planning method, characterized in that: The method comprises: For each of the set directions, determine a set of cut lines generated at intervals along the direction and covering the area to be cleaned; Determining the number of groups in the secant line set according to a preset grouping rule based on the number of intersections between each secant line in the secant line set and the contour of the area to be cleaned, wherein the preset grouping rule is: dividing secant lines with the same number of consecutive intersections into one group; Selecting a set of secants with a group number smaller than a set value or a minimum group number, and using the portion of the secants in the selected set of secants in the area to be cleaned as the bow scanning path, including: Based on the number of groups of the selected secant line set and the intersection points corresponding to each group, the area to be cleaned is partitioned, each partition is sorted based on a sorting strategy, and the part of the secant line of each sorted partition in the area to be cleaned is used as the bow scanning path.
2. The method according to claim 1, characterized in that After determining, for each of the set directions, a set of cut lines generated at intervals along the direction and covering the area to be cleaned, the method further includes: For each secant set, based on the number of intersections between each secant in the secant set and the outline of the area to be cleaned, a secant set with a minimum total number of intersections or less than a preset value is selected; wherein the selected secant set is used for grouping.
3. The method according to claim 1, characterized in that For each of the set directions, a set of cut lines covering the area to be cleaned generated at intervals along the direction is determined, including According to the edge points around the outline of the area to be cleaned and the direction corresponding to each edge point, multiple secants with intersections with the outline of the area to be cleaned are generated from each edge point in the corresponding direction at preset intervals to obtain a set of secants corresponding to each direction.
4. The method according to claim 3, characterized in that The method of generating a plurality of cutting lines having intersections with the contour of the area to be cleaned from each edge point in a corresponding direction at preset intervals includes: For any edge point, according to the direction corresponding to the edge point, secant lines having at least two intersection points with the outline of the area to be cleaned are generated at preset intervals to obtain a set of secant lines corresponding to the direction.
5. The method according to claim 1, wherein The method includes partitioning the area to be cleaned based on the number of groups of the selected secant line set and the intersection points corresponding to each group, sorting each partition based on a sorting strategy, and using the portion of the secant line of each sorted partition in the area to be cleaned as the bow scanning path, including: If the number of groups of the selected secant line set is 1, there is only one partition in the area to be cleaned, and the portion of the secant lines in the selected secant line set in the area to be cleaned is used as the bow scanning path.
6. The method according to claim 1, characterized in that The method includes partitioning the area to be cleaned based on the number of groups of the selected secant line set and the intersection points corresponding to each group, sorting each partition based on a sorting strategy, and using the portion of the secant line of each sorted partition in the area to be cleaned as the bow scanning path, including: If the number of groups of the selected secant line set is not 1, determining the number of partitions of the area where the secant line of each group is located according to the number of intersections between each secant line of each group in the secant line set and the outline of the area to be cleaned; Partition the outline of the area to be cleaned according to the number of partitions in the area where the secant line of each group is located, and assign a corresponding secant line to each partition; According to the current position of the robot, different partitions are sorted in order, and the part of the secant line of each partition with a sequence in the area to be cleaned is used as the bow scanning path.
7. The method according to claim 6, characterized in that Before sorting the different partitions according to the current position of the robot, the method further includes: Based on the distances between the endpoints of the boundary tangent lines of adjacent partitions, adjacent partitions with the closest distance or a distance less than a threshold are merged into one partition.
8. A robot path planning device, characterized in that: include: A cutting line generating module is used to determine, for each of the set directions, a set of cutting lines that are generated at intervals along the direction and cover the area to be cleaned; a secant grouping module for determining the number of groups in the secant set according to a preset grouping rule based on the number of intersections between each secant in the secant set and the contour of the area to be cleaned, wherein the preset grouping rule is: dividing secant lines with the same number of consecutive intersections into one group; A path selection module is used to select a set of secants with a group number less than a set value or a minimum group number, and use the part of the secants in the selected secant set in the area to be cleaned as the bow scanning path, including: partitioning the area to be cleaned based on the number of groups in the selected secant set and the intersection points corresponding to each group, sorting each partition based on a sorting strategy, and using the part of the secants of each sorted partition in the area to be cleaned as the bow scanning path.
9. A robot, characterized in that: The robot comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the robot path planning method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and the computer program can be executed by a processor to complete the robot path planning method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Robot full-coverage path planning method, device and equipment based on offline map
CN110595478A
Turn-minimizing or turn-reducing robot coverage
US20200089255A1