Pool robot control method and storage medium
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.
Claims
exact text as granted — not AI-modifiedWhat 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 .Join the waitlist — get patent alerts
Track US2026092466A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.