Path planning method, device and sweeping robot

By using grid maps and relay points to re-plan the path in the sweeping robot, the problem of low path planning efficiency in dynamic environments is solved, and the sweeping robot can quickly clean in the home environment.

CN114355919BActive Publication Date: 2024-10-29BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111618093.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2024-10-29
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

Existing sweeping robots have low path planning efficiency in dynamically changing home environments, which affects cleaning tasks.

Method used

By establishing a grid map based on the current environmental data, the first planned path is obtained, and the environment changes are monitored during the movement, the target relay point closest to the changed position is determined as the new starting point, and the path is re-planned until the end position is reached.

Benefits of technology

It improves the efficiency of path planning and ensures that the sweeping robot can quickly respond to environmental changes and complete cleaning tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114355919B_ABST
    Figure CN114355919B_ABST
Patent Text Reader

Abstract

The present invention provides a path planning method, device and sweeping robot, wherein the method includes establishing a grid map based on current environmental data; performing path planning according to the grid map to obtain a first planned path; in the process of the sweeping robot moving according to the first planned path, monitoring whether the current environmental data changes; if it changes, determining the target relay point closest to the changed target node from the first planned path, and performing path planning with the target relay point as the starting point to obtain a second planned path; the target relay point is the node corresponding to the inflection point in the first planned path. In this method, when the environmental data changes, the relay point adjacent to the changed node can be used as the starting point to re-plan the path. Compared with the method of re-planning the path from the initial starting point of the environmental data, this method improves the efficiency of path planning and helps the sweeping robot to quickly complete the cleaning task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart home technology, and in particular to a path planning method, device and sweeping robot. Background Art

[0002] With the development of intelligent society, more and more fields use robots as auxiliary tools. Among them, sweeping robots have entered the lives of more and more people with their advantages of simple operation and convenient use, and have become an important member of smart home products.

[0003] When performing cleaning tasks, the sweeping robot in the related technology usually adopts the grid method to plan the path according to the grid map, and then cleans along the planned path; but the home is a dynamically changing environment, and the grid map scanned by the sweeping robot is also constantly changing. When the grid map changes, the path will be replanned from the starting point of the planned path, but this planning method has low efficiency and will affect subsequent cleaning tasks. Summary of the invention

[0004] The object of the present invention is to provide a path planning method, device and sweeping robot to improve the path planning efficiency of the sweeping robot.

[0005] In a first aspect, the present invention provides a path planning method, which is applied to a sweeping robot; the method comprises: establishing a grid map based on current environmental data; performing path planning according to the grid map to obtain a first planned path; wherein the first planned path contains at least one node; in the process of the sweeping robot moving according to the first planned path, monitoring whether the current environmental data changes; if there is a change, determining a target relay point closest to the changed target node from the first planned path, and performing path planning with the target relay point as the starting point to obtain a second planned path; the target relay point is the node corresponding to the inflection point in the first planned path.

[0006] In an optional embodiment, after the above-mentioned step of performing path planning with the target relay point as the starting point to obtain the second planned path, the method also includes: replacing the first planned path with the second planned path, and continuing to execute the step of monitoring whether the current environmental data changes during the movement of the sweeping robot according to the first planned path, until the sweeping robot reaches the end position indicated by the current environmental data.

[0007] In an optional embodiment, after the step of performing path planning according to the grid map to obtain the first planned path, the method further includes: determining a relay point included in the first planned path from at least one node included in the first planned path.

[0008] In an optional embodiment, at least one node included in the above-mentioned first planned path includes a starting node and an ending node; the above-mentioned step of determining the relay points included in the first planned path from at least one node included in the first planned path includes: performing the following operations for each node in the at least one node: calculating a first distance from the starting node to the current node, and a second distance from the starting node to the previous node of the current node; determining a first difference between the first distance and the second distance; calculating a third distance from the current node to the ending node, and a fourth distance from the previous node of the current node to the ending node; determining a second difference between the third distance and the fourth distance; and determining whether the current node is a relay point based on the first difference and the second difference.

[0009] In an optional embodiment, each node in the above-mentioned first planned path corresponds to a parameter identifier, which is used to indicate whether the node is a relay point; the above-mentioned step of determining whether the current node is a relay point based on the first difference and the second difference includes: if the first difference is not equal to zero, determining that the current node is a relay point, and setting the parameter identifier of the current node to the first value; if the second difference is not equal to zero, determining that the current node is a relay point, and setting the parameter identifier of the current node to the first value; if the first difference and the second difference are both zero, determining that the current node is not a relay point, and setting the parameter identifier of the current node to the second value.

