An underwater robot obstacle avoidance method

By collecting information with underwater sensors, predicting collisions, and dividing the environment using a grid method, and combining underwater repulsion functions and the L-BFGS algorithm to optimize the path, the problem of underwater robots being unable to reach targets and easily getting trapped in multi-obstacle environments has been solved, achieving efficient obstacle avoidance and path planning.

CN116300847BActive Publication Date: 2026-06-16HUNAN GUOTIAN ELECTRONICS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN GUOTIAN ELECTRONICS TECH CO LTD
Filing Date
2022-09-08
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing underwater robots face challenges in complex environments with multiple obstacles, such as unreachable targets and the risk of getting trapped, making it difficult to perform effective global path planning.

Method used

By collecting environmental information through underwater sensors, using collision prediction and an improved grid method to divide the underwater environment, determining the optimal ideal point in real time, and combining the underwater repulsion function and L-BFGS algorithm to optimize the path, the underwater robot can achieve obstacle avoidance and path planning.

🎯Benefits of technology

Effective obstacle avoidance reduces the probability of underwater robots coming into contact with obstacles, shortens the time to reach the target location, and improves the efficiency and accuracy of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116300847B_ABST
    Figure CN116300847B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of robot control, and discloses an underwater robot obstacle avoidance method, which comprises the following steps: collecting underwater environment information by using an underwater sensor, and performing collision prediction according to the collected environment information; determining a best ideal point of underwater robot movement in real time according to a collision prediction result and current underwater environment information; determining an underwater robot path real-time optimization target function according to the best ideal point determined in real time and an underwater repulsive force function; and solving the target function by using an L-BFGS algorithm, and the solving result is the moving position of the underwater robot at the next moment. According to the method, the moving direction of the underwater robot is adjusted according to the collision prediction result, collision with obstacles is avoided, the underwater robot path real-time optimization target function is determined, the target function is solved, and the moving position of the underwater robot at the next moment is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot control technology, and more particularly to an obstacle avoidance method for underwater robots. Background Technology

[0002] With the rapid development of artificial intelligence, AI technology has begun to be widely applied in the field of robotics. Mobile robots, as one of the most important categories in intelligent robotics, have always attracted the attention of scholars both domestically and internationally. As a crucial aspect of mobile robots, path planning has become a key step in their research. Meanwhile, existing underwater robots face problems such as unreachable targets and susceptibility to traps in global path planning within complex environments with multiple obstacles during obstacle avoidance.

[0003] In view of this, the present invention proposes an obstacle avoidance method for underwater robots. By performing collision prediction on underwater robots in multi-obstacle scenarios, adjusting the movement direction of the underwater robot according to the collision prediction results to avoid collisions with obstacles, and determining the optimal ideal point for the movement of the underwater robot in real time, and determining the objective function for real-time optimization of the underwater robot path based on the determined optimal ideal point and the underwater repulsion function, the objective function is solved to obtain the movement position of the underwater robot at the next moment. Summary of the Invention

[0004] The present invention provides an obstacle avoidance method for underwater robots, the purpose of which is to (1) realize obstacle avoidance judgment of underwater robots; (2) determine the objective function for real-time optimization of underwater robot path, and obtain the movement position of underwater robot at the next moment by solving the objective function.

[0005] To achieve the above objectives, the present invention provides an obstacle avoidance method for underwater robots, comprising the following steps:

[0006] S1: Use underwater sensors to collect underwater environmental information and perform collision prediction based on the collected environmental information;

[0007] S2: Based on the collision prediction results and the current underwater environment information, determine the optimal ideal point for the underwater robot to move in real time;

[0008] S3: Determine the objective function for real-time optimization of the underwater robot path based on the optimal ideal point determined in real time and the underwater repulsion function;

[0009] S4: Solve the objective function using the L-BFGS algorithm. The solution is the position of the underwater robot at the next moment. Repeat steps S1-S4 until the underwater robot reaches the target position.

[0010] As a further improvement of the present invention:

[0011] Step S1 involves collecting underwater environmental information using underwater sensors, including:

[0012] In one specific embodiment of the present invention, the present invention installs several sensors on an underwater robot, including a temperature and humidity sensor, an environmental perception sensor, and a force field sensor, and uses the environmental perception sensor and the force field sensor to realize obstacle avoidance of the underwater robot.

