A pool robot escape method and system based on historical trajectory rollback

By recording and analyzing the motion trajectory data of the pool robot in real time, reverse control commands are generated, enabling the pool robot to move backward when encountering obstacles. This solves the problem of the pool robot getting stuck and achieves the effects of quick and reliable escape and motor protection.

CN122431389APending Publication Date: 2026-07-21YITUO ELECTRIC CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YITUO ELECTRIC CO LTD
Filing Date
2026-03-26
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Pool robots are prone to getting stuck when faced with complex obstacles such as stairs and fountains, rendering existing escape strategies ineffective and leading to motor overheating or mechanical damage.

Method used

By recording the motion trajectory data of the pool robot in real time and storing it in a circular buffer, monitoring for invalid displacement and attitude instability conditions, generating reverse control commands, and driving the robot to move backward along the original path to escape from trouble.

Benefits of technology

It enables rapid and reliable escape from complex obstacles, avoiding motor overheating and mechanical damage, and improving cleaning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431389A_ABST
    Figure CN122431389A_ABST
Patent Text Reader

Abstract

The application discloses a pool robot escape method based on historical trajectory rollback, comprising the following steps: continuously recording motion data at fixed time intervals during the walking of the pool robot and storing the motion data in a circular buffer; then, when the pool robot executes an advance instruction, if the displacement invalidation condition and the posture instability condition are both met, it is determined that the pool robot is in a trapped state; then, the control system retrieves historical trajectory data before the trapped state from the circular buffer, generates control instructions in reverse order, drives the pool robot to travel backward along the original path, and monitors the escape state in real time; finally, after escaping, the trapped position is marked as a dangerous area and the map is updated, and the subsequent path is re-planned to avoid the area. The application can effectively avoid the pool robot getting into a more and more difficult situation, realize fast autonomous escape, and has environment learning ability and intelligent obstacle avoidance ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent cleaning robot technology, specifically to a method and system for a swimming pool robot to escape from trouble based on historical trajectory reversal. Background Technology

[0002] During autonomous cleaning, pool robots need to clean the pool bottom, side walls, and waterline area. However, the pool environment contains many non-standard fixed obstacles, such as entry stairs, fountain outlets for decoration or massage, and other fixed objects on the poolside like wave pools. These obstacles have complex structures and often feature recesses, protrusions, or railings.

[0003] In existing technologies, pool robots are highly susceptible to getting stuck when encountering such obstacles. For example, the robot's tracks or wheels may become entangled in the gaps between stair steps, or the robot's body may be lifted by a protruding structure from a fountain, causing the chassis to suspend in the air. Traditional escape strategies rely on preset, simple behavioral patterns, such as randomly changing the direction of movement, adjusting the forward angle, or rotating in place when an increase in drive motor current or abnormal encoder feedback is detected. However, these strategies often fail when faced with complex, fixed obstacles on the shore. This is because when the robot is already partially stuck in a recess or straddling an obstacle, continuing to try to move forward or adjust the angle may cause the robot to become even more stuck, not only preventing it from escaping but also causing the motor to stall due to prolonged high current, leading to motor overheating or damage. Therefore, how to enable pool robots to autonomously escape from obstacles quickly, reliably, and safely has become a pressing technical problem that needs to be solved. Summary of the Invention

[0004] This invention proposes a method and system for escaping obstacles in swimming pools based on historical trajectory reversal. Its core objective is to address the situation where swimming pool robots get stuck at fixed points on the shore, such as stairs or fountains, or underwater obstacles, making it impossible to escape using conventional forward commands. When stuck, traditional random adjustment strategies are ineffective and can even exacerbate the stuck situation; this invention achieves rapid escape through an intelligent reversal mechanism.

[0005] In a first aspect, the present invention provides a method for a swimming pool robot to escape from trouble based on historical trajectory retracing, characterized in that it includes:

[0006] S1. During the movement of the pool robot, the motion trajectory data of the pool robot within a preset time period is collected and stored in a circular buffer in real time.

[0007] S2. Monitor the motion state of the pool robot in real time. When both the displacement invalidity condition and the attitude instability condition are met, determine that the pool robot has entered a trapped state. The displacement invalidity condition is that after continuously outputting forward drive commands for more than a first time threshold, the actual displacement change of the pool robot is less than the first displacement threshold. The attitude instability condition is that the heading angle of the pool robot undergoes uncontrolled periodic oscillation.

[0008] S3. In response to the determination of the trapped state, control the pool robot to stop moving forward; retrieve the motion trajectory data within the preset time before entering the trapped state from the loop buffer, and generate a corresponding reverse control command based on the motion trajectory data; execute the reverse control command to drive the pool robot to move backward along the reverse path of the motion trajectory data until it exits the trapped state.

[0009] Furthermore, step S2 also includes motor current saturation detection:

[0010] The current of the drive motor of the pool robot is monitored. When the current of the drive motor continuously exceeds the rated current threshold and the duration reaches the second preset time, it is determined that the current saturation condition is met. The determination of the trapped state also includes simultaneously meeting the current saturation condition.

[0011] Further, in step S3, generating the corresponding reverse control command based on the motion trajectory data specifically involves:

[0012] The motion data is smoothed and fitted to generate a smooth backward path curve. Based on the smooth backward path curve, the linear velocity and angular velocity of the pool robot when it moves backward are calculated to form the reverse control command.

[0013] Furthermore, in step S3, when driving the pool robot to move backward along the reverse path of the motion trajectory data, it is also necessary to monitor the escape status in real time, including:

[0014] The escape determination parameters of the pool robot are monitored in real time. When one or a combination of the following conditions are met, the robot is determined to have exited the trapped state:

[0015] The operating current of the drive motor drops below the no-load current threshold.

[0016] The pressure sensor data located at the bottom of the pool robot was restored to represent the uniform force distribution on the chassis.

[0017] The actual displacement calculated by the inertial measurement unit is continuously generated, and the direction of displacement is consistent with the direction of the reverse driving command.

[0018] Further, in step S3, the step of smoothing and fitting the motion data to generate a smooth regression path curve includes:

[0019] Extract the discrete trajectory coordinate point sequence within a preset time before entering the trap state from the circular buffer, and fit the discrete trajectory coordinate point sequence with a Bézier curve to generate a smooth backtracking path curve.

[0020] Further, in step S3, the reverse control command is executed to drive the pool robot to move backward along the reverse path of the motion trajectory data, employing a segmented control strategy, including:

[0021] Disengagement start-up phase: Control the drive motor to output at a first preset speed and maximum allowable torque to perform initial reversal;

[0022] Attitude correction phase: After detecting that the pool robot has generated effective displacement, the drive motor is controlled to increase to the second preset speed to reverse. At the same time, based on the heading angle fed back by the inertial measurement unit, a closed-loop control algorithm is used to correct the heading angle of the pool robot to be consistent with the initial direction of the historical motion trajectory.

[0023] Rapid evacuation phase: When the operating current of the drive motor is detected to drop below the no-load current threshold and remain below it for a preset time, the drive motor is controlled to reverse at full speed at a third preset speed, which is greater than the second preset speed.

[0024] S4. Mark the position and pose information of the pool robot when the trap state is triggered and a preset range around it as a no-entry area, and update the internal environment map of the pool robot.

[0025] Based on the updated internal environment map, the swimming pool robot replans its subsequent travel path to avoid the restricted area.

[0026] Secondly, the present invention provides a swimming pool robot escape system based on historical trajectory retracing, characterized in that it includes:

[0027] Data recording module: used to collect and store the motion trajectory data of the pool robot within a preset time period in real time during the movement of the pool robot into a circular buffer;