[0010] In an optional embodiment, the first planned path includes at least one relay point; the step of determining the target relay point that is closest to the changed target node from the first planned path includes: determining the target node from the first planned path according to the location where the current environmental data changes; calculating the Manhattan distance between the target node and each relay point in at least one relay point, and determining the relay point corresponding to the smallest Manhattan distance as the target relay point.

[0011] In an optional embodiment, the above-mentioned grid map includes a starting position and an end position; the above-mentioned step of performing path planning with the target relay point as the starting point to obtain a second planned path includes: updating the starting position in the grid map to the position of the target relay point; performing path planning according to the updated grid map to obtain a second planned path from the updated starting position to the end position.

[0012] In an optional embodiment, the grid map includes a plurality of grids, including a grid corresponding to a starting position and a grid corresponding to an end position; the step of performing path planning according to the grid map to obtain a first planned path includes: placing the grid corresponding to the starting position into a preset open list; placing grids that can be reached by the starting position in the grids adjacent to the starting position in the plurality of grids into an open list, and placing the grid corresponding to the starting position into a preset closed list; determining the grid with the smallest moving cost in the open list as the current grid; placing the current grid into a closed list, and determining adjacent grids of the current grid in the grids other than the grids included in the closed list in the plurality of grids; and calculating adjacent grids. The moving cost of the first grid with the smallest cost is estimated; according to the moving cost of the first grid, the final moving cost of the first grid is determined; the final moving cost of the adjacent grids other than the first grid is continued to be calculated until the final moving cost of each adjacent grid is obtained; the adjacent grid with the smallest final moving cost is determined as the new current grid, and the steps of placing the current grid into a closed list and determining the adjacent grids of the current grid among the grids other than the grids included in the closed list among the multiple grids are continued until the grid corresponding to the terminal position is placed in an open list; the first planned path is determined according to the grids in the closed list; wherein the grids included in the closed list correspond to the nodes in the first planned path.

[0013] In an optional embodiment, the estimated cost of the above-mentioned adjacent grid includes the Manhattan distance of moving from the adjacent grid to the grid corresponding to the end position; the moving cost of the above-mentioned first grid includes: the sum of the Manhattan distance of moving from the grid corresponding to the starting position to the first grid and the Manhattan distance of moving from the first grid to the grid corresponding to the end position.

[0014] In a second aspect, the present invention provides a path planning device, which is arranged on a sweeping robot; the device includes: a grid construction module, which is used to establish a grid map based on current environmental data; a first path planning module, which is used to perform path planning according to the grid map to obtain a first planned path; wherein the first planned path contains at least one node; an environment monitoring module, which is used to monitor whether the current environmental data changes during the movement of the sweeping robot according to the first planned path; a second path planning module, which is used to determine the target relay point closest to the changed target node from the first planned path if a change occurs, and perform path planning with the target relay point as the starting point to obtain a second planned path; the target relay point is the node corresponding to the inflection point in the first planned path.

[0015] In a third aspect, the present invention provides a sweeping robot, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned path planning method.

[0016] In a fourth aspect, the present invention provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned path planning method.

[0017] The embodiments of the present invention bring the following beneficial effects:

[0018] The present invention provides a path planning method, device and sweeping robot. First, the sweeping robot establishes a grid map based on the current environmental data obtained; then, the path planning is performed according to the grid map to obtain a first planned path; in the process of the sweeping robot moving according to the first planned path, it monitors whether the current environmental data changes; if it changes, the target relay point closest to the changed target node is determined from the first planned path, and the path planning is performed with the target relay point as the starting point to obtain a second planned path; the target relay point is the node corresponding to the inflection point in the first planned path. In this method, when the environmental data changes, the path can be re-planned with the relay point adjacent to the changed node as the starting point. Compared with the method of re-planning the path from the initial starting point of the environmental data, this method improves the efficiency of path planning and helps the sweeping robot to quickly complete the cleaning task.

[0019] Other features and advantages of the present invention will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present invention.

[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically listed below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A flow chart of a path planning method provided by an embodiment of the present invention;

[0023] Figure 2 A flow chart of another path planning method provided by an embodiment of the present invention;

[0024] Figure 3 A flow chart of another path planning method provided by an embodiment of the present invention;

[0025] Figure 4 A schematic diagram of the structure of a path planning device provided by an embodiment of the present invention;

[0026] Figure 5 A schematic structural diagram of a sweeping robot provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0028] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] In the related art, when performing cleaning tasks, the robot vacuum cleaner usually uses the grid method to plan the path according to the grid map, and then moves along the planned path to clean; however, the home is a dynamically changing environment, and the grid map scanned by the robot vacuum cleaner is also constantly changing. For example, avoiding moving family members, displacement of furniture, interference from family pets, etc., will cause the established grid map to change. When the grid map changes, the path will be replanned from the starting point of the planned path, but this method has low planning efficiency and will affect subsequent cleaning tasks.

