Method for generating path information of cleaning robot and cleaning robot

By determining the target cleaning direction in the cleaning robot and extracting external points to generate path planning information, the problem of low path planning efficiency in the prior art is solved, and more efficient and reliable cleaning path planning is achieved.

CN115145287BActive Publication Date: 2026-01-20SHENZHEN SILVER STAR INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210911557.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-30
Publication Date
2026-01-20
Estimated Expiration
2042-07-30

Smart Images

  • Figure CN115145287B_ABST
    Figure CN115145287B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of path planning, and discloses a path information generation method for a cleaning robot and the cleaning robot. The method comprises the following steps: determining a to-be-cleaned area and a target cleaning direction of the to-be-cleaned area, the to-be-cleaned area comprising to-be-cleaned boundary points; extracting an external point according to the target cleaning direction, the external point being a to-be-cleaned boundary point adjacent to an area outside the to-be-cleaned area in the target cleaning direction; and generating path planning information according to the external point. According to the embodiment, the path planning can be realized by using the external point, without traversing all the grids in the to-be-cleaned area, so that the consumption of excessive computing power can be avoided, the efficiency of the path planning is improved, and the cleaning efficiency is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of path planning, and particularly relates to a path information generation method of a cleaning robot and the cleaning robot. BACKGROUND

[0002] With the development of cleaning robot technology, the existing cleaning robot can plan a cleaning path, and the cleaning robot walks in the cleaning path in a to-be-cleaned area to complete cleaning work. When planning the cleaning path, the existing cleaning robot acquires a plurality of adjacent positions adjacent to a current position in real time according to the current position, selects a target position in the plurality of adjacent positions based on a path planning algorithm, and finally moves from the current position to the target position, and so on, so as to realize planning of the cleaning path. When the existing cleaning robot plans all the cleaning paths, it also means that the cleaning robot needs to traverse all the grids in the to-be-cleaned area, and this path planning method needs to consume a large amount of computing power, resulting in low cleaning efficiency. SUMMARY

[0003] An object of an embodiment of the present application is to provide a path information generation method of a cleaning robot and the cleaning robot, and to improve the problem of low path planning efficiency of the existing cleaning robot.

[0004] In a first aspect, an embodiment of the present application provides a path information generation method of a cleaning robot, comprising:

[0005] determining a to-be-cleaned area and a target cleaning direction of the to-be-cleaned area, the to-be-cleaned area comprising to-be-cleaned boundary points;

[0006] extracting an external point according to the target cleaning direction, the external point being a to-be-cleaned boundary point adjacent to an area outside the to-be-cleaned area in the target cleaning direction;

[0007] generating path planning information according to the external point.

[0008] In a second aspect, an embodiment of the present application provides a cleaning robot, comprising:

[0009] at least one processor; and

[0010] a memory in communication connection with the at least one processor; wherein

[0011] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the path information generation method of the cleaning robot described above.

[0012] In the path information generation method of the cleaning robot provided by the embodiment of the present application, the to-be-cleaned region and a target cleaning direction of the to-be-cleaned region are determined, wherein the to-be-cleaned boundary point of the to-be-cleaned region is a passable grid adjacent to an obstacle grid, an external point is extracted according to the target cleaning direction, the external point is a to-be-cleaned boundary point adjacent to the obstacle grid in the target cleaning direction, and path planning information is generated according to the external point. In this embodiment, the external point can be used to plan the path, without traversing all the grids in the to-be-cleaned region, so that excessive calculation power can be avoided, the efficiency of planning the path is improved, and the cleaning efficiency is also improved. BRIEF DESCRIPTION OF DRAWINGS

[0013] One or more embodiments are illustrated by way of example in the figures that are part of this disclosure and which are illustrative, and not restrictive, of the present embodiments, wherein elements having the same reference number designates like elements throughout the various figures, unless otherwise expressly provided for in the drawings. The figures in the drawings do not necessarily bear a proportional relationship to each other.

[0014] Figure 1 A flowchart of a path information generation method of a cleaning robot provided by an embodiment of the present application is shown in the figure;

[0015] Figure 2 A schematic diagram of an external point on a to-be-cleaned region provided by an embodiment of the present application is shown in the figure, wherein the target cleaning direction is a row-by-row cleaning direction;

[0016] Figure 3 A schematic diagram of an external point on a to-be-cleaned region provided by an embodiment of the present application is shown in the figure, wherein the target cleaning direction is a column-by-column cleaning direction;

[0017] Figure 4 A schematic diagram of extracting an external point according to a row-by-row cleaning direction provided by an embodiment of the present application is shown in the figure;

[0018] Figure 5 A schematic diagram of extracting an external point according to a column-by-column cleaning direction provided by an embodiment of the present application is shown in the figure;

[0019] Figure 6 A schematic diagram of determining a cleaning starting point provided by an embodiment of the present application is shown in the figure;

[0020] Figure 7 A first schematic diagram of determining a moving starting point and a moving ending point of each cleaning path according to a row-by-row cleaning direction provided by an embodiment of the present application is shown in the figure;

[0021] Figure 8 A second schematic diagram of determining a moving starting point and a moving ending point of each cleaning path according to a row-by-row cleaning direction provided by an embodiment of the present application is shown in the figure;

[0022] Figure 9A first schematic diagram for determining the moving start point and the moving end point of each cleaning path according to the column-by-column cleaning direction, provided for the embodiment of the present application;

[0023] Figure 10 A second schematic diagram for determining the moving start point and the moving end point of each cleaning path according to the column-by-column cleaning direction, provided for the embodiment of the present application;

[0024] Figure 11 A schematic diagram for determining the turning direction according to the row-by-row cleaning direction, provided for the embodiment of the present application;

[0025] Figure 12 A schematic diagram for determining the turning direction according to the column-by-column cleaning direction, provided for the embodiment of the present application;

[0026] Figure 13 A schematic diagram of a to-be-cleaned area, provided for the embodiment of the present application, wherein the target cleaning direction is the row-by-row cleaning direction;

[0027] Figure 14 A schematic diagram of another to-be-cleaned area, provided for the embodiment of the present application, wherein the target cleaning direction is the column-by-column cleaning direction;

[0028] Figure 15 A schematic diagram of still another to-be-cleaned area, provided for the embodiment of the present application, wherein the target cleaning direction is the row-by-row cleaning direction;

[0029] Figure 16 A schematic diagram of the edge cleaning performed by the cleaning robot, provided for the embodiment of the present application;

[0030] Figure 17 A schematic diagram of the cleaning map shown in Figure 16 ;

[0031] Figure 18 A schematic diagram of the to-be-cleaned area shown in Figure 17 ;

[0032] Figure 19 A schematic diagram of the path planning information generated on the to-be-cleaned area shown in Figure 18 ;

[0033] Figure 20 A schematic diagram of the circuit structure of the cleaning robot, provided for the embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the objectives, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and not used to limit the present application. Based on the examples in the present application, all other examples obtained by those skilled in the art without creative efforts fall within the protection scope of the present application.

[0035] It should be noted that the various features of the embodiments of the present application can be combined with each other without conflict, and all fall within the protection scope of the present application. In addition, although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a manner different from the module division in the device or the order in the flowchart. Furthermore, the "first", "second", "third" and the like used in the present application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same function and effect.

[0036] The embodiment of the present application provides a path information generation method of a cleaning robot. Please refer to Figure 1 The path information generation method of the cleaning robot comprises the following steps.

[0037] S11: determining a to-be-cleaned area and a target cleaning direction of the to-be-cleaned area, wherein the to-be-cleaned area comprises a to-be-cleaned boundary point.

