Sweeping method and device of sweeper, computer equipment and storage medium

文档序号:1511798 发布日期:2020-02-11 浏览:10次 中文

阅读说明:本技术 扫地机清扫的方法、装置、计算机设备和存储介质 (Sweeping method and device of sweeper, computer equipment and storage medium ) 是由 张立新 许仕哲 周毕兴 于 2019-09-25 设计创作,主要内容包括:本申请涉及扫地机技术领域,特别涉及一种扫地机清扫的方法、装置、计算机设备和存储介质。所述方法包括:沿着房间的墙边进行清扫,直至行进路线形成闭合区域,得到待清扫区域;对所述待清扫区域进行清扫,记录已清扫区域;在清扫过程中实时检测是否存在障碍物;若是,则沿着所述障碍物的边沿进行清扫,记录所述障碍物的区域,得到障碍物区域;根据所述待清扫区域、所述已清扫区域和所述障碍物区域,计算得到未清扫区域;对所述未清扫区域进行清扫,更新所述已清扫区域,并返回执行所述在清扫过程中实时检测是否存在障碍物的步骤,直至不存在所述未清扫区域。解决现有扫地机器人,路径规划不合理,有漏扫或有些区域重复清扫、清扫效率低的问题。(The application relates to the technical field of sweeper, in particular to a sweeping method and device of a sweeper, computer equipment and a storage medium. The method comprises the following steps: cleaning along the wall of the room until a closed area is formed on the traveling route, and obtaining an area to be cleaned; cleaning the area to be cleaned, and recording the cleaned area; detecting whether an obstacle exists in real time in the cleaning process; if so, cleaning along the edge of the obstacle, recording the area of the obstacle, and obtaining the area of the obstacle; calculating to obtain an uncleaned area according to the area to be cleaned, the cleaned area and the obstacle area; and cleaning the non-cleaned area, updating the cleaned area, and returning to the step of detecting whether the obstacles exist in real time in the cleaning process until the non-cleaned area does not exist. The problem of current robot of sweeping the floor, route planning is unreasonable, has to miss to sweep or some region cleans repeatedly, cleans inefficiency is solved.)

1. A method of sweeping with a sweeper, the method comprising:

cleaning along the wall of the room until a closed area is formed on the traveling route, and obtaining an area to be cleaned;

cleaning the area to be cleaned, and recording the cleaned area;

detecting whether an obstacle exists in real time in the cleaning process;

if so, cleaning along the edge of the obstacle, recording the area of the obstacle, and obtaining the area of the obstacle;

calculating to obtain an uncleaned area according to the area to be cleaned, the cleaned area and the obstacle area;

and cleaning the non-cleaned area, updating the cleaned area, and returning to the step of detecting whether the obstacles exist in real time in the cleaning process until the non-cleaned area does not exist.

2. The sweeper sweeping method of claim 1, wherein after the step of detecting in real time during sweeping whether an obstacle is present, comprising:

if not, the cleaning of the non-cleaned area is continued.

3. The method of sweeper sweeping of claim 1, wherein after said sweeping said non-swept area, updating said swept area, and returning to said step of detecting in real time during sweeping whether an obstacle is present until said non-swept area is absent, comprising:

and generating a cleaning area map according to the area to be cleaned and the obstacle area and storing the cleaning area map.

4. The sweeper sweeping method of claim 3, wherein after the step of generating and saving a sweeping area map from the area to be swept and the obstacle area, comprising:

detecting whether the mobile phone is moved;

if not, cleaning according to the cleaning area map when a cleaning command is received;

if yes, returning to execute the cleaning along the wall of the room when a cleaning command is received until a closed area is formed on the traveling route, and obtaining an area to be cleaned.

5. The method of sweeper sweeping of claim 4, wherein the step of sweeping in the sweep area map upon receipt of a sweep command includes:

detecting whether an obstacle in any of the obstacle regions is eliminated;

if so, marking the obstacle area with the obstacle eliminated to obtain a first area to be changed;

cleaning the first area to be changed according to a zigzag route advancing mode;