[0030] Based on the above problems, the embodiments of the present invention provide a path planning method, device and sweeping robot. The technology can be applied to various scenarios where robots perform cleaning tasks, especially scenarios where sweeping robots perform ground cleaning tasks. To facilitate understanding of this embodiment, a path planning method disclosed in the embodiments of the present invention is first described in detail. The method is applied to a sweeping robot. Figure 1 As shown, the method specifically comprises the following steps:

[0031] Step S102: creating a grid map based on current environment data.

[0032] The above-mentioned current environment data can be acquired by the data acquisition module in the sweeping robot when starting the cleaning task. The current environment data includes furniture, open space, etc. in the scene environment corresponding to the cleaning task; the data acquisition module may include laser radar, infrared sensor and ultrasonic sensor, etc., which are not specifically limited here. The above-mentioned grid map is the current environment data divided into grids. The size of each grid can be set according to research and development requirements. The grid can be square or rectangular, etc. In some embodiments, the grid can also be called a node.

[0033] Step S104, performing path planning according to the grid map to obtain a first planned path; wherein the first planned path includes at least one node.

[0034] In a specific implementation, a path planning can be performed for a grid map through a preset algorithm, and the preset algorithm can be an A* algorithm or other path planning algorithm, which is not specifically limited here. The first planned path includes multiple nodes, wherein a node corresponds to a grid in the grid map, and the first planned path includes a starting node and an ending node, that is, the sweeping robot can move from the starting node to the ending node according to the first planned path to complete the cleaning task.

[0035] Step S106: When the cleaning robot moves according to the first planned path, monitor whether the current environment data changes.

[0036] When the sweeping robot performs the cleaning task according to the first planned path, the sweeping robot will continuously monitor whether the current environment of the sweeping robot has changed. If the current environment has changed, it means that the current environment data has changed. The change in the current environment usually means that the current environment used when determining the first planned path has changed, or the scanning window of the mobile robot has moved.

[0037] Step S108, if a change occurs, determine the target relay point closest to the changed target node from the first planned path, and use the target relay point as the starting point for path planning to obtain a second planned path; the target relay point is the node corresponding to the turning point in the first planned path.

[0038] If the current environmental data is monitored to change, in order to complete the cleaning task, it is necessary to re-plan the path for the changed current environmental data so that the sweeping robot can complete the cleaning task according to the re-planned path. In the specific implementation, if the current environmental data is monitored to change, the changed target node is immediately determined from the first planned path, and the target relay point closest to the target node is determined from the first planned path, and then the target relay point is used as the starting node, and the path is planned according to the preset algorithm to obtain the second planned path. Next, the sweeping robot can move according to the second planned path, and continue to monitor whether the changed current environmental data has changed again during the movement. If it has changed, the path planning is performed again with the relay point corresponding to the changed node as the starting point until the sweeping robot reaches the terminal node.

[0039] In a specific implementation, during or after determining the first planned path, a relay point included in the first planned path may be determined, where the relay point is a node corresponding to a turning point in the first planned path.

[0040] If it is detected that the current environmental data has not changed, the sweeping robot will complete the cleaning task according to the first planned path.

[0041] A path planning method provided by an embodiment of the present invention, firstly, a sweeping robot establishes a grid map based on the current environmental data obtained; then, path planning is performed according to the grid map to obtain a first planned path; in the process of the sweeping robot moving according to the first planned path, whether the current environmental data changes is monitored; if it changes, the target relay point closest to the changed target node is determined from the first planned path, and the path planning is performed with the target relay point as the starting point to obtain a second planned path; the target relay point is the node corresponding to the turning point in the first planned path. In this method, when the environmental data changes, the path can be re-planned with the relay point adjacent to the changed node as the starting point. Compared with the method of re-planning the path from the initial starting point of the environmental data, this method improves the efficiency of path planning and helps the sweeping robot to quickly complete the cleaning task.

[0042] The embodiment of the present invention also provides another path planning method, which is implemented on the basis of the method of the above embodiment; the method focuses on the specific process of determining the target relay point closest to the changed target node from the first planned path, and performing path planning with the target relay point as the starting point to obtain the second planned path (implemented by the following steps S208-S220); Figure 2 As shown, the method comprises the following specific steps:

[0043] Step S202, establishing a grid map based on current environment data; wherein the grid map includes a start position and an end position.

[0044] In a specific implementation, the above starting position and the end position may be the same position, for example, it may be the charging position of a sweeping robot. Usually, when a sweeping robot performs a cleaning task, it starts from the base (that is, the charging position), cleans a circle in the current environment, and then returns to the charging position. In some embodiments, the above starting position and the end position may not be the same position, and can be set specifically according to the cleaning task or research and development requirements.

[0045] Step S204, performing path planning according to the grid map to obtain a first planned path; wherein the first planned path includes at least one node, and the at least one node includes at least one relay point.

[0046] In the specific implementation, after determining the first planned path, the relay point included in the first planned path can be determined from at least one node included in the first planned path. The relay point is the node corresponding to the turning point of the turn in the first planned path, that is, the point on the non-straight line of the planned path, which can be understood as the intersection of the broken lines.

[0047] Specifically, the at least one node included in the first planned path includes a starting node and an ending node; when determining the relay point included in the first planned path, the following steps 10-14 may be performed for each of the at least one node included in the first planned path:

[0048] Step 10, calculating a first distance from the starting node to the current node, and a second distance from the starting node to the previous node of the current node.

[0049] The current node may be any node included in the first planning path, that is, the nodes included in the first planning path may be used as the current node in sequence. The previous node of the current node may be the node corresponding to the previous moment when the node was moved to the current node in the first planning path. The first distance may be the Manhattan distance from the starting node to the current node according to the first planning path, and the second distance may be the Manhattan distance from the starting node to the previous node of the current node according to the first planning path.

[0050] Step 11: determine a first difference between the first distance and the second distance.

[0051] Step 12, calculating a third distance from the current node to the end node, and a fourth distance from the previous node of the current node to the end node.

[0052] The third distance may be the Manhattan distance from the current node to the end node, and the fourth distance may be the Manhattan distance from the previous node of the current node to the end node.

[0053] Step 13: Determine a second difference between the third distance and the fourth distance.

[0054] Step 14: Determine whether the current node is a relay point based on the first difference and the second difference.

[0055] In the specific implementation, it can be determined whether the current node is a relay point based on the specific numerical values ​​corresponding to the first difference and the second difference, and then a parameter identifier is set for the current node based on the determination result. That is, each node in the first planned path has a corresponding parameter identifier, which is used to indicate whether the node is a relay point.

[0056] In some embodiments, if the first difference is not equal to zero, the current node is determined to be a relay point, and the parameter identifier of the current node is set to the first value; if the second difference is not equal to zero, the current node is determined to be a relay point, and the parameter identifier of the current node is set to the first value; if the first difference and the second difference are both zero, the current node is determined not to be a relay point, and the parameter identifier of the current node is set to the second value. Specifically, the above-mentioned first value and second value can be set according to research and development requirements. For example, the first value can be set to 1 and the second value can be set to 0; the first value can also be set to 0 and the second value can be set to 1, etc.

[0057] Step S206, when the sweeping robot moves according to the first planned path, monitor whether the current environmental data changes; if it changes, execute step S208; otherwise, execute step S220.

[0058] The current environment data changes, usually a value, and the sweeping robot detects that the current environment changes or the scanning window moves.

[0059] Step S208, determining a target node from the first planned path according to the location where the current environment data changes.

[0060] The target node is a node in the first planned path that is closest to the position where the current environment data changes, or a node in the first planned path that is occupied by the changed position.

[0061] Step S210, calculating the Manhattan distance between the target node and each relay point included in the first planned path, and determining the relay point corresponding to the minimum Manhattan distance as the target relay point.

[0062] Step S212: updating the starting position in the above grid map to the position of the target relay point.

[0063] Step S214, perform path planning according to the updated grid map to obtain a second planned path from the updated starting position to the end position; execute step S216.

[0064] Step S216, determine whether the sweeping robot has reached the end position indicated by the current environmental data; if not, execute step S218; otherwise, end.

[0065] Step S218: Replace the first planned path with the second planned path, and continue to execute step S206.

[0066] If the sweeping robot has not reached the end position indicated by the current environmental data, after obtaining the second path, the sweeping robot will move according to the second planned path, and in the process of the sweeping robot moving according to the two-one planned path, it will listen to whether the updated current environmental data has changed; if it has changed, it is necessary to determine again the relay point closest to the changed node, and re-plan the path with the relay point as the starting point.