[0038] In this step, the to-be-cleaned area is an area that needs to be cleaned by the cleaning robot.

[0039] In some embodiments, when the cleaning robot enters a global cleaning mode, the cleaning robot cleans along the edge, and in the process of cleaning along the edge, the environment data is collected through the sensing assembly, the cleaning map is generated according to the environment data, and the to-be-cleaned area is extracted according to the cleaning map. The sensing assembly comprises a laser radar and / or a camera and / or various motion sensors.

[0040] In some embodiments, the to-be-cleaned area extracted according to the cleaning map in the embodiment comprises the following steps: selecting an expansion starting point in the cleaning map, wherein the expansion starting point is a point in a to-be-cleaned state, starting to search a cleanable connected domain with the expansion starting point according to a path search algorithm, and taking the cleanable connected domain as the to-be-cleaned area. The cleanable connected domain is a connected domain connected with the expansion starting point, and the path search algorithm comprises a BFS algorithm or a Dijkstra algorithm.

[0041] The cleaning map can be a grid map or other graphical map. When the cleaning map is a grid map, the cleaning map is composed of a plurality of grids. In order to be able to reflect the distribution of objects in the environment, a corresponding grid value can be set for each grid, and the grid value can reflect the state of the corresponding grid, and the state of the grid is used to represent the situation of the corresponding pixel point in the environment. The state of a single grid can be one of the following: a passable state, an obstacle state, and an unknown state. Among them, the passable state is used to represent that the corresponding pixel point belongs to the pixel of the region in the environment without being occupied by obstacles, the obstacle state is used to represent that the corresponding pixel point belongs to the pixel of the region in the environment occupied by obstacles, and the unknown state is used to represent that the corresponding pixel point belongs to the pixel of the unknown region in the environment. In order to facilitate description, the type of the grid corresponding to the passable state, the type of the grid corresponding to the obstacle state, and the type of the grid corresponding to the unknown state are respectively determined as passable grid, obstacle grid, and unknown region grid. In some embodiments, the grid value corresponding to the passable grid, the grid value corresponding to the obstacle grid, and the grid value corresponding to the unknown state grid are respectively 0, 1, and 2.

[0042] The to-be-cleaned region includes a to-be-cleaned boundary point, and the to-be-cleaned boundary point is a boundary point of the to-be-cleaned region. Since the to-be-cleaned region is in a to-be-cleaned state, the to-be-cleaned boundary point is also in a to-be-cleaned state.

[0043] In some embodiments, in order to facilitate positioning of a certain object in the target space in the grid map, and facilitate navigation, obstacle avoidance and other operations of the cleaning robot in the target space, the cleaning robot configures a grid coordinate system for the grid map, wherein the origin of the grid coordinate system can be defined at any suitable position of the grid map, for example, the origin can be defined at the upper left corner of the grid map, the positive direction of the X-axis is horizontally to the right, and the positive direction of the Y-axis is vertically downward. In this way, through the grid coordinate system, the position of each object or each region in the grid map can be quantitatively represented.

[0044] In some embodiments, the to-be-cleaned region can be customized by a user, wherein the user downloads and installs a cleaning robot APP in a mobile phone, registers and logs in the cleaning robot APP, clicks a cleaning command on the cleaning robot APP, the mobile phone sends the cleaning command to a cloud server, and the cloud server forwards the cleaning command to the cleaning robot.

[0045] The cleaning robot sends a cleaning map to a cloud server according to a cleaning instruction, the cloud server returns the cleaning map to a mobile phone, and a cleaning robot APP of the mobile phone presents the cleaning map. A user manually draws a to-be-cleaned area on the cleaning map presented by the mobile phone, the mobile phone records coordinate data of the to-be-cleaned area in the cleaning map, and the coordinate data can be area position information. The mobile phone packs the coordinate data of the to-be-cleaned area in the cleaning map into an area selection instruction, and sends the area selection instruction to the cloud server. The cloud server forwards the area selection instruction to the cleaning robot, the cleaning robot analyzes the area position information according to the area selection instruction, and selects an area corresponding to the area position information in the cleaning map as the to-be-cleaned area according to the area position information. Therefore, the embodiment can set the area defined by the user as the to-be-cleaned area.

[0046] The target cleaning direction is a cleaning direction for instructing the cleaning robot to clean the to-be-cleaned area in a full coverage manner. The cleaning direction is a direction in which the cleaning robot cleans the to-be-cleaned area. The cleaning direction includes a row-by-row cleaning direction and a column-by-column cleaning direction.

[0047] The row-by-row cleaning direction is a direction in which cleaning is sequentially performed along each row line in a row sequence. When the cleaning map is a rasterized map, the row line is a line segment composed of grids in the same row. When the target cleaning direction is the row-by-row cleaning direction, the cleaning robot can clean the to-be-cleaned area row by row according to the target cleaning direction, that is, the cleaning robot switches to another row to clean after cleaning a row of the to-be-cleaned area.

[0048] The column-by-column cleaning direction is a direction in which cleaning is sequentially performed along each column line in a column sequence. When the cleaning map is a rasterized map, the column line is a line segment composed of grids in the same column. In some embodiments, when the target cleaning direction is the column-by-column cleaning direction, the cleaning robot can clean the to-be-cleaned area column by column according to the target cleaning direction, that is, the cleaning robot switches to another column to clean after cleaning a column of the to-be-cleaned area.

[0049] Generally, the row line is parallel to the X axis, and the column line is parallel to the Y axis.

[0050] In some embodiments, the cleaning robot can walk in the to-be-cleaned area according to a cleaning path under the indication of the target cleaning direction. The cleaning path is a path walked by the cleaning robot when performing a cleaning task in the to-be-cleaned area. The shape of the cleaning path is an arch shape or a Y shape, etc. The cleaning path can be set in advance by the user or automatically set by the cleaning robot.

[0051] In some embodiments, the arch-shaped cleaning path comprises a cleaning main path and a cleaning turning path, the cleaning main path corresponds to a main path planned in the to-be-cleaned area, and the cleaning turning path corresponds to a path formed when the current cleaning main path turns to the nearest cleaning main path. Generally, the length of the cleaning main path is greater than the length of the cleaning turning path, and thus the cleaning main path can be used as the main path when the cleaning robot walks. The current cleaning main path is the cleaning main path corresponding to the current position of the robot, and the nearest cleaning main path is the cleaning main path closest to the current cleaning main path and in the to-be-cleaned state.

[0052] In some embodiments, when the target cleaning direction is a row-by-row cleaning direction, the cleaning main path in the cleaning path can be parallel to the row line or not parallel to the row line. When the cleaning main path is not parallel to the row line, the cleaning robot performs row-by-row cleaning in the to-be-cleaned area as a whole according to the cleaning path.

[0053] Similarly, when the target cleaning direction is a column-by-column cleaning direction, the cleaning main path in the cleaning path can be parallel to the column line or not parallel to the column line. When the cleaning main path is not parallel to the column line, the cleaning robot performs column-by-column cleaning in the to-be-cleaned area as a whole according to the cleaning path.

[0054] In some embodiments, the cleaning robot can select a direction parallel to any side length of the to-be-cleaned area as the target cleaning direction of the cleaning main path. In some embodiments, in order to reduce the number of turns of the cleaning robot when cleaning in the to-be-cleaned area according to the cleaning path, the cleaning robot selects a direction parallel to the longest side length of the to-be-cleaned area as the target cleaning direction, that is, the target cleaning direction is a cleaning direction for instructing the cleaning robot to clean the to-be-cleaned area in a full coverage manner with the least number of turns.