[0028] Trapped Detection Module: Used to monitor the motion state of the pool robot in real time. When both the displacement invalidity condition and the attitude instability condition are met simultaneously, the pool robot is determined to have entered a trapped state. The displacement invalidity condition is that after continuously outputting forward drive commands for more than a first time threshold, the actual displacement change of the pool robot is less than the first displacement threshold. The attitude instability condition is that the heading angle of the pool robot undergoes uncontrolled periodic oscillation.

[0029] Backward control module: In response to the determination of the trapped state, control the pool robot to stop moving forward; retrieve the motion trajectory data within the preset time before entering the trapped state from the circular buffer, and generate a corresponding reverse control command based on the motion trajectory data; execute the reverse control command to drive the pool robot to move backward along the reverse path of the motion trajectory data until it exits the trapped state.

[0030] This invention proposes a method for escaping a swimming pool robot based on historical trajectory reversal. By recording and storing the recent movement trajectory of the swimming pool robot in real time, a circular buffer is constructed, enabling the swimming pool robot to immediately stop ineffective forward movement when it is determined to be trapped. Based on the historical data in the buffer, control commands are generated in reverse order, driving the swimming pool robot to precisely reverse along the original path to the obstacle, thereby directly escaping from the trapped environment. Furthermore, a multi-dimensional trap detection mechanism integrating features of displacement ineffectiveness, attitude instability, and current saturation is designed. Through dynamic thresholds and scene-adaptive judgment logic, it can accurately identify the stuck state, prevent the robot from getting deeper into the trap, and effectively prevent false triggering during normal climbing or obstacle crossing, ensuring the reliability of the escape strategy execution. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0032] Figure 1 This is a flowchart illustrating the swimming pool robot escape method based on historical trajectory retracing provided by the present invention.

[0033] Figure 2 This is a block diagram of the module structure of the swimming pool robot escape system based on historical trajectory regression provided by the present invention. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0035] Combination Figure 1 The present invention describes a method for a swimming pool robot to escape from trouble based on historical trajectory retracing, comprising:

[0036] S1. During the movement of the pool robot, the motion trajectory data of the pool robot within a preset time period is collected and stored in a circular buffer in real time.

[0037] The "journeying process" refers to the autonomous movement of the pool robot in the pool, including the bottom, walls, and shore, while performing cleaning operations. This encompasses typical scenarios such as wall-following, wall-climbing, and planar movement, representing the robot's normal operating state. "Motion trajectory data" refers to core data reflecting the robot's path and motion state. Specifically, in the context of pool cleaning, this includes the travel distance calculated from the motor encoder pulse count, the heading angle provided by the electronic compass / inertial measurement unit (IMU), and the speed difference between the left and right tracks or wheels. This data forms the basis for reconstructing the robot's path before it gets stuck. "Preset duration" refers to the dedicated storage time for trajectory data set for the robot. Considering the short-distance stuck situation at the pool shore, this is set to 30-60 seconds, eliminating the need to store excessively long trajectory data. "Circular buffer" refers to a dynamic data storage area using a First-In-First-Out (FIFO) queue. Newly collected trajectory data automatically overwrites older data exceeding the preset duration, ensuring real-time trajectory data while avoiding data redundancy within the limited storage resources of the pool robot.

[0038] In S1 of this embodiment, when the pool robot is performing cleaning in the pool, it continuously and frequently collects motion trajectory data. The data is cached and updated in real time through a circular buffer, and only the trajectory data within the recent preset time period is retained, thus abandoning the method of storing the full trajectory.

[0039] The shortcomings of existing technologies are that pool robots lack a dedicated real-time storage mechanism for short-term trajectory data, or blindly store all trajectory data, leading to storage redundancy and low efficiency in retrieving trajectory data after a lag. Ultimately, this results in the robot being stuck without any valid historical trajectory data to call upon, making it impossible to plan a backtracking path. S1 of this embodiment specifically solves the technical problems of pool robots being stuck without any valid historical trajectory data to call upon, or redundant trajectory data storage and untimely retrieval. To ensure that the robot always retains the recent driving path data before the lag, the data storage balances real-time performance and hardware resource utilization. In subsequent lags, historical trajectories can be retrieved quickly and accurately, providing reliable and accurate data support for reverse backtracking path planning. From a data perspective, this avoids the situation where the lack of trajectory data prevents the planning of a backtracking path, laying the foundation for the execution of subsequent escape procedures.

[0040] S2. Monitor the motion state of the pool robot in real time. When both the displacement invalidity condition and the attitude instability condition are met, determine that the pool robot has entered a trapped state. The displacement invalidity condition is that after continuously outputting forward drive commands for more than a first time threshold, the actual displacement change of the pool robot is less than the first displacement threshold. The attitude instability condition is that the heading angle of the pool robot undergoes uncontrolled periodic oscillation.

[0041] Among them, motion state refers to the driving state of the pool robot during its movement, covering typical pool states such as normal driving, brief slippage, climbing slopes, getting stuck on fixed objects on the shore, and being supported or stuck by underwater obstacles; the displacement invalidity condition refers to the judgment condition where the robot outputs a forward drive command but has no effective actual displacement, which is one of the core conditions for distinguishing between normal driving and getting stuck in the pool robot; the first time threshold refers to the shortest duration for judging displacement invalidity, which is set to 3 seconds in combination with the pool scenario to avoid the brief displacement pause caused by uneven pool bottom being mistaken for getting stuck; the actual displacement change refers to the actual distance the robot moves as detected by the IMU / odometer, which is different from the theoretical displacement calculated by the motor encoder and fits the characteristics of the easy slippage scenario in the pool; the first displacement threshold is the displacement threshold for judging displacement invalidity, below which the robot is considered to have no effective actual displacement; attitude instability bar The criteria for determining whether a robot's body is stuck and exhibits uncontrolled swaying is the core condition for distinguishing between ordinary slippage and being stuck in a pool. The heading angle refers to the robot's direction of travel, detected by an electronic compass / IMU, reflecting the robot's frontal orientation. Uncontrolled periodic oscillations refer to irregular left-right oscillations of the robot's heading angle, with the oscillation frequency not synchronized with the motor's adjustment frequency. This is a typical characteristic of pool robots stuck on fixed objects on the shore, such as stair edges or fountain outlets, as well as underwater obstacles, caused by one side of the robot's chassis being suspended and the other side spinning freely, resulting in body swaying. A stuck state refers to a state where the robot is stuck on fixed objects on the shore or underwater obstacles, such as pool stairs, fountain outlets, or surfers, and cannot move normally. Fixed objects on the shore refer to fixed facilities within the pool, such as stairs, fountain outlets, and surfers. Underwater obstacles refer to permanent installations such as pool bottom drains, lighting, and pool wall handrails.

[0042] In this embodiment, S2 involves real-time monitoring of the swimming pool robot's motion state during its movement. By simultaneously satisfying both conditions of invalid displacement and unstable posture, the robot can be accurately determined to have entered a trapped state. The subsequent escape procedure is only triggered when both conditions are met.

[0043] The existing technology's drawback is that the pool robot's stuckness detection relies solely on a single displacement indicator. This easily leads to misjudging normal climbing or brief slippage in the pool as stuckness, or being insensitive to true stuckness caused by fixed objects on the shore or underwater obstacles. False triggers can cause the robot to retreat unnecessarily, affecting the efficiency of pool cleaning operations, while insensitive detection can cause the robot to continue moving forward, exacerbating the stuckness, and even burning out the motor or damaging the mechanical structure. S2 of this embodiment specifically solves the technical problem of the existing technology's single stuckness detection indicator, which is prone to false and missed detections in complex pool scenarios. In particular, it accurately distinguishes between ordinary slippage / climbing in the pool and true stuckness caused by fixed objects on the shore or underwater obstacles. By using dual-condition collaborative judgment, it accurately identifies the stuck state of the pool robot, effectively preventing false and missed triggers of the escape procedure, avoiding the impact of false triggers on pool cleaning efficiency, and avoiding the robot's continued forward movement and exacerbating the stuckness due to missed triggers, thus protecting the motor and mechanical structure. It provides an accurate judgment basis for the timely and accurate initiation of the escape procedure, adapting to the complex driving scenarios of pools.

[0044] S3. In response to the determination of the trapped state, control the pool robot to stop moving forward; retrieve the motion trajectory data within the preset time before entering the trapped state from the loop buffer, and generate a corresponding reverse control command based on the motion trajectory data; execute the reverse control command to drive the pool robot to move backward along the reverse path of the motion trajectory data until it exits the trapped state.

[0045] Among them, the determination of the trapped state refers to the result of the determination of the stuck state of the pool robot completed in S2, which is the only trigger signal to start the escape procedure in this step; the reverse control command refers to the robot driving control command generated in reverse order according to the motion trajectory data of the pool robot before it got stuck. Combined with the tracked / wheeled drive characteristics of the pool robot, if the original trajectory was a right turn, the reverse command is a left turn and reverse; if the original trajectory was a straight line, the reverse command is a straight back. The core is the reverse differential speed control of the left and right wheels / tracks; the reverse path refers to the path that is completely opposite to the robot's driving trajectory before it got stuck, which fits the scenario of the pool robot driving from a flat area to a fixed object on the shore. This path has the characteristics of being unobstructed; backward driving refers to the robot driving backward along the reverse path, which is different from the escape method of adjusting the direction forward in place in the existing technology; exiting the trapped state refers to the robot getting rid of the stuck state of the fixed object on the shore or underwater obstacle by backward driving and returning to the normal driving state. Combined with the pool scenario, it can be determined by indicators such as the motor current returning to normal and the chassis displacement resistance disappearing.

[0046] In this embodiment, S3 uses the determination result of the trapped state as the sole trigger signal. First, it controls the pool robot to stop moving forward to avoid further scrambling with fixed objects on the shore or underwater obstacles due to continuous forward movement. Then, it accurately retrieves the motion trajectory data within a preset time before the scrambling from the loop buffer and generates corresponding reverse control commands based on the data. Finally, it drives the robot to move backward along the reverse path of the motion trajectory until it gets rid of the fixed objects on the shore or underwater obstacles and exits the trapped state.

[0047] The existing technology has a drawback: when a pool robot gets stuck, it uses a tentative forward-probing method of changing direction and adjusting the angle of movement in place to escape. However, in scenarios where the robot gets stuck near fixed objects on the shore, such as pool stairs or fountains, or underwater obstacles, this method increases the contact pressure between the robot and the fixed object, creating a situation where the robot becomes increasingly stuck, making effective escape impossible. It can even cause the motor to burn out due to continuous high current output and damage to the mechanical structure from the forceful pulling. S3 of this embodiment specifically addresses the technical problem in the existing technology where the tentative forward-probing method easily exacerbates the sticking and fails to effectively escape when a pool robot is stuck near fixed objects on the shore or underwater obstacles. It physically releases the robot from the fixed object by reversing its historical trajectory. The robot is designed to overcome the obstacle of underwater obstacles, immediately stopping its forward movement upon becoming stuck. This prevents further entrapment due to continued movement. Reverse control commands generated from historical trajectories ensure the robot accurately reverses its path, leveraging the characteristic of pool robots navigating from flat areas towards fixed shorelines or underwater obstacles to ensure a smooth return path and a near 100% success rate in escaping pool obstacles. Reverse movement physically releases the obstacle, enabling rapid escape while reducing unnecessary high-current output from the motor, achieving energy savings and protecting the motor. This prevents damage to the mechanical structure from forced pulling, perfectly adapting to complex stuck scenarios with fixed shorelines in pools.

[0048] Furthermore, in step S2, to further quantify motion deviation during the displacement invalidation detection, the system introduces a slippage rate calculation. By comparing the displacement estimated by the odometer with the actual displacement, the degree of slippage is quantitatively assessed; the slippage rate... The calculation formula is:

[0049]

[0050] in, The distance traveled as calculated by the odometer; The actual displacement calculated by the optical flow sensor or IMU.

[0051] Decision logic: When If the wheel spins wildly but the vehicle body remains almost stationary, it indicates a severe slippage situation.

[0052] The specific operation of attitude instability detection is that the system first performs Fourier transform on the gyroscope angular velocity data within the last 3 seconds through FFT spectrum analysis to obtain a spectrum diagram, and analyzes whether there are significant energy peaks in the spectrum diagram to identify this uncontrolled periodic oscillation.

[0053] The judgment logic is as follows: when the spectrum graph shows low-frequency oscillation peaks, it is judged as the chassis being off-center or stuck. When the spectrum graph only shows linear changes in pitch angle without oscillations, it is judged as normal climbing.

[0054] Motor current saturation detection monitors the current of the drive motor of the pool robot. When the current of the drive motor continuously exceeds the rated current threshold and the duration reaches the second preset time, it is determined that the current saturation condition is met.

[0055] The judgment logic is as follows: when the ratio of the current to the rated current exceeds the rated current threshold and reaches the second preset time, it is marked as power saturation, indicating that the current pool robot is in a blocked or severely slipping state.

[0056] Further, in step S3, the reverse control command specifically includes: the pool robot stopping sending forward torque commands to the drive motor; then extracting all historical motion data from the current moment back a certain period of time from the loop buffer, the historical motion data accurately recording the path the robot took before getting stuck; performing smooth fitting processing on the motion data to generate a smooth backtracking path curve, and calculating the linear velocity and angular velocity of the pool robot when moving backward based on the smooth backtracking path curve to form the reverse control command; the distance S that the pool robot backs along the original path is at least greater than the recorded path length, or continues to backtrack until the pressure sensor and current monitoring of the chassis return to normal range, confirming that the machine has completely left obstacles such as stairs or fountain openings.

[0057] Furthermore, in step S3, when driving the pool robot backward along the reverse path of the motion trajectory data, it is also necessary to monitor the escape status in real time, including:

[0058] The escape determination parameters of the pool robot are monitored in real time. When one or a combination of the following conditions are met, the robot is determined to have exited the trapped state: the operating current of the drive motor drops below the no-load current threshold; the pressure sensor data set at the bottom of the pool robot recovers to a state that represents a uniform force distribution on the chassis; the actual motion displacement calculated by the inertial measurement unit continues to be generated, and the displacement direction is consistent with the direction of the reverse driving command; when the indicators remain normal for a period of time, it is determined that the robot has completely escaped the trapped area and stops the reverse operation.

[0059] Furthermore, the pool robot's violent struggle in the first few seconds after getting stuck resulted in high-frequency jitter in its original trajectory data points. Directly reversing the execution of these jittery commands would make the backward movement uneven. Therefore, the system extracts a sequence of discrete trajectory points from the circular buffer within a preset time period before entering the trapped state. , ,..., The discrete trajectory coordinate point sequence is fitted using a second- or third-order Bézier curve to generate a smooth backtracking path curve.

[0060] Considering the possibility of wheel slippage before getting stuck, the recorded mileage data is greater than the actual displacement. The system estimates the slippage rate before getting stuck, which is the ratio of the actual speed to the encoder speed. The additional distance is calculated by subtracting the slippage rate multiplied by the planned backtracking distance from unit 1. The actual backtracking distance should be the additional distance plus the planned backtracking distance to ensure complete exit from the stuck point.

[0061] Furthermore, the reverse control command is executed to drive the pool robot to move backward along the reverse path of the motion trajectory data, employing a segmented control strategy, including:

[0062] Disengagement start-up phase: Control the drive motor to output at a first preset speed and maximum allowable torque to perform initial reversal;

[0063] Attitude correction phase: After detecting that the pool robot has generated effective displacement, the drive motor is controlled to increase to the second preset speed to reverse. At the same time, based on the heading angle fed back by the inertial measurement unit, a closed-loop control algorithm is used to correct the heading angle of the pool robot to be consistent with the initial direction of the historical motion trajectory.

[0064] Rapid evacuation phase: When the operating current of the drive motor is detected to drop below the no-load current threshold and remain below it for a preset time, the drive motor is controlled to reverse at full speed at a third preset speed, which is greater than the second preset speed.

[0065] Throughout the retraction process, the robot's escape status is monitored in real time. Once the indicators remain normal for a period of time, it is determined that the robot has completely escaped the trapped area, and the retraction operation is stopped.

[0066] Furthermore, after the retraction operation stops, the system will trigger the robot's center coordinates for this obstacle avoidance determination, and, combined with the robot's overall dimensions, mark it as a danger zone on the map. To further ensure safety, an expansion algorithm can be applied to this zone, extending it outward by a safety distance R meters to form a larger absolute obstacle avoidance zone.

[0067] After escaping the obstacle, the pool robot sets the cost of the absolute obstacle avoidance zone to infinity in its path planning algorithm. The algorithm then automatically calculates a new path to bypass the area. Following the newly planned path, the robot continues its cleaning or return-to-home tasks.

[0068] Combination Figure 2 The present invention describes a pool robot escape system based on historical trajectory reversal, comprising:

[0069] Data recording module: used to continuously record motion data at fixed time intervals during robot walking and store it in a circular buffer; the motion data includes the distance traveled, the direction of travel, and the difference in rotational speed between the left and right wheels; the circular buffer uses a sliding window mechanism to retain only historical trajectory data within the most recent set time period;

[0070] Trapped Detection Module: Used to monitor the robot's motion and attitude state when the robot executes a forward command. If both the displacement invalidity condition and the attitude instability condition are met simultaneously, the robot is determined to be in a trapped state.

[0071] The reversal control module is used to enable the robot to perform the following reversal escape operation when it is trapped: first, stop forward drive; then, retrieve the historical trajectory data that led to the trapped state from the circular buffer; generate corresponding drive control commands in reverse order based on the historical trajectory data to control the robot to move backward along the original path; and monitor the escape status in real time during the reversal process, stopping the reversal operation when the escape index indicates that the robot has escaped the trapped area.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for a swimming pool robot to escape from trouble based on historical trajectory retracing, characterized in that, include: S1. During the movement of the pool robot, the motion trajectory data of the pool robot within a preset time period is collected and stored in a circular buffer in real time. S2. Monitor the motion state of the pool robot in real time. When both the displacement invalidity condition and the attitude instability condition are met, determine that the pool robot has entered a trapped state. The displacement invalidity condition is that after continuously outputting forward drive commands for more than a first time threshold, the actual displacement change of the pool robot is less than the first displacement threshold. The attitude instability condition is that the heading angle of the pool robot undergoes uncontrolled periodic oscillation. S3. In response to the determination of the trapped state, control the pool robot to stop moving forward; retrieve the motion trajectory data within the preset time before entering the trapped state from the loop buffer, and generate a corresponding reverse control command based on the motion trajectory data; execute the reverse control command to drive the pool robot to move backward along the reverse path of the motion trajectory data until it exits the trapped state.

2. The method for a swimming pool robot to escape from trouble based on historical trajectory retracing as described in claim 1, characterized in that, Step S2 also includes motor current saturation detection: The current of the drive motor of the pool robot is monitored. When the current of the drive motor continuously exceeds the rated current threshold and the duration reaches the second preset time, it is determined that the current saturation condition is met. The determination of the trapped state also includes simultaneously meeting the current saturation condition.

3. The method for a swimming pool robot to escape from trouble based on historical trajectory retracing as described in claim 1, characterized in that, In step S3, generating the corresponding reverse control command based on the motion trajectory data specifically involves: The motion data is smoothed and fitted to generate a smooth backward path curve. Based on the smooth backward path curve, the linear velocity and angular velocity of the pool robot when it moves backward are calculated to form the reverse control command.

4. The method for a swimming pool robot to escape from trouble based on historical trajectory retracing as described in claim 1, characterized in that, In step S3, when driving the pool robot to move backward along the reverse path of the motion trajectory data, it is also necessary to monitor the escape status in real time, including: The escape determination parameters of the pool robot are monitored in real time. When one or a combination of the following conditions are met, the robot is determined to have exited the trapped state: The operating current of the drive motor drops below the no-load current threshold. The pressure sensor data located at the bottom of the pool robot was restored to represent the uniform force distribution on the chassis. The actual displacement calculated by the inertial measurement unit is continuously generated, and the direction of displacement is consistent with the direction of the reverse driving command.

5. A method for a swimming pool robot to escape from trouble based on historical trajectory retracing, as described in claim 3, is characterized in that, In step S3, the step of smoothing and fitting the motion data to generate a smooth regression path curve includes: Extract the discrete trajectory coordinate point sequence within a preset time before entering the trap state from the circular buffer, and fit the discrete trajectory coordinate point sequence with a Bézier curve to generate a smooth backtracking path curve.

6. The method for a swimming pool robot to escape from trouble based on historical trajectory retracing as described in claim 1, characterized in that, In step S3, the reverse control command is executed to drive the pool robot to move backward along the reverse path of the motion trajectory data, employing a segmented control strategy, including: Disengagement start-up phase: Control the drive motor to output at a first preset speed and maximum allowable torque to perform initial reversal; Attitude correction phase: After detecting that the pool robot has generated effective displacement, the drive motor is controlled to increase to the second preset speed to reverse. At the same time, based on the heading angle fed back by the inertial measurement unit, a closed-loop control algorithm is used to correct the heading angle of the pool robot to be consistent with the initial direction of the historical motion trajectory. Rapid evacuation phase: When the operating current of the drive motor is detected to drop below the no-load current threshold and remain below it for a preset time, the drive motor is controlled to reverse at full speed at a third preset speed, which is greater than the second preset speed.

7. The method for a swimming pool robot to escape from trouble based on historical trajectory retracing as described in claim 1, characterized in that, Also includes: S4. Mark the position and pose information of the pool robot when the trap state is triggered and a preset range around it as a no-entry area, and update the internal environment map of the pool robot. Based on the updated internal environment map, the swimming pool robot replans its subsequent travel path to avoid the restricted area.

8. A swimming pool robot escape system based on historical trajectory retracing, characterized in that, include: Data recording module: used to collect and store the motion trajectory data of the pool robot within a preset time period in real time during the movement of the pool robot into a circular buffer; Trapped Detection Module: Used to monitor the motion state of the pool robot in real time. When both the displacement invalidity condition and the attitude instability condition are met simultaneously, the pool robot is determined to have entered a trapped state. The displacement invalidity condition is that after continuously outputting forward drive commands for more than a first time threshold, the actual displacement change of the pool robot is less than the first displacement threshold. The attitude instability condition is that the heading angle of the pool robot undergoes uncontrolled periodic oscillation. Backward control module: In response to the determination of the trapped state, control the pool robot to stop moving forward; retrieve the motion trajectory data within the preset time before entering the trapped state from the circular buffer, and generate a corresponding reverse control command based on the motion trajectory data; execute the reverse control command to drive the pool robot to move backward along the reverse path of the motion trajectory data until it exits the trapped state.