[0067] Step S220, controlling the sweeping robot to move according to the first planned path.

[0068] The above path planning method first plans the path using a preset algorithm, then selects relay points for the acquired path, and divides the path into a limited number of segments. When the sweeping robot detects that the environment has changed or the scanning window has moved, it immediately looks for a suitable relay point to implement subsequent path planning. This method does not require re-planning the path from the starting point, thereby improving the efficiency of path planning.

[0069] The embodiment of the present invention also provides another path planning method, which is implemented on the basis of the above-mentioned embodiment method; the method focuses on describing the specific process of performing path planning according to the grid map to obtain the first planned path (implemented by the following steps S304-S308); Figure 3 As shown, the method comprises the following specific steps:

[0070] Step S302, establishing a grid map based on current environment data; wherein the grid map includes a plurality of grids, the plurality of grids including a grid corresponding to a starting position and a grid corresponding to an end position.

[0071] Step S304: put the grid corresponding to the starting position into a preset open list.

[0072] The grids placed in the above open list are paths that may or may not be passed along the way. Basically, the open list is usually a list of grids to be checked.

[0073] Step S306: among the grids adjacent to the starting position in the above-mentioned multiple grids, the grids that can be reached by the starting position are put into an open list, and the grid corresponding to the starting position is put into a preset closed list.

[0074] In the specific implementation, the grids put in the above closed list are grids that do not need to be paid attention to temporarily. Among the multiple grids in the grid map, there are grids corresponding to walls or furniture, etc., which are usually inaccessible to other grids and are also locations that do not need to be cleaned in the current environment.

[0075] Step S308: determine the grid with the smallest moving cost in the open list as the current grid.

[0076] The above movement cost can be calculated by the following formula:

[0077] F = G + H;

[0078] Among them, F represents the movement cost of a certain grid (referred to as the specified grid); G represents the movement cost from the grid corresponding to the actual position to the specified grid, that is, the Manhattan distance of moving along the path generated to reach the specified grid; H represents the estimated cost of moving from the specified grid to the grid corresponding to the destination position, and the estimated cost can be the Manhattan distance corresponding to moving from the specified grid to the destination position.

[0079] Step S310: put the current grid into a closed list, and determine adjacent grids of the current grid from the grids other than the grids included in the closed list among the plurality of grids.

[0080] The adjacent grids mentioned above usually refer to the grids adjacent to the current grid among all the grids contained in the grid map. Usually, the parent node of the current grid is the grid corresponding to the starting position.

[0081] Step S312, determining whether the adjacent grids of the current grid include the grid corresponding to the end position; if included, executing step S320; otherwise, executing step S314.

[0082] In the specific implementation, if the grid corresponding to the end point position is placed in the open list, the planned path will be determined according to the grids in the closed list.

[0083] Step S314, calculating the moving cost of the first grid with the smallest estimated cost among the adjacent grids.

[0084] The estimated cost of the adjacent grid includes the Manhattan distance from the adjacent grid to the grid corresponding to the terminal position.

[0085] Step S316, determining the final movement cost of the first grid according to the movement cost of the first grid; and continuing to calculate the final movement costs of adjacent grids except the first grid until the final movement cost of each adjacent grid is obtained.

[0086] The movement cost of the first grid includes: the sum of the Manhattan distance from the grid corresponding to the starting position to the first grid and the Manhattan distance from the first grid to the grid corresponding to the ending position.

[0087] In specific implementation, the parameter identifier of the adjacent grid can be calculated according to the final moving cost of the adjacent grid; then it is determined whether the final moving cost of the adjacent grid is less than the previous moving cost; if it is less, the moving cost of the adjacent grid is updated to the final moving cost, and the current grid is set as the parent node of the adjacent grid; if it is not less, the value corresponding to the moving cost of the adjacent grid and the original parent node will be maintained.

[0088] Step S318, determining the adjacent grid with the minimum final moving cost as the new current grid; and continuing to execute step S310.

[0089] Step S320, determining a first planned path according to the grids in the closed list; wherein the grids included in the closed list correspond to the nodes in the first planned path.

[0090] In a specific implementation, the parent node may be inferred from the grid corresponding to the end position in the closed list until the grid corresponding to the start position is reached, thereby obtaining the first planned path.

[0091] Step S322, when the sweeping robot moves according to the first planned path, monitor whether the current environmental data changes; if it changes, execute step S324; otherwise, execute step S326.

