CN-116369789-B - Intelligent partitioning method and device for robot, robot and storage medium
Abstract
The invention is applicable to the technical field of robots and provides a robot intelligent partitioning method, a device, a robot and a storage medium, wherein the method comprises the steps of acquiring a slam map after the robot finishes the last work, comparing the slam map with a partitioning map to obtain the region attribute of at least one newly added region which is more than one cleaning region and the region number of the adjacent region of the newly added region; and when the region attribute is judged to be in accordance with the first condition and the region number is judged to be in accordance with the second condition, carrying out local partition on the newly added region. The invention solves the problem that the robot automatic partition in the prior art re-partitions the partitioned area, so that the front and rear partitions are inconsistent, and the robot sweeping working parameters set by a user are invalid.
Inventors
- LI XIAN
- FU LINA
Assignees
- 深圳拓邦股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230321
Claims (8)
- 1. An intelligent partitioning method for a robot, comprising the steps of: Acquiring a slam map after the robot finishes the last work, and comparing the slam map with the partition map to obtain the region attribute of at least one newly added region which is more than the cleaning region and the region number of the adjacent region of the newly added region; Judging whether the region attribute accords with a preset first condition and whether the region number accords with a preset second condition for each newly added region, wherein the region attribute is the area of the newly added region, if the area of the newly added region is larger than a set threshold value, the region attribute accords with the first condition, and if the area of the newly added region is smaller than the set threshold value, the region attribute does not accord with the first condition; When the region attribute is judged to be in accordance with the first condition and the region number is judged to be in accordance with the second condition, carrying out local partitioning on the newly added region; after the step of determining, for each of the newly added areas, whether the area attribute meets a preset first condition and the area number meets a preset second condition, the method further includes: And when judging that the region attribute does not meet the first condition or the region number does not meet the second condition, merging the newly added region with the adjacent region, and updating the partition map.
- 2. The robot intelligent partitioning method as set forth in claim 1, wherein the step of locally partitioning the newly added area comprises: Acquiring local map data corresponding to the newly added area in the slam map, and identifying line segments in the local map data; Judging whether the first end of the line segment has an intersection point with other line segments or not, and judging whether the first end of the line segment has an intersection point in a preset range from the second end of the line segment or not; When judging that the first end of the line segment has an intersection point with other line segments and no intersection point exists in a preset range from the second end of the line segment, extending the line segment to one side of the second end, and stopping extending after encountering an obstacle to obtain a threshold line of the newly-increased area; and filling the newly added area according to the threshold line, and updating the newly added area into the partition map.
- 3. The robot smart partitioning method of claim 2, wherein said step of identifying line segments in said local map data comprises: And carrying out binarization processing on the local map data, and identifying line segments in the local map data after the binarization processing according to a straight line identification model.
- 4. An intelligent partitioning device for a robot, comprising: the newly added region acquisition module is used for acquiring a slam map after the robot finishes the last work and comparing the slam map with the partition map to obtain the region attribute of at least one newly added region which is more than the cleaning region and the region number of the adjacent region of the newly added region; The first judging module is used for judging whether the region attribute accords with a preset first condition and whether the region number accords with a preset second condition for each newly added region, wherein the region attribute is the area of the newly added region, if the area of the newly added region is larger than a set threshold value, the first condition is judged to be met, and if the area of the newly added region is smaller than the set threshold value, the first condition is judged not to be met; The local partitioning module is used for performing local partitioning on the newly added region when judging that the region attribute accords with the first condition and the region number accords with the second condition; and the first region merging module is used for merging the newly added region with the adjacent region and updating the partition map when judging that the region attribute does not meet the first condition or the region number does not meet the second condition.
- 5. The robotic intelligent partitioning device according to claim 4, wherein the partial-partitioning module comprises: The line segment identification sub-module is used for acquiring local map data corresponding to the newly added area in the slam map and identifying line segments in the local map data; The first judging submodule is used for judging whether the first end of the line segment has an intersection point with other line segments or not and whether the first end of the line segment has an intersection point within a preset range from the second end of the line segment or not; The threshold identification sub-module is used for extending the line segment to one side of the second end when judging that the first end of the line segment has an intersection point with other line segments and no intersection point exists in a preset range from the second end of the line segment, and stopping extending after encountering an obstacle to obtain a threshold line of the newly added area; And the region filling sub-module is used for filling the region of the newly added region according to the threshold line and updating the region into the partition map.
- 6. The robotic intelligent partitioning device according to claim 5, wherein the line segment recognition submodule includes: and the line segment identification unit is used for carrying out binarization processing on the local map data and identifying the line segments in the local map data after the binarization processing according to the straight line identification model.
- 7. A robot comprising a robot intelligent partitioning device as claimed in any one of claims 4-6.
- 8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1-3.
Description
Intelligent partitioning method and device for robot, robot and storage medium Technical Field The invention belongs to the technical field of robots, and particularly relates to an intelligent partitioning method and device for a robot, the robot and a computer readable storage medium. Background Cleaning robots such as robots, mopping robots, and floor cleaning robots are intelligent devices for automatically performing cleaning work. For example, when a household cleaning robot is cleaned for the first time, the robot can build a working map for the home environment while cleaning, and when certain conditions are met, the robot can automatically partition the room of the home environment based on the working map information. Specifically, in the prior art, after the robot completes global cleaning of the home environment, the robot can automatically partition the whole working map under the conditions that (1) the working map of the home environment is not partitioned before, and (2) an unknown area is generated in the cleaning process, wherein the unknown area refers to one or more newly added areas in the working map. The existing automatic partitioning method mainly aims at re-partitioning the whole map, so that the problems are that (1) for the same home environment, if an object is moved in the environment compared with the prior art, the map is only locally changed, the working map cannot be partitioned, abnormal display of a user graphical interface, such as empty white blocks and the like, can occur, and user experience is affected, and (2) for the same home environment, when the whole working map is partitioned, the original partition is disturbed due to the local change of the working map, and further working parameters, such as suction force, water spraying flow and the like, of a robot preset by a user for the working map are invalid. Disclosure of Invention In a first aspect, the invention provides an intelligent partitioning method for a robot, which aims to solve the problem that in the prior art, an automatic partitioning method for the robot re-partitions partitioned areas, so that front and rear partitions are inconsistent, and further the sweeping working parameters of the robot set by a user are invalid. The embodiment of the invention is realized in such a way that the intelligent partitioning method of the robot comprises the following steps: Acquiring a slam map after the robot finishes the last work, and comparing the slam map with the partition map to obtain the region attribute of at least one newly added region which is more than the cleaning region and the region number of the adjacent region of the newly added region; Judging whether the region attribute accords with a preset first condition and whether the region number accords with a preset second condition for each newly added region; and when the region attribute is judged to be in accordance with the first condition and the region number is judged to be in accordance with the second condition, carrying out local partitioning on the newly added region. Further, the step of locally partitioning the newly added area includes: Acquiring local map data corresponding to the newly added area in the slam map, and identifying line segments in the local map data; Judging whether the first end of the line segment has an intersection point with other line segments or not, and judging whether the first end of the line segment has an intersection point in a preset range from the second end of the line segment or not; When judging that the first end of the line segment has an intersection point with other line segments and no intersection point exists in a preset range from the second end of the line segment, extending the line segment to the second end side, and stopping extending after encountering an obstacle to obtain a threshold line of the newly added area; and filling the newly added area according to the threshold line, and updating the newly added area into the partition map. Still further, the step of identifying line segments in the local map data includes: And carrying out binarization processing on the local map data, and identifying line segments in the local map data after the binarization processing according to a straight line identification model. Further, after the step of determining, for each newly added area, whether the area attribute meets a preset first condition and the area number meets a preset second condition, the method further includes: And when the region attribute is judged to be not in accordance with the first condition or the region number is judged to be not in accordance with the second condition, merging the newly added region with the adjacent region, and updating the partition map. In a second aspect, the present invention provides a robot intelligent partitioning device, the device comprising: the newly added region acquisition module is used for acquiring a slam map after the robot finishes t