Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a flowchart illustrating an implementation of a method for controlling a window-cleaning robot to walk according to a first embodiment of the present invention, where an execution subject of the method for controlling a window-cleaning robot to walk in this embodiment is a window-cleaning robot.
In practical application, the method for controlling the window cleaning robot to walk provided by the embodiment of the invention can be applied to the window cleaning robot to clean scenes such as window glass and the like. The following mainly takes an example that the method for controlling the window cleaning robot to walk is applied to a scene that the window cleaning robot cleans window glass, and the method for controlling the window cleaning robot to walk provided by the embodiment of the invention is described in detail.
The method for controlling the window cleaning robot to walk as shown in fig. 1 may include the following steps:
step S101, walking along a first boundary of a rectangular working area, and detecting whether a first boundary sensor arranged on the front side of a body of the window cleaning robot and close to the first boundary triggers a boundary signal.
Before the window glass to be cleaned is cleaned, the area to be cleaned of the window glass to be cleaned is determined, and the area to be cleaned of the window glass to be cleaned is the area formed by the boundaries of all cliffs of the glass to be cleaned. In practice, the region to be cleaned of the window pane to be cleaned is usually a regular rectangular working area, wherein the cliff boundary of the rectangular working area may comprise a vertical cliff boundary and a horizontal cliff boundary. In the embodiment of the present invention, when the window-cleaning robot cleans the rectangular work area, the window-cleaning robot generally performs a welting travel along a certain cliff boundary in such a manner that the motion direction of the window-cleaning robot is parallel to and close to the cliff boundary of the rectangular work area, and cleans the area close to the boundary. If the window cleaning robot moves to the second boundary, the window cleaning robot should finish the cleaning action by walking along the first boundary, so the window cleaning robot needs to detect the second boundary of the rectangular working area according to the first boundary sensor arranged at the front side of the body of the window cleaning robot, and the first boundary sensor triggers the boundary signal when detecting any boundary of the rectangular working area.
When the window cleaning robot walks along the first boundary of the rectangular working area, the window cleaning robot detects whether a first boundary sensor arranged on the front side of the body of the window cleaning robot and close to the first boundary triggers a boundary signal, wherein the window cleaning robot specifically detects whether the first boundary sensor triggers the boundary signal on the first boundary or the second boundary, and the purpose of the window cleaning robot is to avoid moving out of the first boundary or the second boundary.
And step S102, if yes, stopping advancing, and backing in a mode that the speed of the travelling wheels close to the first boundary is greater than that of the travelling wheels far away from the first boundary.
In step S102, when the window cleaning robot moves along the first boundary to the second boundary, generally, the window cleaning robot adjusts the body orientation to be parallel to the first boundary by rotating, so as to facilitate moving cleaning towards the second boundary, because when the window cleaning robot detects the boundary signal triggered by the first boundary sensor, there are two cases that the first boundary sensor is a signal triggered at the first boundary and a signal triggered at the second boundary; when the first boundary sensor triggers a signal at the second boundary, all areas close to the first boundary are cleaned completely, and at this time, the window cleaning robot can finish the action of walking along the first boundary to clean, but when the first boundary sensor triggers a signal at a certain position in the middle of the first boundary, the window cleaning robot needs to continue walking along the first boundary to clean the areas close to the first boundary, and can only ensure to clean all areas close to the first boundary. Therefore, when the window cleaning robot detects that the first boundary sensor triggers the boundary signal, the window cleaning robot stops advancing and retreats in a mode that the speed of the walking wheels close to the first boundary is greater than that of the walking wheels far away from the first boundary, at the moment, the window cleaning robot is far away from the first boundary in an arc moving mode, and an included angle exists between the body of the window cleaning robot and the first boundary along with the movement of the window cleaning robot.
Step S103, detecting whether an included angle between the machine body and the first boundary reaches a preset angle or not, if so, stopping retreating, and adjusting the orientation of the machine body to be parallel to the first boundary and then walking along the first boundary.
In step S103, the window cleaning robot detects whether the included angle between the body and the first boundary reaches a preset angle, and when the window cleaning robot detects that the included angle between the body and the first boundary reaches the preset angle, the window cleaning robot stops moving back, and controls to adjust the body orientation to be parallel to the first boundary in a manner of in-situ rotation, so as to prevent the window cleaning robot from falling from the first boundary, and facilitate the window cleaning robot to continue to move toward the second boundary in a manner of welting, and further to move and clean the area close to the first boundary, it should be noted that the window cleaning robot obtains the included angle between the body and the first boundary of the window cleaning robot through an angle detection device disposed on the window cleaning robot, and controls the window cleaning robot to adjust the body orientation to be parallel to the first boundary in a manner of in-situ rotation, where the angle detection device may be a gyroscope, the orientation of the machine body is adjusted to be parallel to the first boundary in a pivot rotating mode through control, so that the window cleaning robot walks along the first boundary, and the uncleaned area close to the first boundary is continuously cleaned in a moving mode.
Step S104, detecting whether the first boundary sensor triggers a boundary signal within a preset time or within a preset moving distance, and if so, judging that the first boundary sensor currently moves to a second boundary adjacent to the first boundary.
In step S104, the preset time is a smaller time value, and when the window cleaning robot continues to move along the first boundary, the window cleaning robot can only move a smaller distance within the time, where the device for detecting time may be a clock. When the window-cleaning robot detects the boundary signal triggered by the first boundary sensor for the first time, it cannot be determined whether the boundary signal corresponds to the first boundary or the second boundary. When the window cleaning robot continues to walk along the first boundary in a welting mode for cleaning, if the window cleaning robot detects that the first boundary sensor triggers the boundary signal again within the preset time, the boundary signal triggered by the first boundary sensor is detected as the boundary signal corresponding to the second boundary for the first time by the window cleaning robot, so that the boundary signal triggered by the first boundary sensor can be detected again within the preset time, and therefore the window cleaning robot can be judged to move to the second boundary currently; it should be noted that the window cleaning robot may also determine whether to trigger a boundary signal within a preset moving distance by determining the moving distance, where the device for detecting the distance may specifically be an odometer; when detecting whether the first boundary sensor triggers a boundary signal within a preset time or within a preset moving distance, the detection may be specifically performed by a comparator provided in the window-cleaning robot. When the window cleaning robot judges that the window cleaning robot moves to the second boundary at present, the window cleaning robot finishes the action of walking along the first boundary, so that the window cleaning robot can clean all areas close to the first boundary, the window cleaning robot can comprehensively clean the areas needing to be cleaned, and the cleaning effect is obviously improved. If the boundary signal triggered by the first boundary sensor is not detected within the preset time or within the preset moving distance, it indicates that the boundary signal triggered by the first boundary sensor detected by the window cleaning robot for the first time is the boundary signal corresponding to the first boundary.
Further, step S104 includes:
recording the times of triggering the boundary signal by the first boundary sensor within a preset time or within a preset moving distance;
and if the times are greater than the preset times, judging that the mobile terminal is moved to the second boundary currently.
In order to accurately determine whether the window-cleaning robot reaches the second boundary, the number of times of the boundary signal triggered by the first boundary sensor can be recorded, and when the number of times of the boundary signal triggered by the first boundary sensor is detected within preset time or within a preset moving distance, the window-cleaning robot is controlled to stop advancing and retreat in a mode that the speed of the travelling wheel close to the first boundary is greater than that of the travelling wheel far away from the first boundary; if the window cleaning robot detects that the included angle between the machine body and the first boundary is a preset angle, stopping moving backwards, adjusting the orientation of the machine body to be parallel to the first boundary, continuously walking along the first boundary to move for cleaning, detecting whether the first boundary sensor triggers a boundary signal within preset time or within a preset moving distance, if the window cleaning robot detects that the first boundary sensor triggers the boundary signal within preset time or within the preset moving distance, continuously recording the number of times of the boundary signal triggered by the first boundary sensor, and when the recorded number of times is still smaller than the preset number of times, continuously repeating the steps. It should be noted that, even if the above steps are repeated for a plurality of times when the window-cleaning robot has moved to the second boundary, the first boundary sensor disposed at the front end of the body will always trigger the boundary signal corresponding to the second boundary when the first boundary sensor reaches the second boundary, so that comparing the recorded times with the preset times can accurately determine whether the window-cleaning robot reaches the second boundary. When the recorded times are greater than the preset times, the window cleaning robot finishes the action of walking and cleaning along the first boundary welt, wherein the preset times can be set to two times or three times, so that the window cleaning robot can finish the action of walking and cleaning along the first boundary welt after cleaning is finished while ensuring that all areas close to the first boundary are cleaned by the window cleaning robot. In addition, when the window cleaning robot needs to carry out welting walking cleaning on other boundaries of the rectangular working area, the window cleaning robot can clear the recorded times to zero at the moment, so that the window cleaning robot can record the times again conveniently.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating an implementation of a method for controlling a window-cleaning robot to walk according to a second embodiment of the present invention. The present embodiment is different from the previous embodiment in that the present embodiment further includes steps S201 to S203 before step S101. In step S201, when the window cleaning robot walks along the first boundary of the rectangular working area while being attached to the side, and the window cleaning robot detects a second boundary sensor which is arranged on the front side of the body of the window cleaning robot and is far away from the first boundary, step S202 is executed, otherwise, steps S203 to S207 are executed. Steps S204 to S207 are the same as steps S101 to S104 in the previous embodiment, and please refer to the description related to steps S101 to S104 in the previous embodiment, which is not described herein again. S201 to S203 are specifically as follows:
s201, walking along the first boundary of the rectangular working area, and detecting whether a second boundary sensor arranged on the front side of the body of the window cleaning robot and far away from the first boundary triggers a boundary signal.
S202, if yes, the current mobile terminal is judged to be moved to the second boundary.
And S203, if not, judging that the condition of detecting whether a first boundary sensor arranged on the front side of the body of the window cleaning robot close to the first boundary triggers a boundary signal is reached.
When the window cleaning robot walks along the first boundary of the rectangular working area, namely the window cleaning robot walks along the first boundary and moves towards the second boundary to clean the area close to the first boundary, the window cleaning robot detects whether a second boundary sensor far away from the first boundary triggers a boundary signal or not from the front side of the machine body. When the window cleaning robot detects a boundary signal triggered by the second boundary sensor, the window cleaning robot inevitably explains that the window cleaning robot is arranged at the front side of the body of the window cleaning robot and reaches the second boundary, so that the window cleaning robot currently moves to the second boundary, and the window cleaning robot finishes cleaning the area close to the first boundary, and therefore the window cleaning robot finishes the action of walking along the first boundary.
And if the window-cleaning robot does not detect the boundary signal triggered by the second boundary sensor, judging that the condition that whether the boundary signal is triggered by the first boundary sensor which is arranged at the front side of the body of the window-cleaning robot and is close to the first boundary is reached, and detecting the boundary signal triggered by the first boundary sensor arranged on the window-cleaning robot by the window-cleaning robot, namely when the window-cleaning robot does not detect the boundary signal triggered by the second boundary sensor.
When the window cleaning robot walks along the first boundary and moves towards the second boundary to clean the area close to the first boundary, and the body of the window cleaning robot deviates to the first boundary or deviates to a fourth boundary parallel to the first boundary when the body of the window cleaning robot is not completely parallel to the first boundary due to other unexpected reasons; when the body of the window cleaning robot deviates to the first boundary, the window cleaning robot moves towards the second boundary, and the window cleaning robot drops from the first boundary.
Referring to fig. 3, fig. 3 is a schematic flow chart illustrating an implementation of a method for controlling a window cleaning robot to walk according to a third embodiment of the present invention. The difference between this embodiment and the previous embodiment is that the embodiment further includes steps S301 to S302 before step S101, and steps S303 to S306 are the same as steps S101 to S104 in the previous embodiment, and reference is specifically made to the description related to steps S101 to S104 in the previous embodiment, which is not repeated herein. S301 to S302 are specifically as follows:
s301, rotating the body in situ until the body is parallel to the perpendicular line of the first boundary, and moving the body towards the first boundary.
S302, if the first boundary sensor or the second boundary sensor is detected to trigger a boundary signal, stopping moving, adjusting the orientation of the machine body to be parallel to the first boundary of the rectangular working area, and walking along the first boundary.
When the window cleaning robot needs to walk along the first boundary of the rectangular working area and move towards the second boundary to clean the area close to the first boundary, the body of the window cleaning robot needs to face the direction parallel to the first boundary and the body of the window cleaning robot is close to the first boundary. Therefore, before the window cleaning robot walks along the first boundary and moves towards the second boundary to clean the area close to the first boundary, the window cleaning robot needs to rotate in situ until the body of the window cleaning robot is parallel to the perpendicular line of the first boundary, so as to move towards the first boundary along the direction parallel to the perpendicular line of the first boundary.
When the window cleaning robot moves towards the first boundary along the direction parallel to the perpendicular line of the first boundary, if the first boundary sensor or the second boundary sensor is detected to trigger a boundary signal, the window cleaning robot reaches the first boundary, and at the moment, the window cleaning robot stops moving to adjust the body direction to be parallel to the first boundary of the rectangular working area and walks along the first boundary.
Preferably, in order to enable the window cleaning robot to be closer to the first boundary, the window cleaning robot further travels to a state of traveling along the first boundary of the rectangular working area by the following traveling manner, referring to fig. 4, fig. 4 is a schematic diagram of the movement of the window cleaning robot in the third embodiment of the present invention, and the traveling manner is specifically described according to the schematic diagram of the movement of the window cleaning robot in fig. 4. When the window cleaning robot walks along the first boundary close to the edge and moves towards the second boundary to clean the area close to the first boundary, the body of the window cleaning robot needs to face the direction parallel to the first boundary and the body of the window cleaning robot is close to the first boundary. Therefore, before the window cleaning robot walks along the first boundary and moves towards the second boundary to clean the area close to the first boundary, the window cleaning robot needs to rotate in situ until the body of the window cleaning robot is parallel to the perpendicular line of the first boundary, so as to move towards the first boundary along the direction parallel to the perpendicular line of the first boundary.
When the window cleaning robot moves towards the first boundary along the direction parallel to the perpendicular line of the first boundary, if the first boundary sensor or the second boundary sensor is detected to trigger a boundary signal, the window cleaning robot reaches the first boundary, the window cleaning robot stops moving at the moment, and stops moving after retreating for a preset distance along the perpendicular line of the first boundary, and the purpose of retreating for the preset distance is to enable the window cleaning robot to have a certain distance from the first boundary, so that the window cleaning robot can conveniently enter a state that the body of the window cleaning robot faces the direction parallel to the first boundary and the body of the window cleaning robot is close to the first boundary.
Thus, the window wiping robot will now advance at a speed which is lower on one side than on the other side, moving in an arcuate movement towards the first and second boundaries. When the window cleaning robot detects that the body orientation is parallel to the first boundary, the body orientation of the window cleaning robot is parallel to the perpendicular direction of the second boundary at the moment. It should be noted that, the distance from the body of the window cleaning robot to the first boundary is still larger, and in order to get closer to the first boundary, after the window cleaning robot detects that the body is oriented parallel to the first boundary, the window cleaning robot stops moving and retreats in a manner that the speed of the traveling wheel close to the first boundary is smaller than that of the traveling wheel far away from the first boundary, at this time, the rear end position of the window cleaning robot approaches the first boundary in an arc-line moving manner. It should be noted that the third boundary sensor is disposed at the rear side of the window cleaning robot body, the third boundary sensor is adjacent to the first boundary, the window cleaning robot detects whether the third boundary sensor at the rear side of the window cleaning robot body near the first boundary triggers a boundary signal, when the third boundary sensor detects a trigger detection signal, it indicates that the boundary sensor at the rear side of the window cleaning robot body near the first boundary detects the boundary signal of the first boundary, and at this time, the window cleaning robot moves out of the first boundary. At the moment, the window cleaning robot stops moving and rotates in situ, the orientation of the machine body is adjusted to be parallel to the first boundary, and the distance from the machine body to the first boundary is smaller in the mode, so that the window cleaning robot can be closer to the first boundary, and the effect of completely cleaning the area close to the first boundary is ensured.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The embodiment of the invention also provides a window cleaning robot, which comprises a first boundary sensor and a second boundary sensor, wherein the first boundary sensor and the second boundary sensor are positioned at two sides of the front end of the body of the window cleaning robot and are used for triggering boundary signals.
And the two traveling wheels are used for controlling the window cleaning robot to move forwards or backwards in the rectangular working area.
And the gyroscope is used for detecting included angles between the body of the window cleaning robot and each boundary of the rectangular working area.
And the detection device is used for detecting the walking time or the walking distance of the window cleaning robot. The window cleaning robot is configured to execute the steps in the foregoing embodiment, and please refer to the related description in the foregoing embodiment, which is not described herein again.
According to the scheme, the window cleaning robot walks along the first boundary of the rectangular working area, and detects whether a first boundary sensor arranged on the front side of the body of the window cleaning robot and close to the first boundary triggers a boundary signal or not; if so, stopping advancing, and backing in a mode that the speed of the travelling wheels close to the first boundary is greater than that of the travelling wheels far away from the first boundary; detecting whether an included angle between the machine body and the first boundary reaches a preset angle or not, if so, stopping retreating, adjusting the orientation of the machine body to be parallel to the first boundary, and then walking along the first boundary; whether the first boundary sensor triggers a boundary signal within a preset time or within a preset moving distance is detected, if yes, it is judged that the first boundary sensor moves to a second boundary adjacent to the first boundary at present, and the window cleaning robot finishes the action of walking along the first boundary, so that the window cleaning robot can clean all areas close to the first boundary, the window cleaning robot can clean the areas needing to be cleaned comprehensively, and the cleaning effect is improved remarkably. If the boundary signal triggered by the first boundary sensor is not detected within the preset time or within the preset moving distance, it indicates that the boundary signal triggered by the first boundary sensor is detected by the window-cleaning robot for the first time as the boundary signal corresponding to the first boundary.
Fig. 5 is a schematic view of a window cleaning robot according to a fourth embodiment of the present invention. As shown in fig. 5, the window wiping robot 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50, such as a program for controlling a method of walking a window wiping robot. The processor 50, when executing the computer program 52, implements the steps in the above-described embodiments of the method for controlling the walking of the window-cleaning robot, such as the steps S101 to S104 shown in fig. 1. Alternatively, the processor 50 implements the functions in the embodiments of the window wiping robot described above when executing the computer program 52.
Illustratively, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the window-wiping robot 5.
The window wiping robot 5 may include, but is not limited to, a processor 50 and a memory 51. It will be appreciated by those skilled in the art that fig. 5 is merely an example of the window wiping robot 5, and does not constitute a limitation of the window wiping robot 5, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device may further include an input-output device, a network access device, a bus, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the window cleaning robot 5, such as a hard disk or a memory of the window cleaning robot 5. The memory 51 may also be an external storage device of the window cleaning robot 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the window cleaning robot 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the window-wiping robot 5. The memory 51 is used for storing the computer program and other programs and data required by the window-cleaning robot. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed window-cleaning robot and method may be implemented in other ways. For example, the above-described window-cleaning robot embodiments are merely illustrative, and for example, the division of the modules or units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the above embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.