[0055] In some embodiments, determining the target cleaning direction of the to-be-cleaned area comprises: judging whether the length of the to-be-cleaned area is greater than the width, if yes, selecting the target cleaning direction as a row-by-row cleaning direction, and if not, selecting the target cleaning direction as a column-by-column cleaning direction.

[0056] In some embodiments, determining whether the length of the area to be cleaned is greater than its width includes: determining the maximum row, minimum row, maximum column, and minimum column of the area to be cleaned; calculating the row difference between the maximum row and the minimum row, and the column difference between the maximum column and the minimum column; and determining whether the row difference is less than the column difference. If the row difference is less than the column difference, it indicates that the area to be cleaned has a longer length and a smaller width. To reduce the number of turns, the target cleaning direction is selected as the row-by-row cleaning direction. If the row difference is greater than the column difference, it indicates that the area to be cleaned has a shorter length and a larger width. To reduce the number of turns, the target cleaning direction is selected as the column-by-column cleaning direction. If they are equal, either the row-by-row cleaning direction or the column-by-column cleaning direction is selected as the target cleaning direction. Wherein, the maximum row is the row line corresponding to the maximum row sequence of the area to be cleaned, the minimum row is the row line corresponding to the minimum row sequence of the area to be cleaned, the maximum column is the column line corresponding to the maximum column sequence of the area to be cleaned, and the minimum column is the column line corresponding to the minimum column sequence of the area to be cleaned.

[0057] S12: Extract the outer circumscribing points according to the target cleaning direction. The outer circumscribing points are the boundary points of the area to be cleaned that are adjacent to the area outside the area to be cleaned in the target cleaning direction.

[0058] In this step, this embodiment traverses the area to be cleaned according to the target cleaning direction to extract external vertices. When the target cleaning direction is a row-by-row cleaning direction, this embodiment traverses the area to be cleaned according to the row-by-row cleaning direction to extract external vertices. When the target cleaning direction is a column-by-column cleaning direction, this embodiment traverses the area to be cleaned according to the column-by-column cleaning direction to extract external vertices.

[0059] For example, please see Figure 2 The area to be cleaned, 21, consists of multiple passable grids, among which... Figure 2 The light gray passable grid shown represents the boundary points of the area to be cleaned, 21.

[0060] like Figure 2 As shown, the area outside the area to be cleaned 21 is the obstacle area 22, wherein the obstacle area 22 is in Figure 2 The area is represented by dark gray grids, which are obstacle grids. Since the length of the area to be cleaned 21 is greater than its width, this embodiment selects the row-by-row cleaning direction as the target cleaning direction. When traversing the area to be cleaned according to the row-by-row cleaning direction, since the passable grid a1 is adjacent to the obstacle grid in the row-by-row cleaning direction, passable grid a1 can be used as an outer juncture. Passable grid a5 is also adjacent to the obstacle grid in the row-by-row cleaning direction, so passable grid a5 can also be used as an outer juncture. Similarly, passable grids a2, a3, a4, a5, a6, a7, and a8 are all adjacent to the obstacle grid in the row-by-row cleaning direction, so they can all be used as outer junctures.

[0061] Although passable grid a9 is adjacent to obstacle grid in the column-by-column cleaning direction, the target cleaning direction is the row-by-row cleaning direction, and passable grid a9 is not adjacent to obstacle grid in the row-by-row cleaning direction. Therefore, passable grid a9 is not an external point. Similarly, passable grids a10 and a11 are also not external points.

[0062] Understandably, with Figure 2 The difference between the "area outside the area to be cleaned 21 is the obstacle area 22" shown is that, in some embodiments, the area outside the area to be cleaned 21 can also be an unknown area, which is an area that the cleaning robot has not yet explored. In some embodiments, the area outside the area to be cleaned 21 can also be the boundary of another area to be cleaned. That is, when a user selects a local area as the area to be cleaned in a large target area, and other surrounding areas to be cleaned surround the area to be cleaned, the area outside the area to be cleaned can also be the boundary of another area to be cleaned.

[0063] For another example, please refer to Figure 3 Since the width of the area to be cleaned 31 is greater than its length, this embodiment selects the column-by-column cleaning direction as the target cleaning direction. When traversing the area to be cleaned according to the column-by-column cleaning direction, since the passable grid b1 is adjacent to the obstacle grid in the column-by-column cleaning direction, passable grid b1 can be used as an external point. Passable grid b5 is also adjacent to the obstacle grid in the column-by-column cleaning direction, and can also be used as an external point. Similarly, passable grids b2, b3, b4, b5, b6, b7, and b8 are all adjacent to the obstacle grid in the column-by-column cleaning direction, and therefore can all be used as external points.

[0064] Although passable grid b9 is adjacent to obstacle grid in the row-by-row cleaning direction, the target cleaning direction is the column-by-column cleaning direction, and passable grid b9 is not adjacent to obstacle grid in the column-by-column cleaning direction. Therefore, passable grid b9 is not an external point. Similarly, passable grids b10 and b11 are also not external points.

[0065] S13: Generate path planning information based on external points.

[0066] In this step, the path planning information is planning information for walking along a preset cleaning path in the to-be-cleaned area, wherein the path planning information comprises a cleaning starting point, a moving starting point and a moving ending point of each cleaning path, a turning direction or a turning arrival point. The cleaning starting point is a starting point at which the cleaning robot starts to perform a cleaning task in the to-be-cleaned area. The moving starting point is a starting point at which the cleaning robot walks on each cleaning path, and the moving ending point is an ending point at which the cleaning robot walks on each cleaning path. Generally, the moving starting point and the moving ending point can form a line segment. The turning direction is a direction in which the cleaning robot needs to adjust when switching to another cleaning path after walking along a current cleaning path. The turning arrival point is a first arrival point of the cleaning robot after switching from the current cleaning path to another cleaning path according to the turning direction.

[0067] In this embodiment, the path planning can be realized by using the circumscribed points, without traversing all the grids in the to-be-cleaned area. Thus, excessive calculation power can be avoided, and the efficiency of planning the path is improved, and the cleaning efficiency is also improved.

[0068] In addition, the prior art plans a cleaning path in real time based on a current position. When the motion mechanism of the cleaning robot is abnormal, for example, the motion mechanism slips, causing the cleaning robot to deviate from the original direction. At this time, the cleaning robot continues to plan a cleaning path towards the deviated position. Thus, the cleaning robot may not be able to continue to complete another part of the to-be-cleaned area, thereby reducing the cleaning coverage. However, since the path is planned by using the circumscribed points in this embodiment, the circumscribed points do not change when the motion mechanism is abnormal. Therefore, the cleaning path can be reliably planned in this embodiment. Even if the cleaning robot deviates from the original direction due to slipping during walking, the cleaning robot can still reliably plan a cleaning path according to the circumscribed points. Therefore, the method provided in this embodiment has high robustness.

[0069] In some embodiments, the circumscribed points comprise a segment starting point and a segment ending point of each subsegment. When the circumscribed points are extracted, S12 comprises: extracting a circumscribed point satisfying a segment starting condition as the segment starting point of each subsegment according to the target cleaning direction; and extracting a circumscribed point satisfying a segment ending condition as the segment ending point of each subsegment according to the target cleaning direction.

[0070] When the target cleaning direction is a row-by-row cleaning direction, the circumscribed points on each row line are traversed row by row to determine the segment starting point and the segment ending point of each subsegment. Please refer to Figure 4 In this embodiment, the 0th row line r0 is traversed first to obtain the segment starting point and the segment ending point of each subsegment on the 0th row line r0. After traversing the 0th row line r0, the 1st row line r0 is traversed, and so on, until the 15th row line r15 is traversed.

