Disclosure of Invention
To solve the above problems, embodiments of the present application provide an edge control scheme for a pool cleaning robot to at least partially solve the above problems.
According to an aspect of the present application, there is provided a method of controlling an edgewise operation of a pool cleaning robot, comprising: determining an edge proximity position from each of currently determined edge positions of a pool map of a pool based on a current position of a pool cleaning robot in the pool map of the pool in response to a triggering of an edge proximity command; and controlling the swimming pool cleaning robot to move from the current position to the near side position according to the current position and the near side position determined in the swimming pool map.
Alternatively, each edge location in the pool map can be determined by: controlling the pool cleaning robot to move relative to the pool map that completely covers the pool within a work area defined by the pool to determine edge blocks in the pool map corresponding to each edge location.
Optionally, the determining an edge block in the pool map corresponding to each edge location includes: controlling the swimming pool cleaning robot to move relative to the swimming pool map, marking a grid block corresponding to each position which can be reached by the swimming pool cleaning robot in the swimming pool map as a cleaning block, and marking a grid block corresponding to each position which cannot be reached by the swimming pool cleaning robot in the swimming pool map as a non-cleaning block; each cleaned block adjacent to a non-cleaned block is labeled as an edge block based on each cleaned block and each non-cleaned block in the pool map.
Optionally, the determining the edge position from each of the currently determined edge positions of the pool map based on the current position of the pool cleaning robot in the pool map of the pool comprises: determining a grid block containing the current position in the swimming pool map as a current block according to the current position of the swimming pool cleaning robot in the swimming pool map of the swimming pool; and determining the edge block closest to the moving distance of the current block as an edge block corresponding to the edge position based on a preset routing algorithm according to the current block and each edge block determined currently in the swimming pool map.
Optionally, the determining the edge position from each of the currently determined edge positions of the pool map based on the current position of the pool cleaning robot in the pool map of the pool comprises: determining a grid block containing the current position in the swimming pool map as a current block according to the current position of the swimming pool cleaning robot in the swimming pool map of the swimming pool; determining an initial position of the pool cleaning robot in the pool map and each currently determined edge block in the pool map as candidate blocks; and determining the candidate block closest to the moving distance of the current block as the edge block corresponding to the edge position based on a preset routing algorithm according to the current block and each candidate block in the pool map.
Alternatively, the initial position of the pool cleaning robot in the pool map may be determined by: determining the position of the swimming pool cleaning robot after the swimming pool cleaning robot freely sinks into the bottom of the swimming pool along the wall of the swimming pool as the initial position of the swimming pool cleaning robot in the swimming pool map; or after the swimming pool cleaning robot sinks into the bottom of the swimming pool freely, controlling the swimming pool cleaning robot to move to a specified position relative to the bottom of the swimming pool according to a moving instruction, and determining the specified position as the initial position of the swimming pool cleaning robot in the swimming pool map.
Optionally, the controlling the pool cleaning robot to move from the current position to the near position according to the current position and the near position determined in the pool map includes: and controlling the swimming pool cleaning robot to move from the current block to the side block based on the preset routing algorithm.
Optionally, the preset way-finding algorithm comprises an a-STAR algorithm.
Optionally, the method further comprises: the side approaching instruction can be triggered based on a preset trigger condition; the preset trigger condition comprises system automatic trigger or man-machine interaction input trigger meeting a preset rule.
Optionally, the system automatically triggering to satisfy the preset rule includes: the swimming pool cleaning robot comprises at least one of a system automatic trigger when the swimming pool cleaning robot completes a preset work task, a system automatic trigger when the current electric quantity of the swimming pool cleaning robot is lower than a preset electric quantity threshold value, a system automatic trigger when the blockage degree of a filter basket of the swimming pool cleaning robot is detected and meets a preset blockage condition, a system automatic trigger when the swimming pool cleaning robot is detected to have an operation fault, and a system automatic trigger when the running time of the swimming pool cleaning robot is detected and meets preset time.
According to another aspect of the present application, there is provided a side control apparatus of a pool cleaning robot, comprising: an edge position determination module, which is used for responding to the triggering of the edge instruction, and determining an edge position from each currently determined edge position of a swimming pool map according to the current position of the swimming pool cleaning robot in the swimming pool map of the swimming pool; and the side control module is used for controlling the swimming pool cleaning robot to move from the current position to the side position according to the current position and the side position determined in the swimming pool map.
According to another aspect of the present application, there is provided an electronic device including: a processor; and a memory storing a program, wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method of the above aspect.
According to another aspect of the present application, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of the above aspect.
The application provides a swimming pool cleaning machines people lean on limit control technique, can be when leaning on the limit instruction to be triggered, according to swimming pool cleaning machines people's current position in the swimming pool map, confirm one from each edge position that has confirmed on the swimming pool map and lean on the limit position, move to leaning on the limit position by current position according to control swimming pool cleaning machines people, in order to realize that swimming pool cleaning machines people leans on the technical efficiency on the limit automatically, the swimming pool cleaning machines people that can be convenient for is retrieved in the limit position that leans on of swimming pool, thereby improve swimming pool cleaning machines people's use intellectuality, and improve user's use experience.
Detailed Description
In order to more clearly understand the technical features, objects and effects of the embodiments of the present application, specific embodiments of the present application will be described with reference to the accompanying drawings.
"exemplary" means "serving as an example, instance, or illustration" herein, and any illustration, embodiment, or steps described as "exemplary" herein should not be construed as a preferred or advantageous alternative.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present application, and they do not represent the actual structure of the product. In addition, for simplicity and clarity of understanding, elements having the same structure or function in some of the figures may be shown only schematically or only schematically.
The existing swimming pool cleaning robot can cause the problem that the swimming pool cleaning robot stays in the center of a swimming pool water area due to abnormal interruption of task execution in the process of executing tasks, thereby causing difficulty in recycling the swimming pool cleaning robot. In view of the above, the present application provides an improved method, an apparatus, an electronic device and a computer storage medium for controlling an edge of a swimming pool cleaning robot, which can solve the above-mentioned problems in the prior art.
Specific embodiments of each application will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating an edge control method of a pool cleaning robot according to an exemplary embodiment of the present disclosure. As shown in the figure, the present embodiment mainly includes the following steps:
step S102, responding to the triggering of the side approaching instruction, and determining the side approaching position from each currently determined edge position of the pool map according to the current position of the pool cleaning robot in the pool map of the pool.
Alternatively, the edge blocks corresponding to each edge location in the pool map can be determined by controlling the pool cleaning robot to move within the work area defined by the pool relative to a pool map that completely covers the pool (e.g., a pool map that completely covers the bottom of the pool).
In this embodiment, the edge blocks corresponding to each edge position in the pool map can be determined by:
the swimming pool cleaning robot is controlled to move relative to the swimming pool map, the grid blocks corresponding to each position which can be reached by the swimming pool cleaning robot in the swimming pool map are marked as cleaning blocks, the grid blocks corresponding to each position which cannot be reached by the swimming pool cleaning robot in the swimming pool map are marked as non-cleaning blocks, and each cleaning block adjacent to the non-cleaning blocks is marked as an edge block according to each cleaning block and each non-cleaning block in the swimming pool map.
In this embodiment, the edgewise command can be triggered at any stage of the pool cleaning robot performing various pool tasks (e.g., pool construction task, pool cleaning task). If the side instruction is triggered in the process of executing the swimming pool mapping task, the side position can be determined based on each edge position which is determined currently in the swimming pool map which is not built yet, and if the side instruction is triggered after the swimming pool mapping task is executed, the side position is determined based on each edge position which is determined in the swimming pool map which is built completely.
And step S104, controlling the swimming pool cleaning robot to move from the current position to the near position according to the current position and the near position determined in the swimming pool map.
Alternatively, the swimming pool cleaning robot can be controlled to move from the current block to the side block based on a preset routing algorithm.
Alternatively, the preset way-finding algorithm may include, but is not limited to, the A-STAR algorithm.
In summary, the method for controlling the edge of the pool cleaning robot in the embodiment can determine the edge location from each of the currently determined edge locations of the pool map according to the current location of the pool cleaning robot when the edge instruction is triggered, so as to drive the pool cleaning robot to move from the current location to the edge location, so that the pool cleaning robot is retracted at the edge location, thereby improving the intelligence of the pool cleaning robot, and improving the user experience.
Fig. 2 is a process flow diagram illustrating an edge control method of a pool cleaning robot according to another exemplary embodiment of the present application. As shown in the figure, the present embodiment mainly includes the following steps:
step S202, responding to the triggering of the side instruction, and determining the current block in the pool map according to the current position of the pool cleaning robot in the pool map of the pool.
Alternatively, the side instruction may be triggered based on a preset trigger condition.
Optionally, the preset trigger condition may include a system automatic trigger or a human-computer interaction input trigger satisfying a preset rule.
In this embodiment, the system automatic triggering that satisfies the preset rule includes: the system comprises at least one of a system automatic trigger when the swimming pool cleaning robot finishes a preset work task, a system automatic trigger when the current electric quantity of the swimming pool cleaning robot is lower than a preset electric quantity threshold value, a system automatic trigger when the blockage degree of a filter basket of the swimming pool cleaning robot is detected to meet a preset blockage condition, a system automatic trigger when the swimming pool cleaning robot is detected to have an operation fault, and a system automatic trigger when the running time of the swimming pool cleaning robot is detected to meet a preset time.
Alternatively, the grid block in the pool map including the current position may be determined as the current block based on the current position of the pool cleaning robot in the pool map of the pool.
In step S204, according to the current block, an edge block closest to the moving distance of the current block is determined from the candidate blocks of the pool map.
Alternatively, each edge block currently determined in the pool map can be determined as a candidate block.
Alternatively, the initial position of the pool cleaning robot in the pool map and each of the currently determined edge blocks in the pool map may be determined as candidate blocks.
In one embodiment, the position of the pool cleaning robot after it has freely sunk into the bottom of the pool along the walls of the pool can be determined as the initial position of the pool cleaning robot in the pool map.
In another embodiment, the pool cleaning robot can be controlled to move to a specified position (e.g., a position near the wall of the pool) relative to the bottom of the pool according to the movement instructions after the pool cleaning robot is freely submerged in the bottom of the pool, and the specified position can be determined as the initial position of the pool cleaning robot in the pool map.
Alternatively, the candidate block with the closest moving distance to the current block may be determined as the edge block based on a preset routing algorithm according to the current block and each candidate block in the pool map.
In the present embodiment, the predetermined way-finding algorithm may include, but is not limited to, the A-STAR algorithm.
In step S206, the pool cleaning robot is controlled to move from the current block to the near block according to the current block and the near block determined in the pool map.
Specifically, the swimming pool cleaning robot is controlled to move from the current block to the side block based on a preset routing algorithm according to the current block and the side block determined in the swimming pool map.
In summary, the embodiment of the present application utilizes the predetermined routing algorithm to determine the candidate block with the closest moving distance to the current block as the edge block based on the current block and each candidate block in the pool map, so as to provide the pool cleaning robot to perform the edge operation quickly and safely.
Fig. 3 is a block diagram showing a structure of an edge control apparatus of a pool cleaning robot according to an exemplary embodiment of the present application. As shown in the drawings, the alongside control apparatus 300 of the pool cleaning robot of the present embodiment mainly includes:
an edge location determination module 302 for determining an edge location from each of the currently determined edge locations of the pool map of the pool based on the current location of the pool cleaning robot in the pool map of the pool in response to a trigger of the edge instruction.
An edge control module 304, configured to control the pool cleaning robot to move from the current position to the edge position according to the current position and the edge position determined in the pool map.
Optionally, the swimming pool cleaning robot edgewise control apparatus 300 further comprises a mapping module for controlling the swimming pool cleaning robot to move relative to the swimming pool map completely covering the swimming pool within the working area defined by the swimming pool to determine edge blocks corresponding to each edge position in the swimming pool map.
Optionally, the mapping module is further configured to: controlling the swimming pool cleaning robot to move relative to the swimming pool map, marking a grid block corresponding to each position which can be reached by the swimming pool cleaning robot in the swimming pool map as a cleaning block, and marking a grid block corresponding to each position which cannot be reached by the swimming pool cleaning robot in the swimming pool map as a non-cleaning block; each cleaned block adjacent to a non-cleaned block is labeled as an edge block based on each cleaned block and each non-cleaned block in the pool map.
Optionally, the alongside position determination module 302 is further configured to: determining a grid block containing the current position in the swimming pool map as a current block according to the current position of the swimming pool cleaning robot in the swimming pool map of the swimming pool; and determining the edge block closest to the moving distance of the current block as an edge block corresponding to the edge position based on a preset routing algorithm according to the current block and each edge block determined currently in the swimming pool map.
Optionally, the alongside position determination module 302 is further configured to: determining a grid block containing the current position in the swimming pool map as a current block according to the current position of the swimming pool cleaning robot in the swimming pool map of the swimming pool; determining an initial position of the pool cleaning robot in the pool map and each currently determined edge block in the pool map as candidate blocks; and determining the candidate block closest to the moving distance of the current block as the edge block corresponding to the edge position based on a preset routing algorithm according to the current block and each candidate block in the pool map.
Optionally, the alongside position determination module 302 is further configured to: determining the position of the swimming pool cleaning robot after the swimming pool cleaning robot freely sinks into the bottom of the swimming pool along the wall of the swimming pool as the initial position of the swimming pool cleaning robot in the swimming pool map; or after the swimming pool cleaning robot sinks into the bottom of the swimming pool freely, controlling the swimming pool cleaning robot to move to a specified position relative to the bottom of the swimming pool according to a moving instruction, and determining the specified position as the initial position of the swimming pool cleaning robot in the swimming pool map.
Optionally, the edge control module 304 is further configured to: and controlling the swimming pool cleaning robot to move from the current block to the side block based on the preset routing algorithm.
Optionally, the preset way-finding algorithm comprises an a-STAR algorithm.
Optionally, the edge-approaching instruction may be triggered based on a preset trigger condition; the preset trigger condition comprises system automatic trigger or man-machine interaction input trigger meeting a preset rule.
Optionally, the system automatically triggering to satisfy the preset rule includes: the swimming pool cleaning robot comprises at least one of a system automatic trigger when the swimming pool cleaning robot completes a preset work task, a system automatic trigger when the current electric quantity of the swimming pool cleaning robot is lower than a preset electric quantity threshold value, a system automatic trigger when the blockage degree of a filter basket of the swimming pool cleaning robot is detected and meets a preset blockage condition, a system automatic trigger when the swimming pool cleaning robot is detected to have an operation fault, and a system automatic trigger when the running time of the swimming pool cleaning robot is detected and meets preset time.
In addition, the device 300 for controlling the near edge of the swimming pool cleaning robot according to the embodiment of the present application can also be used to implement other steps in the aforementioned embodiments of the method for controlling the near edge of the swimming pool cleaning robot, and has the advantages of the corresponding embodiments of the method steps, which are not described herein again.
An exemplary embodiment of the present application also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, is for causing the electronic device to perform a method according to an embodiment of the application.
The exemplary embodiments of this application also provide a non-transitory computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is configured to cause the computer to perform a method according to embodiments of this application.
The exemplary embodiments of this application also provide a computer program product comprising a computer program, wherein the computer program is adapted to cause a computer to perform the method according to the embodiments of this application when executed by a processor of the computer.
Referring to fig. 4, a block diagram of a structure of an electronic device 400, which may be a server or a client of the present application, which is an example of a hardware device that may be applied to aspects of the present application, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 4, the electronic device 400 includes a computing unit 401 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)402 or a computer program loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in the electronic device 400 are connected to the I/O interface 405, including: 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 to the electronic device 400, and the input unit 406 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. Output unit 407 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, 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, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, WiFi devices, WiMax devices, cellular communication devices, and/or the like.
Computing unit 401 may be a variety of general and/or special purpose processing components with 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), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 401 executes the respective methods and processes described above. For example, in some embodiments, the pool cleaning robot edgewise control method of the foregoing embodiments can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program 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 to perform the pool cleaning robot edgewise control method by any other suitable means (e.g., by way of firmware).
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program code 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 code, when executed by the processor or controller, causes the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program 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. A 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 of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) 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, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; 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 may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can 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 user computer having a graphical user interface or a web browser through which a user can 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 can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through 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 the present description has been described in terms of various embodiments, not every embodiment includes only a single embodiment, and such description is for clarity purposes only, and those skilled in the art will recognize that the embodiments described herein may be combined as suitable to form other embodiments, as will be appreciated by those skilled in the art.
The above description is only an exemplary embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any person skilled in the art should be able to make equivalent changes, modifications and combinations without departing from the concept and principle of the embodiments of the present application.