Patent application title:

POOL ROBOT CONTROL METHOD AND STORAGE MEDIUM

Publication number:

US20260092466A1

Publication date:
Application number:

19/412,774

Filed date:

2025-12-08

Smart Summary: A method has been developed to control a pool cleaning robot. It measures how far the robot is from obstacles while it cleans the water surface. If the robot gets too close to an obstacle, it will turn and clean in a different direction. After cleaning in the new direction for a set time or distance, the robot will turn back and continue cleaning in the original direction. This helps the robot avoid obstacles while effectively cleaning the pool. 🚀 TL;DR

Abstract:

This application provides a pool robot control method and a storage medium. The method includes: obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction; when the first distance is less than a first threshold, controlling the pool robot to rotate by a first rotation angle to a second direction and perform the target operation in the second direction; and when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, controlling the pool robot to rotate by a second rotation angle to the first direction and perform the target operation in the first direction.

Inventors:

Assignee:

Applicant:

Interested in similar patents?

Get notified when new applications in this technology area are published.

Classification:

E04H4/1654 »  CPC main

Swimming or splash baths or pools; Parts, details or accessories not otherwise provided for specially adapted for cleaning Self-propelled cleaners

E04H4/16 IPC

Swimming or splash baths or pools; Parts, details or accessories not otherwise provided for specially adapted for cleaning

Description

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent Application No. PCT/CN2023/113176, filed with the World Intellectual Property Organization on August 15, 2023, which claims priority to Chinese Patent Application No. 2023107142835, filed with the China National Intellectual Property Administration on June 15, 2023 and entitled "POOL ROBOT CONTROL METHOD AND STORAGE MEDIUM", which is hereby incorporated by reference herein.

TECHNICAL FIELD

Embodiments of this application relate to the computer field, and specifically, to a pool robot control method and a storage medium.

BACKGROUND

Due to low costs and an extremely low error rate, robots, for example, pool robots, are gradually replacing much labor of people.

However, a motion path of a pool robot in a related technology is insufficiently planned and irregular. When the pool robot collides with a pool wall, a moving direction is randomly selected, leading to low operation efficiency. For example, some regions may be repeatedly cleaned, and some regions may fail to be cleaned.

In the related technology, an effective solution to resolve the above problem has not been proposed.

SUMMARY

Embodiments of this application provide a pool robot control method and a storage medium, to at least resolve a problem of low operation efficiency of a pool robot in a related technology.

According to an embodiment of this application, a pool robot control method is provided. The method includes: obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction; 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 by the first rotation angle to a second direction and perform the target operation in the second direction; and determining a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and controlling the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

In some embodiments, the determining a first rotation angle of the pool robot when the first distance is less than a first threshold includes: determining a first preset angle as the first rotation angle when an orientation of a current moving direction is a first orientation; and determining a second preset angle as the first rotation angle when the orientation of the current moving direction is a second orientation. The first direction includes the first orientation and the second orientation. The first orientation is opposite to the second orientation. The first preset angle and the second preset angle correspond to opposite directions.

In some embodiments, in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, the method further includes: obtaining a current moving direction of the pool robot in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction; adjusting an operation angular velocity of the pool robot when the current moving direction deviates from the first direction; and adjusting the current moving direction based on the operation angular velocity to control the pool robot to perform the target operation in the first direction.

In some embodiments, the determining a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance includes: determining a first rotation direction corresponding to the first rotation angle; and determining the second rotation angle based on the first rotation direction and the first rotation angle.

In some embodiments, after the controlling the pool robot to rotate by the first rotation angle to a second direction and perform the target operation in 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 moving to stop performing the target operation.

In some embodiments, before the obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction, controlling the pool robot to perform at least one of the following in the target water region: performing the target operation on the water surface of the target water region along an edge of the target water region; moving on the water surface of the target water region along the edge of the target water region; or constructing a map of the target water region after the pool robot moves in the target water region along the edge of the target water region.

In some embodiments, the obstacle includes at least one of a physical obstacle or a virtual obstacle.

In some embodiments, before the obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction, the method further includes: obtaining a map of the pool robot, where the map is constructed in a process in which the pool robot moves in the target water region, or the map is obtained from a pre-constructed map; and determining a moving direction of the pool robot based on the map. The moving direction includes the first direction and the second direction.

In some embodiments, before the obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction, the method further includes: after the pool robot is controlled to move in the target water region along an edge of the target water region by one round, determining a moving direction as the first direction, where moving duration in the moving direction is greater than a preset threshold; and determining a direction perpendicular to the first direction as the second direction.

In some embodiments, after the obtaining a current moving direction of the pool robot in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, the method further includes: when a deviation angle between the current moving direction and the first direction is greater than or equal to a second threshold, determining that the current moving direction deviates from the first direction.

In some embodiments, the first threshold is any value within a preset threshold range. The preset threshold range is determined based on an operation width of the pool robot. The first threshold is less than the operation width.