and removing the obstacle area corresponding to the first area to be changed from the pre-recorded obstacle areas so as to update the cleaning area map.

6. The method of sweeper sweeping of claim 4, after said step of sweeping in said sweep area map upon receipt of a sweep command, comprising:

detecting whether a newly added obstacle exists in the area to be cleaned;

if so, cleaning along the edge of the newly added obstacle, and recording the area of the newly added obstacle to obtain a second area to be changed;

and determining the second area to be changed as a newly added obstacle area, and updating the cleaning area map according to the newly added obstacle area.

7. The sweeper sweeping method of claim 1, wherein said sweeping the area to be swept includes:

and cleaning the area to be cleaned according to a zigzag route advancing mode.

8. The utility model provides a device that sweeper cleaned which characterized in that, the device includes:

the cleaning module is used for cleaning along the wall of the room until a closed area is formed on the traveling route to obtain an area to be cleaned;

the first recording module is used for cleaning the area to be cleaned and recording the cleaned area;

the detection module is used for detecting whether the obstacles exist in real time in the cleaning process;

the second recording module is used for cleaning along the edge of the obstacle if the obstacle exists, recording the area of the obstacle and obtaining the area of the obstacle;

the calculation module is used for calculating an uncleaned area according to the area to be cleaned, the cleaned area and the obstacle area;

and the execution module is used for cleaning the non-cleaned area, updating the cleaned area and returning to the step of detecting whether the obstacles exist in real time in the cleaning process until the non-cleaned area does not exist.

9. Computer device, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the method of sweeper sweeping according to any one of claims 1-7.

10. A storage medium having stored thereon a computer program which, when executed, implements a method of sweeping by a sweeper of any one of claims 1-7.

Technical Field

The application relates to the technical field of sweeper, in particular to a sweeping method and device of a sweeper, computer equipment and a storage medium.

Background

The floor sweeping robot is also called an automatic cleaner, intelligent dust collection, a robot dust collector and the like, is one of intelligent household appliances, and can automatically complete floor cleaning work in a room by means of certain artificial intelligence. The low-end sweeping robot usually cleans according to a fixed mode, so that the sweeping is easy to miss or repeat, and the sweeping efficiency is not high.

Disclosure of Invention

Aiming at the defects in the prior art, the application provides a sweeping method, a sweeping device, a computer device and a storage medium of a sweeper, and aims to solve the problems that an existing sweeping robot is unreasonable in path planning, has missing sweeping or has repeated sweeping in some areas and low sweeping efficiency.

The technical scheme provided by the application is as follows:

a method of sweeper sweeping, the method comprising:

cleaning along the wall of the room until a closed area is formed on the traveling route, and obtaining an area to be cleaned;

cleaning the area to be cleaned, and recording the cleaned area;

detecting whether an obstacle exists in real time in the cleaning process;

if so, cleaning along the edge of the obstacle, recording the area of the obstacle, and obtaining the area of the obstacle;

calculating to obtain an uncleaned area according to the area to be cleaned, the cleaned area and the obstacle area;

and cleaning the non-cleaned area, updating the cleaned area, and returning to the step of detecting whether the obstacles exist in real time in the cleaning process until the non-cleaned area does not exist.

Further, after the step of detecting whether an obstacle exists in real time during sweeping, the method comprises the following steps:

if not, the cleaning of the non-cleaned area is continued.

Further, after the cleaning the non-cleaned area, updating the cleaned area, and returning to the step of detecting whether an obstacle exists during the cleaning process until the non-cleaned area does not exist, the method includes:

and generating a cleaning area map according to the area to be cleaned and the obstacle area and storing the cleaning area map.

Further, after the step of generating and storing a cleaning area map from the area to be cleaned and the obstacle area, the method includes:

detecting whether the mobile phone is moved;

if not, cleaning according to the cleaning area map when a cleaning command is received;

if yes, returning to execute the cleaning along the wall of the room when a cleaning command is received until a closed area is formed on the traveling route, and obtaining an area to be cleaned.

Further, the step of performing cleaning according to the cleaning area map when the cleaning command is received includes:

detecting whether an obstacle in any of the obstacle regions is eliminated;