[0013] The underwater robot uses environmental sensing sensors to perceive the underwater environment in real time, and then uses an improved grid method to divide the perceived underwater environment into grids. The process of the improved grid method is as follows:

[0014] An underwater robot's environmental perception sensors detect information about its surroundings, forming a grid space C of size M×M. If the grid space C is divided into several grids of unit length a, then the number of grids in the grid space is...

[0015] The grid space C is divided into free space C1 and obstacle space C2, satisfying C1∪C2=C. Free grid cells in free space C1 are represented as 0, and obstacle grid cells in obstacle space C2 are represented as 1. The obstacle space represents the grid space containing obstacles, including reefs, shipwrecks, boxes, etc. In a specific embodiment of the present invention, obstacles whose actual size is smaller than a unit grid cell are treated as unit grid cell sizes, so that obstacles whose actual size does not fill a grid cell are expanded to fill a grid cell.

[0016] The grid cells in the grid space are numbered sequentially from top to bottom and from left to right, as follows: For any i-th grid center coordinate (x) i y i The relationship between the i-th grid cell and the i-th grid cell is as follows:

[0017]

[0018] in:

[0019] L r This indicates the walking radius of the underwater robot.

[0020] The collision prediction for the underwater robot's movement in step S1 includes:

[0021] Select the target position direction of the underwater robot as the priority movement direction of the underwater robot, and calculate the distance r0 between the first obstacle grid in the priority movement direction and the current position of the underwater robot. The underwater robot then deflects its movement direction and angle to bypass the underwater obstacle grid. This is the distance threshold; if The underwater robot then moves along the preferred direction of movement;

[0022] The process for determining the deflection angle is as follows:

[0023] Taking the current position of the underwater robot as the center, if there are m consecutive obstacle grids in the preferred movement direction, then the robot uses the obstacle grid farthest from the underwater robot among the m consecutive obstacle grids as the radius and deflects by an angle β to avoid the m obstacles. The underwater robot's rotation angle is within 3° each time. Therefore, the deflection angle can be expressed as:

[0024]

[0025] in:

[0026] β i This represents the rotation angle of the underwater robot as it navigates around the i-th grid of m consecutive obstacle grids.

[0027] In one specific embodiment of the present invention, if the distance between any two obstacle grids is less than or equal to Then the two obstacle grids are considered to be continuous obstacle grids, where a is the length of the grid.

[0028] The S2 step, which involves determining the optimal ideal point for the underwater robot's movement in real time, includes:

[0029] The obstacle grid furthest from the underwater surface among m consecutive obstacle grids is taken as the optimal ideal point for the underwater robot to move. Guided by the optimal ideal point, the underwater robot moves towards the optimal ideal point. Once the underwater robot reaches the optimal ideal point, the optimal ideal point is removed.

[0030] Repeat the above steps until the underwater robot reaches the target location.

[0031] The objective function for real-time optimization of the underwater robot path is determined in step S3, including:

[0032] The underwater robot's forces during movement are determined using the underwater repulsion function:

[0033]

[0034] in:

[0035] F c Let m be the repulsive force components of m consecutive obstacles on the underwater robot;

[0036] F y The gravitational component of the underwater robot at the optimal ideal point;

[0037] ρ represents the range of influence of the obstacle;

[0038] αv This represents the repulsion adjustment factor. α is set to 0.4. If p is greater than 1.4 grids, v is set to 10; otherwise, v is set to 20.

[0039] e represents the current position coordinates of the underwater robot. s This represents the optimal ideal point for an underwater robot.

[0040] Determine the objective function for real-time optimization of the underwater robot's path:

[0041]

[0042] in:

[0043] The objective function is optimized in real time for the determined underwater robot path, where u represents the movement position of the underwater robot at the next moment;

[0044] L(u) represents the distance the underwater robot moves from its current position to position u;

[0045] β u This represents the deflection angle by which the underwater robot moves from its current position to its current position u.

[0046] Step S4 uses the L-BFGS algorithm to solve the objective function, including:

[0047] The objective function G(u) is solved using the L-BFGS algorithm. The L-BFGS algorithm process is as follows:

[0048] 1) For the objective function G(u), randomly generate the position coordinates u0 of the underwater robot at the next moment. The randomly generated position coordinates are within 5 grids of the current position of the underwater robot.

[0049] 2) Obtain through iteration. Approximate value D k :

[0050]

[0051] in:

[0052] I is the identity matrix;

[0053] s k =c k+1 -c k ;

[0054] b k =g k+1 -g k ;

[0055] ck Let c0 be the stationary point in the k-th iteration, and c0 = u0.

[0056] g k The derivative of the objective function;

[0057] D0 is the identity matrix;

[0058] It is the reciprocal of the second derivative of the objective function;

[0059] k represents the number of iterations;

[0060] 3) Solve for its stationary point c using Newton's iteration method. k+1 Where k is initially 0:

[0061] c k+1 =c k -D k ·g k

[0062] g k The derivative of the objective function;

[0063] c0 = u0;

[0064] 4) Repeat steps 2)-3) until the preset number of algorithm iterations is reached. The final stationary point of the iteration is the position of the underwater robot at the next moment.

[0065] In step S4, the solution to the objective function is used as the position coordinates of the underwater robot at the next moment, including:

[0066] During the underwater robot's movement, the methods described in steps S1-S4 are used to establish and solve an objective function. The solution to the objective function is then used as the underwater robot's position coordinates at the next moment. This process continues until the underwater robot reaches the target position, and the obstacle avoidance path {d0, d1, d2, ..., d...} is obtained. g}, where d0 represents the position coordinates of the underwater robot at the initial moment, d1 is the position coordinates of the underwater robot at the next moment obtained by the solution, and d g These are the coordinates of the underwater robot's target position.

[0067] Compared with existing technologies, this invention proposes an obstacle avoidance method for underwater robots, which has the following advantages:

[0068] First, this proposal suggests a collision prediction method. This method selects the target position direction of the underwater robot as its preferred movement direction and calculates the distance r0 between the first obstacle grid in the preferred movement direction and the underwater robot's current position. The underwater robot then deflects its movement direction and angle to bypass the underwater obstacle grid. This is the distance threshold; if The underwater robot then moves along the preferred direction of movement. The process for determining the deflection angle is as follows: taking the current position of the underwater robot as the center, if there are m consecutive obstacle grids in the preferred direction of movement, then the radius is the obstacle grid farthest from the underwater robot among the m consecutive obstacle grids, and a deflection angle β is used to avoid the m obstacles. The rotation angle of the underwater robot each time is within 3°. The deflection angle can be expressed as:

[0069]

[0070] Where: β i Let represent the rotation angle of the underwater robot to avoid the i-th grid in a sequence of m consecutive obstacle grids. The obstacle grid furthest from the underwater surface in the m consecutive obstacle grids is designated as the optimal ideal point for the underwater robot's movement. Guided by this optimal ideal point, the underwater robot moves towards it. Once the underwater robot reaches the optimal ideal point, the optimal ideal point is removed. This process is repeated until the underwater robot reaches the target position, thus achieving obstacle avoidance in the underwater robot's path planning.

[0071] Meanwhile, this scheme proposes a real-time path optimization objective function for underwater robots. First, it uses an underwater repulsion function to determine the force situation of the underwater robot during its movement:

[0072]

[0073] Wherein: F c Let F be the repulsive force component of m consecutive obstacles on the underwater robot; y The gravitational component of the underwater robot at the optimal point; ρ represents the range of influence of the obstacle; α v α represents the repulsion adjustment factor, set to 0.4. If ρ is greater than 1.4 grids, then v is set to 10; otherwise, v is set to 20. e represents the current position coordinates of the underwater robot. s The optimal ideal point for the underwater robot is represented; based on the forces acting on the underwater robot during its movement and the underwater obstacle environment, the real-time optimization objective function for the underwater robot's path is determined:

[0074]