[0071] When the target cleaning direction is the column-by-column cleaning direction, the embodiment traverses the external points on each column line to determine the segment start point and the segment end point of each sub-segment. Please refer to Figure 5 The embodiment traverses the 0thcolumn line c0first to obtain the segment start point and the segment end point of each sub-segment on the 0thcolumn line c0. After traversing the 0thcolumn line c0, the embodiment traverses the 1stcolumn line c1, and so on until the 10thcolumn line c10is traversed.

[0072] In some embodiments, the segment start condition includes that the last position of the to-be-cleaned boundary point in the target cleaning direction is a region outside the to-be-cleaned region. The segment end condition includes that the next position of the to-be-cleaned boundary point in the target cleaning direction is a region outside the to-be-cleaned region.

[0073] Please continue to refer to Figure 4 , wherein, Figure 4 The white grid, the light gray grid, and the dark gray grid are all passable grids, and further, the light gray grid and the dark gray grid are all external point grids. The black grid is a grid corresponding to a region outside the to-be-cleaned region, for example, the region outside the to-be-cleaned region is an obstacle region, and the black grid is an obstacle grid.

[0074] Under the premise that the target cleaning direction is the row-by-row cleaning direction, when the 0throw line r0is traversed, since the last position of the external point d1is an obstacle grid, the external point d1satisfies the segment start condition, and the external point d1may serve as the segment start point first1of the first sub-segment. Since the next position of the external point d2is an obstacle grid, the external point d2satisfies the segment end condition, and the external point d2may serve as the segment end point second1of the first sub-segment. The embodiment records the first sub-segment of the 0throw line r0as (r0, line1(d1, d2)).

[0075] Then the 0throw line r0still needs to be traversed. Since the last position of the external point d3is an obstacle grid, the external point d3satisfies the segment start condition, and the external point d3may serve as the segment start point first2of the second sub-segment. Since the next position of the external point d4is an obstacle grid, the external point d4satisfies the segment end condition, and the external point d4may serve as the segment end point second2of the second sub-segment. The embodiment records the second sub-segment of the 0throw line r0as (r0, line2(d3, d4)).

[0076] By analogy, the segment start point of the third sub-segment of the 0throw line r0may be determined as d5, and the segment end point may be determined as d6, and the third sub-segment of the 1strow line r0is recorded as (r0, line3(d5, d6)).

[0077] Similarly, the segment start point of the first sub-segment of the 9th row line is d7, and the segment end point is d8. The first sub-segment of the 9th row line r9 is denoted as (r9, line1(d7, d8)).

[0078] The segment start point of the first sub-segment of the 15th row line is d11, and the segment end point is d12. The first sub-segment of the 15th row line r15 is denoted as (r15, line1(d11, d12)).

[0079] Please continue to refer to Figure 5 Under the premise that the target cleaning direction is the column-by-column cleaning direction, when the 0th column line c0 is traversed, since the previous position of the external point e1 is an obstacle grid, the external point e1 satisfies the segment start condition, and the external point e1 can be used as the segment start point first1 of the first sub-segment. Since the next position of the external point e2 is an obstacle grid, the external point e2 satisfies the segment end condition, and the external point e2 can be used as the segment end point second1 of the first sub-segment. The first sub-segment of the 0th column line c0 is denoted as (c0, line1(e1, e2)) in this embodiment.

[0080] Then the 0th column line c0 still needs to be traversed. Since the previous position of the external point e3 is an obstacle grid, the external point e3 satisfies the segment start condition, and the external point e3 can be used as the segment start point first2 of the second sub-segment. Since the next position of the external point e4 is an obstacle grid, the external point e4 satisfies the segment end condition, and the external point e4 can be used as the segment end point second2 of the second sub-segment. The second sub-segment of the 0th column line c0 is denoted as (c0, line2(e3, e4)) in this embodiment.

[0081] By analogy, the segment start point of the third sub-segment of the 0th column line c0 is e5, and the segment end point is e6. The third sub-segment of the 0th row line r0 is denoted as (c0, line3(e5, e6)).

[0082] In some embodiments, the present embodiment creates a new map corresponding to the current map Figure 1 and initializes each grid in the new map. The grid value of each initialized grid is 1. In the new map, the grid values of the region corresponding to the to-be-cleaned region are set to 0.

[0083] When the target cleaning direction is a row-by-row cleaning direction, if the grid value of the last traversed grid is 1 and the grid value of the current grid is 0, the current grid is a segment start point first of a current segment of a current row. If the grid value of the last traversed grid is 0 and the grid value of the current grid is 1, the last traversed grid is a segment end point second of the current segment of the current row, and information of the current segment of the current row is (row*, line*(first, second)).

[0084] In some embodiments, the path planning information includes a cleaning start point, and generating the path planning information according to the bounding points comprises: determining a current position of the cleaning robot, and selecting a bounding point closest to and reachable from the current position as the cleaning start point.

[0085] In some embodiments, selecting the bounding point closest to and reachable from the current position as the cleaning start point comprises: determining a bounding point at each end of a maximum row (a bounding point at each end of a maximum column) and a bounding point at each end of a minimum row (a bounding point at each end of a minimum column), calculating distances between the current position and each end bounding point, selecting a bounding point corresponding to a minimum distance among the end bounding points as a reference bounding point, judging whether the cleaning robot is reachable from the current position to the reference bounding point, and if reachable, selecting the reference bounding point as the cleaning start point, and if not reachable, continuing to select the cleaning start point according to distances between the current position and the remaining bounding points. The distance calculation algorithm can be Manhattan algorithm or the like.

[0086] Referring to FIG. 6, Figure 6 , the bounding point d1 and the bounding point d2 are located at two ends of a minimum row, the bounding point d11 and the bounding point d12 are located at two ends of a maximum row, and the current position is a grid where the pentagram is located. Since the distance from the current position to the bounding point d1 is smaller than the distances to the bounding point d2, the bounding point d11 and the bounding point d12, and the current position is reachable to the bounding point d1, the bounding point d1 is selected as the cleaning start point.

[0087] In some embodiments, the path planning information includes a moving start point and a moving end point of each cleaning path, and generating the path planning information according to the bounding points comprises: determining a current position of the cleaning robot, selecting a subsegment containing the current position as a current subsegment, and selecting one closest to the current position as the moving start point and the other as the moving end point among a segment start point and a segment end point of the current subsegment.

[0088] Referring to FIG. 7, Figure 7The target cleaning direction is a row-by-row cleaning direction. The current position of the cleaning robot is in the ath row ra, wherein the current position is on the 1st sub-segment of the ath row ra, thus the 1st sub-segment is the current sub-segment, the grid corresponding to the segment start point first of the 1st sub-segment is ra1, the grid corresponding to the segment end point second of the 1st sub-segment is ra2. Since the distance between the current position and the segment start point first of the current sub-segment is less than the distance between the current position and the segment end point second of the current sub-segment, the segment start point first of the current sub-segment can be used as the movement start point of the cleaning robot, and the segment end point second can be used as the movement end point. The cleaning robot moves from the movement start point to the movement end point on each cleaning path, thereby completing the walking of the cleaning path.

[0089] Please refer to Figure 8 , Figure 8 and Figure 7 The difference lies in that the distance between the current position and the segment start point first of the current sub-segment is greater than the distance between the current position and the segment end point second of the current sub-segment, thus the segment end point second of the current sub-segment can be used as the movement start point of the cleaning robot, and the segment start point first can be used as the movement end point.

