Embodiments of the present disclosure relate to the technical field of control of swimming pool cleaning robots, and in particular, relate to a method and apparatus for return control of a swimming pool cleaning robot, and an electronic device and a computer storage medium thereof.
A swimming pool cleaning robot is developed for cleaning a swimming pool. The swimming pool cleaning robot may establish a map for the swimming pool corresponding to a work area of the swimming pool, and do cleaning for walls and bottom of the swimming pool on the basis of the map for the swimming pool.
In the related art, the swimming pool cleaning robot, upon completing a swimming pool map creation task and/or a swimming pool cleaning task, may reside at a random position in a swimming pool. In this case, it is possible that the swimming pool cleaning robot resides in central waters in the swimming pool. In addition, in the course of performing the swimming pool map creation task and/or the swimming pool cleaning task by the swimming pool cleaning robot, due to power insufficiency, a filter basket of the swimming pool cleaning robot may be clogged or the swimming pool cleaning robot may encounter an abrupt fault, and in this case, the swimming pool cleaning robot may reside in the central waters in the swimming pool due to exceptional interruption of the ongoing task. As a result, it is difficult to retrieve the swimming pool cleaning robot.
Therefore, an improved automatic return technique is desired for the swimming pool cleaning robot to retrieve the swimming pool cleaning robot.
To address the above technical problem, embodiments of the present disclosure provide a technique for return control of a swimming pool cleaning robot, which may at least partially solve the above technical problem.
According to one aspect of the present disclosure, a method for return control of a swimming pool cleaning robot is provided. The method includes: in response to a trigger of a return instruction, acquiring a current position of the swimming pool cleaning robot in a map fora swimming pool; and generating a return path according to a reachable block in the map for the swimming pool, a predetermined return position, and the current position, and controlling the swimming pool cleaning robot to return from the current position to the predetermined return position on the basis of the return path.
In one or more embodiments, the method further includes: determining the predetermined return position according to one of an initial position of the swimming pool cleaning robot, a position of a charging post for the swimming pool cleaning robot, and a designated position in the swimming pool.
In one or more embodiments, the initial position of the swimming pool cleaning robot is determined by: determining the initial position of the swimming pool cleaning robot according to a position at a bottom of the swimming pool to which the swimming pool cleaning robot freely sinks; or controlling the swimming pool cleaning robot to move, in response to a move instruction, to the designated position relative to the bottom of the swimming pool, and determining the designated position as the initial position of the swimming pool cleaning robot.
In one or more embodiments, the map for the swimming pool including the reachable block is generated by: determining a central position of the map for the swimming pool according to the initial position; generating, according to the central position, the map for the swimming pool covering a work area of the swimming pool and including a plurality of grid blocks; and controlling the swimming pool cleaning robot to move relative to the map for the swimming pool in the work area of the swimming pool, and determining each grid block reachable by the swimming pool cleaning robot in the map for the swimming pool as the reachable block.
In one or more embodiments, generating the return path according to the reachable block in the map for the swimming pool, the predetermined return position, and the current position, and controlling the swimming pool cleaning robot to return from the current position to the predetermined return position on the basis of the return path include: determining, according to the predetermined return position, the grid block corresponding to the predetermined return position in the map for the swimming pool as a return block; determining, according to the current position of the swimming pool cleaning robot, the grid block corresponding to the current position in the map for the swimming pool as a current block; generating, according to each reachable block in the map for the swimming pool, the return block, and the current block, the return path for moving from the current block to the return block; and controlling the swimming pool cleaning robot to move, on the basis of the return path, from the current block to the return block through at least one reachable block in the map for the swimming pool.
In one or more embodiments, generating, according to each reachable block in the map for the swimming pool, the return block, and the current block, the return path for moving from the current block to the return block includes: generating, according to each reachable block in the map for the swimming pool, the return block, and the current block, a shortest movement path between the current block and the return block by using a predetermined path-finding algorithm, and determining the shortest movement path as the return path.
In one or more embodiments, the predetermined path-finding algorithm includes an A-STAR algorithm.
In one or more embodiments, the trigger of the return instruction includes a system automatic trigger in response to fulfillment of a predetermined rule, or a manual trigger in response to a man-machine interactive input.
In one or more embodiments, the system automatic trigger in response to fulfillment of the predetermined rule includes at least one of: a system automatic trigger in response to detecting that the swimming pool cleaning robot completes a predetermined task, a system automatic trigger in response to detecting that a current power amount of the swimming pool cleaning robot is lower than a predetermined power amount threshold, a system automatic trigger in response to detecting that a clogging degree of a filter basket of the swimming pool cleaning robot satisfies a predetermined clogging condition, a system automatic trigger in response to detecting that the swimming pool cleaning robot encounters a fault, and a system automatic trigger in response to detecting that a running duration of the swimming pool cleaning robot satisfies a predetermined duration.
According to another aspect of the present disclosure, an apparatus for return control of a swimming pool cleaning robot is provided. The apparatus includes: a current position determining module, configured to, in response to a trigger of a return instruction, acquire a current position of the swimming pool cleaning robot in a map for a swimming pool; and a return control module, configured to generate a return path according to a reachable block in the map for the swimming pool, a predetermined return position, and the current position, and control the swimming pool cleaning robot to return from the current position to the predetermined return position on the basis of the return path.
According to still another aspect of the present disclosure, an electronic device is provided. The electronic device includes: a processor; and a memory storing a program therein; wherein the program includes one or more instructions, and the processor, when executing the one or more instructions, is caused to perform the method as described above.
According to yet still another aspect of the present disclosure, a non-transitory computer-readable storage medium storing one or more computer instructions therein is provided, wherein the one or more computer instructions, when executed by a computer, cause the computer to perform the method as described above.
In the technical solutions of return control of the swimming pool cleaning robot according to the present disclosure, in response to the trigger of the return instruction, the swimming pool cleaning robot is controlled to return from the current position to the predetermined return position in the swimming pool based on the generated return path, such that the swimming pool cleaning robot is retrieved or charged at the predetermined return position. In this way, use smartness of the swimming pool cleaning robot is improved, development cost is reduced, and operations are simplified.
The accompanying drawings are merely for schematic description and demonstration of the present disclosure, instead of limiting the scope of the present disclosure.
Reference numerals and denotations thereof:
For clearer descriptions of the technical features, objectives, and the technical effects of the embodiments of the present disclosure, specific embodiments of the present disclosure are hereinafter described with reference to the accompanying drawings.
In this text, the term “exemplary” or “schematic” is used herein to mean “serving as an example, instance, or illustration,” and any illustration or embodiment described herein as “exemplary” shall not be necessarily construed as preferred or advantageous over other illustrations or embodiments.
For brevity, parts relevant to the present disclosure are merely illustrated in the drawings, and these parts do not denote the actual structure of the product. In addition, for brevity and ease of understanding, with respect to parts having the same structure or function in the drawings, one or more of these parts are illustratively drawn in the drawings, or one or more of these parts are marked.
A conventional swimming pool cleaning robot, upon completing a swimming pool map creation task and/or a swimming pool cleaning task, may reside at a random position in a swimming pool. In this case, it is possible that the swimming pool cleaning robot resides in central waters in the swimming pool. Alternatively, in the course of performing the swimming pool map creation task and/or the swimming pool cleaning task, due to power insufficiency, a filter basket of the swimming pool cleaning robot may be clogged or the swimming pool cleaning robot may encounter an abrupt fault, and in this case, the swimming pool cleaning robot may reside in the central waters in the swimming pool due to exceptional interruption of the ongoing task. As a result, it is difficult to retrieve the swimming pool cleaning robot.
Accordingly, the present disclosure provides an improved method and apparatus for return control of the swimming pool cleaning robot, and an electronic device and a computer storage medium thereof, which may solve the problems in the related art.
The specific embodiments of the present disclosure are described in detail hereinafter with reference to the accompanying drawings.
In step S102, a current position of the swimming pool cleaning robot in a map for a swimming pool is acquired in response to a trigger of a return instruction.
Optionally, the trigger of the return instruction includes a system automatic trigger in response to fulfillment of a predetermined rule, or a manual trigger in response to a man-machine interactive input.
In this embodiment, the system automatic trigger in response to fulfillment of the predetermined rule may include, but is not limited to: a system automatic trigger in response to detecting that the swimming pool cleaning robot completes a predetermined task, a system automatic trigger in response to detecting that a current power amount of the swimming pool cleaning robot is lower than a predetermined power amount threshold, a system automatic trigger in response to detecting that a clogging degree of a filter basket of the swimming pool cleaning robot satisfies a predetermined clogging condition, a system automatic trigger in response to detecting that the swimming pool cleaning robot encounters a fault, and a system automatic trigger in response to detecting that a running duration of the swimming pool cleaning robot satisfies a predetermined duration.
For example, in the case that the swimming pool cleaning robot completes one or more predetermined tasks in the swimming pool, generation of the return instruction is triggered.
Still for example, in the course of performing various tasks in the swimming pool by the swimming pool cleaning robot, generation of the return instruction is triggered in response to detecting that the current power amount of the swimming pool cleaning robot is lower than the predetermined power amount threshold, or detecting that the swimming pool cleaning robot encounters the fault, or detecting that the filter basket of the swimming pool cleaning robot is severely clogged.
Still for example, a predetermined running duration of the swimming pool cleaning robot may be defined. Generation of the return instruction is triggered in response to detecting that an actual running duration of the swimming pool cleaning robot satisfies the predetermined running duration.
In step S104, a return path is generated according to a reachable block in the map for the swimming pool, a predetermined return position, and the current position, and the swimming pool cleaning robot is controlled to return from the current position to the predetermined return position on the basis of the return path.
Optionally, the predetermined return position may be determined according to an initial position of the swimming pool cleaning robot, a position of a charging post for the swimming pool cleaning robot, and a designated position in the swimming pool.
In one embodiment, the initial position of the swimming pool cleaning robot may be determined according to a position at a bottom of the swimming pool to which the swimming pool cleaning robot freely sinks.
For example, the position at the bottom of the swimming pool to which the swimming pool cleaning robot freely sinks when being placed into the swimming pool along a wall of the swimming pool may be determined as the initial position of the swimming pool cleaning robot.
In another embodiment, the swimming pool cleaning robot is controlled to move, in response to a move instruction, to the designated position relative to the bottom of the swimming pool, and the designated position is determined as the initial position of the swimming pool cleaning robot.
For example, in the case that the swimming pool cleaning robot freely sinks to the bottom of the swimming pool, the swimming pool cleaning robot to may be controlled to move, in response to the move instruction, to the designated position expected by a user relative to the bottom of the swimming pool, and the designated position is determined as the initial position of the swimming pool cleaning robot.
Therefore, in the case that the initial position of the swimming pool cleaning robot is determined as the return position, a user may conveniently retrieve the swimming pool cleaning robot from the swimming pool; and in the case that the position of the charging post for the swimming pool cleaning robot is determined as the return position, the swimming pool cleaning robot may automatically return to the charging post and may be charged at the charging post.
In this embodiment, the designated position of the swimming pool is a position designated in the swimming pool based on a man-machine interaction instruction.
In addition, in the case that the swimming pool cleaning robot encounters the fault or the power amount of the swimming pool cleaning robot is less than the predetermined power amount threshold, an edge position, in the swimming pool, adjacent to the current position of the swimming pool cleaning robot may be designated as the return position.
Optionally, the map for the swimming pool including a plurality of reachable blocks is generated by:
Specifically, a central coordinate point of the map for the swimming pool may be determined according to the initial position of the swimming pool cleaning robot, and the map for the swimming pool covering the work area of the swimming pool may be generated according to the central coordinate point.
In this embodiment, coordinate values of the central coordinate point may be determined according to a predetermined size of the map for the swimming pool, and coordinate values of each grid block in the map for the swimming pool are made not less than 0.
For example, in the case that the size of the map for the swimming pool is 101×101, the coordinate values of the central coordinate point of the map for the swimming pool are defined as (50, 50), such that the coordinate values of each grid block in the map for the swimming pool are not less than 0 for correct recognition by the system.
In this embodiment, the return path from the current position to the predetermined return position may be generated according to various reachable blocks in the map for the swimming pool, and hence the swimming pool cleaning robot is controlled to return to the predetermined return position.
In summary, in the method for return control of the swimming pool cleaning robot according to this embodiment, in response to detecting the trigger of the return instruction, the return path is generated according to the current position of the swimming pool cleaning robot and the predetermined return position, and hence the swimming pool cleaning robot is driven to move and return from the current position to the predetermined return position, such that the swimming pool cleaning robot is retrieved or charged at the predetermined return position. In this way, use smartness of the swimming pool cleaning robot is improved, and use experience of the user is enhanced.
In step S202, the grid block corresponding to the predetermined return position in the map for the swimming pool is determined as a return block according to the predetermined return position.
Optionally, the predetermined return position may include the initial position when the swimming pool cleaning robot drops into the water, the position of the charging post for the swimming pool cleaning robot, or the designated position in the swimming pool.
In step S204, the grid block corresponding to the current position in the map for the swimming pool is determined as a current block according to the current position of the swimming pool cleaning robot.
In this embodiment, the current position of the swimming pool cleaning robot in the map for the swimming pool may be simultaneously updated according to a movement trajectory of the swimming pool cleaning robot relative to the map for the swimming pool.
In step S206, the return path for moving from the current block to the return block is generated according to each reachable block in the map for the swimming pool, the return block, and the current block.
In this embodiment, a shortest movement path between the current block and the return block may be generated according to each reachable block in the map for the swimming pool, the return block, and the current block, by using the predetermined path-finding algorithm, and the shortest movement path may be determined as the return path.
Optionally, the predetermined path-finding algorithm may include, but is not limited to, an A-STAR algorithm.
In step S208, the swimming pool cleaning robot is controlled to move, on the basis of the return path, from the current block to the return block through at least one reachable block in the map for the swimming pool.
In summary, according to the embodiment of the present disclosure, by using the predetermined path-finding algorithm, an optimal movement path for returning from the current position to the predetermined return position is calculated based on the reachable block in the map for the swimming pool. In this way, the swimming pool cleaning robot is capable of quickly and safely returning, and thus the operation is simple and safe.
Optionally, the return control module 304 is further configured to: determine the predetermined return position according to one of an initial position of the swimming pool cleaning robot, a position of a charging post for the swimming pool cleaning robot, and a designated position in the swimming pool.
Optionally, the initial position of the swimming pool cleaning robot is determined by: determining the initial position of the swimming pool cleaning robot according to a position at a bottom of the swimming pool to which the swimming pool cleaning robot freely sinks; or controlling the swimming pool cleaning robot to move, in response to a move instruction, to the designated position relative to the bottom of the swimming pool, and determining the designated position as the initial position of the swimming pool cleaning robot.
Optionally, the map for the swimming pool including the reachable block is generated by: determining a central position of the map for the swimming pool according to the initial position; generating, according to the central position, the map for the swimming pool covering a work area of the swimming pool and including a plurality of grid blocks; and controlling the swimming pool cleaning robot to move relative to the map for the swimming pool in the work area of the swimming pool, and determining each grid block reachable by the swimming pool cleaning robot in the map for the swimming pool as the reachable block.
Optionally, the return control module 304 is further configured to: determine, according to the predetermined return position, the grid block corresponding to the predetermined return position in the map for the swimming pool as a return block; determine, according to the current position of the swimming pool cleaning robot, the grid block corresponding to the current position in the map for the swimming pool as a current block; generating, according to each reachable block in the map for the swimming pool, the return block, and the current block, the return path for moving from the current block to the return block; and control the swimming pool cleaning robot to move, on the basis of the return path, from the current block to the return block through at least one reachable block in the map for the swimming pool.
Optionally, the return control module 304 is further configured to: generate, according to each reachable block in the map for the swimming pool, the return block, and the current block, a shortest movement path between the current block and the return block by using the predetermined path-finding algorithm, and determine the shortest movement path as the return path.
Optionally, the predetermined path-finding algorithm includes an A-STAR algorithm.
Optionally, the trigger of the return instruction includes a system automatic trigger in response to fulfillment of a predetermined rule, or a manual trigger in response to a man-machine interactive input.
Optionally, the system automatic trigger in response to fulfillment of the predetermined rule includes at least one of: a system automatic trigger in response to detecting that the swimming pool cleaning robot completes a predetermined task, a system automatic trigger in response to detecting that a current power amount of the swimming pool cleaning robot is lower than a predetermined power amount threshold, a system automatic trigger in response to detecting that a clogging degree of a filter basket of the swimming pool cleaning robot satisfies a predetermined clogging condition, a system automatic trigger in response to detecting that the swimming pool cleaning robot encounters a fault, and a system automatic trigger in response to detecting that a running duration of the swimming pool cleaning robot satisfies a predetermined duration.
The apparatus 300 for return control of the swimming pool cleaning robot according to the embodiments of the present disclosure may be employed to perform the other steps of the methods for return control of the swimming pool cleaning robot as described above, and achieves corresponding beneficial effects that have been achieved by the method embodiments, which are not described herein any further.
An exemplary embodiment of the present disclosure further provides an electronic device. The electronic device includes: at least one processor and a memory communicably connected to the at least one processor. The memory stores a computer program runnable by the at least one processor, wherein the computer program, when run by the at least one processor, causes the electronic device to perform the methods according to the embodiments of the present disclosure.
An exemplary embodiment of the present disclosure further provides a non-transitory computer-readable storage medium storing a computer program therein, wherein the computer program, when run by a processor of a computer, causes the computer to perform the methods according to the embodiments of the present disclosure.
An exemplary embodiment of the present disclosure further provides a computer program product including a computer program therein, wherein the computer program, when run by a processor of a computer, causes the computer to perform the methods according to the embodiments of the present disclosure.
Referring to
As illustrated in
A plurality of units in the electron device 400 are connected to the I/O interface 405. The units include an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information into the electronic device 400. The input unit 406 may receive input digital or character information and generate key signal inputs related to user settings and/or function control of the electronic device. The output unit 407 may be any type of device capable of displaying information. The output unit 407 may include, but is not limited to, a display, a loudspeaker, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 404 may include, but is not limited to, a magnetic disk and an optical disk. The communication unit 409 allows the electronic device 400 to exchange information/data with other devices over a computer network, for example, the Internet, and/or various telecommunication networks. The communication unit 409 may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and/or a chip set, for example, a Bluetooth™ device, a Wi-Fi device, a WiMAX device, a cellular communication device, and/or analogs.
The computing unit 401 may be any universal and/or dedicated processing component having processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), any dedicated Artificial Intelligence (AI) computing chip, any computing unit running a machine learning model algorithm, a digital signal processor (DSP), and any suitable processor, controller, micro controller unit, or the like. The computing unit 401 performs the methods and operations as described above. For example, in some embodiments, the method for return control of the swimming pool cleaning robot as described in the above embodiments may be practiced as a computer software program, which is tangibly embodied in a machine-readable medium, for example, the storage unit 408. In some embodiments, some or all of the computer programs may be loaded and/or installed onto the electronic device 400 via the ROM 402 and/or the communication unit 409. In some embodiments, the computing unit 401 may be configured, in any suitable fashion (for example, by virtue of firmware), to perform the method for return control of the swimming pool cleaning robot.
Program codes for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer or other programmable data processing apparatus such that the program codes, when executed by the processor or controller, enables the functions/operations specified in the flowcharts and/or block diagrams being implemented. The program codes may be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on the remote machine, or entirely on the remote machine or server.
In the context of the present disclosure, the machine-readable medium may be a tangible medium that may contain or store programs for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More specific examples of the machine readable storage medium may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or a flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
As used herein, the term “machine-readable medium” and “computer-readable medium” refer to any computer program product, apparatus and/or device, for example, a magnetic disk, an optical disk, a memory, and a programmable logic device (PLD), used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term “machine-readable signal” refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, one or more aspects or features of the subject matter described herein can be implemented on a computer having a display device, for example a cathode ray tube (CRT) or a liquid crystal display (LCD) or a light emitting diode (LED) monitor for displaying information to the user and a keyboard and a pointing device, for example a mouse or a trackball, by which the user may provide input to the computer. Other types of devices may be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here may be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a client computer having a graphical user interface or a Web browser through which a user may interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of the communication network include a local area network (LAN), a wide area network (WAN), and the Internet.
The computer system may include a client and a server. The client and the server are deployed distally from each other, and generally communicate and interact with each other over a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that, although this specification is described based on the embodiments, not each of the embodiments discloses an independent technical solution. Such description manner of the specification is only for clarity. A person skilled in the art should consider the specification as an entirety. The technical solutions according to the embodiments may also be suitably combined to derive other embodiments that may be understood by a person skilled in the art.
Described above are merely exemplary specific embodiments of the present disclosure, instead of causing any limitation to the scope of the embodiments of the present disclosure. Any person skilled in the art would derive equivalent variations, modifications, and combinations without departing from the concept and principle of the embodiments of the present disclosure, and these variations, modifications, and combinations shall fall within the scope of projection of the embodiments of the present disclosure.
This application is a continuation of International Application No. PCT/CN2022/076900 filed on Feb. 18, 2022, and entitled “METHOD, APPARATUS FOR RETURN CONTROL OF SWIMMING POOL CLEANING ROBOT, AND ELECTRONIC DEVICE THEREOF,” the contents of which is hereby incorporated by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2022/076900 | Feb 2022 | WO |
Child | 18807174 | US |