[0092] Step S324, determining the target relay point closest to the changed target node from the first planned path, and determining the grid corresponding to the target relay point as the new starting position, and continuing to execute step S304.

[0093] Step S326, controlling the cleaning robot to move according to the first planned path.

[0094] In the above path planning method, after starting the cleaning task, a grid map is established based on the current environmental data obtained, and then the path planning is performed based on the grid map to obtain a first planned path, and then the mobile robot is controlled to move according to the first planned path. If the current environmental data changes during the movement, the path can be replanned from the relay point near the location where the change occurred, and there is no need to re-plan the path from the starting point, thereby improving the efficiency of path planning. In particular, if the sweeping robot has already cleaned a section of the path and is interrupted in the middle, it only needs to continue planning from the point where it was interrupted, and then perform the cleaning operation.

[0095] In view of the above-mentioned path planning method embodiment, the present invention provides a path planning device, which is arranged on a sweeping robot; Figure 4 As shown, the device comprises:

[0096] The grid construction module 40 is used to build a grid map based on current environmental data.

[0097] The first path planning module 41 is used to perform path planning according to the grid map to obtain a first planned path; wherein the first planned path includes at least one node.

[0098] The environment monitoring module 42 is used to monitor whether the current environment data changes when the cleaning robot moves according to the first planned path.

[0099] The second path planning module 43 is used to determine the target relay point closest to the changed target node from the first planned path if a change occurs, and to perform path planning with the target relay point as the starting point to obtain a second planned path; the target relay point is the node corresponding to the turning point in the first planned path.

[0100] The above-mentioned path planning device first establishes a grid map based on the current environmental data obtained by the sweeping robot; then performs path planning according to the grid map to obtain a first planned path; in the process of the sweeping robot moving according to the first planned path, monitors whether the current environmental data changes; if it changes, determines the target relay point closest to the changed target node from the first planned path, and performs path planning with the target relay point as the starting point to obtain a second planned path; the target relay point is the node corresponding to the turning point in the first planned path. In this method, when the environmental data changes, the path can be re-planned with the relay point adjacent to the changed node as the starting point. Compared with the method of re-planning the path from the initial starting point of the environmental data, this method improves the efficiency of path planning and helps the sweeping robot to quickly complete the cleaning task.

[0101] Furthermore, the above-mentioned device also includes a loop execution module, which is used to perform path planning with the target relay point as the starting point. After obtaining the second planned path, the first planned path is replaced by the second planned path, and the step of monitoring whether the current environmental data changes during the movement of the sweeping robot according to the first planned path is continued until the sweeping robot reaches the end position indicated by the current environmental data.

[0102] In a specific implementation, the above-mentioned device further includes a relay point determination module, which is used to: determine a relay point included in the first planned path from at least one node included in the first planned path.

[0103] Specifically, at least one node included in the above-mentioned first planned path includes a starting node and an ending node; the above-mentioned second path planning module 43 is used to: perform the following operations for each node in at least one node: calculate the first distance from the starting node to the current node, and the second distance from the starting node to the previous node of the current node; determine the first difference between the first distance and the second distance; calculate the third distance from the current node to the ending node, and the fourth distance from the previous node of the current node to the ending node; determine the second difference between the third distance and the fourth distance; based on the first difference and the second difference, determine whether the current node is a relay point.

[0104] In some embodiments, each node in the above-mentioned first planned path corresponds to a parameter identifier, and the parameter identifier is used to indicate whether the node is a relay point; the above-mentioned second path planning module 43 is also used: if the first difference is not equal to zero, it is determined that the current node is a relay point, and the parameter identifier of the current node is set to the first value; if the second difference is not equal to zero, it is determined that the current node is a relay point, and the parameter identifier of the current node is set to the first value; if the first difference and the second difference are both zero, it is determined that the current node is not a relay point, and the parameter identifier of the current node is set to the second value.

[0105] In a specific implementation, the first planned path includes at least one relay point; the second path planning module 43 is used to: determine the target node from the first planned path according to the location where the current environmental data changes; calculate the Manhattan distance between the target node and each relay point in at least one relay point, and determine the relay point corresponding to the minimum Manhattan distance as the target relay point.

[0106] Furthermore, the above-mentioned grid map includes a starting position and an end position; the above-mentioned second path planning module 43 is also used to: update the starting position in the grid map to the position of the target relay point; perform path planning according to the updated grid map to obtain a second planned path from the updated starting position to the end position.

