Control method for pool robot, and storage medium
By obtaining the distance between the pool robot and the obstacles, building a map, adjusting the rotation angle and running direction, the problem of lack of planning of the pool robot's operating route is solved, and the operation efficiency and cleaning coverage are improved.
Patent Information
- Application Number
- PCT/CN2023/113176
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-15
- Filing Date
- 2023-08-15
- Publication Date
- 2024-12-19
AI Technical Summary
The operating routes of existing pool robots are lacking in planning, resulting in inefficiency in operation, repeated cleaning or missing cleaning in some areas, and relevant technologies have not yet proposed effective solutions.
By obtaining the distance between the pool robot and the obstacle, determining the rotation angle and adjusting the running direction, ensuring that the robot performs target operations in the preset direction, avoiding impacting the pool wall, and adjusting the running path using map construction and preset thresholds.
Improve the operating efficiency of pool robots, ensure that the robot can operate in a planned manner, avoid repeated or missing cleaning areas, and improve cleaning coverage and stability.
Smart Images

Figure CN2023113176_19122024_PF_FP_ABST
Abstract
Description
A control method and storage medium for a pool robot
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on June 15, 2023, with application number 2023107142835 and invention name “A control method and storage medium for a pool robot”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The embodiments of the present application relate to the field of computers, and more specifically, to a control method and storage medium for a pool robot. Background Art
[0004] With low cost and extremely low error rate, robots are gradually replacing many human labor tasks, such as pool robots.
[0005] However, the running route of the pool robot in the related art lacks planning and rules. When it hits the pool wall, it randomly chooses the running direction, resulting in low running efficiency. For example, some areas may be cleaned repeatedly and some areas may be missed.
[0006] Regarding the above problems, relevant technologies have not yet proposed effective solutions.
[0007] Summary of the Invention
[0008] The embodiments of the present application provide a control method and storage medium for a pool robot to at least solve the problem of low operating efficiency of the pool robot in the related art.
[0009] According to one embodiment of the present application, a control method for a pool robot is provided, including: obtaining a first distance between the pool robot and an obstacle during a process in which the pool robot performs a target operation along a first direction on the water surface in a target water area; determining a first rotation angle of the pool robot when the first distance is less than a first threshold; controlling the pool robot to rotate the first rotation angle to a second direction, and perform the target operation along the second direction; determining a second rotation angle of the pool robot when the time for the pool robot to perform the target operation in the second direction meets a preset time, or when the distance for the pool robot to perform the target operation in the second direction meets a preset distance, and controlling the pool robot to rotate the second rotation angle to the first direction and perform the target operation along the first direction.
[0010] In an exemplary embodiment, when the above-mentioned first distance is less than the first threshold value, the first rotation angle of the above-mentioned pool robot is determined, including: when the direction of the above-mentioned current running direction is the first direction, the first preset angle is determined as the above-mentioned first rotation angle; when the direction of the above-mentioned current running direction is the second direction, the second preset angle is determined as the above-mentioned first rotation angle; wherein the above-mentioned first direction includes the above-mentioned first direction and the above-mentioned second direction, the above-mentioned first direction and the above-mentioned second direction are opposite directions, and the above-mentioned first preset angle is opposite to the direction corresponding to the above-mentioned second preset angle.
[0011] In an exemplary embodiment, while the pool robot is performing a target operation along a first direction on the water surface in a target water area, the method further includes: while the pool robot is performing the target operation along the first direction on the water surface in the target water area, obtaining the current running direction of the pool robot in real time; when the current running direction deviates from the first direction, adjusting the running angular velocity of the pool robot; and adjusting the current running direction according to the running angular velocity to control the pool robot to perform the target operation along the first direction.
[0012] In an exemplary embodiment, when the time for the above-mentioned pool robot to perform the above-mentioned target operation in the above-mentioned second direction meets the preset time, or when the distance for the above-mentioned pool robot to perform the above-mentioned target operation in the above-mentioned second direction meets the preset distance, the second rotation angle of the above-mentioned pool robot is determined, including: determining the first rotation direction of the above-mentioned first rotation angle; determining the above-mentioned second rotation angle according to the above-mentioned first rotation direction and the above-mentioned first rotation angle.
[0013] In an exemplary embodiment, after controlling the pool robot to rotate the first rotation angle to a second direction and performing the target operation along the second direction, the method further includes: obtaining a second distance between the pool robot and the obstacle; and when the second distance is less than a third threshold, controlling the pool robot to stop running to stop performing the target operation.
[0014] In an exemplary embodiment, during the process of the pool robot performing a target operation along a first direction on the water surface in the target water area, before obtaining the first distance between the pool robot and the obstacle, the pool robot is controlled to perform at least one of the following in the target water area: performing the target operation along the boundary of the target water area on the water surface of the target water area; running along the boundary of the target water area on the water surface of the target water area; and constructing a map of the target water area after running in the target water area along the boundary of the target water area.
[0015] In an exemplary embodiment, the above-mentioned obstacle includes at least one of the following: a physical obstacle, a virtual obstacle.
[0016] In an exemplary embodiment, before obtaining the first distance between the pool robot and an obstacle during the process of the pool robot performing a target operation along a first direction on the water surface in the target water area, the method further includes: obtaining a map of the pool robot, wherein the map is constructed during the operation of the pool robot in the target water area, or the map is obtained from a pre-established map; determining the operating direction of the pool robot according to the map, wherein the operating direction includes the first direction and the second direction.
[0017] In an exemplary embodiment, during the process of the pool robot performing a target operation along a first direction on the water surface in a target water area, before obtaining a first distance between the pool robot and an obstacle, the method further includes: controlling the pool robot to run one circle along the boundary of the target water area in the target water area, and determining the running direction whose running time exceeds a preset threshold as the first direction; and determining the direction perpendicular to the first direction as the second direction.
[0018] In an exemplary embodiment, after obtaining the current running direction of the pool robot in real time while the pool robot performs the target operation along the first direction on the water surface in the target water area, the method further includes: determining that the current running direction deviates from the first direction when the deviation angle between the current running direction and the first direction is greater than or equal to a second threshold.
[0019] In an exemplary embodiment, the first threshold is any length within a preset threshold range, the preset threshold range is determined based on the working width of the pool robot, and the first threshold is smaller than the working width.
[0020] In an exemplary embodiment, the preset time is determined according to the forward speed of the pool robot, and the distance moved by the pool robot in the second direction within the preset time at the forward speed is less than the working width of the pool robot.
[0021] In an exemplary embodiment, the virtual obstacle includes at least one of the following: a boundary line of the target water area partition, and a virtual wall.
[0022] In an exemplary embodiment, the third threshold is determined according to a working width of the pool robot, and the third threshold is smaller than the working width.
[0023] In an exemplary embodiment, the map includes a surface map of the target water area or an underwater map of the target water area.
[0024] In an exemplary embodiment, the method further includes: when there are multiple running directions exceeding the preset threshold, randomly selecting any one of the running directions as the first direction.
[0025] According to another embodiment of the present application, a control method for a pool robot is provided, comprising: in a process in which the pool robot performs a target operation along a first direction on the water surface in a target water area, in the event that the pool robot collides with an obstacle, controlling the pool robot to rotate the first rotation angle to perform the target operation along the second direction; in the event that the time for the pool robot to perform the target operation in the second direction satisfies a preset time, or in the event that the distance for the pool robot to perform the target operation in the second direction satisfies a preset distance, determining the second rotation angle of the pool robot, and controlling the pool robot to rotate the second rotation angle to the first direction and perform the target operation along the first direction.
[0026] According to another embodiment of the present application, a control device for a pool robot is provided, including: a first acquisition module, configured to acquire a first distance between the pool robot and an obstacle when the pool robot performs a target operation along a first direction on the water surface in a target water area; a first determination module, configured to determine a first rotation angle of the pool robot when the first distance is less than a first threshold; a first control module, configured to control the pool robot to rotate the first rotation angle to a second direction and perform the target operation along the second direction; a second control module, configured to determine the second rotation angle of the pool robot when the time for the pool robot to perform the target operation in the second direction meets a preset time, or when the distance for the pool robot to perform the target operation in the second direction meets a preset distance, and control the pool robot to rotate the second rotation angle to the first direction and perform the target operation along the first direction.
[0027] In an exemplary embodiment, the above-mentioned first determination module also includes: a first determination submodule, which is configured to determine the first preset angle as the above-mentioned first rotation angle when the direction of the above-mentioned current running direction is the first direction; a second determination submodule, which is configured to determine the second preset angle as the above-mentioned first rotation angle when the direction of the above-mentioned current running direction is the second direction, wherein the above-mentioned first direction includes the above-mentioned first direction and the above-mentioned second direction, the above-mentioned first direction and the above-mentioned second direction are opposite directions, and the above-mentioned first preset angle is opposite to the direction corresponding to the above-mentioned second preset angle.
[0028] In an exemplary embodiment, the above-mentioned device also includes: a second acquisition module, configured to acquire the current running direction of the above-mentioned pool robot in real time when the pool robot performs the target operation along the first direction on the water surface in the target water area; a first adjustment module, configured to adjust the running angular velocity of the above-mentioned pool robot when the above-mentioned current running direction deviates from the above-mentioned first direction; and a second adjustment module, adjusting the above-mentioned current running direction according to the above-mentioned running angular velocity to control the above-mentioned pool robot to perform the above-mentioned target operation along the above-mentioned first direction.
[0029] In an exemplary embodiment, the above-mentioned device also includes: a third determination module, which is configured to determine that the above-mentioned current running direction deviates from the above-mentioned first direction before obtaining the current running direction of the above-mentioned pool robot in real time during the process of the above-mentioned pool robot performing the above-mentioned target operation along the above-mentioned first direction on the water surface in the above-mentioned target water area, when the deviation angle between the above-mentioned current running direction and the above-mentioned first direction is greater than or equal to a second threshold.
[0030] In an exemplary embodiment, the second determination module further includes: a third determination submodule configured to determine the first rotation direction of the first rotation angle; and a fourth determination submodule configured to determine the second rotation angle according to the first rotation direction and the first rotation angle.
[0031] In an exemplary embodiment, the above-mentioned device also includes: a third acquisition module, configured to determine the first rotation angle of the above-mentioned pool robot when the above-mentioned first distance is less than a first threshold value; control the above-mentioned pool robot to rotate the above-mentioned first rotation angle to a second direction, and after performing the above-mentioned target operation along the above-mentioned second direction, obtain the second distance between the above-mentioned pool robot and the above-mentioned obstacle; a second control module, configured to control the above-mentioned pool robot to stop running when the above-mentioned second distance is less than a third threshold value, so as to stop performing the above-mentioned target operation.
[0032] In an exemplary embodiment, the above-mentioned device also includes: a fifth control module, which is configured to control the above-mentioned pool robot to perform at least one of the following in the above-mentioned target water area before obtaining the first distance between the pool robot and the obstacle during the process of the pool robot performing the target operation along the first direction on the water surface in the target water area: performing the above-mentioned target operation along the boundary of the above-mentioned target water area on the water surface of the above-mentioned target water area; running along the boundary of the above-mentioned target water area on the water surface of the above-mentioned target water area; and constructing a map of the above-mentioned target water area after running along the boundary of the above-mentioned target water area in the above-mentioned target water area.
[0033] In an exemplary embodiment, the above-mentioned obstacle includes at least one of the following: a physical obstacle, a virtual obstacle.
[0034] In an exemplary embodiment, the above-mentioned device also includes: a sixth control module, configured to obtain a map of the above-mentioned pool robot before obtaining the first distance between the pool robot and the obstacle during the process of the pool robot performing the target operation along the first direction on the water surface in the target water area, wherein the above-mentioned map is constructed during the operation of the above-mentioned pool robot in the above-mentioned target water area, or the above-mentioned map is obtained from a pre-established map; a third determination module, configured to determine the running direction of the above-mentioned pool robot according to the above-mentioned map, wherein the above-mentioned running direction includes the above-mentioned first direction and the above-mentioned second direction.
[0035] In an exemplary embodiment, the above-mentioned device also includes: a fourth determination module, which is configured to control the above-mentioned pool robot to run one circle in the above-mentioned target water area along the boundary of the above-mentioned target water area, and determine the running direction whose running time exceeds a preset threshold as the above-mentioned first direction; a fifth determination module, which is configured to determine the direction perpendicular to the above-mentioned first direction as the above-mentioned second direction.
[0036] In an exemplary embodiment, the above-mentioned device also includes: a fifth determination module, which is configured to obtain the current running direction of the above-mentioned pool robot in real time during the process of the above-mentioned pool robot performing the above-mentioned target operation along the above-mentioned first direction on the water surface in the above-mentioned target water area, and determine that the above-mentioned current running direction deviates from the above-mentioned first direction when the deviation angle between the above-mentioned current running direction and the above-mentioned first direction is greater than or equal to a second threshold.
[0037] In an exemplary embodiment, the first threshold is any length within a preset threshold range, the preset threshold range is determined based on the working width of the pool robot, and the first threshold is smaller than the working width.
[0038] In an exemplary embodiment, the preset time is determined according to the forward speed of the pool robot, and the distance moved by the pool robot in the second direction within the preset time at the forward speed is less than the working width of the pool robot.
[0039] In an exemplary embodiment, the virtual obstacle includes at least one of the following: a boundary line of the target water area partition, and a virtual wall.
[0040] In an exemplary embodiment, the third threshold is determined according to a working width of the pool robot, and the third threshold is smaller than the working width.
[0041] In an exemplary embodiment, the map includes a surface map of the target water area or an underwater map of the target water area.
[0042] In an exemplary embodiment, the fourth determining module further includes: a selecting submodule configured to randomly select any one of the running directions as the first direction when there are multiple running directions exceeding the preset threshold.
[0043] According to another embodiment of the present application, a control device for a pool robot is provided, including: a third control module, configured to control the pool robot to rotate the first rotation angle to perform the target operation along the second direction when the pool robot collides with an obstacle during the process of the pool robot performing the target operation along the first direction on the water surface in the target water area; a fourth control module, configured to determine the second rotation angle of the pool robot when the time for the pool robot to perform the target operation in the second direction meets a preset time, or when the distance for the pool robot to perform the target operation in the second direction meets a preset distance, and control the pool robot to rotate the second rotation angle to the first direction and perform the target operation along the first direction.
[0044] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.
[0045] According to another embodiment of the present application, a pool robot is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] FIG1 is a hardware structure block diagram of a mobile terminal of a method for controlling a pool robot according to an embodiment of the present application;
[0047] FIG2 is a flow chart of a control method of a pool robot according to an embodiment of the present application;
[0048] FIG3 is a working route diagram of the pool robot according to an embodiment of the present application;
[0049] FIG4 is a main flow chart of a pool robot cleaning a rectangular swimming pool according to an embodiment of the present application;
[0050] FIG5 is a flow chart of a pool robot performing full-coverage cleaning of a water surface according to an embodiment of the present application;
[0051] FIG6 is a structural block diagram of a control device of a pool robot according to an embodiment of the present application. DETAILED DESCRIPTION
[0052] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0053] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0054] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking operation on a mobile terminal as an example, FIG1 is a hardware structure block diagram of a mobile terminal of a control method for a pool robot in an embodiment of the present application. As shown in FIG1 , the mobile terminal may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 configured to have a communication function. It will be understood by those skilled in the art that the structure shown in FIG1 is merely illustrative and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .
[0055] The memory 104 can be configured to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the control method of the pool robot in the embodiment of the present application. The processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, thereby implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0056] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's telecommunications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module configured to communicate with the Internet wirelessly.
[0057] In this embodiment, a control method for a pool robot is provided. FIG2 is a flow chart of the control method for a pool robot according to an embodiment of the present application. As shown in FIG2 , the flow chart includes the following steps:
[0058] Step S202, while the pool robot is performing a target operation along a first direction on the surface of the target water area, obtaining a first distance between the pool robot and an obstacle;
[0059] Step S204: if the first distance is less than a first threshold, determining a first rotation angle of the pool robot;
[0060] Step S206, controlling the pool robot to rotate the first rotation angle to a second direction, and performing the target operation along the second direction;
[0061] Step S208, when the time for the above-mentioned pool robot to perform the above-mentioned target operation in the above-mentioned second direction meets the preset time, or when the distance for the above-mentioned pool robot to perform the above-mentioned target operation in the above-mentioned second direction meets the preset distance, determine the second rotation angle of the above-mentioned pool robot, and control the above-mentioned pool robot to rotate the above-mentioned second rotation angle to the above-mentioned first direction and perform the above-mentioned target operation along the above-mentioned first direction.
[0062] The execution subject of the above steps may be the controller of the pool robot, or a processor with data processing and signal interaction capabilities, or other processing devices or processing units with similar processing capabilities, but not limited thereto.
[0063] In the above embodiment, the first distance is the distance between the front of the pool robot and the obstacle. The target water area includes, but is not limited to, swimming pools, ornamental reservoirs, and outdoor pools. The first threshold can be 20 cm, 30 cm, or 25 cm. Of course, this is merely an illustrative example. The first threshold can be any distance between 20 and 30 cm, slightly smaller than the pool robot's working width, which can range from 30 to 35 cm. This setting is intended to increase the actual coverage area of the pool robot within the target water area and improve the coverage rate of the pool robot's actual working range within the target water area. The pool robot can operate within the target water area according to a predetermined route, for example, in a "bow" or "S"-shaped trajectory. While the pool robot is operating within the target water area in an overall "bow"-shaped trajectory, the first rotation angle and the second rotation angle are in the same direction, for example, 90 degrees clockwise or 90 degrees counterclockwise. The first direction can be any direction within the target water area and is perpendicular to the second direction. For example, if the target water area is a rectangular pool, the first direction may be the long side of the rectangular pool, including both directions along the long side, and the second direction may be the short side of the rectangular pool. The preset time may be 2 seconds, 3 seconds, or 2.5 seconds. The preset time is related to the speed of the pool robot in the target water area. The distance the pool robot moves in the second direction during the preset time is slightly less than the working width of the pool robot. For example, the distance the pool robot moves in the second direction during the preset time is 1 / 2-1 / 3 of the working width of the pool robot. This setting is intended to increase the actual coverage area of the pool robot in the target water area and improve the coverage rate of the pool robot's actual working range of the target water area.
[0064] Optionally, when the pool robot collides with an obstacle, the pool robot is controlled to rotate through a first rotation angle to perform the target operation in a second direction.
[0065] Optionally, when the distance that the pool robot performs the target operation in the second direction satisfies a preset distance, the second rotation angle of the pool robot is determined, and the pool robot is controlled to rotate through the second rotation angle to perform the target operation along the first direction.
[0066] By measuring the distance between the pool robot and obstacles, the robot's rotation angle and direction of movement are continuously adjusted, allowing the robot to operate in a planned manner and avoiding the random selection of movement directions in the event of a collision with the pool wall. This solves the low operating efficiency of pool robots in related technologies and improves their efficiency.
[0067] In an exemplary embodiment, when the first distance is less than a first threshold, determining the first rotation angle of the pool robot includes: when the current running direction is the first direction, determining a first preset angle as the first rotation angle; when the current running direction is the second direction, determining a second preset angle as the first rotation angle; wherein the first direction includes the first direction and the second direction, the first direction and the second direction are opposite directions, and the first preset angle and the second preset angle are opposite directions. In the above embodiment, the first direction and the second direction are opposite directions. Taking the case of FIG3 as an example where the target water area is a rectangular swimming pool with the long side of the pool running east-west, the first direction can be from west to east, and the second direction can be from east to west. Furthermore, if the pool robot's water surface coverage direction is from south to north, the first rotation angle determined when the pool robot moves from west to east is 90 degrees counterclockwise (in a bird's-eye view of the pool), meaning a 90-degree rotation toward the north. If the pool robot moves from east to west, the first rotation angle determined is 90 degrees clockwise, also a 90-degree rotation toward the north. Through the above embodiment, determining the next turning angle based on the pool robot's forward direction can effectively reduce the difficulty of handling complex water areas and improve cleaning efficiency.
[0068] In one exemplary embodiment, while the pool robot is performing a target operation along a first direction on the surface of the water in a target area, the method further includes: obtaining the pool robot's current operating direction in real time while the pool robot is performing the target operation along the first direction on the surface of the water in the target area; adjusting the pool robot's operating angular velocity if the current operating direction deviates from the first direction; and adjusting the current operating direction according to the operating angular velocity to control the pool robot to perform the target operation along the first direction. In the above embodiment, the operating angular velocity can be 1 rad / s or 1.5 rad / s. Of course, the above operating angular velocity is merely an illustrative example and can be any suitable angular velocity determined based on the adjustment requirements of the pool robot. Through the above embodiment, when it is confirmed that the current forward direction of the pool robot is deviating, the angular velocity is promptly output to adjust the forward direction of the pool robot, effectively improving the stability of the pool robot's working path.
[0069] In an exemplary embodiment, during the process of the pool robot performing the above-mentioned target operation along the above-mentioned first direction on the water surface in the above-mentioned target water area, after obtaining the current running direction of the pool robot in real time, the above-mentioned method further includes: when the deviation angle between the above-mentioned current running direction and the above-mentioned first direction is greater than or equal to a second threshold value, determining that the above-mentioned current running direction deviates from the above-mentioned first direction. In the above-mentioned embodiment, the second threshold value can be 20 degrees, 30 degrees, or 25 degrees. Of course, the above-mentioned is merely an illustrative example, and the second threshold value can be any angle within the appropriate allowable deviation of the direction of the pool robot. Determining whether there is a deviation in the current forward direction of the pool robot by presetting the threshold value has the advantages of being accurate and easy to execute, thereby improving the working efficiency of the pool robot.
[0070] In an exemplary embodiment, when the time for the pool robot to perform the target operation in the second direction satisfies a preset time or when the distance the pool robot has performed the target operation in the second direction satisfies a preset distance, determining the second rotation angle of the pool robot includes: determining a first rotation direction of the first rotation angle; and determining the second rotation angle based on the first rotation direction and the first rotation angle. In the above embodiment, when the first rotation direction of the first rotation angle is determined, i.e., when the pool robot is operating in the short side direction, the rotation direction for turning to the long side can be calculated by referring to the rotation direction from the previous long side to the current short side, and the two directions are consistent. For example, as shown in Figure 3, in a rectangular swimming pool with an east-west long side, the pool robot performs cleaning work from south to north. The short sides of the pool robot on the bow-shaped route can be divided into the short side facing east and the short side facing west. When the pool robot enters the short side facing east from the long side, the forward direction needs to be rotated 90 degrees counterclockwise. When the pool robot enters the short side facing west from the long side, the forward direction needs to be rotated 90 degrees clockwise. In addition, when the pool robot enters the long side from the east short side, the forward direction needs to be rotated 90 degrees counterclockwise. When the pool robot enters the long side from the west short side, the forward direction needs to be rotated 90 degrees clockwise. In other words, the direction of rotation from the short side to the long side is consistent with the direction of rotation from the previous long side to the current short side. Through the above embodiment, the second rotation angle from the current second direction to the first direction can be quickly determined, thereby improving the working efficiency of the pool robot.
[0071] In an exemplary embodiment, when the first distance is less than a first threshold, the first rotation angle of the pool robot is determined; after the pool robot is controlled to rotate the first rotation angle to a second direction and perform the target operation along the second direction, the method further includes: obtaining a second distance between the pool robot and the obstacle; when the second distance is less than a third threshold, the pool robot is controlled to stop running to stop performing the target operation. In the above embodiment, the second distance is the distance between the front of the pool robot and the obstacle, and the third threshold can be 20 cm, 30 cm, or 25 cm. Of course, the above is merely an illustrative example, and the third threshold can be a value within any reasonable range that is less than the working width of the pool robot. In the above embodiment, the appropriate time for the pool robot to end the cleaning process can be determined by setting the third threshold, effectively improving the overall cleaning efficiency.
[0072] In one exemplary embodiment, while the pool robot is performing a target operation along a first direction on the surface of a target water area, before obtaining a first distance between the pool robot and an obstacle, the pool robot is controlled to perform at least one of the following in the target water area: performing the target operation along the boundary of the target water area on the surface of the target water area; operating along the boundary of the target water area on the surface of the target water area; and constructing a map of the target water area after operating along the boundary of the target water area in the target water area. Through the above embodiment, when the target operation is a cleaning operation, the target water area is first cleaned along the edge, which can effectively adapt to different target water areas and reduce the complexity of comprehensive cleaning of the water area.
[0073] In an exemplary embodiment, the obstacle includes at least one of the following: a physical obstacle and a virtual obstacle. In the above embodiment, the virtual obstacle can be a boundary line dividing a water area, or a virtual wall, etc. If the target water area is a swimming pool, the physical obstacle can be a pool wall.
[0074] In one exemplary embodiment, before obtaining a first distance between the pool robot and an obstacle while the pool robot is performing a target operation along a first direction on the surface of the target water area, the method further includes: obtaining a map of the pool robot, wherein the map is constructed while the pool robot is operating in the target water area, or the map is obtained from a pre-established map; and determining a direction for the pool robot to operate according to the map, wherein the direction includes the first direction and the second direction. In the above embodiment, the map can be a surface map or an underwater map. The constructed map can be constructed while the pool robot is performing the target operation in the target water area, or it can be constructed while the pool robot is operating in the target water area without performing the target operation. For example, if the target water area is a rectangular swimming pool, the long side of the rectangular pool can be determined in the map as the first direction, the short side of the rectangular pool can be determined as the second direction, and a corner of the rectangular pool in the map can be determined as the starting point for the pool robot's operation. The above-mentioned running direction whose running time exceeds the preset threshold is determined to be the above-mentioned first direction, that is, the angle with the longest straight-line time close to the wall during the process of running along the water surface is determined to be the first direction. The above-mentioned running direction exceeding the preset threshold can be one or more. In the case where there are multiple running directions exceeding the preset threshold, the first direction can be determined by random selection. For example, if the target water area is a rectangular swimming pool, the angle with the longest straight-line time during the process of running along the edge of the pool is the long side direction. For example, if the target water area is a circular pool, there are multiple straight-line directions with the same running time during the process of running along the edge of the pool. In this case, the first direction can be determined by random selection. Through the above-mentioned embodiment, the robot's running starting point and direction can be quickly determined based on the map constructed by the pool robot while working or the map constructed previously, which effectively improves the operating efficiency of the pool robot.
[0075] In an exemplary embodiment, during the process of the pool robot performing a target operation along a first direction on the water surface in a target water area, before obtaining a first distance between the pool robot and an obstacle, the method further includes: controlling the pool robot to run one circle along the boundary of the target water area in the target water area, and determining the running direction whose running time exceeds a preset threshold as the first direction; and determining the direction perpendicular to the first direction as the second direction.
[0076] In an exemplary embodiment, after obtaining the current running direction of the pool robot in real time while the pool robot performs the target operation along the first direction on the water surface in the target water area, the method further includes: determining that the current running direction deviates from the first direction when the deviation angle between the current running direction and the first direction is greater than or equal to a second threshold.
[0077] In an exemplary embodiment, the first threshold is any length within a preset threshold range, the preset threshold range is determined based on the working width of the pool robot, and the first threshold is smaller than the working width.
[0078] In an exemplary embodiment, the preset time is determined according to the forward speed of the pool robot, and the distance moved by the pool robot in the second direction within the preset time at the forward speed is less than the working width of the pool robot.
[0079] In an exemplary embodiment, the virtual obstacle includes at least one of the following: a boundary line of the target water area partition, and a virtual wall.
[0080] In an exemplary embodiment, the third threshold is determined according to a working width of the pool robot, and the third threshold is smaller than the working width.
[0081] In an exemplary embodiment, the map includes a surface map of the target water area or an underwater map of the target water area.
[0082] In an exemplary embodiment, the method further includes: when there are multiple running directions exceeding the preset threshold, randomly selecting any one of the running directions as the first direction.
[0083] According to another embodiment of the present application, a control method for a pool robot is provided, including: in a process where the pool robot performs a target operation along a first direction on the water surface in a target water area, in the event that the pool robot collides with an obstacle, controlling the pool robot to rotate the first rotation angle to perform the target operation along the second direction; in the event that the time for the pool robot to perform the target operation in the second direction satisfies a preset time, or in the event that the distance for the pool robot to perform the target operation in the second direction satisfies a preset distance, determining the second rotation angle of the pool robot, and controlling the pool robot to rotate the second rotation angle to the first direction and perform the target operation along the first direction.
[0084] The present application is described below with reference to specific embodiments. The process of a pool robot cleaning a rectangular swimming pool is taken as an example to illustrate this specific embodiment. As shown in FIG4 , the steps of the pool robot cleaning a rectangular swimming pool include:
[0085] S1: The pool robot enters the rectangular swimming pool and starts cleaning;
[0086] S2: The pool robot cleans along the edge of the rectangular pool and creates a pool map;
[0087] S3: The pool robot cleans the entire water surface;
[0088] S4: The pool robot cleans along the edge of the rectangular pool again;
[0089] S5: The pool robot finishes cleaning the rectangular swimming pool.
[0090] The process of the pool robot performing full coverage cleaning of the water surface is shown in FIG5 , and includes the following steps:
[0091] Step 1: The pool robot starts the water surface cleaning process;
[0092] Step 2: The pool robot determines the direction of the long side and the corner positions of the rectangular pool based on the above pool shape map;
[0093] Step 3: The pool robot moves to the corner of the rectangular pool and rotates to the long side.
[0094] Step 4: The pool robot starts from the corner of the rectangular pool and moves along the long side, cleaning the pool surface along the way;
[0095] Step 5: The pool robot continuously detects the distance to the pool wall in front while moving along the long side;
[0096] Step 6: When the pool robot detects that the distance to the pool wall in front is less than a first threshold, calculate a first azimuth angle, that is, the angle required for the pool robot to turn toward the short side;
[0097] Step 7: The pool robot turns past the first azimuth angle and enters the short side direction;
[0098] Step 8: The pool robot moves along the short side;
[0099] Step 9: When the pool robot moves along the short side for a preset time, the pool robot calculates a second azimuth angle, that is, the angle required for the pool robot to turn toward the long side;
[0100] Step 10: The pool robot continuously detects the distance to the pool wall in front while moving along the short side. If the distance is less than a second threshold, step 11 is executed. If the distance is greater than the second threshold, step 3 is executed according to the second azimuth angle, and the above process is repeated.
[0101] Step 11: The pool robot completes the water surface covering and cleaning process.
[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the above-mentioned methods of each embodiment of the present application.
[0103] This embodiment also provides a pool robot control device configured to implement the aforementioned embodiments and alternative implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. While the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0104] FIG6 is a block diagram of a pool robot device according to an embodiment of the present application. As shown in FIG6 , the device includes:
[0105] A first acquisition module 62 is configured to acquire a first distance between the pool robot and an obstacle when the pool robot performs a target operation along a first direction on the water surface in the target water area;
[0106] A first determining module 64 is configured to determine a first rotation angle of the pool robot when the first distance is less than a first threshold;
[0107] A first control module 66 is configured to control the pool robot to rotate the first rotation angle to a second direction and perform the target operation along the second direction;
[0108] The second determination module 68 is configured to determine the second rotation angle of the pool robot when the time for the pool robot to perform the target operation in the second direction meets the preset time, or when the distance for the pool robot to perform the target operation in the second direction meets the preset distance, and control the pool robot to rotate the second rotation angle to the first direction and perform the target operation along the first direction.
[0109] In an exemplary embodiment, the first determination module 64 further includes: a first determination submodule, configured to determine the first preset angle as the first rotation angle when the current running direction is the first direction; a second determination submodule, configured to determine the second preset angle as the first rotation angle when the current running direction is the second direction, wherein the first direction includes the first direction and the second direction, the first direction and the second direction are opposite, and the first preset angle is opposite to the direction corresponding to the second preset angle.
[0110] In an exemplary embodiment, the above-mentioned device also includes: a second acquisition module, configured to acquire the current running direction of the above-mentioned pool robot in real time when the pool robot performs the target operation along the first direction on the water surface in the target water area; a first adjustment module, configured to adjust the running angular velocity of the above-mentioned pool robot when the above-mentioned current running direction deviates from the above-mentioned first direction; and a second adjustment module, adjusting the above-mentioned current running direction according to the above-mentioned running angular velocity to control the above-mentioned pool robot to perform the above-mentioned target operation along the above-mentioned first direction.
[0111] In an exemplary embodiment, the above-mentioned device also includes: a third determination module, which is configured to determine that the above-mentioned current running direction deviates from the above-mentioned first direction before obtaining the current running direction of the above-mentioned pool robot in real time during the process of the above-mentioned pool robot performing the above-mentioned target operation along the above-mentioned first direction on the water surface in the above-mentioned target water area, when the deviation angle between the above-mentioned current running direction and the above-mentioned first direction is greater than or equal to a second threshold.
[0112] In an exemplary embodiment, the second determination module 68 further includes: a third determination submodule configured to determine the first rotation direction of the first rotation angle; and a fourth determination submodule configured to determine the second rotation angle according to the first rotation direction and the first rotation angle.
[0113] In an exemplary embodiment, the above-mentioned device also includes: a third acquisition module, configured to determine the first rotation angle of the above-mentioned pool robot when the above-mentioned first distance is less than a first threshold value; control the above-mentioned pool robot to rotate the above-mentioned first rotation angle to a second direction, and after performing the above-mentioned target operation along the above-mentioned second direction, obtain the second distance between the above-mentioned pool robot and the above-mentioned obstacle; a second control module, configured to control the above-mentioned pool robot to stop running when the above-mentioned second distance is less than a third threshold value, so as to stop performing the above-mentioned target operation.
[0114] In an exemplary embodiment, the above-mentioned device also includes: a fifth control module, which is configured to control the above-mentioned pool robot to perform at least one of the following in the above-mentioned target water area before obtaining the first distance between the pool robot and the obstacle during the process of the pool robot performing the target operation along the first direction on the water surface in the target water area: performing the above-mentioned target operation along the boundary of the above-mentioned target water area on the water surface in the above-mentioned target water area; running along the boundary of the above-mentioned target water area on the water surface in the above-mentioned target water area; and constructing a map of the above-mentioned target water area after running along the boundary of the above-mentioned target water area in the above-mentioned target water area.
[0115] In an exemplary embodiment, the above-mentioned obstacle includes at least one of the following: a physical obstacle, a virtual obstacle.
[0116] In an exemplary embodiment, the above-mentioned device also includes: a sixth control module, configured to obtain a map of the above-mentioned pool robot before obtaining the first distance between the pool robot and the obstacle during the process of the pool robot performing the target operation along the first direction on the water surface in the target water area, wherein the above-mentioned map is constructed during the operation of the above-mentioned pool robot in the above-mentioned target water area, or the above-mentioned map is obtained from a pre-established map; a third determination module, configured to determine the running direction of the above-mentioned pool robot according to the above-mentioned map, wherein the above-mentioned running direction includes the above-mentioned first direction and the above-mentioned second direction.
[0117] In an exemplary embodiment, the above-mentioned device also includes: a fourth determination module, which is configured to control the above-mentioned pool robot to run one circle in the above-mentioned target water area along the boundary of the above-mentioned target water area, and determine the running direction whose running time exceeds a preset threshold as the above-mentioned first direction; a fifth determination module, which is configured to determine the direction perpendicular to the above-mentioned first direction as the above-mentioned second direction.
[0118] In an exemplary embodiment, the above-mentioned device also includes: a sixth determination module, which is configured to obtain the current running direction of the above-mentioned pool robot in real time during the process of the above-mentioned pool robot performing the above-mentioned target operation along the above-mentioned first direction on the water surface in the above-mentioned target water area, and determine that the above-mentioned current running direction deviates from the above-mentioned first direction when the deviation angle between the above-mentioned current running direction and the above-mentioned first direction is greater than or equal to a second threshold.
[0119] In an exemplary embodiment, the first threshold is any length within a preset threshold range, the preset threshold range is determined based on the working width of the pool robot, and the first threshold is smaller than the working width.
[0120] In an exemplary embodiment, the preset time is determined according to the forward speed of the pool robot, and the distance moved by the pool robot in the second direction within the preset time at the forward speed is less than the working width of the pool robot.
[0121] In an exemplary embodiment, the virtual obstacle includes at least one of the following: a boundary line of the target water area partition, and a virtual wall.
[0122] In an exemplary embodiment, the third threshold is determined according to a working width of the pool robot, and the third threshold is smaller than the working width.
[0123] In an exemplary embodiment, the map includes a surface map of the target water area or an underwater map of the target water area.
[0124] In an exemplary embodiment, the fourth determining module further includes: a selecting submodule configured to randomly select any one of the running directions as the first direction when there are multiple running directions exceeding the preset threshold.
[0125] According to another embodiment of the present application, a control device for a pool robot is provided, including: a third control module, configured to control the pool robot to rotate the first rotation angle to perform the target operation along the second direction when the pool robot collides with an obstacle during the process of the pool robot performing the target operation along the first direction on the water surface in the target water area; a fourth control module, configured to determine the second rotation angle of the pool robot when the time for the pool robot to perform the target operation in the second direction meets a preset time, or when the distance for the pool robot to perform the target operation in the second direction meets a preset distance, and control the pool robot to rotate the second rotation angle to the first direction and perform the target operation along the first direction.
[0126] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0127] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.
[0128] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0129] An embodiment of the present application further provides a pool robot comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0130] In an exemplary embodiment, the pool robot may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0131] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0132] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0133] The above are merely optional embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may be modified and varied in various ways. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A control method for a pool robot, comprising: During the process of the pool robot performing a target operation along a first direction on a water surface in a target water area, obtaining a first distance between the pool robot and an obstacle; When the first distance is less than a first threshold, determining a first rotation angle of the pool robot; Controlling the pool robot to rotate the first rotation angle to a second direction, and performing the target operation along the second direction; When the time for the pool robot to perform the target operation in the second direction meets the preset time, or when the distance for the pool robot to perform the target operation in the second direction meets the preset distance, the second rotation angle of the pool robot is determined, and the pool robot is controlled to rotate the second rotation angle to the first direction and perform the target operation along the first direction.
2. The method according to claim 1, wherein: When the first distance is less than a first threshold, determining a first rotation angle of the pool robot includes: When the current running direction is directed to the first direction, determining a first preset angle as the first rotation angle; When the current running direction is directed to the second direction, determining the second preset angle as the first rotation angle; The first direction includes the first orientation and the second orientation, the first orientation and the second orientation are in opposite directions, and the first preset angle and the second preset angle correspond to opposite directions.
3. The method according to claim 1, wherein: During the process in which the pool robot performs a target operation along a first direction on a water surface in a target water area, the method further includes: When the pool robot performs the target operation along the first direction on the water surface in the target water area, obtaining the current running direction of the pool robot in real time; When the current running direction deviates from the first direction, adjusting the running angular velocity of the pool robot; The current running direction is adjusted according to the running angular velocity to control the pool robot to perform the target operation along the first direction.
4. The method according to claim 1, wherein: When the time for the pool robot to perform the target operation in the second direction meets the preset time, or when the distance for the pool robot to perform the target operation in the second direction meets the preset distance, determining the second rotation angle of the pool robot includes: determining a first rotation direction of the first rotation angle; The second rotation angle is determined according to the first rotation direction and the first rotation angle.
5. The method according to claim 1, wherein: After controlling the pool robot to rotate the first rotation angle to a second direction and performing the target operation along the second direction, the method further includes: Acquire a second distance between the pool robot and the obstacle; When the second distance is less than a third threshold, the pool robot is controlled to stop running to stop executing the target operation.
6. The method according to claim 1, wherein: In the process of the pool robot performing a target operation along a first direction on a water surface in a target water area, before obtaining a first distance between the pool robot and an obstacle, the pool robot is controlled to perform at least one of the following in the target water area: Performing the target operation on the water surface of the target water area along the boundary of the target water area; Running on the surface of the target water area along the boundary of the target water area; A map of the target water area is constructed after running in the target water area along the boundary of the target water area.
7. The method according to claim 1, wherein: The obstacle includes at least one of the following: a physical obstacle and a virtual obstacle.
8. The method according to claim 1, wherein: In the process of the pool robot performing the target operation along the first direction on the water surface in the target water area, before obtaining the first distance between the pool robot and the obstacle, the method further includes: Acquire a map of the pool robot, wherein the map is constructed during the operation of the pool robot in the target water area, or the map is acquired from a pre-established map; The running direction of the pool robot is determined according to the map, wherein the running direction includes the first direction and the second direction.
9. The method according to claim 1, wherein: In the process of the pool robot performing the target operation along the first direction on the water surface in the target water area, before obtaining the first distance between the pool robot and the obstacle, the method further includes: After controlling the pool robot to run in the target water area along the boundary of the target water area for one circle, determining the running direction whose running time exceeds a preset threshold as the first direction; A direction perpendicular to the first direction is determined as the second direction.
10. The method according to claim 3, wherein: During the process in which the pool robot performs the target operation along the first direction on the water surface in the target water area, after obtaining the current running direction of the pool robot in real time, the method further includes: When the deviation angle between the current running direction and the first direction is greater than or equal to a second threshold, it is determined that the current running direction deviates from the first direction.
11. The method according to claim 1, wherein: The first threshold is any length within a preset threshold range, the preset threshold range is determined based on the working width of the pool robot, and the first threshold is smaller than the working width.
12. The method according to claim 1, wherein: The preset time is determined according to the forward speed of the pool robot, and the distance moved by the pool robot in the second direction within the preset time at the forward speed is less than the working width of the pool robot.
13. The method according to claim 7, wherein: The virtual obstacle includes at least one of the following: a boundary line of the target water area partition and a virtual wall.
14. The method according to claim 5, wherein: The third threshold is determined according to the working width of the pool robot, and the third threshold is smaller than the working width.
15. The method according to claim 8, wherein: The map includes a surface map of the target water area or an underwater map of the target water area.
16. The method according to claim 9, wherein: The method further comprises: In the case that there are multiple running directions exceeding the preset threshold, any one of the running directions is randomly selected as the first direction.
17. A control method for a pool robot, comprising: During the process of the pool robot performing a target operation along a first direction on the water surface in the target water area, if the pool robot collides with an obstacle, controlling the pool robot to rotate the first rotation angle to perform the target operation along the second direction; When the time for the pool robot to perform the target operation in the second direction meets the preset time, or when the distance for the pool robot to perform the target operation in the second direction meets the preset distance, the second rotation angle of the pool robot is determined, and the pool robot is controlled to rotate the second rotation angle to the first direction and perform the target operation along the first direction.
18. A control device for a pool robot, comprising: A first acquisition module is configured to acquire a first distance between the pool robot and an obstacle when the pool robot performs a target operation along a first direction on a water surface in a target water area; A first determination module, configured to determine a first rotation angle of the pool robot when the first distance is less than a first threshold; A first control module, configured to control the pool robot to rotate the first rotation angle to a second direction, and perform the target operation along the second direction; The second control module is configured to determine a second rotation angle of the pool robot and control the pool robot to rotate the second rotation angle to the first direction and perform the target operation along the first direction when the time for the pool robot to perform the target operation in the second direction meets a preset time, or when the distance for the pool robot to perform the target operation in the second direction meets a preset distance.
19. A computer-readable storage medium having a computer program stored therein, wherein: When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 16 or claim 17 are implemented.
20. A pool robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of claims 1 to 16 or claim 17 when executing the computer program.
Citation Information
Patent Citations
Robot obstacle avoidance method, nonvolatile computer readable storage medium and robot
CN111352424A
Path planning method of wall-climbing robot
CN114019986A
Autonomously traveling mobile robot and traveling control method therefor
EP3892426A1
Autonomous running robot cleaner
JP2005230044A
Local obstacle avoidance walking method of self-moving robot
US20170075353A1