if so, marking the obstacle area with the obstacle eliminated to obtain a first area to be changed;

cleaning the first area to be changed according to a zigzag route advancing mode;

and removing the obstacle area corresponding to the first area to be changed from the pre-recorded obstacle areas so as to update the cleaning area map.

Further, after the step of performing cleaning in accordance with the cleaning area map when the cleaning command is received, the method includes:

detecting whether a newly added obstacle exists in the area to be cleaned;

if so, cleaning along the edge of the newly added obstacle, and recording the area of the newly added obstacle to obtain a second area to be changed;

and determining the second area to be changed as a newly added obstacle area, and updating the cleaning area map according to the newly added obstacle area.

Further, the step of cleaning the area to be cleaned comprises:

and cleaning the area to be cleaned according to a zigzag route advancing mode.

The application still provides a device that the machine of sweeping the floor cleaned, the device includes:

the cleaning module is used for cleaning along the wall of the room until a closed area is formed on the traveling route to obtain an area to be cleaned;

the first recording module is used for cleaning the area to be cleaned and recording the cleaned area;

the detection module is used for detecting whether the obstacles exist in real time in the cleaning process;

the second recording module is used for cleaning along the edge of the obstacle if the obstacle exists, recording the area of the obstacle and obtaining the area of the obstacle;

the calculation module is used for calculating an uncleaned area according to the area to be cleaned, the cleaned area and the obstacle area;

and the execution module is used for cleaning the non-cleaned area, updating the cleaned area and returning to the step of detecting whether the obstacles exist in real time in the cleaning process until the non-cleaned area does not exist.

The application also provides a computer device, which comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the sweeping method of the sweeper when executing the computer program.

The application also provides a storage medium, on which a computer program is stored, and the computer program is executed to realize the sweeping method of the sweeper.

According to the technical scheme, the method has the advantages that: the sweeper cleans along the wall of a room to obtain a region to be cleaned, cleans the region to be cleaned again, cleans along the barrier if the barrier exists in the region to be cleaned, cleans the region to be cleaned again later until the region to be cleaned does not exist, and aims to solve the problems that the existing sweeping robot is unreasonable in path planning, and is missed to be cleaned or the region to be cleaned repeatedly and low in cleaning efficiency.

Drawings

Fig. 1 is a flowchart of a sweeping method of a sweeper provided in an embodiment of the present application;

fig. 2 is a schematic diagram of a sweeping path of a sweeping method of a sweeper provided by an embodiment of the present application;

fig. 3 is a functional block diagram of a sweeping device of a sweeper provided in an embodiment of the present application;

FIG. 4 is a block diagram schematically illustrating a structure of a computer device provided in an embodiment of the present application;

fig. 5 is a block diagram schematically illustrating a structure of a storage medium according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

As shown in fig. 1, an embodiment of the present application provides a method for sweeping by a sweeper, including the following steps:

and S101, cleaning along the wall of the room until a closed area is formed on the traveling route, and obtaining an area to be cleaned.

In this embodiment, the sweeper has an acceleration or speed detection sensor and also has a direction (geomagnetic) detection sensor, i.e., capable of detecting speed and direction of travel. In addition, the sweeper has a distance detection sensor (or a proximity sensor) which can detect at least the state that the left and right side edges of the sweeper are close to the obstacle.

After starting the automatic sweeping function of the sweeper, the sweeper moves towards a preset direction to touch a wall, as shown in fig. 2, at an initial moment, the sweeper is located indoors and moves along the direction of a path a in the drawing, wherein as long as the sweeper touches an obstacle, the obstacle is assumed to be the wall, then the assumption is verified, if the obstacle is a non-continuous edge or a continuous edge, and the area of an area surrounded by the continuous edge is smaller than the preset area, the previous assumption is determined to be wrong, and then the assumption is restarted to be the wall when the edge is touched, and if the edge is the continuous edge, and the area of the area surrounded by the continuous edge is larger than or equal to the preset area, the previous assumption is determined to be correct. In the embodiment of the invention, when the sweeper is supposed to touch the wall, timing is started and the travelling direction and speed are recorded, the distance between the sweeper and the wall is monitored through the distance detection sensors at the left side edge and the right side edge, the travelling direction is adjusted in real time, the distance between the sweeper and the wall is ensured to be smaller than or equal to a set value, the sweeper is enabled to walk along the wall edge, the travelling time and speed of a fixed direction angle are converted into the travelling distance, and the travelling distance and the direction angle are recorded.