[0107] In a specific implementation, the grid map includes a plurality of grids, including a grid corresponding to a starting position and a grid corresponding to an end position; the first path planning module is used to: put the grid corresponding to the starting position into a preset open list; put the grid that can be reached by the starting position in the grids adjacent to the starting position in the plurality of grids into the open list, and put the grid corresponding to the starting position into a preset closed list; determine the grid with the smallest moving cost in the open list as the current grid; put the current grid into the closed list, and determine the adjacent grids of the current grid in the grids other than the grids included in the closed list among the plurality of grids; calculate the grid with the lowest estimated cost among the adjacent grids The method comprises the following steps: calculating the moving cost of the first grid with the smallest moving cost; determining the final moving cost of the first grid according to the moving cost of the first grid; continuing to calculate the final moving costs of the adjacent grids except the first grid until the final moving cost of each adjacent grid is obtained; determining the adjacent grid with the smallest final moving cost as the new current grid, continuing to execute the steps of placing the current grid into a closed list, and determining the adjacent grids of the current grid among the grids except the grids included in the closed list among the multiple grids until the grid corresponding to the terminal position is placed into an open list; determining the first planned path according to the grids in the closed list; wherein the grids included in the closed list correspond to the nodes in the first planned path.

[0108] In a specific implementation, the estimated cost of the adjacent grid includes the Manhattan distance from the adjacent grid to the grid corresponding to the end position; the moving cost of the first grid includes: the sum of the Manhattan distance from the grid corresponding to the starting position to the first grid and the Manhattan distance from the first grid to the grid corresponding to the end position.

[0109] The path planning device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0110] The embodiment of the present invention also provides a sweeping robot, such as Figure 5 As shown, the cleaning robot includes a processor 101 and a memory 100. The memory 100 stores machine executable instructions that can be executed by the processor 101. The processor 101 executes the machine executable instructions to implement the above path planning method.

[0111] Further, Figure 5 The cleaning robot shown further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .

[0112] The memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0113] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 101 or the instruction in the form of software. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and completes the steps of the method of the above embodiment in combination with its hardware.

[0114] An embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned path planning method. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0115] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0116] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A path planning method, characterized in that: The method is applied to a sweeping robot; the method comprises: Create a grid map based on current environmental data; Perform path planning according to the grid map to obtain a first planned path; wherein the first planned path includes at least one node; During the process of the sweeping robot moving according to the first planned path, monitoring whether the current environment data changes; wherein the change of the current environment data includes: the current environment data changes relative to the current environment data used when determining the first planned path, or the scanning window of the mobile robot moves; If a change occurs, determine the target relay point closest to the target node that has changed from the first planned path, and perform path planning with the target relay point as the starting point to obtain a second planned path; the target relay point is the node corresponding to the turning point in the first planned path; wherein the relay point included in the first planned path is the node corresponding to the turning point of the first planned path; After the step of performing path planning with the target relay point as the starting point to obtain a second planned path, the method further includes: replacing the first planned path with the second planned path, and continuing to perform the step of monitoring whether the current environment data changes during the movement of the sweeping robot according to the first planned path, until the sweeping robot reaches the end position indicated by the current environment data; After the step of performing path planning according to the grid map to obtain a first planned path, the method further comprises: determining a relay point included in the first planned path from the at least one node included in the first planned path; The at least one node included in the first planned path includes a starting node and an ending node; the step of determining the relay point included in the first planned path from the at least one node included in the first planned path includes: performing the following operations for each of the at least one node: calculating a first distance from the starting node to a current node, and a second distance from the starting node to a node previous to the current node; determining a first difference between the first distance and the second distance; calculating a third distance from the current node to the ending node, and a fourth distance from a node previous to the current node to the ending node; determining a second difference between the third distance and the fourth distance; and determining whether the current node is a relay point based on the first difference and the second difference; Each node in the first planned path corresponds to a parameter identifier, and the parameter identifier is used to indicate whether the node is a relay point; the step of determining whether the current node is a relay point according to the first difference and the second difference comprises: if the first difference is not equal to zero, determining that the current node is a relay point, and setting the parameter identifier of the current node to a first value; if the second difference is not equal to zero, determining that the current node is a relay point, and setting the parameter identifier of the current node to a first value; if the first difference and the second difference are both zero, determining that the current node is not a relay point, and setting the parameter identifier of the current node to a second value; The first planned path includes at least one relay point; the step of determining the target relay point closest to the changed target node from the first planned path includes: determining the target node from the first planned path according to the location where the current environmental data changes; calculating the Manhattan distance between the target node and each of the at least one relay point, and determining the relay point corresponding to the minimum Manhattan distance as the target relay point.