In some embodiments, the preset duration is determined based on a moving speed of the pool robot. A distance over which the pool robot moves at the moving speed in the second direction within the preset duration is less than an operation width of the pool robot.

In some embodiments, the virtual obstacle includes at least one of a boundary of divisions of the target water region or a virtual wall.

In some embodiments, the third threshold is determined based on an operation width of the pool robot. The third threshold is less than the operation width.

In some embodiments, the map includes a map of the water surface of the target water region or a map of a bottom of the target water region.

In some embodiments, the method further includes: randomly selecting any moving direction as the first direction when there are a plurality of moving directions, where moving duration in each moving direction is greater than the preset threshold.

According to another embodiment of this application, a pool robot control method is provided. The method includes: in a process in which a pool robot performs a target operation on a water surface of a target water region in a first direction, when the pool robot collides with an obstacle, controlling the pool robot to rotate by a first rotation angle, enabling the pool robot to perform the target operation in a second direction; and determining a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and controlling the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

According to another embodiment of this application, a pool robot control apparatus is provided. The apparatus includes: a first obtaining module configured to obtain a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction; a first determining 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 by the first rotation angle to a second direction and perform the target operation in the second direction; and a second determining module configured to determine a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and control the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

In some embodiments, the first determining module further includes: a first determining sub-module configured to determine a first preset angle as the first rotation angle when an orientation of a current moving direction is a first orientation; and a second determining sub-module configured to determine a second preset angle as the first rotation angle when the orientation of the current moving direction is a second orientation. The first direction includes the first orientation and the second orientation. The first orientation is opposite to the second orientation. The first preset angle and the second preset angle correspond to opposite directions.

In some embodiments, the apparatus further includes: a second obtaining module configured to obtain a current moving direction of the pool robot in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction; a first adjustment module configured to adjust an operation angular velocity of the pool robot when the current moving direction deviates from the first direction; and a second adjustment module configured to adjust the current moving direction based on the operation angular velocity to control the pool robot to perform the target operation in the first direction.

In some embodiments, the apparatus further includes: a third determining module configured to before the current moving direction of the pool robot is obtained in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, when a deviation angle between the current moving direction and the first direction is greater than or equal to a second threshold, determine that the current moving direction deviates from the first direction.

In some embodiments, the second determining module further includes: a third determining sub-module configured to determine a first rotation direction corresponding to the first rotation angle; and a fourth determining sub-module configured to determine the second rotation angle based on the first rotation direction and the first rotation angle.

In some embodiments, the apparatus further includes: a third obtaining module configured to obtain a second distance between the pool robot and the obstacle in a process of controlling the pool robot to perform the target operation in the second direction; and a second control module configured to when the second distance is less than a third threshold, control the pool robot to stop moving to stop performing the target operation.

In some embodiments, the apparatus further includes: a fifth control module configured to before the first distance between the pool robot and the obstacle is obtained in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, control the pool robot to perform at least one of the following in the target water region: performing the target operation on the water surface of the target water region along an edge of the target water region; moving on the water surface of the target water region along the edge of the target water region; or constructing a map of the target water region after the pool robot moves in the target water region along the edge of the target water region.

In some embodiments, the obstacle includes at least one of a physical obstacle or a virtual obstacle.

In some embodiments, the apparatus further includes: a sixth control module configured to before the first distance between the pool robot and the obstacle is obtained in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, obtain a map of the pool robot, where the map is constructed in a process in which the pool robot moves in the target water region, or the map is obtained from a pre-constructed map; and a third determining module configured to determine a moving direction of the pool robot based on the map. The moving direction includes the first direction and the second direction.

In some embodiments, the apparatus further includes: a fourth determining module configured to after the pool robot is controlled to move in the target water region along an edge of the target water region by one round, determine a moving direction as the first direction, where moving duration in the moving direction is greater than a preset threshold; and a fifth determining module configured to determine a direction perpendicular to the first direction as the second direction.

In some embodiments, the apparatus further includes: a sixth determining module configured to after the current moving direction of the pool robot is obtained in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, when a deviation angle between the current moving direction and the first direction is greater than or equal to a second threshold, determine that the current moving direction deviates from the first direction.

In some embodiments, the first threshold is any value within a preset threshold range. The preset threshold range is determined based on an operation width of the pool robot. The first threshold is less than the operation width.

In some embodiments, the preset duration is determined based on a moving speed of the pool robot. A distance over which the pool robot moves at the moving speed in the second direction within the preset duration is less than an operation width of the pool robot.

In some embodiments, the virtual obstacle includes at least one of a boundary of divisions of the target water region or a virtual wall.

In some embodiments, the third threshold is determined based on an operation width of the pool robot. The third threshold is less than the operation width.

In some embodiments, the map includes a map of the water surface of the target water region or a map of a bottom of the target water region.

In some embodiments, the fourth determining module further includes a selection sub-module configured to randomly select any moving direction as the first direction when there are a plurality of moving directions, where moving duration in each moving direction is greater than the preset threshold.