[0090] Similarly, please refer to Figure 9 , the target cleaning direction is a column-by-column cleaning direction. The current position of the cleaning robot is in the ath column ca, wherein the current position is on the 1st sub-segment of the ath column ca, thus the 1st sub-segment is the current sub-segment, the grid corresponding to the segment start point first of the 1st sub-segment is ca1, the grid corresponding to the segment end point second of the 1st sub-segment is ca2. Since the distance between the current position and the segment start point first of the current sub-segment is less than the distance between the current position and the segment end point second of the current sub-segment, the segment start point first of the current sub-segment can be used as the movement start point of the cleaning robot, and the segment end point second can be used as the movement end point.

[0091] Please refer to Figure 10 , Figure 10 and Figure 9 The difference lies in that the distance between the current position and the segment start point first of the current sub-segment is greater than the distance between the current position and the segment end point second of the current sub-segment, thus the segment end point second of the current sub-segment can be used as the movement start point of the cleaning robot, and the segment start point first can be used as the movement end point.

[0092] In some embodiments, the path planning information comprises a turning direction, and the generating the path planning information according to the external point comprises: determining a current position of the cleaning robot, if a first side designated area at the current position is in a to-be-cleaned state and a second side designated area at the current position is in a cleaned state, selecting a direction of the first side designated area relative to the current position as the turning direction. If the first side designated area at the current position is in the cleaned state and the second side designated area at the current position is in the to-be-cleaned state, selecting a direction of the second side designated area relative to the current position as the turning direction. If both the first side designated area and the second side designated area at the current position are in the to-be-cleaned state, calculating a total number of turns of the cleaning robot in each side designated area, selecting a designated area with a minimum total number of turns as a target designated area, and determining a direction of the target designated area relative to the current position as the turning direction.

[0093] When the target cleaning direction is the row-by-row cleaning direction, the first side designated area is the upper area, the second side designated area is the lower area, the direction of the first side designated area relative to the current position is the upward direction, and the direction of the second side designated area relative to the current position is the downward direction.

[0094] When the target cleaning direction is the column-by-column cleaning direction, the first side designated area is the left area, the second side designated area is the right area, the direction of the first side designated area relative to the current position is the left direction, and the direction of the second side designated area relative to the current position is the right direction.

[0095] Referring to FIG. 6, when the target cleaning direction is the row-by-row cleaning direction, the first side designated area is the upper area, the second side designated area is the lower area, the direction of the first side designated area relative to the current position is the upward direction, and the direction of the second side designated area relative to the current position is the downward direction. Figure 11 When the target cleaning direction is the row-by-row cleaning direction, the present embodiment starts from the grid f1 where the current position of the cleaning robot is located, calculates a total number of turns of the cleaning robot in the upper area as 5 times, and calculates a total number of turns of the cleaning robot in the lower area as 10 times. Therefore, the present embodiment selects the upper area as the target designated area. Since the direction of the upper area relative to the current position is the upward direction, the turning direction is the upward direction.

[0096] Referring to FIG. 7, when the target cleaning direction is the column-by-column cleaning direction, the first side designated area is the left area, the second side designated area is the right area, the direction of the first side designated area relative to the current position is the left direction, and the direction of the second side designated area relative to the current position is the right direction. Figure 12 When the target cleaning direction is the column-by-column cleaning direction, the present embodiment starts from the grid f2 where the current position of the cleaning robot is located, calculates a total number of turns of the cleaning robot in the left area as 4 times, and calculates a total number of turns of the cleaning robot in the right area as 6 times. Therefore, the present embodiment selects the left area as the target designated area. Since the direction of the left area relative to the current position is the left direction, the turning direction is the left direction.

[0097] In some embodiments, the calculating the total number of turns of the cleaning robot in each side designated area comprises the following steps:

[0098] S14: determining, according to the current position, a target line adjacent to the turning sub-segment and not traversed in each side designated area, wherein the target line comprises at least one sub-segment, and the turning sub-segment is a sub-segment that the cleaning robot needs to turn to reach.

[0099] S15: selecting, on the target line, a sub-segment meeting the intersection condition with the turning sub-segment as a candidate sub-segment.

[0100] S16: if the number of candidate sub-segments is greater than 1, selecting, according to the turning start point of the turning sub-segment, a candidate sub-segment meeting the screening condition from at least two candidate sub-segments as the turning sub-segment.

[0101] S17: if the number of candidate sub-segments is equal to 1, selecting the candidate sub-segment as the turning sub-segment.

[0102] S18: calculating the total number of turns according to the number of turning sub-segments.

[0103] In step S14, the target line is a line adjacent to the turning sub-segment, wherein the target line can be a row line or a column line. When the target cleaning direction is a row-by-row cleaning direction, the target line is a row line. When the target cleaning direction is a column-by-column cleaning direction, the target line is a column line.

[0104] In this embodiment, according to the current position, a sub-segment containing the current position is determined as the current sub-segment, and the current sub-segment is taken as the 0th turning sub-segment, that is, the current sub-segment is the initial turning sub-segment, so that subsequently, the target line adjacent to the turning sub-segment can be determined in each side designated area in sequence and iteratively.

[0105] For example, referring to Figure 13 , on the premise that the target cleaning direction is a row-by-row cleaning direction, the row line r6 comprises a first sub-segment (r6, line1(g37, g38)) and a second sub-segment (r6, line2(g39, g40)), wherein the current position is in the first sub-segment (r6, line1(g37, g38)) of the row line r6, that is, the first sub-segment (r6, line1(g37, g38)) is the current sub-segment, which can be regarded as the 0th turning sub-segment.

[0106] In this embodiment, the turning direction is searched in the upper area and the lower area of the current position respectively. In the upper area, the target line adjacent to the 0th turning sub-segment and not traversed is the row line r5. Assuming that the first sub-segment (r5, line1(g31, g32)) in the row line r5 is determined as the 1st turning sub-segment, this embodiment continues to determine the target line. The target line adjacent to the 1st turning sub-segment and not traversed is the row line r4. Assuming that the first sub-segment (r4, line1(g25, g26)) in the row line r4 is determined as the 2nd turning sub-segment, and so on, this embodiment continues to determine the target line.

[0107] In the left region, the target line adjacent to the 0th turning sub-segment and not traversed is column line c4. Assuming that the first sub-segment (c4,line1 (h25, h26)) in column line c4 is determined as the 1st turning sub-segment, the embodiment continues to determine the target line. The target line adjacent to the 1st turning sub-segment and not traversed is column line c3. Assuming that the first sub-segment (c3,line1 (h19, h20)) in column line c3 is determined as the 2nd turning sub-segment, the embodiment continues to determine the target line in this way.

[0108] For another example, please refer to Figure 14 , under the premise that the target cleaning direction is the column-by-column cleaning direction, column line c5 includes a first sub-segment (c5,line1 (h31, h32)) and a second sub-segment (c5,line1 (h33, h34)), wherein the current position is in the first sub-segment (c5,line1 (h31, h32)) of column line c5, that is, the first sub-segment (c5,line1 (h31, h32)) is the current sub-segment, which can be regarded as the 0th turning sub-segment.

[0109] The embodiment searches for the turning direction in the left region and the right region of the current position respectively. In the left region, the target line adjacent to the 0th turning sub-segment and not traversed is column line c4. Assuming that the first sub-segment (c4,line1 (h25, h26)) in column line c4 is determined as the 1st turning sub-segment, the embodiment continues to determine the target line. The target line adjacent to the 1st turning sub-segment and not traversed is column line c3. Assuming that the first sub-segment (c3,line1 (h19, h20)) in column line c3 is determined as the 2nd turning sub-segment, the embodiment continues to determine the target line in this way.