When the right side of the sweeper moves close to the wall, if the distance from the right side to the wall exceeds a set value at a certain moment, the sweeper moves towards the right side until the distance from the right side to the wall is smaller than or equal to the set value, and then the sweeper moves forwards. On the contrary, when the left side of the sweeper moves close to the wall, if the distance from the left side to the wall exceeds the set value at a certain moment, the sweeper moves towards the left side until the distance from the left side to the wall is smaller than or equal to the set value, and then the sweeper moves forwards. The above process is repeated until the path of the sweeper is formed into a closed planar pattern (i.e., a closed area). Illustratively, the enclosed area formed by segment B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R in fig. 2 is the largest area of the room to be cleaned.

And S102, cleaning the area to be cleaned and recording the cleaned area.

Specifically, the step of cleaning the area to be cleaned includes:

and cleaning the area to be cleaned according to a zigzag route advancing mode.

In this embodiment, the sweeper cleans the region to be cleaned according to the nearest edge-to-edge straight-line distance in the preset range according to the zigzag path, as shown in fig. 2, in the region to be cleaned between the P line segment and the RB line segment, the region to be cleaned is cleaned back according to the zigzag path, and the cleaned region is recorded at the same time. The preset range may be, for example, a range within 1 meter to 5 meters, and if the edge-to-edge straight distance is too long, the sweeper is prone to deviation, and if the edge-to-edge straight distance is too short, the sweeping speed is affected by too many times of turning back.

Step S103, detecting whether an obstacle exists in real time in the cleaning process.

In the process of cleaning the area to be cleaned, the sweeper detects whether an obstacle exists in front of the cleaning route.

And step S104, if so, cleaning along the edge of the obstacle, recording the area of the obstacle, and obtaining the area of the obstacle.

If the obstacle is detected to be present, the cleaning task is altered to clean along the obstacle, and the area of the obstacle is recorded to obtain the area of the obstacle. The area of the obstacle may be recorded by marking the area from the start of cleaning along the edge of the obstacle to obtain a starting point, drawing a boundary line from the starting point while the edge of the obstacle is being cleaned until the end point of the boundary line coincides with the starting point to obtain a closed area, which is an obstacle area.

Specifically, sweeping is performed along the edge of the obstacle.

And step S105, calculating an uncleaned area according to the area to be cleaned, the cleaned area and the obstacle area.

The sweeper stores the area to be cleaned, the area to be cleaned and the obstacle area, and can calculate the area not to be cleaned, specifically, the area not to be cleaned is the area to be cleaned- (the area to be cleaned + the obstacle area).

And S106, cleaning the non-cleaned area, updating the cleaned area, and returning to the step of detecting whether the obstacles exist in real time in the cleaning process until the non-cleaned area does not exist.

And after the non-cleaned area is obtained through calculation, the cleaning path is planned again, a new cleaning task is generated, and the non-cleaned area is cleaned. During the cleaning of the non-cleaned area, a new cleaned area is also recorded, the cleaned area is updated in the area to be cleaned, and the presence of obstacles is detected until the non-cleaned area is absent.

In the present embodiment, after step S106, the method includes:

and generating a cleaning area map according to the area to be cleaned and the obstacle area and storing the cleaning area map.

After completion of cleaning of the area to be cleaned, an obstacle area is marked in the area to be cleaned, a cleaning area map is generated, and is saved. When the sweeper is used for sweeping next time, the sweeping machine can directly sweep according to a sweeping area map.

After step S103, comprising:

if not, the cleaning of the non-cleaned area is continued. If no obstacle is detected, the planned cleaning task remaining before is continued, i.e. the cleaning of the non-cleaned area is continued, in which case the non-cleaned area is the area to be cleaned-the cleaned area. And after the cleaning task of the non-cleaned area is continuously executed, returning to the step S103 to continuously detect whether the obstacles exist in real time, and finally generating and storing a cleaning area map according to the area to be cleaned after the cleaning is finished.

In this embodiment, after the step of generating and storing a cleaning area map based on the area to be cleaned and the obstacle area, the method includes:

detecting whether the mobile phone is moved;

if not, cleaning according to the cleaning area map when a cleaning command is received;

if yes, returning to execute the cleaning along the wall of the room when a cleaning command is received until a closed area is formed on the traveling route, and obtaining an area to be cleaned.

After the cleaning area map is stored, whether the cleaning device has moved or not is detected, and if the cleaning device has not moved, cleaning is performed according to the cleaning area map at the next cleaning. If the cleaning area is moved, cleaning according to the cleaning area map cannot be performed at the next cleaning, and the area to be cleaned is acquired again, that is, the above steps S101 to S105 are executed again.

The step of detecting whether the mobile terminal is moved comprises:

detecting the distance between the mobile phone and the ground to obtain a first distance;

judging whether the first distance is greater than a preset distance;

if yes, judging that the mobile terminal is moved;

if not, the mobile terminal judges that the mobile terminal is not moved.

And judging whether the mobile phone is moved or not according to the distance between the mobile phone and the ground.

In this embodiment, the step of performing cleaning in accordance with the cleaning area map when the cleaning command is received includes:

detecting whether an obstacle in any of the obstacle regions is eliminated;

if so, marking the obstacle area with the obstacle eliminated to obtain a first area to be changed;

cleaning the first area to be changed according to a zigzag route advancing mode;

and removing the obstacle area corresponding to the first area to be changed from the pre-recorded obstacle areas so as to update the cleaning area map.

The method comprises the steps of cleaning according to a cleaning area map, simultaneously detecting obstacles of obstacle areas, marking the obstacle area corresponding to a certain obstacle if the obstacle is eliminated, namely marking the obstacle area with the eliminated obstacle to obtain a first area to be changed, wherein the first area to be changed belongs to an area which is not cleaned, and cleaning the first area to be changed. Specifically, the cleaning is performed in a zigzag path traveling manner. In order to use the cleaning area map more accurately in the following, since a certain obstacle is eliminated, the cleaning area map needs to be updated, and among the obstacle areas recorded in advance, the obstacle area corresponding to the first area to be changed is eliminated, and then the updated cleaning area map is obtained.

In this embodiment, after the step of performing cleaning in accordance with the cleaning area map when the cleaning command is received, the method includes:

detecting whether a newly added obstacle exists in the area to be cleaned;

if so, cleaning along the edge of the newly added obstacle, and recording the area of the newly added obstacle to obtain a second area to be changed;

and determining the second area to be changed as a newly added obstacle area, and updating the cleaning area map according to the newly added obstacle area.

And when cleaning is carried out according to the cleaning area map, detecting the area to be cleaned, detecting whether a new obstacle exists, if so, cleaning the area corresponding to the new obstacle in a way of advancing according to a zigzag route, cleaning along the edge of the new obstacle, recording the area of the new obstacle, and obtaining a second area to be changed. In order to use the cleaning area map more accurately in the following process, the cleaning area map needs to be updated because new obstacles exist in the area to be cleaned, so that the second area to be changed is determined as a new obstacle area, the cleaning area map is updated according to the new obstacle area, and then the updated cleaning area map is obtained. In this embodiment, after the step of generating and storing a cleaning area map based on the area to be cleaned and the obstacle area, the method includes:

detecting whether a shutdown command is executed or not;

if yes, clearing the cleaning area map;

and returning to execute the cleaning along the wall of the room until a closed area is formed by the traveling route when the machine is restarted and the cleaning command is received, and obtaining the area to be cleaned.

And automatically clearing a map of the cleaning area after the sweeper is shut down, and acquiring the area to be cleaned again after cleaning is performed next time, namely performing cleaning along the wall of the room until a closed area is formed on the traveling route to obtain the area to be cleaned.