According to another embodiment of this application, a pool robot control apparatus is provided. The apparatus includes: a third control module configured to in a process in which a pool robot performs a target operation on a water surface of a target water region in a first direction, when the pool robot collides with an obstacle, control the pool robot to rotate by a first rotation angle, enabling the pool robot to perform the target operation in a second direction; and a fourth control module configured to determine a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and control the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

According to another embodiment of this application, a computer-readable storage medium is further provided. The computer-readable storage medium stores a computer program. When the computer program is run, steps in any one of the method embodiments are performed.

According to another embodiment of this application, a pool robot is further provided. The pool robot includes a memory and a processor. The memory stores a computer program. The processor is configured to: when executing the computer program, perform steps in any one of the method embodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram 100 of a hardware structure of a mobile terminal for performing a pool robot control method according to an embodiment of this application;

FIG. 2 is a flowchart 200 of a pool robot control method according to an embodiment of this application;

FIG. 3 is a diagram 300 of a motion path of a pool robot according to an embodiment of this application;

FIG. 4 is a main flowchart 400 showing that a pool robot cleans a rectangular swimming pool according to an embodiment of this application;

FIG. 5 is a flowchart 500 showing that a pool robot performs full-coverage cleaning on a water surface according to an embodiment of this application; and

FIG. 6 is a block diagram 600 of a structure of a pool robot control apparatus according to an embodiment of this application.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Embodiments of this application are described in detail in the following with reference to the accompanying drawings.

It should be noted that in this specification, claims, and the accompanying drawings of this application, the terms "first", "second", and the like are intended to distinguish between similar objects but do not necessarily indicate a specific order or sequence.

The method embodiments provided in embodiments of this application may be performed by a mobile terminal, a computer terminal, or a similar computing apparatus. An example in which the method is performed by the mobile terminal is used. FIG. 1 is a block diagram 100 of a hardware structure of a mobile terminal for performing a pool robot control method according to an embodiment of this application. As shown in FIG. 1, the mobile terminal may include one or more (only one processor is shown in FIG. 1) processors 102 (the processor 102 may include, but is not limited to, a processing apparatus such as a microprocessor unit MPU or a field-programmable gate array FPGA) and a memory 104 configured to store data. The mobile terminal may further include a transmission device 106 with a communication function and an input/output device 108. A person skilled in the art may understand that the structure shown in FIG. 1 is only an example and does not constitute any limitation on the structure of the mobile terminal. For example, the mobile terminal may include more or fewer components than those shown in FIG. 1 or have a configuration different from that shown in FIG. 1.

The memory 104 may be configured to store a computer program, for example, a software program of an application software and modules, for example, a computer program corresponding to the pool robot control method in embodiments of this application. The processor 102 executes the computer program stored in the memory 104 to execute various functional applications and data processing, that is, to implement the above method. The memory 104 may include a high-speed random access memory or a non-volatile memory, for example, one or more magnetic storage apparatuses, a flash memory, or another non-volatile solid-state memory. In some examples, the memory 104 may further include memories that are remotely disposed relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the foregoing network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and a combination thereof.

The transmission device 106 is configured to receive or send data through one network. Specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network interface controller (Network Interface Controller, NIC for short) and may be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (Radio Frequency, RF for short) module configured to communicate with the Internet in a wireless manner.

An embodiment provides a pool robot control method. FIG. 2 is a flowchart 200 of a pool robot control method according to an embodiment of this application. As shown in FIG. 2, the method may include the following steps.

S202: Obtain a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction.

Step S204: Determine a first rotation angle of the pool robot when the first distance is less than a first threshold.

Step S206: Control the pool robot to rotate by the first rotation angle to a second direction and perform the target operation in the second direction.

Step S208: Determine a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and control the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

The above steps may be performed by a controller of the pool robot, a processor having data processing and signal interaction capabilities, or another processing device or processing unit having a similar processing capability. However, this is not limited thereto.

In the above embodiment, the first distance is a distance between a front portion of the pool robot and the obstacle. The target water region includes, but is not limited to, a swimming pool, an ornamental reservoir, a wild pool, and the like. The first threshold may be 20 cm, 30 cm, or 25 cm. Certainly, the above first threshold is only an example. The first threshold may be any length within a range from 20 cm to 30 cm, the length is slightly less than an operation width of the pool robot, and the operation width of the pool robot may range from 30 cm to 35 cm. This can increase an actual operation coverage area of the pool robot in the target water region and increase a coverage rate of an actual operation range of the pool robot over the target water region. The pool robot may move in the target water region along a preset motion path, for example, a bow-shaped trajectory (the bow-shaped trajectory means that two adjacent paths are parallel to each other, and the pool robot moves along the two adjacent paths in two opposite forward directions) or an S-shaped trajectory. In a process in which the pool robot moves in the target water region substantially along the bow-shaped trajectory, a direction corresponding to the first rotation angle is consistent with a direction corresponding to the second rotation angle, for example, 90° clockwise or 90° counterclockwise. The first direction may be any direction in the target water region and perpendicular to the second direction. For example, when the target water region is a rectangular pool, the first direction may be a direction of a longer side of the rectangular pool and include two directions along the longer side, and the second direction may be a direction of a shorter side of the rectangular pool. The preset duration may be 2s, 3s, or 2.5s. The preset duration is related to a speed at which the pool robot moves forward in the target water region. A distance over which the pool robot moves in the second direction within the preset duration is slightly less than the operation width of the pool robot. For example, the distance over which the pool robot moves in the second direction within the preset duration is 1/2 to 1/3 of the operation width of the pool robot. This can also increase the actual operation coverage area of the pool robot in the target water region and increase the coverage rate of the actual operation range of the pool robot over the target water region.