[0110] In the right region, the target line adjacent to the 0th turning sub-segment and not traversed is column line c6. Assuming that the first sub-segment (c6,line1 (h35, h36)) in column line c6 is determined as the 1st turning sub-segment, the embodiment continues to determine the target line. The target line adjacent to the 1st turning sub-segment and not traversed is column line c7. Assuming that the first sub-segment (c7,line1 (h39, h40)) in column line c7 is determined as the 2nd turning sub-segment, the embodiment continues to determine the target line in this way.

[0111] In step S15, the intersection condition is a condition for judging whether a turning sub-segment is connected with the target line. In some embodiments, each sub-segment of the target line is orthogonally projected on a target horizontal plane to obtain a projection line, the target horizontal plane is a plane passing through the turning sub-segment and parallel to the target line, if the projection line at least partially overlaps with the turning sub-segment, the sub-segment satisfies the intersection condition, and thus the sub-segment is selected as a candidate sub-segment. If the projection line does not overlap with the turning sub-segment, the sub-segment does not satisfy the intersection condition, and thus the sub-segment is not selected as a candidate sub-segment.

[0112] For example, please continue to refer to Figure 13 The current sub-segment (r6,line1(g37,g38)) containing the current position is the 0th turning sub-segment, and the target line adjacent to the 0th turning sub-segment and not traversed in the upper region is the row line r5. The target horizontal plane P1 is a plane passing through the 0th turning sub-segment and parallel to the row line r5. When the first sub-segment (r5,line1(g31,g32)), the second sub-segment (r5,line2(g33,g34)) and the third sub-segment (r5,line3(g35,g36)) of the row line r5 are orthogonally projected on the target horizontal plane P1, the projection line p11 of the first sub-segment (r5,line1(g31,g32)), the projection line p12 of the second sub-segment (r5,line2(g33,g34)) and the projection line p13 of the third sub-segment (r5,line3(g35,g36)) are obtained, respectively.

[0113] Since the projection line p11 and the projection line p12 both overlap with the 0th turning sub-segment, the first sub-segment (r5,line1(g31,g32)) of the projection line p11 and the second sub-segment (r5,line2(g33,g34)) of the projection line p12 are both candidate sub-segments. Since the projection line p13 does not overlap with the 0th turning sub-segment, the third sub-segment (r5,line3(g35,g36)) of the projection line p13 is not a candidate sub-segment.

[0114] Next, in the upper region, the first sub-segment (r5,line1(g31,g32)) of the row line r5 is finally selected as the 1st turning sub-segment, assuming that it is selected as a candidate sub-segment. In the upper region, the target line adjacent to the 1st turning sub-segment and not traversed is the row line r4. The target horizontal plane P2 is a plane passing through the 1st turning sub-segment and parallel to the row line r4. When the first sub-segment (r4,line1(g25,g26)), the second sub-segment (r4,line2(g27,g28)), and the third sub-segment (r4,line3(g29,g30)) of the row line r4 are orthogonally projected onto the target horizontal plane P2, the first sub-segment (r4,line1(g25,g26)) of the projection line p21, the second sub-segment (r4,line2(g27,g28)) of the projection line p22, and the third sub-segment (r4,line3(g29,g30)) of the projection line p23 are obtained, respectively.

[0115] Since the projection line p21 overlaps the 1st turning sub-segment, the first sub-segment (r4,line1(g25,g26)) of the projection line p21 is a candidate sub-segment. Since the projection line p22 and the projection line p23 do not overlap the 1st turning sub-segment, neither the second sub-segment (r4,line2(g27,g28)) of the projection line p22 nor the third sub-segment (r4,line3(g29,g30)) of the projection line p23 is a candidate sub-segment.

[0116] Similarly, in the lower region, since the projection line of the first sub-segment (r7,line1(g41,g42)) of the row line r7 overlaps the 0th turning sub-segment, the first sub-segment (r7,line1(g41,g42)) of the row line r7 is a candidate sub-segment. Since the projection line of the second sub-segment (r7,line1(g43,g44)) of the row line r7 does not overlap the 0th turning sub-segment, the second sub-segment (r7,line1(g43,g44)) of the row line r7 is not a candidate sub-segment.

[0117] By analogy, further description is omitted.

[0118] For another example, please continue to refer to Figure 14 The current sub-segment (c5,line1(h31,h32)) containing the current position is the 0th turning sub-segment, and in the left region, the target line adjacent to the 0th turning sub-segment and not traversed is the column line c4. The target horizontal plane Q1 is a plane passing through the 0th turning sub-segment and parallel to the column line c4. When the first sub-segment (c4,line1(h25,h26)), the second sub-segment (c4,line1(h27,h28)), and the third sub-segment (c4,line1(h29,h30)) of the column line c4 are orthogonally projected onto the target horizontal plane Q1, the projection line Q11, the projection line Q12, and the projection line Q13 are obtained, respectively.

[0119] Since the projection line Q11 and the projection line Q12 both overlap the 0th turning subsegment, the first subsegment (c4, line1(h25, h26)) of the projection line Q11 and the second subsegment (c4, line1(h27, h28)) of the projection line Q12 are both candidate subsegments.

[0120] Since the projection line Q13 does not overlap the 0th turning subsegment, the third subsegment (c4, line1(h29, h30)) of the projection line Q13 is not a candidate subsegment.

[0121] By analogy, details are not described here.

[0122] In some embodiments, the cleaning map is configured with a coordinate system, wherein an X axis of the coordinate system is parallel to the row line, and a Y axis of the coordinate system is parallel to the column line. When the target cleaning direction is a row-by-row cleaning direction, determining whether each subsegment on the target line satisfies the intersection condition with the turning subsegment includes:

[0123] determining whether the horizontal coordinate of the segment start point of each subsegment is less than or equal to the horizontal coordinate of the segment start point of the turning subsegment, and the horizontal coordinate of the segment start point of the turning subsegment is less than or equal to the horizontal coordinate of the segment end point of the subsegment; or,

[0124] determining whether the horizontal coordinate of the segment start point of each subsegment is less than or equal to the horizontal coordinate of the segment end point of the turning subsegment, and the horizontal coordinate of the segment end point of the turning subsegment is less than or equal to the horizontal coordinate of the segment end point of the subsegment; or,

[0125] determining whether the horizontal coordinate of the segment start point of the turning subsegment is less than or equal to the horizontal coordinate of the segment start point of each subsegment, and the horizontal coordinate of the segment start point of the subsegment is less than or equal to the horizontal coordinate of the segment end point of the turning subsegment; or,

[0126] determining whether the horizontal coordinate of the segment start point of the turning subsegment is less than or equal to the horizontal coordinate of the segment end point of each subsegment, and the horizontal coordinate of the segment end point of the subsegment is less than or equal to the horizontal coordinate of the segment end point of the turning subsegment.

[0127] In some embodiments, when the target cleaning direction is a column-by-column cleaning direction, determining whether each subsegment on the target line satisfies the intersection condition with the turning subsegment includes:

[0128] determining whether the vertical coordinate of the segment start point of each subsegment is less than or equal to the vertical coordinate of the segment start point of the turning subsegment, and the vertical coordinate of the segment start point of the turning subsegment is less than or equal to the vertical coordinate of the segment end point of the subsegment; or,