In conclusion, the sweeper cleans along the wall of a room to obtain a to-be-cleaned area, cleans the to-be-cleaned area, cleans along an obstacle if the obstacle in the to-be-cleaned area exists, and cleans the to-be-cleaned area until the to-be-cleaned area does not exist, and the sweeper aims to solve the problems that an existing sweeping robot is unreasonable in path planning, and has missing sweeping or repeated sweeping in some areas and low cleaning efficiency.

As shown in fig. 3, the embodiment of the present application provides a device 1 for sweeping by a sweeper, where the device 1 includes a sweeping module 11, a first recording module 12, a detecting module 13, a second recording module 14, a calculating module 15, and an executing module 16.

And the cleaning module 11 is used for cleaning along the wall of the room until a closed area is formed on the traveling route, so that an area to be cleaned is obtained.

In this embodiment, the sweeper has an acceleration or speed detection sensor and also has a direction (geomagnetic) detection sensor, i.e., capable of detecting the direction and speed of travel. In addition, the sweeper has a distance detection sensor (or a proximity sensor) which can detect at least the state that the left and right side edges of the sweeper are close to the obstacle.

After starting the automatic sweeping function of the sweeper, the sweeper moves towards a preset direction to touch a wall, as shown in fig. 2, at an initial moment, the sweeper is located indoors and moves along the direction of a path a in the drawing, wherein as long as the sweeper touches an obstacle, the obstacle is assumed to be the wall, then the assumption is verified, if the obstacle is a non-continuous edge or a continuous edge, and the area of an area surrounded by the continuous edge is smaller than the preset area, the previous assumption is determined to be wrong, and then the assumption is restarted to be the wall when the edge is touched, and if the edge is the continuous edge, and the area of the area surrounded by the continuous edge is larger than or equal to the preset area, the previous assumption is determined to be correct. In the embodiment of the invention, when the sweeper is supposed to touch the wall, timing is started and the travelling direction and speed are recorded, the distance between the sweeper and the wall is monitored through the distance detection sensors at the left side edge and the right side edge, the travelling direction is adjusted in real time, the distance between the sweeper and the wall is ensured to be smaller than or equal to a set value, the sweeper is enabled to walk along the wall edge, the travelling time and speed of a fixed direction angle are converted into the travelling distance, and the travelling distance and the direction angle are recorded.

When the right side of the sweeper moves close to the wall, if the distance from the right side to the wall exceeds a set value at a certain moment, the sweeper moves towards the right side until the distance from the right side to the wall is smaller than or equal to the set value, and then the sweeper moves forwards. On the contrary, when the left side of the sweeper moves close to the wall, if the distance from the left side to the wall exceeds the set value at a certain moment, the sweeper moves towards the left side until the distance from the left side to the wall is smaller than or equal to the set value, and then the sweeper moves forwards. The above process is repeated until the path of the sweeper is formed into a closed planar pattern (i.e., a closed area). Illustratively, the enclosed area formed by segment B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R in fig. 2 is the largest area of the room to be cleaned.

And the first recording module 12 is used for cleaning the area to be cleaned and recording the cleaned area.

Specifically, the first recording module 12 includes:

and the first cleaning submodule is used for cleaning the area to be cleaned according to a zigzag route advancing mode.

In this embodiment, the sweeper cleans the region to be cleaned according to the nearest edge-to-edge straight-line distance in the preset range according to the zigzag path, as shown in fig. 2, in the region to be cleaned between the P line segment and the RB line segment, the region to be cleaned is cleaned back according to the zigzag path, and the cleaned region is recorded at the same time. The preset range may be, for example, a range within 1 meter to 5 meters, and if the edge-to-edge straight distance is too long, the sweeper is prone to deviation, and if the edge-to-edge straight distance is too short, the sweeping speed is affected by too many times of turning back.

And the detection module 13 is used for detecting whether an obstacle exists in real time in the cleaning process.

In the process of cleaning the area to be cleaned, the sweeper detects whether an obstacle exists in front of the cleaning route.