Optionally, when the pool robot collides with the obstacle, the pool robot is controlled to rotate by the first rotation angle to perform the target operation in the second direction.

Optionally, when the distance over which the pool robot performs the target operation in the second direction meets a preset distance, the second rotation angle of the pool robot is determined, and the pool robot is controlled to rotate by the second rotation angle to perform the target operation in the first direction.

The rotation angle and the moving direction of the pool robot are continuously adjusted based on a distance between the pool robot and the obstacle, so that the robot can move in a planned manner. This can prevent the pool robot from randomly selecting a moving direction when the pool robot collides with a pool wall. Therefore, a problem of low operation efficiency of a pool robot in a related technology is resolved, thereby improving the operation efficiency of the pool robot.

In some embodiments, the determining a first rotation angle of the pool robot when the first distance is less than a first threshold includes: determining a first preset angle as the first rotation angle when an orientation of a current moving direction is a first orientation; and determining a second preset angle as the first rotation angle when the orientation of the current moving direction is a second orientation. The first direction includes the first orientation and the second orientation. The first orientation is opposite to the second orientation. The first preset angle and the second preset angle correspond to opposite directions. In the above embodiment, the first orientation is opposite to the second orientation. An example in which the target water region is a rectangular swimming pool in FIG. 3, and a longer side of the swimming pool runs south-north is used. In this case, the first orientation may be a direction from west to east, and the second orientation may be a direction from east to west. Further, if a coverage direction of the pool robot for the water surface is from south to north, when the pool robot moves forward in a direction from west to east, it is determined that the first rotation angle is 90° counterclockwise (in a top view of the swimming pool), that is, the pool robot rotates toward the north by 90°; and when the pool robot moves forward in a direction from east to west, it is determined that the first rotation angle is 90° clockwise, that is, the pool robot also rotates toward the north by 90°. According to the above embodiment, a next steering angle is determined based on a forward direction of the pool robot. This can effectively reduce difficulty in handling a complex water region and improve cleaning efficiency.

In some embodiments, in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, the method further includes: obtaining a current moving direction of the pool robot in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction; adjusting an operation angular velocity of the pool robot when the current moving direction deviates from the first direction; and adjusting the current moving direction based on the operation angular velocity to control the pool robot to perform the target operation in the first direction. In the above embodiment, the operation angular velocity may be 1 rad/s or 1.5 rad/s. Certainly, the above operation angular velocity is only an example. The operation angular velocity may be any appropriate angular velocity determined based on an adjustment requirement of the pool robot. According to the above embodiment, when it is determined that a current forward direction of the pool robot deviates, the angular velocity is output in time to adjust the forward direction of the pool robot. This can effectively improve stability of an operation path of the pool robot.

In some embodiments, after the obtaining a current moving direction of the pool robot in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, the method further includes: when a deviation angle between the current moving direction and the first direction is greater than or equal to a second threshold, determining that the current moving direction deviates from the first direction. In the above embodiment, the second threshold may be 20°, 30°, or 25°. Certainly, the above second threshold is only an example. The second threshold may be any appropriate angle within an allowable direction deviation of the pool robot. Whether the current forward direction of the pool robot deviates is determined accurately and easily based on a preset threshold. This improves operating efficiency of the pool robot.

In some embodiments, the determining a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance includes: determining a first rotation direction corresponding to 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, determining the first rotation direction corresponding to the first rotation angle means when the pool robot moves in the direction of the shorter side, calculating a rotation direction in which the pool robot turns to the longer side. For details, refer to descriptions of a rotation direction in which the pool robot turns from a previous longer side to a current shorter side. Two rotation directions are consistent. For example, as shown in FIG. 3, in a rectangular swimming pool whose longer side runs south-north, the pool robot performs cleaning from south to north. In this case, the shorter sides of the bow-shaped path of the pool robot may be grouped into east shorter sides and west shorter sides. When the pool robot moves from a longer side to an east shorter side, the pool robot needs to rotate counterclockwise by 90°. When the pool robot moves from a longer side to a west shorter side, the pool robot needs to rotate clockwise by 90°. In addition, when the pool robot moves from an east shorter side to a longer side, the pool robot needs to rotate counterclockwise by 90°, and when the pool robot moves from a west shorter side to a longer side, the pool robot needs to rotate clockwise by 90°. In other words, a direction in which the pool robot rotates from a shorter side to a longer side is consistent with a direction in which the pool robot rotates from a previous longer side to the current shorter side. According to the above embodiment, the second rotation angle by which the pool robot rotates from the second direction to the first direction can be quickly determined. This improves the operating efficiency of the pool robot.