[0129] determining whether the longitudinal coordinate of the segment start point of each sub-segment is less than or equal to the longitudinal coordinate of the segment end point of the turning sub-segment, and whether the longitudinal coordinate of the segment end point of the turning sub-segment is less than or equal to the longitudinal coordinate of the segment end point of the sub-segment; or

[0130] determining whether the longitudinal coordinate of the segment start point of each sub-segment is less than or equal to the longitudinal coordinate of the segment end point of the turning sub-segment, and whether the longitudinal coordinate of the segment end point of the turning sub-segment is less than or equal to the longitudinal coordinate of the segment end point of the sub-segment; or

[0131] determining whether the longitudinal coordinate of the segment start point of each sub-segment is less than or equal to the longitudinal coordinate of the segment end point of the turning sub-segment, and whether the longitudinal coordinate of the segment end point of the turning sub-segment is less than or equal to the longitudinal coordinate of the segment end point of the sub-segment; or

[0132] Thus, the embodiment can reliably and effectively determine the turning sub-segment.

[0133] In step S16, in some embodiments, if the number of candidate sub-segments is greater than 1, the embodiment selects one of the segment start point and the segment end point of the turning sub-segment that is closest to the current position as the turning start point. When the turning start point is the segment start point, the embodiment calculates the distance between the turning start point and the segment start point of each candidate sub-segment, and selects the candidate sub-segment with the smallest distance as the turning sub-segment. When the turning start point is the segment end point, the embodiment calculates the distance between the turning start point and the segment end point of each candidate sub-segment, and selects the candidate sub-segment with the smallest distance as the turning sub-segment.

[0134] Please continue to refer to Figure 13 As described above, the embodiment can select both the first sub-segment (r5,line1(g31,g32)) and the second sub-segment (r5,line2(g33,g34)) of the line r5 as candidate sub-segments, and the first sub-segment (r6,line1(g37,g38)) of the line r6 is the 0th turning sub-segment.

[0135] In the first sub-segment (r6,line1(g37,g38)), since the segment start point g37 is closest to the current position, the segment start point g37 is selected as the turning start point when the cleaning robot turns from the 0th turning sub-segment to the 1st turning sub-segment. Since the turning start point is the segment start point g37, the embodiment calculates the distance between the segment start point g37 and the segment start point g31 of the first sub-segment (r5,line1(g31,g32)) and the distance between the segment start point g37 and the segment start point g33 of the second sub-segment (r5,line2(g33,g34)). Since the distance between the segment start point g37 and the segment start point g31 is smaller than the distance between the segment start point g37 and the segment start point g33, the first sub-segment (r5,line1(g31,g32)) is selected as the 1st turning sub-segment.

[0136] Please continue to refer toFigure 13 Assuming that the current position of the cleaning robot is closest to the segment end point g38, the segment end point g38 is taken as the turning start point when the cleaning robot turns from the 0th turning sub-segment to the 1st turning sub-segment. Since the turning start point is the segment end point g38, the embodiment calculates the distances between the segment end point g38 and the segment end point g32 of the first sub-segment (r5, line1(g31, g32)) and the segment end point g34 of the second sub-segment (r5, line2(g33, g34)), respectively. Since the distance between the segment end point g38 and the segment end point g34 is smaller than the distance between the segment end point g38 and the segment end point g32, the second sub-segment (r5, line2(g33, g34)) is selected as the 1st turning sub-segment.

[0137] In step S17, since there is only one candidate sub-segment, the embodiment directly takes the candidate sub-segment as the turning sub-segment.

[0138] In step S18, the embodiment accumulates the turning sub-segments of each designated area to obtain the total number of turns.

[0139] In some embodiments, the path planning information further comprises a turning arrival point, and generating the path planning information according to the circumscribed point further comprises: when the turning start point is the segment start point, the segment start point of the candidate sub-segment with the minimum distance is taken as the turning arrival point; and when the turning start point is the segment end point, the segment end point of the candidate sub-segment with the minimum distance is taken as the turning arrival point.

[0140] Please continue to refer to Figure 13 When the first sub-segment (r6, line1(g37, g38)) of the line r6 is the 0th turning sub-segment, since the first sub-segment (r5, line1(g31, g32)) is the candidate sub-segment with the minimum distance, and the turning start point is the segment start point g37, the embodiment selects the segment start point g31 of the first sub-segment (r5, line1(g31, g32)) as the turning arrival point.

[0141] To elaborate the process of determining the turning sub-segment in the embodiment of the application, the embodiment combines Figure 15 The detailed elaboration is as follows:

[0142] Please refer to Figure 15, the current sub-segment (r7, line1(i19, i20)) containing the current position is the 0th turning sub-segment, and the target line adjacent to the 0th turning sub-segment and not traversed in the upper region is line r6. The first sub-segment (r6, line1(i15, i16)) and the second sub-segment (r6, line2(i17, i18)) of line r6 respectively satisfy the intersection condition with the current sub-segment (r7, line1(i19, i20)), and thus both the first sub-segment (r6, line1(i15, i16)) and the second sub-segment (r6, line2(i17, i18)) of line r6 are candidate sub-segments.

[0143] In the current sub-segment (r7, line1(i19, i20)), since the segment start point i19 is closest to the current position, the segment start point i19 is taken as the turning start point when the cleaning robot turns from the 0th turning sub-segment to the 1st turning sub-segment. Since the turning start point is the segment start point i19, the embodiment calculates the distances between the segment start point i19 and the segment start point i15 and the segment start point i17, respectively. Since the distance between the segment start point i19 and the segment start point i17 is less than the distance between the segment start point i19 and the segment start point i15, the second sub-segment (r6, line2(i17, i18)) of line r6 is selected as the 1st turning sub-segment, wherein the turning arrival point is the segment start point i17.

[0144] By analogy, in the upper region, the required turning sub-segments are the second sub-segment (r6, line2(i17, i18)) of line r6, the second sub-segment (r5, line2(i13, i14)) of line r5, the first sub-segment (r4, line1(i9, i10)) of line r4, the first sub-segment (r3, line1(i7, i8)) of line r3, the first sub-segment (r2, line1(i5, i6)) of line r2, the first sub-segment (r1, line1(i3, i4)) of line r1, and the first sub-segment (r0, line1(i1, i2)) of line r0, respectively, and the total number of turns in the upper region is 7.

[0145] Similarly, in the lower area, the sub-segments that meet the requirements are: the first sub-segment (r8,line1(i21,i22)) of the row r8, the first sub-segment (r9,line1(i23,i24)) of the row r9, the first sub-segment (r10,line1(i25,i26)) of the row r10, the first sub-segment (r11,line1(i27,i28)) of the row r11, the first sub-segment (r12,line1(i29,i30)) of the row r12, the first sub-segment (r13,line1(i31,i32)) of the row r13, the first sub-segment (r14,line1(i33,i34)) of the row r14, and the first sub-segment (r15,line1(i35,i36)) of the row r15, and the total number of turns in the lower area is 8. Since the total number of turns in the upper area is the least, the upper direction is selected as the turning direction in this embodiment.

[0146] To elaborate the principle of the path information generation method of the cleaning robot provided in the embodiment of the application, the embodiment provides Figures 16 to 19 The details are as follows:

[0147] Please refer to Figure 16 When the cleaning robot 16 enters the global cleaning mode, the cleaning robot first cleans along the edge, converts the environment by laser radar scanning to obtain environment data, and generates a cleaning map according to the environment data, wherein the cleaning map is a grid map. At the same time, the cleaning robot determines the current position based on the slam positioning algorithm. Wherein, Figure 16 The edge trajectory 17 of the cleaning robot 16 is shown, and the black points represent obstacles and the gray points represent unknown areas.