And a second recording module 14, configured to, if yes, perform cleaning along an edge of the obstacle, record an area of the obstacle, and obtain an obstacle area.

If the obstacle is detected to be present, the cleaning task is altered to clean along the obstacle, and the area of the obstacle is recorded to obtain the area of the obstacle.

The area of the obstacle may be recorded by marking the area from the start of cleaning along the edge of the obstacle to obtain a starting point, drawing a boundary line from the starting point while the edge of the obstacle is being cleaned until the end point of the boundary line coincides with the starting point to obtain a closed area, which is an obstacle area.

Specifically, sweeping is performed along the edge of the obstacle.

And the calculating module 15 is used for calculating an uncleaned area according to the area to be cleaned, the cleaned area and the obstacle area.

The sweeper stores the area to be cleaned, the area to be cleaned and the obstacle area, and can calculate the area not to be cleaned, specifically, the area not to be cleaned is the area to be cleaned- (the area to be cleaned + the obstacle area).

And the execution module 16 is configured to clean the non-cleaned area, update the cleaned area, and return to the step of detecting whether an obstacle exists in real time in the cleaning process until the non-cleaned area does not exist.

And after the non-cleaned area is obtained through calculation, the cleaning path is planned again, a new cleaning task is generated, and the non-cleaned area is cleaned. During the cleaning of the non-cleaned area, a new cleaned area is also recorded, the cleaned area is updated in the area to be cleaned, and the presence of obstacles is detected until the non-cleaned area is absent.

In the present embodiment, the apparatus 1 comprises:

and the map module is used for generating and storing a cleaning area map according to the area to be cleaned and the obstacle area.

After completion of cleaning of the area to be cleaned, an obstacle area is marked in the area to be cleaned, a cleaning area map is generated, and is saved. When the sweeper is used for sweeping next time, the sweeping machine can directly sweep according to a sweeping area map.

The apparatus 1 comprises:

and the first cleaning module is used for continuously cleaning the non-cleaned area if the obstacle is not detected.

If no obstacle is detected, the planned cleaning task remaining before is continued, i.e. the cleaning of the non-cleaned area is continued, in which case the non-cleaned area is the area to be cleaned-the cleaned area. And after the cleaning task of the non-cleaned area is continuously executed, returning to the step S103 to continuously detect whether the obstacles exist in real time, and finally generating and storing a cleaning area map according to the area to be cleaned.

In this embodiment, the apparatus 1 further comprises:

the first detection module is used for detecting whether the mobile phone is moved or not;

the second cleaning module is used for cleaning according to the cleaning area map when a cleaning command is received if the cleaning command is not received;

and the third cleaning module is used for returning to execute the step of cleaning along the wall of the room until a closed area is formed on the traveling route to obtain the area to be cleaned if the cleaning command is received.

After the cleaning area map is stored, whether the cleaning device has moved or not is detected, and if the cleaning device has not moved, cleaning is performed according to the cleaning area map at the next cleaning. If the mobile robot is moved, cleaning according to the cleaning area map cannot be performed at the next cleaning, and the area to be cleaned is acquired again, that is, the steps executed by the cleaning module 11, the first recording module 12, the detection module 13, the second recording module 14 and the calculation module 15 are returned to be executed.

The first detection module includes:

the first detection submodule is used for detecting the distance between the first detection submodule and the ground to obtain a first distance;

the first judgment submodule is used for judging whether the first distance is greater than a preset distance;

the first judgment submodule is used for judging that the mobile terminal is moved if the mobile terminal is in the first judgment submodule;

and the second judging submodule is used for judging that the mobile terminal is not moved if the mobile terminal is not moved.

And judging whether the mobile phone is moved or not according to the distance between the mobile phone and the ground.

In this embodiment, the second sweeping module includes:

a second detection submodule for detecting whether an obstacle of any of the obstacle regions is eliminated;

the marking submodule is used for marking the obstacle area with the obstacle eliminated if the obstacle area is the first area to be changed;

the second cleaning submodule is used for cleaning the first area to be changed according to a zigzag route advancing mode;

and the first updating submodule is used for eliminating the obstacle area corresponding to the first area to be changed in each pre-recorded obstacle area so as to update the cleaning area map.