2. The method according to claim 1, characterized in that The grid map includes a starting position and an end position; The step of performing path planning with the target relay point as the starting point to obtain a second planned path includes: Updating the starting position in the grid map to the position of the target relay point; Path planning is performed according to the updated grid map to obtain a second planned path from the updated starting position to the end position.

3. The method according to claim 1, characterized in that: The grid map includes a plurality of grids, wherein the plurality of grids include a grid corresponding to a starting position and a grid corresponding to an end position; the step of performing path planning according to the grid map to obtain a first planned path includes: Putting the grid corresponding to the starting position into a preset open list; Among the grids adjacent to the starting position in the plurality of grids, the grids that can be reached by the starting position are placed in the open list, and the grid corresponding to the starting position is placed in a preset closed list; Determine the grid with the smallest moving cost in the open list as the current grid; Put the current grid into the closed list, and determine the adjacent grids of the current grid among the grids other than the grids included in the closed list; Calculating the moving cost of the first grid with the smallest estimated cost among the adjacent grids; Determine the final movement cost of the first grid according to the movement cost of the first grid; continue to calculate the final movement cost of the adjacent grids except the first grid until the final movement cost of each adjacent grid is obtained; Determine the adjacent grid with the minimum final moving cost as a new current grid, continue to perform the steps of placing the current grid into the closed list, and determine adjacent grids of the current grid among the multiple grids except the grids included in the closed list, until the grid corresponding to the end position is placed in the open list; The first planned path is determined according to the grids in the closed list; wherein the grids included in the closed list correspond to the nodes in the first planned path.

4. The method according to claim 3, characterized in that The estimated cost of the adjacent grid includes the Manhattan distance of moving from the adjacent grid to the grid corresponding to the terminal position; The movement cost of the first grid includes: the sum of the Manhattan distance from the grid corresponding to the starting position to the first grid and the Manhattan distance from the first grid to the grid corresponding to the end position.

5. A path planning device, characterized in that: The device is arranged on a sweeping robot; the device comprises: The grid construction module is used to build a grid map based on the current environmental data; A first path planning module, configured to perform path planning according to the grid map to obtain a first planned path; wherein the first planned path includes at least one node; An environment monitoring module, used for monitoring whether the current environment data changes during the process of the sweeping robot moving according to the first planned path; wherein the change of the current environment data includes: the current environment data changes relative to the current environment data used when determining the first planned path, or the scanning window of the mobile robot moves; A second path planning module is used to determine, if a change occurs, a target relay point that is closest to the target node that has changed from the first planned path, and perform path planning with the target relay point as the starting point to obtain a second planned path; the target relay point is a node corresponding to an inflection point in the first planned path; wherein the relay point included in the first planned path is a node corresponding to an inflection point of a turn in the first planned path; The device also includes a loop execution module, which is used to replace the first planned path with the second planned path, and continue to execute the step of monitoring whether the current environment data changes during the process of the cleaning robot moving according to the first planned path, until the cleaning robot reaches the end position indicated by the current environment data; A relay point determination module, used to determine a relay point included in the first planned path from the at least one node included in the first planned path; The at least one node included in the first planned path includes a starting node and an ending node; the relay point determination module is used to perform the following operations for each of the at least one node: calculate a first distance from the starting node to the current node, and a second distance from the starting node to a node previous to the current node; determine a first difference between the first distance and the second distance; calculate a third distance from the current node to the ending node, and a fourth distance from a node previous to the current node to the ending node; determine a second difference between the third distance and the fourth distance; and determine whether the current node is a relay point based on the first difference and the second difference; Each node in the first planned path corresponds to a parameter identifier, and the parameter identifier is used to indicate whether the node is a relay point; the relay point determination module is used to determine that the current node is a relay point if the first difference is not equal to zero, and set the parameter identifier of the current node to a first value; if the second difference is not equal to zero, determine that the current node is a relay point, and set the parameter identifier of the current node to the first value; if the first difference and the second difference are both zero, determine that the current node is not a relay point, and set the parameter identifier of the current node to a second value; The first planned path includes at least one relay point; the second path planning module is used to determine the target node from the first planned path according to the location where the current environmental data changes; calculate the Manhattan distance between the target node and each of the at least one relay point, and determine the relay point corresponding to the minimum Manhattan distance as the target relay point.

6. A sweeping robot, characterized in that: The sweeping robot comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the path planning method according to any one of claims 1 to 4.

7. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the path planning method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Intelligent logistics path planning method and system

    CN113156886A