In some embodiments, the first rotation angle of the pool robot is determined when the first distance is less than the first threshold, and after the controlling the pool robot to rotate by the first rotation angle to a second direction and perform the target operation in 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 moving to stop performing the target operation. In the above embodiment, the second distance is a distance between the front portion of the pool robot and the obstacle, and the third threshold may be 20 cm, 30 cm, or 25 cm. The above third threshold is only an example. The third threshold may be a value less than the operation width of the pool robot in any appropriate range. In the above embodiment, an appropriate occasion on which the pool robot ends a cleaning process is determined by setting the third threshold, thereby effectively improving overall cleaning efficiency.

In some embodiments, before the obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction, controlling the pool robot to perform at least one of the following in the target water region: performing the target operation on the water surface of the target water region along an edge of the target water region; moving on the water surface of the target water region along the edge of the target water region; or constructing a map of the target water region after the pool robot moves in the target water region along the edge of the target water region. According to the above embodiment, when the target operation is a cleaning operation, the pool robot cleans the target water region along the edge, so that the pool robot can effectively adapt to different target water regions. This reduces complexity of performing full-coverage cleaning on a water region.

In some embodiments, the obstacle includes at least one of a physical obstacle or a virtual obstacle. In the above embodiment, the virtual obstacle may be a boundary of divisions of the water region, a virtual wall, or the like. The physical obstacle may be a wall of a swimming pool when the target water region is the swimming pool.

In some embodiments, before the obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction, the method further includes: obtaining a map of the pool robot, where the map is constructed in a process in which the pool robot moves in the target water region, or the map is obtained from a pre-constructed map; and determining a moving direction of the pool robot based on the map. The moving direction includes the first direction and the second direction. In the above embodiment, the map may be a map of the water surface or a map of the pool bottom. The map may be constructed in the process in which the pool robot performs the target operation in the target water region or may be constructed when the pool robot only operates in the target water region without performing the target operation. For example, when the target water region is a rectangular swimming pool, a direction of a longer side of the rectangular swimming pool may be determined as the first direction in the map, a direction of a shorter side of the rectangular swimming pool may be determined as the second direction, and a corner of the rectangular swimming pool in the map may be determined as a starting point from which the pool robot operates. Determining a moving direction as the first direction, where moving duration in the moving direction is greater than a preset threshold means that a direction in which the pool robot moves straight along the wall for the longest time in a process of moving along an edge of the water surface is determined as the first direction. There may be one or a plurality of moving directions in which moving duration exceeds the preset threshold. When there are a plurality of moving directions in which moving duration exceeds the preset threshold, a moving direction may be randomly selected as the first direction. For example, when the target water region is a rectangular swimming pool, a direction in which the pool robot moves straight for the longest time in a process of moving along an edge of the swimming pool by one round is a direction of a longer side. For example, when the target water region is a circular pool, there are a plurality of straight moving directions in which moving duration is the same in a process of moving along an edge of the swimming pool by one round. In this case, a moving direction may be randomly selected as the first direction. According to the above embodiments, a moving starting point and a moving direction of the robot can be quickly determined based on a map constructed when the pool robot operates or a pre-constructed map. This effectively improves operation efficiency of the pool robot.

In some embodiments, before the obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction, the method further includes: after the pool robot is controlled to move in the target water region along an edge of the target water region by one round, determining a moving direction as the first direction, where moving duration in the moving direction is greater than a preset threshold; and determining a direction perpendicular to the first direction as the second direction.

In some embodiments, after the obtaining a current moving direction of the pool robot in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, the method further includes: when a deviation angle between the current moving direction and the first direction is greater than or equal to a second threshold, determining that the current moving direction deviates from the first direction.

In some embodiments, the first threshold is any value within a preset threshold range. The preset threshold range is determined based on an operation width of the pool robot. The first threshold is less than the operation width.

In some embodiments, the preset duration is determined based on a moving speed of the pool robot. A distance over which the pool robot moves at the moving speed in the second direction within the preset duration is less than an operation width of the pool robot.

In some embodiments, the virtual obstacle includes at least one of a boundary of divisions of the target water region or a virtual wall.

In some embodiments, the third threshold is determined based on an operation width of the pool robot. The third threshold is less than the operation width.

In some embodiments, the map includes a map of the water surface of the target water region or a map of a bottom of the target water region.

