Cleaning method and apparatus for underwater robot, and readable storage medium
Patent Information
- Application Number
- PCT/CN2025/091768
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-02-27
- Filing Date
- 2025-04-28
- Publication Date
- 2026-09-03
Smart Images

Figure CN2025091768_03092026_PF_FP_ABST
Abstract
Description
Cleaning method and device of underwater robot and readable storage medium
[0001] The present application is based on the Chinese patent application No. 202510227920.5 entitled "Cleaning method and device of underwater robot and readable storage medium" filed on February 27, 2025, and claims priority thereto. TECHNICAL FIELD
[0002] The present application relates to the technical field of intelligent robots, in particular to a cleaning method and device of an underwater robot and a readable storage medium. BACKGROUND
[0003] Swimming pools are places where people engage in swimming. Some garbage or bacteria will appear in the swimming pool during long-term use, so the swimming pool needs to be cleaned regularly. At present, the swimming pool is usually cleaned by a cleaning robot. The cleaning robot includes a water cleaning robot and an underwater cleaning robot, which are respectively used to clean the surrounding environment, the bottom and the wall of the swimming pool. The underwater cleaning robot moves on the bottom and the wall of the swimming pool by carrying a cleaning mechanism to clean the bottom and the wall of the swimming pool.
[0004] The existing underwater cleaning robot uses an inertial navigation module for positioning when cleaning. The inertial navigation module measures the acceleration and angular velocity of the object through the internal inertial sensor (such as an accelerometer and a gyroscope), and then calculates the position and direction of the object. However, this calculation process is based on initial conditions and integral operation, so the error will gradually accumulate over time, causing the orientation of the head of the robot to gradually deviate to one side when cleaning the bottom of the pool. As a result, the robot cannot maintain an arch-shaped or several-shaped action, which greatly reduces the cleaning effect. SUMMARY
[0005] The embodiments of the present application provide a cleaning method and device of an underwater robot and a readable storage medium to solve the problem that the existing underwater robot deviates to one side when cleaning the bottom of the pool due to the accumulated error of positioning, so that the underwater robot cannot maintain a fixed posture for cleaning work, and the cleaning effect is greatly reduced.
[0006] A cleaning method of an underwater robot, comprising:
[0007] obtaining direction information for representing a posture change of the underwater robot and distance information for representing a distance of the underwater robot passing through a current wall in a running period of the underwater robot passing through the current wall; and
[0008] According to the distance information and the direction information, a wall passed through by the underwater robot is determined, and when the determination result is that the direction information is within a preset direction deviation range and the distance information is greater than a preset distance threshold, it is determined that the current wall passed through by the underwater robot is a target reference wall;
[0009] The underwater robot is controlled to perform cleaning work in a vertical direction of the reference line.
[0010] A cleaning device of an underwater robot, comprising:
[0011] An acquisition module is configured to acquire direction information representing a change in a posture of the underwater robot in a running period of the underwater robot passing through a current wall and distance information representing a distance of the underwater robot passing through the current wall;
[0012] A screening module is configured to determine, according to the distance information and the direction information, a wall passed through by the underwater robot, and when the determination result is that the direction information is within a preset direction deviation range and the distance information is greater than a preset distance threshold, it is determined that the current wall passed through by the underwater robot is a target reference wall;
[0013] A correction module is configured to control the underwater robot to perform cleaning work in a vertical direction of the reference line.
[0014] An underwater robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the cleaning method of the underwater robot when executing the computer program.
[0015] A computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the cleaning method of the underwater robot.
[0016] The cleaning method, device and readable storage medium of the underwater robot, comprising acquiring direction information representing a change in a posture of the underwater robot in a running period of the underwater robot passing through a current wall and distance information representing a distance of the underwater robot passing through the current wall; determining, according to the distance information and the direction information, a wall passed through by the underwater robot, and when the determination result is that the direction information is within a preset direction deviation range and the distance information is greater than a preset distance threshold, it is determined that the current wall passed through by the underwater robot is a target reference wall; and controlling the underwater robot to perform cleaning work in a vertical direction of the reference line.
[0017] The application compares the distance information with a preset distance threshold value and compares the direction information with a preset direction deviation range to determine a target reference wall. The posture of the current underwater robot is corrected based on the target reference wall as a reference line. The correction can effectively reduce the accumulated error generated by the inertial navigation module in the positioning process. Thus, the problem that the head of the existing underwater robot gradually deviates due to the accumulated error in positioning when cleaning the pool bottom, so that the cleaning work cannot be performed in a fixed posture, thereby affecting the cleaning effect, is solved. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the application, the drawings needed to be used in the description of the embodiments of the application will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0019] Fig. 1 is a schematic diagram of an application environment of the cleaning method of the underwater robot in an embodiment of the application;
[0020] Fig. 2 is a flowchart of the cleaning method of the underwater robot in an embodiment of the application;
[0021] Fig. 3 is a schematic diagram of the structure of the underwater robot in the cleaning method of the underwater robot in an embodiment of the application;
[0022] Fig. 4 is a schematic diagram of finding a long straight wall in the cleaning method of the underwater robot in an embodiment of the application;
[0023] Fig. 5 is a schematic diagram of longitudinal pool bottom depth cleaning in the cleaning method of the underwater robot in an embodiment of the application;
[0024] Fig. 6 is a schematic diagram of transverse pool bottom depth cleaning in the cleaning method of the underwater robot in an embodiment of the application;
[0025] Fig. 7 is a schematic diagram of the cleaning device of the underwater robot in an embodiment of the application;
[0026] Fig. 8 is a schematic diagram of the underwater robot in an embodiment of the application;
[0027] In the drawings: 1, inertial measurement unit; 2, ultrasonic ranging sensor; 3, ultrasonic wave; 4, wall. DETAILED DESCRIPTION
[0028] With reference to the drawings and embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0029] The cleaning method of the underwater robot provided in the embodiments of the present application can be applied in the application environment as shown in FIG. 1. Specifically, the cleaning method of the underwater robot is applied in a cleaning system of the underwater robot, which includes a client and a server as shown in FIG. 1, and the client and the server communicate through a network, to solve the problem that the orientation of the head of the underwater robot will gradually deviate to one side due to the accumulated error of positioning when the underwater robot cleans the pool bottom, so that the underwater robot cannot maintain a fixed posture to perform the cleaning work, and further causes the cleaning effect to be greatly discounted. The client, also known as the user end, is a program that provides local services for clients corresponding to the server. The client can be installed on, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers.
[0030] In an embodiment, as shown in FIG. 2, a cleaning method of an underwater robot is provided, and the method is applied to the server in FIG. 1 as an example, including the following steps:
[0031] S01: Obtain direction information for representing the posture change of the underwater robot in the running period of the underwater robot through the current wall, and distance information for representing the distance of the underwater robot through the current wall.
[0032] In the embodiment, the underwater robot is equipped with an ultrasonic ranging sensor 2 and an inertial measurement unit 1. The ultrasonic ranging sensor 2 accurately measures the distance between the underwater robot and the obstacle by emitting ultrasonic waves and receiving the reflected echo. The inertial measurement unit 1 integrates a three-axis accelerometer, a gyroscope and a magnetometer, and can measure acceleration, angular velocity and earth magnetic field in real time, and calculate the position, velocity and attitude information of the robot accordingly.
[0033] As shown in FIG. 3, the ultrasonic ranging sensor 2 is installed around the shell of the underwater robot, for accurately measuring the distance of the pool boundary, wall, step and obstacle, so as to plan the optimal cleaning path. The inertial measurement unit (IMU) 1 is installed near the center of gravity of the robot body, to ensure accurate capture and reflection of the overall motion state and attitude information.
[0034] In this embodiment, the directional information used to characterize the attitude changes of the underwater robot is acquired through the inertial measurement unit 1. The directional information characterizing the attitude changes of the underwater robot mainly includes pitch angle, roll angle, and heading angle. Pitch angle refers to the angle of rotation of an object about its horizontal axis (usually consistent with the object's forward / backward direction). During the vertical movement of the underwater robot, the pitch angle reflects the degree of tilt of the robot's head or tail relative to the horizontal plane. Roll angle refers to the angle of rotation of an object about its vertical axis (usually consistent with the object's left / right direction). During the left / right roll of the underwater robot, the roll angle reflects the degree of tilt of the robot's left and right sides relative to the vertical plane. Heading angle refers to the angle of rotation of an object about its vertical axis (usually consistent with the object's up / down direction). In the forward direction of the underwater robot, the heading angle reflects the degree of deflection of the robot's head or tail relative to a fixed direction (such as true north).
[0035] In this embodiment, a gyroscope is used to measure angular velocity (i.e., the speed at which the robot rotates around its axes), and the robot's attitude change can be calculated by integration. An accelerometer is used to measure linear acceleration, which can be used to detect the direction of gravity, thereby helping to determine the robot's pitch and roll angles. A magnetometer is used to measure the Earth's magnetic field to determine the robot's yaw angle, especially in underwater environments where there are no other external references (such as GPS).
[0036] In this embodiment, the distance information representing the underwater robot's distance from the current wall is obtained using an odometer installed near the drive wheels. An odometer is a device installed on an underwater robot to measure its travel distance. It primarily estimates the distance traveled by measuring the displacement of moving parts and combining this with relevant parameters (such as wheel diameter, encoder pulse count, etc.). Its basic principle is to use sensors to detect the object's motion state and calculate the travel distance. Specifically:
[0037] 1) First, the odometer measures the number of revolutions N of the wheel as it passes the current wall by an encoder mounted on the robot's wheel or motor.
[0038] 2) Based on the diameter of the underwater robot's wheels, calculate the distance traveled per revolution, and then multiply it by the number of revolutions N of the wheels to obtain the distance information of the underwater robot passing through the current wall.
[0039] S02: Based on the distance information and direction information, determine the wall that the underwater robot passes through. When the determination result is that the direction information is within a preset direction deviation range and the distance information is greater than a preset distance threshold, determine the current wall that the underwater robot passes through as the target reference wall.
[0040] In this embodiment, the determination of direction information and the preset direction deviation range mainly includes an overall deviation determination method and a local deviation determination method. The steps for determining local deviation include the following:
[0041] 1) Calculate the deviation between the current orientation information of the underwater robot and the expected orientation of the target wall.
[0042] 2) Determine whether the deviation is within the preset directional deviation range: |θ 当前 -θ 目标 |<θ 偏差
[0043] Where, θ 当前 This is the current orientation information of the underwater robot; θ 目标 It is the expected orientation of the target wall; θ 偏差 It is the preset directional deviation range.
[0044] For example, the target wall is expected to face 90 degrees (due east), the preset direction deviation range is ±10 degrees, and the robot's current direction is 95 degrees. Direction determination: |95-90|=5<10
[0045] Then the direction condition is satisfied.
[0046] In this embodiment, the overall deviation judgment method is to calculate the standard deviation (mean square deviation) of all directional information to obtain an overall directional deviation value, and then compare it with a preset directional deviation range to obtain a judgment result.
[0047] In this embodiment, if the current distance information obtained in step S01 exceeds a preset distance threshold, it is considered that the distance condition is met. When both the direction condition and the distance condition are met, the currently passed wall is determined as the target reference wall.
[0048] S03: Using the target reference wall as a baseline, control the underwater robot to perform cleaning work in the direction perpendicular to the baseline.
[0049] In this embodiment, the vertical direction of the baseline is calculated by using the direction θ of the target reference wall. 墙壁 It is obtained by rotating 90 degrees clockwise or counterclockwise, and the specific calculation formula is: θ 垂直 =θ 墙壁 ±90°
[0050] The choice between +90° and -90° depends on the planned direction of the cleaning path.
[0051] In this embodiment, the step of controlling the robot to move vertically includes:
[0052] 1) Obtain the robot's current orientation information θ through the inertial measurement unit (IMU). 当前 Calculate the angle that needs to be adjusted: Δθ = θ 垂直 -θ 当前
[0053] 2) Control the robot to rotate by an angle Δθ, and control the robot along θ. 垂直 The underwater machine moves in a straight line while activating cleaning devices (such as brushes or vacuums). After finding the target reference wall, the underwater machine needs to rotate by an angle Δθ, for example, 90 degrees to the left. At the end of the rotation, due to inertia, the machine's rotation angle will be greater than 90 degrees. At this point, the machine reverses direction and rotates by a small angle again. This reverse-rotation action is repeated several times. Due to the damping effect of the water, the machine's orientation eventually approaches the target angle.
[0054] 3) Move a certain distance (e.g., the width of a swimming pool) perpendicular to the wall, then move in the opposite direction to form a reciprocating cleaning path. Each time the robot reaches the end of the path, adjust its position to maintain a fixed distance from the wall. Through multiple reciprocating movements, cover the entire cleaning area. After each reciprocating movement, move a certain distance (e.g., the width of the cleaning device) parallel to the target reference wall to ensure no area is missed.
[0055] In this embodiment, the underwater robot must maintain a certain distance from the right-side wall (left-side wall) at all times during its movement. The distance to the wall is monitored in real time by an ultrasonic sensor on the right side. When the distance decreases, the speed of the left wheel is appropriately reduced, allowing the robot to gradually move away from the wall and increase the distance to the wall; when the distance increases, the speed of the right wheel is appropriately reduced, allowing the robot to gradually move closer to the wall and decrease the distance to the wall.
[0056] The underwater robot cleaning method in this embodiment determines a target reference wall by comparing distance information with a preset distance threshold and direction information with a preset direction deviation range. Using this target reference wall as a baseline, the current attitude of the underwater robot is corrected. This correction effectively reduces the cumulative error generated by the inertial navigation module during positioning. This solves the problem that existing underwater robots, when cleaning the bottom of a pool, experience a gradual head deflection due to accumulated positioning errors, making it impossible to maintain a fixed posture for cleaning and thus affecting the cleaning effect.
[0057] In one embodiment, step S02 above, namely, the specific steps of determining the wall passed by the underwater robot based on the distance information and direction information, include:
[0058] S201: If the distance information of the currently passed wall is greater than the preset distance threshold, then the currently passed wall is a long wall.
[0059] Specifically, as shown in Figure 4, during the robot's movement along the current wall, it compares the distance information of the currently passed wall with a preset distance threshold. If d 当前 >d 阈值 If the current wall is a long wall, then it is a long wall. Otherwise, the current wall is not a long wall. 当前 This is the distance information of the currently passed wall, d 阈值 It is a preset distance threshold.
[0060] S202: If the current wall's orientation information is less than the preset orientation deviation threshold, then the wall currently being passed is a straight wall.
[0061] Specifically, as shown in Figure 4, during the process of the robot running along the current wall, it will calculate the local deviation of the direction information of the wall it is currently passing, and compare the local deviation of the current direction information with the preset direction deviation threshold. If the local deviation of the current direction information is less than the preset direction deviation threshold, it means that the wall it is currently passing is a straight wall.
[0062] S203: If it is determined that the currently passed wall is both a long wall and a straight wall, then the currently passed wall is used as the target reference wall.
[0063] Specifically, based on the determination methods in steps S201 and S202 above, the length and direction information of the currently passed wall are determined. If the currently passed wall is both a long wall and a straight wall, then the currently passed wall is taken as the target reference wall.
[0064] S204: The distance threshold is less than the length of the longest wall and greater than the length of the second longest wall; the second longest wall refers to a wall whose length is less than the length of the longest wall and greater than the length of the remaining other walls; the remaining other walls refer to all walls except the longest wall and the second longest wall.
[0065] In this embodiment, to filter out the longest wall among all walls, a distance threshold needs to be set. This threshold should be less than the length of the longest wall and greater than the length of the second longest wall to ensure that only the longest wall is filtered out. Here, the second longest wall refers to the wall whose length is second only to the longest wall but longer than all other walls; the remaining walls refer to all walls other than the longest and second longest walls.
[0066] The underwater robot cleaning method in this embodiment plans the optimal cleaning path by selecting the longest wall, thereby covering the entire cleaning area more efficiently and improving the cleaning effect.
[0067] In one embodiment, the method for determining the target reference wall in step S203 above further includes:
[0068] S301: Obtain the orientation and distance information of the underwater robot during all running segments on all walls.
[0069] In this embodiment, after the underwater robot enters the water, it will run a circle along all the walls of the pool. Using the same method as in step S01, directional information representing the changes in the underwater robot's attitude and distance information representing the distance the underwater robot travels past each wall are obtained during the robot's runtime.
[0070] S302: Based on the distance and direction information, determine whether each wall is both a long wall and a straight wall.
[0071] In this embodiment, based on the direction and distance information of all walls obtained in step S301, and combined with the criteria for determining long walls and straight walls defined in steps S201 and S202, the distance and direction information of each wall are analyzed to determine whether it simultaneously meets the conditions of a long wall and a straight wall.
[0072] S303: If there are more than two walls that are both long and straight, then compare the distance information of the walls that are both long and straight.
[0073] In this embodiment, if the analysis results of step S302 show that the number of walls that are both long walls and straight walls exceeds two, further screening is required to determine the optimal target reference wall.
[0074] S304: Select the wall with the longest distance information that is both a long wall and a straight wall as the target reference wall.
[0075] In this embodiment, the final target reference wall is determined by further filtering distance information. Specifically, the distance information of walls that are both long and straight is first sorted from largest to smallest, and then the wall with the longest distance is selected as the final target reference wall.
[0076] The underwater robot cleaning method in this embodiment, by comprehensively analyzing the distance and direction information of the wall, can more accurately select the most suitable wall as a target reference. This improvement not only enhances the efficiency and accuracy of the cleaning task but also strengthens the robot's autonomous navigation and decision-making capabilities.
[0077] In one embodiment, step S202 above, namely the step of determining that if the direction information of the current wall is less than a preset direction deviation threshold, then the currently passed wall is a straight wall, includes:
[0078] S401: The direction information includes yaw angles used to characterize the direction change of the underwater robot on the horizontal plane; the deviation of the yaw angle is obtained based on the difference between each yaw angle of the underwater robot when passing the current wall and the average value of all yaw angles.
[0079] In this embodiment, the direction information refers to the yaw angle, which characterizes the underwater robot's direction change on the horizontal plane. The average yaw angle is obtained by summing all recorded yaw angle data and dividing by the total number of data points. This average represents the robot's average heading when passing the wall. For each recorded yaw angle, the difference between it and the average yaw angle is calculated; this difference is the yaw angle deviation at that point. The yaw angle deviation can be positive or negative, where a positive value indicates the robot has deviated to the right relative to the average heading, and a negative value indicates it has deviated to the left.
[0080] S402: Obtain the square of the yaw angle based on the square of the deviation of the yaw angle.
[0081] In this embodiment, each calculated yaw angle deviation is squared. This step is to eliminate the influence of the sign of the deviation and to give larger deviations greater statistical weight. The squared value is the squared difference of the yaw angle.
[0082] S403: The overall deviation of the yaw angle of the current wall is obtained by taking the square root of the average of the squares of the differences of all the yaw angles.
[0083] In this embodiment, the squared differences of each yaw angle are summed, and then the total number of yaw angles collected is used to obtain the average value of the squared differences of all yaw angles. This average value reflects the average level of yaw angle deviation of the robot throughout its movement. Finally, the square root of the average value of the squared differences of all yaw angles is taken to obtain the overall yaw angle deviation of the current wall. This value is a scalar representing the overall magnitude of the robot's yaw angle deviation, and its unit is the same as the unit of yaw angle. The specific calculation formula is as follows:
[0084] Where, θ i Let θ represent the i-th yaw angle. mean θ represents the average of n yaw angles, where n is the total number of yaw angle samples. 偏差 It is the overall deviation of the yaw angle.
[0085] S404: If the overall deviation of the yaw angle of the current wall is less than the preset direction deviation threshold, then the wall currently being passed is a straight wall.
[0086] In this embodiment, the calculated overall deviation of the yaw angle is compared with a preset direction deviation threshold. If the deviation is less than the direction deviation threshold, the wall being traversed is considered to be a straight wall; if the deviation is greater than or equal to the direction deviation threshold, the wall is considered to have a certain curvature or irregularity.
[0087] The underwater robot cleaning method in this embodiment calculates the overall deviation of the yaw angle and compares it with a preset yaw threshold to determine whether the wall being traversed is a straight wall. Accurate wall straightness determination helps the robot adopt a more suitable cleaning path, thereby improving cleaning efficiency. This method not only improves the robot's automation and adaptability but also contributes to improved cleaning efficiency and quality.
[0088] In one embodiment, step S03 above, namely the step of controlling the underwater robot to perform cleaning work in a direction perpendicular to the target reference wall as a baseline, includes:
[0089] S501: Control the underwater robot to perform cleaning work in a zigzag pattern along the vertical direction of the baseline, starting from the baseline.
[0090] In this embodiment, after locating the target reference wall, as shown in Figure 5, the underwater robot uses the target reference wall as a baseline. Starting from the baseline, the robot moves a distance perpendicular to it, beginning the first segment of the cleaning path. After reaching the predetermined cleaning distance, the robot turns and moves in the opposite direction, forming the upper half of a zigzag shape. Then, the robot turns again and moves a distance parallel to the baseline, returning to the vicinity of the baseline, forming the lower half of the zigzag shape. Repeating this process, the robot continuously advances along the baseline, covering the entire cleaning area with a zigzag route.
[0091] S502: Each time the underwater robot returns to the target reference wall, control the underwater robot to turn 180 degrees so that the tail of the underwater robot is perpendicular to the target reference wall, and correct the underwater robot.
[0092] In this embodiment, as the robot approaches the target reference wall, it rotates 180 degrees around its vertical axis using its propulsion system or rotation mechanism. The purpose of this step is to align the robot's tail with the target reference wall, preparing for the subsequent contact operation. After completing the 180-degree turn, the robot adjusts its posture and position to ensure its tail is in close contact with the target reference wall. This process can be achieved through a propulsion system, posture control system, or robotic arm. Ultimately, by maintaining close contact between its tail and the wall, the robot can maintain a perpendicular posture to the target reference wall, thus completing posture correction.
[0093] In this embodiment of the underwater robot cleaning method, when the robot's tail is in close contact with the target reference wall, its body naturally forms a perpendicular relationship with the target reference wall. This perpendicular relationship not only provides the robot with a stable support point but also helps to correct its attitude parameters such as heading and depth. This allows the underwater robot to maintain a fixed posture during cleaning work, thereby improving the cleaning effect.
[0094] In one embodiment, the cleaning method for the underwater robot further includes:
[0095] S601: After the underwater robot has finished cleaning along the direction perpendicular to the target reference wall, control the underwater robot to move to the adjacent wall of the target reference wall, so that the underwater robot cleans along the direction parallel to the target reference wall.
[0096] In this embodiment, after completing vertical cleaning, the robot needs to identify and locate the wall adjacent to the target reference wall. This process can be achieved through the robot's navigation system, sensor data, or preset map information. Specifically, after perceiving the environment, the robot uses algorithms (such as laser positioning or visual positioning) to determine its own position path on the map. As shown in Figure 6, the robot is controlled to move to the wall adjacent to the target reference wall according to the optimal path. After successfully turning to the adjacent wall, the robot begins cleaning in a direction parallel to the target reference wall.
[0097] The underwater robot cleaning method of this embodiment controls the underwater robot to run to the adjacent wall of the target reference wall, so that the underwater robot cleans in a direction parallel to the target reference wall, which can ensure that all walls in the target area are fully treated, thereby further improving the cleaning effect of the underwater robot.
[0098] In one embodiment, the step S01 above, before obtaining the direction and distance information during the underwater robot's operation period as it passes the first wall, requires reaching the wall closest to the underwater robot's entry point, includes:
[0099] S701: Obtain the distance and orientation angle of the underwater robot from its launch position to the surrounding walls.
[0100] In this embodiment, after the underwater robot enters the water, it begins to rotate and uses the front-mounted ultrasonic sensor 2 to record the distance from the entry point to the surrounding walls. At the same time, the inertial measurement unit 1 records the wall orientation angle from the entry point to the surrounding walls. The robot stops after rotating 360 degrees.
[0101] S702: Based on the wall distance, find the wall closest to the current position of the underwater robot.
[0102] In this embodiment, the distances from the obtained launch location to the surrounding walls are sorted from smallest to largest to determine the wall closest to the underwater robot's current location.
[0103] S703: Control the underwater robot to move toward the nearest wall based on the orientation angle of the nearest wall.
[0104] In this embodiment, the robot adjusts its rotation based on the orientation angle of the nearest wall determined in step S702. After the angle adjustment is completed, the robot will continue to move forward in that direction.
[0105] S704: If the distance from the current position to the nearest wall is within the preset anti-collision safety distance range, then the underwater robot has reached the nearest wall.
[0106] In this embodiment, when the distance data detected by the front ultrasonic sensor 2 enters the preset anti-collision safety range, it indicates that the robot has approached the nearest wall. At this time, the robot's left wheel reverses while its right wheel moves forward, causing it to rotate counterclockwise. During this process, the robot will switch to forward mode within a short period of time, thereby ensuring that its right side remains close to the wall while rotating.
[0107] The underwater robot cleaning method in this embodiment allows the robot to quickly determine its relative position in the underwater environment by finding the nearest wall, thereby accelerating task execution. By controlling the distance between the robot and the wall within a preset collision-avoidance safety range, unnecessary collisions can be prevented. This method not only protects the robot itself from damage but also ensures the safe execution of the task and the accuracy of data collection.
[0108] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0109] In one embodiment, a cleaning device for an underwater robot is provided, which corresponds one-to-one with the cleaning method for the underwater robot in the above embodiments. As shown in FIG7, the cleaning device for the underwater robot includes an acquisition module 101, a screening module 102, and a calibration module 103. The functional modules are described in detail below:
[0110] The acquisition module 101 is used to acquire directional information representing the attitude change of the underwater robot during the runtime segment when the underwater robot passes through the current wall, and distance information representing the underwater robot passing through the current wall.
[0111] The filtering module 102 is used to determine the wall passed by the underwater robot based on the distance information and direction information. When the determination result is that the direction information is within a preset direction deviation range and the distance information is greater than a preset distance threshold, the current wall passed by the underwater robot is determined as the target reference wall.
[0112] The calibration module 103 is used to control the underwater robot to perform cleaning work in the direction perpendicular to the target reference wall, using the target reference wall as a baseline.
[0113] Optionally, the above-mentioned filtering module 102 includes:
[0114] The long wall detection submodule is used to determine if the distance information of the currently passed wall is greater than a preset distance threshold.
[0115] The straight wall determination submodule is used to determine if the direction information of the current wall is less than a preset direction deviation threshold, and therefore the currently passed wall is a straight wall.
[0116] The target reference wall determination submodule is used to determine if the currently passed wall is both a long wall and a straight wall, and then use the currently passed wall as the target reference wall.
[0117] The condition submodule is used for the distance threshold being less than the length of the longest wall and greater than the length of the second longest wall; the second longest wall refers to a wall whose length is less than the length of the longest wall and greater than the length of the remaining other walls; the remaining other walls refer to all walls other than the longest wall and the second longest wall.
[0118] Optionally, the above target reference wall determination submodule includes:
[0119] The acquisition unit is used to acquire the orientation and distance information of the underwater robot during its operation on all walls.
[0120] The judgment unit is used to determine whether each wall is both a long wall and a straight wall based on the distance information and direction information.
[0121] The condition judgment unit is used to compare the distance information of walls that are both long walls and straight walls if there are more than two such walls.
[0122] The filtering sub-unit is used to select the wall with the longest distance information that is both a long wall and a straight wall as the target reference wall.
[0123] Optionally, the above-mentioned straight wall determination submodule includes:
[0124] Yaw angle unit, used for the direction information including yaw angle for characterizing the direction change of the underwater robot on the horizontal plane.
[0125] The deviation calculation unit for yaw angle is used to obtain the deviation of yaw angle based on the difference between each yaw angle of the underwater robot when passing the current wall and the average value of all yaw angles.
[0126] The yaw angle difference calculation unit is used to obtain the yaw angle difference based on the square of the deviation of the yaw angle.
[0127] The overall deviation calculation unit is used to obtain the overall deviation of the current wall's yaw angle based on the square root of the average of the squares of the differences of all the yaw angles.
[0128] The straight wall determination unit is used to determine if the overall deviation of the yaw angle of the current wall is less than a preset direction deviation threshold, and therefore the wall currently being passed is a straight wall.
[0129] Optionally, the above-mentioned correction module 103 includes:
[0130] The cleaning submodule is used to control the underwater robot to perform cleaning work along a zigzag route, starting from the baseline and moving perpendicular to it.
[0131] The correction submodule is used to control the underwater robot to turn 180 degrees each time it returns to the target reference wall, so that the tail of the underwater robot is perpendicular to the target reference wall, thereby correcting the underwater robot.
[0132] Optionally, the above cleaning submodule includes:
[0133] The cleaning unit is used to control the underwater robot to move to an adjacent wall of the target reference wall after the underwater robot has finished cleaning in a direction perpendicular to the target reference wall, so that the underwater robot can clean in a direction parallel to the target reference wall.
[0134] Optionally, the aforementioned acquisition module 101 includes:
[0135] The nearest wall acquisition submodule is used to obtain the wall distance and orientation angle from the underwater robot's launch position to the surrounding walls.
[0136] The nearest wall filtering submodule is used to obtain the wall closest to the current position of the underwater robot based on the wall distance.
[0137] The operation submodule is used to control the underwater robot to move toward the nearest wall based on the orientation angle of the nearest wall.
[0138] The nearest wall determination submodule is used to determine if the underwater robot has reached the nearest wall when the distance from the current position to the nearest wall is within the preset anti-collision safety distance range.
[0139] Specific limitations regarding the cleaning device for underwater robots can be found in the limitations on the cleaning methods for underwater robots described above, and will not be repeated here. Each module in the aforementioned cleaning device for underwater robots can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0140] In one embodiment, FIG8 is a schematic diagram of the structure of an underwater robot provided in this application. As shown in FIG8, the underwater robot of this embodiment includes: at least one processor (only one is shown in FIG8), a memory, and a computer program stored in the memory and executable on at least one processor. When the processor executes the computer program, it implements the steps of the cleaning method embodiments of any of the above-described underwater robots.
[0141] The underwater robot may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 8 is merely an example of an underwater robot and does not constitute a limitation on the underwater robot. An underwater robot may include more or fewer components than shown, or combine certain components, or different components; for example, it may also include a network interface, a display screen, and input devices.
[0142] The processor referred to can be a CPU, but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0143] The memory includes readable storage media, internal memory, etc., wherein the internal memory can be the underwater robot's RAM, providing an environment for the operation of the operating system and readable instructions of the underwater robot stored in the readable storage media. The readable storage media can be the underwater robot's hard drive, or in other embodiments, an external storage device for the underwater robot, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory can include both internal storage units and external storage devices of the underwater robot. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as program code for computer programs. The memory can also be used to temporarily store data that has been output or will be output.
[0144] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0145] The implementation of all or part of the processes in the methods of the above embodiments can also be accomplished by a computer program product. When the computer program product is run on the underwater robot, the underwater robot executes the steps in the above method embodiments.
[0146] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0147] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the cleaning method of the underwater robot in the above embodiment, as shown in Figure 2, and will not be described again here to avoid repetition. Alternatively, when executed by a processor, the computer program implements the functions of each module / unit in the cleaning device for the underwater robot in this embodiment, such as the functions of the acquisition module 101, the screening module 102, and the calibration module 103 shown in Figure 7, and will not be described again here to avoid repetition.
[0148] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by instructing related hardware through a readable storage medium. The readable storage medium can be stored in a non-volatile computer-readable storage medium, which, when executed, can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0149] The implementation of all or part of the processes in the methods of the above embodiments can also be accomplished by a computer program product. When the computer program product is run on the underwater robot, the underwater robot executes the steps in the above method embodiments.
[0150] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0151] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0152] In the embodiments provided in this application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / underwater robot embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0153] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0154] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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. Such 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 this application, and should all be included within the protection scope of this application.
Claims
1. A cleaning method for an underwater robot, wherein, include: Obtain directional information representing the attitude change of the underwater robot during the runtime segment when the underwater robot passes through the current wall, and distance information representing the distance of the underwater robot passing through the current wall; Based on the distance and direction information, the wall that the underwater robot passes through is determined. When the determination result is that the direction information is within a preset direction deviation range and the distance information is greater than a preset distance threshold, the current wall that the underwater robot passes through is determined as the target reference wall. Using the target reference wall as a baseline, the underwater robot is controlled to perform cleaning work in a direction perpendicular to the baseline.
2. The cleaning method for an underwater robot according to claim 1, wherein, The step of determining the wall traversed by the underwater robot based on the distance and direction information includes: If the distance to the wall being passed is greater than a preset distance threshold, then the wall being passed is a long wall. If the current orientation information of the wall is less than the preset orientation deviation threshold, then the wall being passed is a straight wall. If it is determined that the wall being passed is both a long wall and a straight wall, then the wall being passed is used as the target reference wall. The distance threshold is less than the length of the longest wall and greater than the length of the second longest wall; the second longest wall is defined as a wall whose length is less than the length of the longest wall and greater than the length of the remaining other walls; the remaining other walls are all walls except the longest and second longest walls.
3. The cleaning method for an underwater robot according to claim 2, wherein, The method for determining the target reference wall also includes: Obtain the orientation and distance information of the underwater robot during its operation on all walls; Based on the distance and direction information, determine whether each wall is both a long wall and a straight wall; If there are more than two walls that are both long and straight, then compare the distance information of the walls that are both long and straight. The wall with the longest distance information that is both a long wall and a straight wall is selected as the target reference wall.
4. The cleaning method for an underwater robot according to claim 2, wherein, The step of determining if the direction information of the current wall is less than a preset direction deviation threshold, and therefore the currently passed wall is a straight wall, includes: The orientation information includes a yaw angle that characterizes the orientation change of the underwater robot on the horizontal plane; The deviation of the yaw angle is obtained by the difference between each yaw angle of the underwater robot when passing the current wall and the average value of all yaw angles; The square of the yaw angle is obtained by taking the square of the deviation of the yaw angle. The overall deviation of the yaw angle of the current wall is obtained by taking the square root of the average of the squares of the differences of all the yaw angles. If the overall deviation of the yaw angle of the current wall is less than a preset direction deviation threshold, then the wall being passed is a straight wall.
5. The cleaning method for an underwater robot according to claim 1, wherein, The step of controlling the underwater robot to perform cleaning work in a direction perpendicular to the target reference wall as a baseline includes: The underwater robot is controlled to perform cleaning work in a zigzag pattern along the vertical direction of the baseline, starting from the baseline. Each time the underwater robot returns to the target reference wall, it is controlled to turn 180 degrees so that its tail is perpendicular to the target reference wall, thus correcting the underwater robot.
6. The cleaning method for an underwater robot according to claim 5, wherein, The cleaning method for the underwater robot also includes: Once the underwater robot has finished cleaning along a direction perpendicular to the target reference wall, it is controlled to move to an adjacent wall of the target reference wall, so that the underwater robot can clean along a direction parallel to the target reference wall.
7. The cleaning method for an underwater robot according to claim 1, wherein, Before obtaining the direction and distance information of the underwater robot during its operation phase as it passes the first wall, it is necessary to first reach the wall closest to the underwater robot's entry point, including: Obtain the distance and orientation angle of the underwater robot from its launch position to each of the surrounding walls; Based on the wall distance, the wall closest to the current position of the underwater robot is obtained; The underwater robot is controlled to move toward the nearest wall based on the orientation angle of the nearest wall. If the distance from the current position to the nearest wall is determined to be within the preset anti-collision safety distance range, then the underwater robot has reached the nearest wall.
8. A cleaning device for an underwater robot, wherein, include: The acquisition module is used to acquire directional information representing the attitude change of the underwater robot during the runtime segment when the underwater robot passes through the current wall, and distance information representing the distance of the underwater robot passing through the current wall. The filtering module is used to determine the wall passed by the underwater robot based on the distance information and direction information. When the determination result is that the direction information is within a preset direction deviation range and the distance information is greater than a preset distance threshold, the current wall passed by the underwater robot is determined as the target reference wall. The calibration module is used to control the underwater robot to perform cleaning work in a direction perpendicular to the target reference wall, using the target reference wall as a baseline.
9. An underwater robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the cleaning method for the underwater robot according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein, When the computer program is executed by the processor, it implements the cleaning method for the underwater robot according to any one of claims 1 to 7.