[0075] in: The objective function for real-time optimization of the determined underwater robot path is defined, where u represents the robot's position at the next moment; L(u) represents the distance the underwater robot travels from its current position to position u; and β... uThis represents the deflection angle by which the underwater robot moves from its current position to its current position, u. Finally, this scheme uses the L-BFGS algorithm to solve the objective function G(u). The stationary point at the end of the final iteration is the solution for the underwater robot's position at the next moment. Compared to traditional schemes, this scheme introduces the underwater robot's attraction and repulsion functions into the underwater environment, selecting the path with the minimum repulsion from obstacles and the maximum attraction at the target position as the obstacle avoidance path. This reduces the probability of damage caused by contact with obstacles and shortens the time it takes for the underwater robot to reach the target position, thus achieving obstacle avoidance path planning for the underwater robot. Attached Figure Description

[0076] Figure 1 This is a flowchart illustrating an obstacle avoidance method for an underwater robot according to an embodiment of the present invention.

[0077] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0078] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0079] S1: Use underwater sensors to collect underwater environmental information and perform collision prediction based on the collected environmental information.

[0080] Step S1 involves collecting underwater environmental information using underwater sensors, including:

[0081] In one specific embodiment of the present invention, the present invention installs several sensors on an underwater robot, including a temperature and humidity sensor, an environmental perception sensor, and a force field sensor, and uses the environmental perception sensor and the force field sensor to realize obstacle avoidance of the underwater robot.

[0082] The underwater robot uses environmental sensing sensors to perceive the underwater environment in real time, and then uses an improved grid method to divide the perceived underwater environment into grids. The process of the improved grid method is as follows:

[0083] An underwater robot's environmental perception sensors detect information about its surroundings, forming a grid space C of size M×M. If the grid space C is divided into several grids of unit length a, then the number of grids in the grid space is...

[0084] The grid space C is divided into free space C1 and obstacle space C2, satisfying C1∪C2=C. Free grid cells in free space C1 are represented as 0, and obstacle grid cells in obstacle space C2 are represented as 1. The obstacle space represents the grid space containing obstacles, including reefs, shipwrecks, boxes, etc. In a specific embodiment of the present invention, obstacles whose actual size is smaller than a unit grid cell are treated as unit grid cell sizes, so that obstacles whose actual size does not fill a grid cell are expanded to fill a grid cell.

[0085] The grid cells in the grid space are numbered sequentially from top to bottom and from left to right, as follows: For any i-th grid center coordinate (x) i y i The relationship between the i-th grid cell and the i-th grid cell is as follows:

[0086]

[0087] in:

[0088] L r This indicates the walking radius of the underwater robot.

[0089] The collision prediction for the underwater robot's movement in step S1 includes:

[0090] Select the target position direction of the underwater robot as the priority movement direction of the underwater robot, and calculate the distance r0 between the first obstacle grid in the priority movement direction and the current position of the underwater robot. The underwater robot then deflects its movement direction and angle to bypass the underwater obstacle grid. This is the distance threshold; if The underwater robot then moves along the preferred direction of movement;

[0091] The process for determining the deflection angle is as follows:

[0092] Taking the current position of the underwater robot as the center, if there are m consecutive obstacle grids in the preferred movement direction, then the robot uses the obstacle grid farthest from the underwater robot among the m consecutive obstacle grids as the radius and deflects by an angle β to avoid the m obstacles. The underwater robot's rotation angle is within 3° each time. Therefore, the deflection angle can be expressed as:

[0093]

[0094] in:

[0095] β i This represents the rotation angle of the underwater robot as it navigates around the i-th grid of m consecutive obstacle grids.

[0096] In one specific embodiment of the present invention, if the distance between any two obstacle grids is less than or equal to Then the two obstacle grids are considered to be continuous obstacle grids, where a is the length of the grid.

[0097] S2: Based on the collision prediction results and the current underwater environment information, determine the optimal ideal point for the underwater robot to move in real time.

[0098] The S2 step, which involves determining the optimal ideal point for the underwater robot's movement in real time, includes:

[0099] The obstacle grid furthest from the underwater surface among m consecutive obstacle grids is taken as the optimal ideal point for the underwater robot to move. Guided by the optimal ideal point, the underwater robot moves towards the optimal ideal point. Once the underwater robot reaches the optimal ideal point, the optimal ideal point is removed.

[0100] Repeat the above steps until the underwater robot reaches the target location.

[0101] S3: Determine the objective function for real-time optimization of the underwater robot path based on the optimal ideal point determined in real time and the underwater repulsion function.