In some embodiments, the method further includes: randomly selecting any moving direction as the first direction when there are a plurality of moving directions, where moving duration in each moving direction is greater than the preset threshold.

According to another embodiment of this application, a pool robot control method is provided. The method includes: in a process in which a pool robot performs a target operation on a water surface of a target water region in a first direction, when the pool robot collides with an obstacle, controlling the pool robot to rotate by a first rotation angle, enabling the pool robot to perform the target operation in a second direction; and determining a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and controlling the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

The following describes in detail this application with reference to specific embodiments, and a procedure in which the pool robot cleans a rectangular swimming pool is used as an example to describe this specific embodiment. As shown in FIG. 4, steps for cleaning the rectangular swimming pool by the pool robot include the following.

S1: The pool robot enters the rectangular swimming pool and starts performing cleaning.

S2: The pool robot performs cleaning along an edge of the rectangular swimming pool and constructs a map of the swimming pool.

S3: The pool robot performs full-coverage cleaning on a water surface.

S4: The pool robot performs cleaning along the edge of the rectangular swimming pool again.

S5: The pool robot finishes cleaning the rectangular swimming pool.

As shown in FIG. 5, a procedure in which the pool robot performs full-coverage cleaning on the water surface includes the following steps.

Step 1: The pool robot starts performing coverage cleaning on the water surface.

Step 2: The pool robot determines a direction of a longer side and a corner of the rectangular swimming pool based on the map of the swimming pool.

Step 3: The pool robot moves to the corner of the rectangular swimming pool and rotates to the direction of the longer side.

Step 4: The pool robot moves from the corner of the rectangular swimming pool in the direction of the longer side and cleans the water surface of the swimming pool along a motion path.

Step 5: The pool robot continuously detects a distance between the pool robot and a wall of the swimming pool in front of the pool robot in a process of moving in the direction of the longer side.

Step 6: When the pool robot detects that the distance between the pool robot and the wall of the swimming pool in front of the pool robot is less than a first threshold, the pool robot calculates a first azimuth, namely, an angle by which the pool robot needs to rotate to a direction of a shorter side.

Step 7: The pool robot rotates by the first azimuth to the direction of the shorter side.

Step 8: The pool robot moves in the direction of the shorter side.

Step 9: When the pool robot moves in the direction of the shorter side for preset duration, the pool robot calculates a second azimuth, namely, an angle by which the pool robot needs to rotate to the direction of the longer side.

Step 10: The pool robot continuously detects a distance between the pool robot and a wall of the swimming pool in front of the pool robot in a process of moving in the direction of the shorter side, where when the distance is less than a second threshold, step 11 is performed, or when the distance is greater than the second threshold, step 3 is performed based on the second azimuth, and the above process is repeated.

Step 11: The pool robot finishes performing coverage cleaning on the water surface.

Based on the foregoing descriptions of the implementations, a person skilled in the art may clearly understand that the method in the above embodiments may be implemented by software in addition to a necessary universal hardware platform or by hardware only. In many cases, the former is a preferred implementation. Based on such understanding, the technical solutions of this application can be essentially or the part that contributes to the related technology can be embodied in a form of a software product. This computer software product is stored in a storage medium (for example, a ROM/RAM, a magnetic disk, or a compact disc), and includes several instructions for instructing a terminal device (which may be a mobile phone, a computer, a server, or a network device) to perform the method described in embodiments of this application.

An embodiment further provides a pool robot control apparatus. The apparatus is configured to implement the above embodiments and optional implementations. Some that have been described are not described in detail again. The term "module" used below may be a combination of software and/or hardware that implements a preset function. Although the apparatus described in the following embodiment is preferably implemented in software, it may be conceived that the apparatus is implemented in hardware or a combination of software and hardware.

FIG. 6 is a block diagram 600 of a structure of a pool robot control apparatus according to an embodiment of this application. As shown in FIG. 6, the apparatus includes: a first obtaining module 62 configured to obtain a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction; a first determining module 64 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 66 configured to control the pool robot to rotate by the first rotation angle to a second direction and perform the target operation in the second direction; and a second determining module 68 configured to determine a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and control the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

In some embodiments, the first determining module 64 further includes: a first determining sub-module configured to determine a first preset angle as the first rotation angle when an orientation of a current moving direction is a first orientation; and a second determining sub-module configured to determine a second preset angle as the first rotation angle when the orientation of the current moving direction is a second orientation. The first direction includes the first orientation and the second orientation. The first orientation is opposite to the second orientation. The first preset angle and the second preset angle correspond to opposite directions.

In some embodiments, the apparatus further includes: a second obtaining module configured to obtain a current moving direction of the pool robot in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction; a first adjustment module configured to adjust an operation angular velocity of the pool robot when the current moving direction deviates from the first direction; and a second adjustment module configured to adjust the current moving direction based on the operation angular velocity to control the pool robot to perform the target operation in the first direction.