The method comprises the steps of cleaning according to a cleaning area map, simultaneously detecting obstacles of obstacle areas, marking the obstacle area corresponding to a certain obstacle if the obstacle is eliminated, namely marking the obstacle area with the eliminated obstacle to obtain a first area to be changed, wherein the first area to be changed belongs to an area which is not cleaned, and cleaning the first area to be changed. Specifically, the cleaning is performed in a zigzag path traveling manner. In order to use the cleaning area map more accurately in the following, since a certain obstacle is eliminated, the cleaning area map needs to be updated, and among the obstacle areas recorded in advance, the obstacle area corresponding to the first area to be changed is eliminated, and then the updated cleaning area map is obtained.

In this embodiment, the apparatus 1 further comprises:

a third detection submodule, configured to detect whether a newly added obstacle exists in the area to be cleaned;

the sub-recording module is used for cleaning along the edge of the newly added obstacle if the new obstacle exists, and recording the area of the newly added obstacle to obtain a second area to be changed;

and the second updating submodule is used for determining the second area to be changed as a newly-added obstacle area and updating the cleaning area map according to the newly-added obstacle area.

And when cleaning is carried out according to the cleaning area map, detecting the area to be cleaned, detecting whether a new obstacle exists, if so, cleaning the area corresponding to the new obstacle in a way of advancing according to a zigzag route, cleaning along the edge of the new obstacle, recording the area of the new obstacle, and obtaining a second area to be changed. In order to use the cleaning area map more accurately in the following process, the cleaning area map needs to be updated because new obstacles exist in the area to be cleaned, so that the second area to be changed is determined as a new obstacle area, the cleaning area map is updated according to the new obstacle area, and then the updated cleaning area map is obtained.

In this embodiment, the apparatus 1 further comprises:

the third detection module is used for detecting whether the shutdown command is executed or not;

the first clearing module is used for clearing the cleaning area map if the cleaning area map is the first clearing module;

and the first execution submodule is used for returning and executing the step of cleaning along the wall of the room until a closed area is formed when the mobile terminal is restarted and a cleaning command is received, so that the step of obtaining the area to be cleaned is obtained.

And after restarting and the sweeper is shut down, automatically clearing the map of the cleaning area, and after cleaning next time, re-acquiring the area to be cleaned, namely, performing cleaning along the wall of the room until a closed area is formed on the traveling route to obtain the area to be cleaned.

In conclusion, the sweeper cleans along the wall of a room to obtain a to-be-cleaned area, cleans the to-be-cleaned area, cleans along an obstacle if the obstacle in the to-be-cleaned area exists, and cleans the to-be-cleaned area until the to-be-cleaned area does not exist, and the sweeper aims to solve the problems that an existing sweeping robot is unreasonable in path planning, and has missing sweeping or repeated sweeping in some areas and low cleaning efficiency.

As shown in fig. 4, the present application also provides a computer device 2, which includes a processor 21, a memory 22, and a computer program 23 stored on the memory 22 and operable on the processor 21, wherein the processor 21 executes the computer program 23 to implement any one of the above-mentioned methods for cleaning a sweeper.

As shown in fig. 5, the present application also proposes a storage medium 3, on which a computer program 31 is stored, wherein the computer program 31 is executed to implement the method of sweeping by the sweeper.

In the above embodiments, the computer device 2 may be a server, the processor 21 of the computer device 2 is used to provide computing and control capabilities, and the memory 22 of the computer device 2 includes a nonvolatile storage medium and an internal memory. The nonvolatile storage medium stores a computer program 23. The internal memory provides an environment for the execution of the computer program 23 in the nonvolatile storage medium. The computer program 31 is executed by the processor 51 to implement a method of sweeper cleaning.

The storage medium 3 may be any available medium that a computer can store or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others. The computer program 31 comprises one or more computer instructions. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a storage medium or transmitted from one computer storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). When the computer instructions are loaded and executed on a computer, the sweeping method of the sweeper is realized.

The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于清扫机器人的扫洗组件和具有其的清扫机器人

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!