[0102] The objective function for real-time optimization of the underwater robot path is determined in step S3, including:

[0103] The underwater robot's forces during movement are determined using the underwater repulsion function:

[0104]

[0105] in:

[0106] F c Let m be the repulsive force components of m consecutive obstacles on the underwater robot;

[0107] F y The gravitational component of the underwater robot at the optimal ideal point;

[0108] ρ represents the range of influence of the obstacle;

[0109] α v This represents the repulsion adjustment factor. α is set to 0.4. If ρ is greater than 1.4 grids, v is set to 10; otherwise, v is set to 20.

[0110] e represents the current position coordinates of the underwater robot. s This represents the optimal ideal point for an underwater robot.

[0111] Determine the objective function for real-time optimization of the underwater robot's path:

[0112]

[0113] in:

[0114] The objective function is optimized in real time for the determined underwater robot path, where u represents the movement position of the underwater robot at the next moment;

[0115] L(u) represents the distance the underwater robot moves from its current position to position u;

[0116] β u This represents the deflection angle by which the underwater robot moves from its current position to its current position u.

[0117] S4: Solve the objective function using the L-BFGS algorithm. The solution is the position of the underwater robot at the next moment. Repeat steps S1-S4 until the underwater robot reaches the target position.

[0118] Step S4 uses the L-BFGS algorithm to solve the objective function, including:

[0119] The objective function G(u) is solved using the L-BFGS algorithm. The L-BFGS algorithm process is as follows:

[0120] 1) For the objective function G(u), randomly generate the position coordinates u0 of the underwater robot at the next moment. The randomly generated position coordinates are within 5 grids of the current position of the underwater robot.

[0121] 2) Obtain through iteration. Approximate value Dk:

[0122]

[0123] in:

[0124] I is the identity matrix;

[0125] s k =c k+1 -c k ;

[0126] b k =g k+1 -g k ;

[0127] c k Let c0 be the stationary point in the k-th iteration, and c0 = u0.

[0128] g k The derivative of the objective function;

[0129] D0 is the identity matrix;

[0130] It is the reciprocal of the second derivative of the objective function;

[0131] k represents the number of iterations;

[0132] 3) Solve for its stationary point c using Newton's iteration method. k+1 Where k is initially 0:

[0133] c k+1 =c k -D k ·g k

[0134] g k The derivative of the objective function;

[0135] c0 = u0;

[0136] 4) Repeat steps 2)-3) until the preset number of algorithm iterations is reached. The final stationary point of the iteration is the position of the underwater robot at the next moment.

[0137] In step S4, the solution to the objective function is used as the position coordinates of the underwater robot at the next moment, including:

[0138] During the underwater robot's movement, the methods described in steps S1-S4 are used to establish and solve an objective function. The solution to the objective function is then used as the underwater robot's position coordinates at the next moment. This process continues until the underwater robot reaches the target position, and the obstacle avoidance path {d0, d1, d2, ..., d...} is obtained. g}, where d0 represents the position coordinates of the underwater robot at the initial moment, d1 is the position coordinates of the underwater robot at the next moment obtained by the solution, and d g These are the coordinates of the underwater robot's target position.

[0139] It should be noted that the sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0141] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. An obstacle avoidance method for an underwater robot, characterized in that, The method includes: S1: Use underwater sensors to collect underwater environmental information and perform collision prediction based on the collected environmental information; S2: Based on collision prediction results and current underwater environment information, determine the optimal ideal point for the underwater robot's movement in real time, including: The obstacle grid furthest from the underwater surface among m consecutive obstacle grids is taken as the optimal ideal point for the underwater robot to move. Guided by the optimal ideal point, the underwater robot moves towards it. Once the underwater robot reaches the optimal ideal point, the optimal ideal point is removed. The above steps are repeated until the underwater robot reaches the target position. S3: Determine the objective function for real-time optimization of the underwater robot path based on the optimal ideal point determined in real time and the underwater repulsion function; Determine the objective function for real-time optimization of the underwater robot's path, including: Determine the forces acting on an underwater robot during its movement using underwater repulsion functions: in: Let m be the repulsive force components of m consecutive obstacles on the underwater robot; The gravitational component of the underwater robot at the optimal ideal point; Indicates the area affected by the obstacle; This represents the repulsion adjustment factor, which will Set to 0.4, if If the number of grid cells is greater than 1.4, set v to 10; otherwise, set v to 20. e represents the current position coordinates of the underwater robot. This represents the optimal ideal point for an underwater robot. Determine the objective function for real-time optimization of the underwater robot's path: in: The objective function is optimized in real time for the determined underwater robot path, where u represents the movement position of the underwater robot at the next moment; This represents the distance the underwater robot has moved from its current position to position u. This represents the deflection angle by which the underwater robot moves from its current position to position u. S4: Solve the objective function using the L-BFGS algorithm. The solution is the position of the underwater robot at the next moment. Repeat steps S1-S4 until the underwater robot reaches the target position.