In some embodiments, the apparatus further includes: a third determining module configured to before the current moving direction of the pool robot is obtained in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, when a deviation angle between the current moving direction and the first direction is greater than or equal to a second threshold, determine that the current moving direction deviates from the first direction.

In some embodiments, the second determining module 68 further includes: a third determining sub-module configured to determine a first rotation direction corresponding to the first rotation angle; and a fourth determining sub-module configured to determine the second rotation angle based on the first rotation direction and the first rotation angle.

In some embodiments, the apparatus further includes: a third obtaining module configured to obtain a second distance between the pool robot and the obstacle in a process of controlling the pool robot to perform the target operation in the second direction; and a second control module configured to when the second distance is less than a third threshold, control the pool robot to stop moving to stop performing the target operation.

In some embodiments, the apparatus further includes: a fifth control module configured to before the first distance between the pool robot and the obstacle is obtained in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, control the pool robot to perform at least one of the following in the target water region: performing the target operation on the water surface of the target water region along an edge of the target water region; moving on the water surface of the target water region along the edge of the target water region; or constructing a map of the target water region after the pool robot moves in the target water region along the edge of the target water region.

In some embodiments, the obstacle includes at least one of a physical obstacle or a virtual obstacle.

In some embodiments, the apparatus further includes: a sixth control module configured to before the first distance between the pool robot and the obstacle is obtained in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, obtain a map of the pool robot, where the map is constructed in a process in which the pool robot moves in the target water region, or the map is obtained from a pre-constructed map; and a third determining module configured to determine a moving direction of the pool robot based on the map. The moving direction includes the first direction and the second direction.

In some embodiments, the apparatus further includes: a fourth determining module configured to after the pool robot is controlled to move in the target water region along an edge of the target water region by one round, determine a moving direction as the first direction, where moving duration in the moving direction is greater than a preset threshold; and a fifth determining module configured to determine a direction perpendicular to the first direction as the second direction.

In some embodiments, the apparatus further includes: a sixth determining module configured to after the current moving direction of the pool robot is obtained in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, when a deviation angle between the current moving direction and the first direction is greater than or equal to a second threshold, determine that the current moving direction deviates from the first direction.

In some embodiments, the first threshold is any value within a preset threshold range. The preset threshold range is determined based on an operation width of the pool robot. The first threshold is less than the operation width.

In some embodiments, the preset duration is determined based on a moving speed of the pool robot. A distance over which the pool robot moves at the moving speed in the second direction within the preset duration is less than an operation width of the pool robot.

In some embodiments, the virtual obstacle includes at least one of a boundary of divisions of the target water region or a virtual wall.

In some embodiments, the third threshold is determined based on an operation width of the pool robot. The third threshold is less than the operation width.

In some embodiments, the map includes a map of the water surface of the target water region or a map of a bottom of the target water region.

In some embodiments, the fourth determining module further includes a selection sub-module configured to randomly select any moving direction as the first direction when there are a plurality of moving directions, where moving duration in each moving direction is greater than the preset threshold.

According to another embodiment of this application, a pool robot control apparatus is provided. The apparatus includes: a third control module configured to in a process in which a pool robot performs a target operation on a water surface of a target water region in a first direction, when the pool robot collides with an obstacle, control the pool robot to rotate by a first rotation angle, enabling the pool robot to perform the target operation in a second direction; and a fourth control module configured to determine a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and control the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

It should be noted that each module may be implemented by software or hardware, and for the latter, it may be implemented in the following manner: All modules are located in a same processor, or various modules are located in different processors respectively in a form of any combination. However, this is not limited thereto.

An embodiment of this application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is run, steps in any one of the method embodiments are performed.

In some embodiments, the computer-readable storage medium may include, but is not limited to, any medium that can store the computer program, for example, a USB flash drive, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a removable hard disk, a magnetic disk, or a compact disc.

An embodiment of this application further provides a pool robot. The pool robot includes a memory and a processor. The memory stores a computer program. The processor is configured to: when executing the computer program, perform steps in any one of the method embodiments.

In some embodiments, the pool robot may further include a transmission device and an input/output device. The transmission device is connected to the processor, and the input/output device is connected to the processor.

For details of specific examples in this embodiment, refer to the examples described in the above embodiments and example implementations. Details are not described in this embodiment again.

It is clear that a person skilled in the art should understand that the modules or steps in this application may be implemented by a general-purpose computing apparatus, and the modules may be integrated on a single computing apparatus or distributed on a network including a plurality of computing apparatuses, or may be implemented by program code executed by a computing apparatus. In this way, the program code can be stored in a storage apparatus and executed by the computing apparatus. In addition, in some cases, the shown or described steps may be performed in an order different from the above order, or the modules are respectively manufactured into various integrated circuit modules, or a plurality of modules are manufactured into a single integrated circuit module. In this way, this application is not limited to any particular combination of hardware and software.

The foregoing descriptions are merely preferred embodiments of this application, and are not intended to limit this application. For a person skilled in the art, this application may have various modifications and variations. Any modification, equivalent replacement, improvement, or the like made without departing from the principle of this application shall fall within the protection scope of this application.