[0148] Please refer to Figure 17 The cleaning robot 16 extracts the to-be-cleaned area 18 according to the cleaning map.

[0149] Please refer to Figure 18 Since the length of the to-be-cleaned area 18 is greater than the width, the cleaning robot 16 selects the row-by-row cleaning direction as the target cleaning direction. Then, the cleaning robot extracts the circumscribed point 19 according to the target cleaning direction. Wherein, in Figure 18 The light gray points are the boundaries of the areas outside the to-be-cleaned area, and the dark gray points are the circumscribed points 19.

[0150] Please refer to Figure 19 The cleaning robot 16 generates path planning information according to the circumscribed point.

[0151] The embodiment can realize path planning by using external points, without traversing all grids in the to-be-cleaned area, thereby avoiding consuming too much computing power and improving the path planning efficiency and the cleaning efficiency.

[0152] It should be noted that in the above various embodiments, there is no certain sequence between the above steps, and those skilled in the art can understand from the description of the embodiments of the present application that the above steps can have different execution sequences in different embodiments, that is, can be executed in parallel, can be exchanged, and the like.

[0153] Please refer to Figure 20 , Figure 20 A circuit structure schematic diagram of a cleaning robot is provided in the embodiments of the present application. As shown in Figure 20 , the cleaning robot 200 includes one or more processors 201 and a memory 202. Among them, Figure 20 take one processor 201 as an example.

[0154] The processor 201 and the memory 202 can be connected through a bus or other means, Figure 20 take the connection through the bus as an example.

[0155] The memory 202 is a kind of non-volatile computer readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the path information generation method of the cleaning robot in the embodiments of the present application. The processor 201 realizes the function of the path information generation method of the cleaning robot provided by the above method embodiment by running the non-volatile software program, instruction and module stored in the memory 202.

[0156] The memory 202 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 202 can optionally include a memory remotely arranged with respect to the processor 201, and these remote memories can be connected to the processor 201 through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0157] The program instructions / modules are stored in the memory 202, and when executed by the one or more processors 201, the path information generation method of the cleaning robot in any of the above method embodiments is executed.

[0158] The embodiments of the present application also provide a storage medium, the storage medium stores computer executable instructions, the computer executable instructions are executed by one or more processors, for exampleFigure 20 The one processor 201 in the processor 201 can cause the one or more processors to execute the path information generation method of the cleaning robot in any of the method embodiments described above.

[0159] The embodiments of the present application also provide a computer program product, which comprises a computer program stored on a non-volatile computer readable storage medium, the computer program comprising program instructions which, when executed by a cleaning robot, cause the cleaning robot to perform the path information generation method of the cleaning robot of any of the embodiments.

[0160] The apparatus or device embodiments described above are merely illustrative, and the units shown as separate components can or can not be physically separate, and the components shown as module units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network module units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment scheme.

[0161] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0162] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; under the idea of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of different aspects of the present application as described above, which are not provided in detail for simplicity; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of generating path information of a cleaning robot, characterized by, The method comprises the following steps: determining a to-be-cleaned area and a target cleaning direction of the to-be-cleaned area, the to-be-cleaned area comprising to-be-cleaned boundary points; extracting an external point according to the target cleaning direction, the external point being a to-be-cleaned boundary point adjacent to an area outside the to-be-cleaned area in the target cleaning direction; generating path planning information according to the external point, the path planning information comprising a turning direction, the generating of the path planning information according to the external point comprising: determining a current position of the cleaning robot; if both sides of the current position are in a to-be-cleaned state, determining a target line adjacent to a turning subsegment and not traversed in each of the specified areas according to the current position, the target line comprising at least one subsegment, the turning subsegment being a subsegment to be reached by the cleaning robot after turning; projecting each subsegment of the target line onto a target horizontal plane to obtain a projection line, the target horizontal plane being a plane passing through the turning subsegment and parallel to the target line; if the projection line at least partially overlaps with the turning subsegment, selecting the subsegment as a candidate subsegment; if the number of candidate subsegments is greater than 1, selecting a candidate subsegment satisfying a screening condition as the turning subsegment from at least two candidate subsegments according to a turning starting point of the turning subsegment, if the number of candidate subsegments is equal to 1, selecting the candidate subsegment as the turning subsegment; calculating a total number of turns according to the number of turning subsegments; selecting a specified area with the least total number of turns as a target specified area; determining a direction of the target specified area relative to the current position as the turning direction.

2. The method of claim 1, wherein, The external point comprises a segment starting point and a segment ending point of each subsegment, the extracting of the external point according to the target cleaning direction comprising: extracting an external point satisfying a segment starting condition as a segment starting point of each subsegment according to the target cleaning direction; extracting an external point satisfying a segment ending condition as a segment ending point of each subsegment according to the target cleaning direction.

3. The method according to claim 2, wherein: the segment starting condition comprises that a position located before the to-be-cleaned boundary point in the target cleaning direction is an area outside the to-be-cleaned area; the segment ending condition comprises that a position located after the to-be-cleaned boundary point in the target cleaning direction is an area outside the to-be-cleaned area.

4. The method of claim 2, wherein, The path planning information comprises a moving starting point and a moving ending point of each cleaning path, the generating of the path planning information according to the external point comprising: determining a current position of the cleaning robot; selecting a subsegment containing the current position as a current subsegment; selecting one of a segment starting point and a segment ending point of the current subsegment closest to the current position as the moving starting point, and selecting the other as the moving ending point.

5. The method of claim 1, wherein, The turning subsegment comprises a segment starting point and a segment ending point, the selecting of a candidate subsegment satisfying a screening condition as the turning subsegment from at least two candidate subsegments according to a turning starting point of the turning subsegment comprising: In the segment start point and the segment end point of the turning sub-segment, select one closest to the current position as the turning start point; When the turning start point is the segment start point, calculate the distance between the turning start point and the segment start point of each candidate sub-segment, and select the candidate sub-segment with the minimum distance as the turning sub-segment; When the turning start point is the segment end point, calculate the distance between the turning start point and the segment end point of each candidate sub-segment, and select the candidate sub-segment with the minimum distance as the turning sub-segment.

6. The method of claim 5, wherein, The path planning information further comprises a turning arrival point, and the generating path planning information according to the external point further comprises: When the turning start point is the segment start point, the segment start point of the candidate sub-segment with the minimum distance is the turning arrival point; When the turning start point is the segment end point, the segment end point of the candidate sub-segment with the minimum distance is the turning arrival point.

7. The method of claim 1, wherein, The path planning information comprises a cleaning start point, and the generating path planning information according to the external point comprises: Determining the current position of the cleaning robot; Selecting an external point closest to and reachable from the current position as the cleaning start point.

8. The method according to any one of claims 1 to 7, characterized in that, The determining the target cleaning direction of the to-be-cleaned area comprises: Judging whether the length of the to-be-cleaned area is greater than the width; If yes, selecting the target cleaning direction as a row-by-row cleaning direction; If not, selecting the target cleaning direction as a column-by-column cleaning direction.

9. A cleaning robot, characterized in that, Comprise: At least one processor; And A memory in communication connection with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the path information generation method of the cleaning robot according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Robot cleaning method and device, robot and storage medium

    CN111802962A

  • Path planning method and cleaning robot

    CN113219992A

  • Hydrological region contour extraction method and device, equipment and storage medium

    CN113378342A

  • Cleaning robot control method and device, computer equipment and storage medium

    CN114764239A