2. The underwater robot obstacle avoidance method as described in claim 1, characterized in that, Step S1 involves collecting underwater environmental information using underwater sensors, including: The underwater robot uses environmental sensing sensors to perceive the underwater environment in real time, and then uses an improved grid method to divide the perceived underwater environment into grids. The process of the improved grid method is as follows: The underwater robot's environmental perception sensors detect information about the surrounding environment and form a data structure of size [missing information]. The raster space C is divided into several units of length C. If the grid is such that the number of grid cells in the grid space is , then the number of grid cells in the grid space is . ; Divide the grid space C into free space. and obstacle space And satisfy , will free space The free grid within is represented as 0, and the obstacle space is... An obstacle grid within the grid is represented as 1; the obstacle space represents the grid space containing obstacles, including reefs, shipwrecks, and boxes. The grid cells in the grid space are numbered sequentially from top to bottom and from left to right, as follows: For any i-th grid center coordinate The relationship between the i-th grid cell and the i-th grid cell is as follows: in: This indicates the walking radius of the underwater robot.

3. The underwater robot obstacle avoidance method as described in claim 1, characterized in that, The collision prediction for the underwater robot's movement in step S1 includes: Select the target position direction of the underwater robot as its preferred movement direction, and calculate the distance between the first obstacle grid in the preferred movement direction and the underwater robot's current position. ,like The underwater robot can bypass underwater obstacle grids by deflecting its movement direction and angle. This is the distance threshold; if If so, the underwater robot moves along the preferred direction of movement; The process for determining the direction and angle of movement of the deflecting underwater robot is as follows: Using the underwater robot's current position as the center, if there are m consecutive obstacle grids in the preferred movement direction, then the radius is the obstacle grid furthest from the underwater robot among the m consecutive obstacle grids, and the deflection angle is... To avoid m obstacles, the underwater robot rotates within 3° each time. The deflection angle is expressed as: in: This represents the rotation angle of the underwater robot as it navigates around the i-th grid of m consecutive obstacle grids.

4. The underwater robot obstacle avoidance method as described in claim 1, characterized in that, Step S4 uses the L-BFGS algorithm to solve the objective function, including: Using the L-BFGS algorithm to evaluate the objective function The L-BFGS algorithm is described in the following steps: 1) For the objective function Randomly generate the underwater robot's position coordinates for the next moment. The randomly generated position coordinates are within 5 grid squares of the underwater robot's current position; 2) Obtain through iteration. approximation : in: I is the identity matrix; ; ; For the stationary point in the k-th iteration, ; The derivative of the objective function; It is the identity matrix; It is the reciprocal of the second derivative of the objective function; k represents the number of iterations; 3) Solve for its stationary points using Newton's iteration method. Where k is initially 0: The derivative of the objective function; ; 4) Repeat steps 2)-3) until the preset number of algorithm iterations is reached. The final stationary point of the iteration is the position of the underwater robot at the next moment.

5. The underwater robot obstacle avoidance method as described in claim 4, characterized in that, In step S4, the solution to the objective function is used as the position coordinates of the underwater robot at the next moment, including: During the underwater robot's movement, the methods described in steps S1-S4 are used to establish and solve an objective function. The solution to the objective function is then used as the underwater robot's position coordinates at the next moment. This process continues until the underwater robot reaches the target position, and the obstacle avoidance path for the underwater robot is obtained. ,in This represents the position coordinates of the underwater robot at the initial moment. To obtain the underwater robot's position coordinates at the next moment, These are the coordinates of the underwater robot's target position.