Claims

What is claimed is:

1. A pool robot control method, comprising:

obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction;

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 by the first rotation angle to a second direction and perform the target operation in the second direction; and

determining a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and controlling the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

2. The method according to claim 1, wherein the determining a first rotation angle of the pool robot when the first distance is less than a first threshold comprises:

determining a first preset angle as the first rotation angle when an orientation of a current moving direction is a first orientation; and

determining a second preset angle as the first rotation angle when the orientation of the current moving direction is a second orientation, wherein

the first direction comprises the first orientation and the second orientation, wherein the first orientation is opposite to the second orientation, and the first preset angle and the second preset angle correspond to opposite directions.

3. The method according to claim 1, wherein in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, the method further comprises:

obtaining a current moving direction of the pool robot in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction;

adjusting an operation angular velocity of the pool robot when the current moving direction deviates from the first direction; and

adjusting the current moving direction based on the operation angular velocity to control the pool robot to perform the target operation in the first direction.

4. The method according to claim 1, wherein the determining a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance comprises:

determining a first rotation direction corresponding to the first rotation angle; and

determining the second rotation angle based on the first rotation direction and the first rotation angle.

5. The method according to claim 1, wherein in a process of controlling the pool robot to rotate by the first rotation angle to the second direction and perform the target operation in the second direction, the method further comprises:

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 moving to stop performing the target operation.

6. The method according to claim 1, wherein before the obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction, controlling the pool robot to perform at least one of the following in the target water region:

performing the target operation on the water surface of the target water region along an edge of the target water region;

moving on the water surface of the target water region along the edge of the target water region; or

constructing a map of the target water region after the pool robot moves in the target water region along the edge of the target water region.

7. The method according to claim 1, wherein the obstacle comprises at least one of a physical obstacle or a virtual obstacle.

8. The method according to claim 1, wherein before the obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction, the method further comprises:

obtaining a map of the pool robot, wherein the map is constructed in a process in which the pool robot moves in the target water region, or the map is obtained from a pre-constructed map; and

determining a moving direction or a moving starting point of the pool robot based on the map, wherein the moving direction comprises the first direction and the second direction.

9. The method according to claim 1, wherein before the obtaining a first distance between a pool robot and an obstacle in a process in which the pool robot performs a target operation on a water surface of a target water region in a first direction, the method further comprises:

after the pool robot is controlled to move in the target water region along an edge of the target water region by one round, determining a moving direction as the first direction, wherein moving duration in the moving direction is greater than a preset threshold; and

determining a direction perpendicular to the first direction as the second direction.

10. The method according to claim 3, wherein after the obtaining a current moving direction of the pool robot in real time in the process in which the pool robot performs the target operation on the water surface of the target water region in the first direction, the method further comprises:

when a deviation angle between the current moving direction and the first direction is greater than or equal to a second threshold, determining that the current moving direction deviates from the first direction.

11. The method according to claim 1, wherein the first threshold is any value within a preset threshold range, wherein the preset threshold range is determined based on an operation width of the pool robot, wherein the first threshold is less than the operation width.

12. The method according to claim 1, wherein the preset duration is determined based on a moving speed of the pool robot, wherein a distance over which the pool robot moves at the moving speed in the second direction within the preset duration is less than an operation width of the pool robot.

13. The method according to claim 7, wherein the virtual obstacle comprises at least one of a boundary of divisions of the target water region or a virtual wall.

14. The method according to claim 5, wherein the third threshold is determined based on an operation width of the pool robot, wherein the third threshold is less than the operation width.

15. The method according to claim 8, wherein the map comprises a map of the water surface of the target water region or a map of a bottom of the target water region.

16. The method according to claim 9, further comprising:

randomly selecting any moving direction as the first direction when there are a plurality of moving directions, wherein moving duration in each moving direction is greater than the preset threshold.

17. The method according to claim 1, wherein the obstacle is located in front of the pool robot.

18. A pool robot control method, comprising:

in a process in which a pool robot performs a target operation on a water surface of a target water region in a first direction, when the pool robot collides with an obstacle, controlling the pool robot to rotate by a first rotation angle, enabling the pool robot to perform the target operation in a second direction; and

determining a second rotation angle of the pool robot when duration for which the pool robot performs the target operation in the second direction meets preset duration or when a distance over which the pool robot performs the target operation in the second direction meets a preset distance, and controlling the pool robot to rotate by the second rotation angle to the first direction and perform the target operation in the first direction.

19. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, steps of the method according to claim 1 are implemented.

20. A pool robot, comprising a memory, a processor, and a computer program that is stored in the memory and that is capable of being run on the processor, wherein when executing the computer program, the processor implements steps of the method according to claim 1.

Resources

Images & Drawings included:

Sources:

Similar patent applications:

Recent applications in this class:

Recent applications for this Assignee: