Underwater vehicle autonomous swimming control method based on Auco code and underwater vehicle

By using Aruco code-assisted positioning and Astar algorithm obstacle avoidance in underwater vehicles, the problem of autonomous swimming of underwater vehicles in complex environments is solved, efficient positioning and obstacle avoidance are achieved, and the vehicle reaches the end point reliably.

CN118747002APending Publication Date: 2024-10-08NINGBO INST OF NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410668371.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

Underwater vehicles face challenges such as complex environments, limited signal transmission, and the inability of GPS signals to penetrate the water surface when swimming autonomously underwater, making it difficult to achieve effective cruise control and precise positioning.

Method used

An autonomous swimming control method based on Aruco codes is adopted. By pre-arranging Aruco codes in the area to be cruised, combined with the image acquisition module and travel drive module, the initial cruising path and obstacle avoidance path are determined, and the Astar algorithm and Kalman filter are used for real-time positioning and Obstacle avoidance ensures that the underwater vehicle moves along the initial path and avoids obstacles.

Benefits of technology

Reliable underwater vehicle autonomous swimming control and perception of the area to be cruised are realized, ensuring that the vehicle moves along the initial path and effectively avoids obstacles when encountering them, and finally reaches the cruise end point.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747002A_ABST
    Figure CN118747002A_ABST
Patent Text Reader

Abstract

The invention discloses an autonomous swimming control method for an underwater vehicle based on Auco codes and the underwater vehicle, and relates to the field of underwater vehicle control, a plurality of Auco codes for assisting positioning are pre-arranged in a to-be-cruised area, an initial cruising path is determined, the underwater vehicle is controlled to move along the path, a first image is acquired through an image acquisition module, and the first image is acquired through an image processing module; when it is judged that at least two Aruco codes exist in the first image, the current position coordinate is determined according to the image and a preset underwater global coordinate graph, the underwater positioning mode is reliable and efficient, and it is ensured that the aircraft moves according to the initial cruise path; and determining an obstacle avoidance path from the obstacle avoidance starting point to the obstacle avoidance ending point according to a preset real-time obstacle avoidance algorithm when the obstacle is judged to appear, so as to control the underwater vehicle to continuously move along the initial cruise path after moving along the obstacle avoidance path to avoid the obstacle, and finally reliably arrive at the cruise ending point. According to the scheme, autonomous swimming control over the underwater vehicle can be reliably achieved, and sensing of the to-be-cruised area is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underwater vehicle control, and in particular to an underwater vehicle autonomous swimming control method based on Aruco code and the underwater vehicle. Background Art

[0002] As an important equipment for underwater detection, underwater vehicles have broad application prospects, but their autonomous swimming underwater also faces many challenges. First, the underwater environment is complex and changeable. Water flow, water quality and light will have a certain impact on the performance of sensors in underwater navigation equipment. Secondly, underwater communication is limited and high-speed signal transmission cannot be achieved. In an underwater environment, it is impossible to reliably predict obstacles ahead on the water surface in advance. In addition, underwater GPS (Global Positioning System) signals cannot penetrate the water surface, so it is impossible to rely on GPS to achieve precise positioning like on land.

[0003] Therefore, how to design an effective cruise control scheme to achieve autonomous swimming control of underwater vehicles is a problem that needs to be solved urgently. Summary of the invention

[0004] The problem solved by the present invention is to provide an underwater vehicle autonomous swimming control method based on Aruco code and an underwater vehicle, which can reliably realize the autonomous swimming control of the underwater vehicle and realize the perception of the cruising area.

[0005] In order to solve the above problems, the present invention provides an underwater vehicle autonomous swimming control method based on Aruco code, which is applied to a control module in the underwater vehicle. The underwater vehicle also includes an image acquisition module and a travel drive module connected to the control module. The underwater vehicle autonomous swimming control method includes:

[0006] Determine a cruising start point and a cruising end point of the underwater vehicle in the area to be cruised to obtain an initial cruising path; wherein the area to be cruised includes a plurality of pre-arranged Aruco codes;

[0007] The underwater vehicle is controlled to move along the initial cruising path by the travel drive module, and a first image representing the current position of the underwater vehicle is acquired by the image acquisition module, so that when it is determined that at least two Aruco codes exist in the first image, the current position coordinates of the underwater vehicle are determined according to the first image and a preset underwater global coordinate map, thereby ensuring that the underwater vehicle moves along the initial cruising path;

[0008] When it is determined through the first image that an obstacle appears on the initial cruising path, determining an obstacle avoidance starting point and an obstacle avoidance end point that are still on the initial cruising path and are at a preset safety distance from the obstacle according to the position of the obstacle;

[0009] An obstacle avoidance path from the obstacle avoidance starting point to the obstacle avoidance end point is determined according to a preset real-time obstacle avoidance algorithm to control the underwater vehicle to move along the obstacle avoidance path, and then continue to move along the initial cruising path after avoiding the obstacle.

[0010] The beneficial effects of the present invention are: positioning is achieved by pre-arranging multiple Aruco codes that can assist in positioning in the area to be cruised, and the positioning method is reliable and efficient, ensuring that the underwater vehicle moves according to the initial cruise path, and when encountering obstacles, it can rely on the preset real-time obstacle avoidance algorithm to avoid them, and finally reliably reach the cruise end point. It can be seen that the scheme can reliably realize the autonomous swimming control of the underwater vehicle, realize the perception of the area to be cruised, and is conducive to practical application.

[0011] Furthermore, the step of determining the preset underwater global coordinate map includes:

[0012] For each of the Aruco codes, acquiring a second image including the Aruco code, and then establishing an underwater reference map based on the Aruco code based on the second image;

[0013] Determine any Aruco code in the underwater reference map as the coordinate origin and establish a coordinate system, thereby obtaining a preset underwater global coordinate map.

[0014] In this solution, the above method can simply and reliably establish a preset underwater global coordinate map, providing a basis for the real-time positioning of the subsequent underwater vehicle during its swimming process.

[0015] Furthermore, the preset real-time obstacle avoidance algorithm is an Astar algorithm and Manhattan distance is used to construct a heuristic function for calculating the cost between a current node and a next node in the Astar algorithm;

[0016] The heuristic function is:

[0017] h(n)=x1-x2+y1-y2+z1-z2

[0018] Among them, (x1, y1, z1) represents the position coordinates of the current node, and (x2, y2, z2) represents the position coordinates of the next node.

[0019] In this solution, the heuristic function can be constructed simply and efficiently in the above manner, making the Astar algorithm under the heuristic function more practical.

[0020] Furthermore, after acquiring the first image representing the current position of the underwater vehicle through the image acquisition module, the method further includes:

[0021] When it is determined that the number of the Aruco codes included in the first image is less than two, taking the estimated position of the underwater vehicle at the current moment determined at the last moment as the measured position at the current moment;

[0022] The step of determining the estimated position of the underwater vehicle at time k+1 at time k comprises:

[0023] Determining an estimated position of the underwater vehicle according to a first preset relationship;

[0024] The first preset relationship is:

[0025]

[0026] Among them, P k+1 represents the estimated position of the underwater vehicle at time k+1, P k represents the position of the underwater vehicle at time k, Δt represents the time interval, V k represents the speed determined according to the angular velocity measured by the IMU in the underwater vehicle at time k, a k represents the acceleration measured by the IMU at time k.

[0027] In this solution, the above method can be used to realize the positioning of the underwater vehicle when two or more Aruco codes are not recognized in the first image, ensuring that the position information of the underwater vehicle can be determined in real time.

[0028] Further, after taking the estimated position of the underwater vehicle at the current moment determined at the previous moment as the measured position at the current moment, the method further includes:

[0029] At time k, determining an estimated attitude angle representing the operating attitude of the underwater vehicle at time k+1 according to a second preset relationship;

[0030] The second preset relationship is:

[0031]

[0032] Among them, q k+1 represents the estimated attitude angle of the underwater vehicle at time k+1, q k represents the attitude angle of the underwater vehicle at time k, τ(a k ) means a k The quaternion update matrix.

[0033] In this solution, the operating posture of the underwater vehicle can be reliably obtained through the above method, which is conducive to better realizing the swimming control of the underwater vehicle.

[0034] Further, when it is determined that there are at least two Aruco codes in the first image, after determining the current position coordinates of the underwater vehicle according to the first image and a preset underwater global coordinate map, it also includes:

[0035] At time k, determining the measurement residual according to a third preset relationship;

[0036] The third preset relationship is:

[0037] y k+1 =pos k+1 -pos′ k+1

[0038] Among them, y k+1 Represents the measurement residual at time k+1, pos k+1 represents the measured position of the underwater vehicle at time k+1 determined according to the first image and the preset underwater global coordinate map; pos′ k+1 represents the estimated position determined according to the first preset relationship at time k+1;

[0039] The Kalman gain is calculated according to the fourth preset relationship to obtain the Kalman gain matrix at time k+1;

[0040] The fourth preset relationship is:

[0041]

[0042] Among them, K k+1 represents the Kalman gain matrix at time k+1, C k+1k is the covariance matrix obtained in the last update, H k+1 represents the Jacobian matrix, R k+1 represents the measurement noise covariance matrix;

[0043] According to y k+1 , K k+1 and the fifth preset relationship to determine the final position state information at time k+1;

[0044] The fifth preset relationship is:

[0045] X k+1|k+1 =X k+1|k +K k+1 y k+1

[0046] Among them, X k+1|k+1represents the final updated position status information at time k+1, X k+1|k Represents the final position state information determined at time k;

[0047] According to the sixth preset relationship, the covariance matrix C k+1|k Make updates;

[0048] The sixth preset relationship is:

[0049] C k+1|k+1 =(IK k y k )C k+1|k

[0050] Among them, C k+1|k+1 represents the updated covariance matrix, and I is the unit matrix.

[0051] In this solution, the above-mentioned setting can integrate the measured position of the underwater vehicle determined based on the first image and the preset underwater global coordinate map, and the estimated position determined according to the first preset relationship, so that the position determination is more accurate.

[0052] Furthermore, after determining the obstacle avoidance path from the obstacle avoidance starting point to the obstacle avoidance end point according to the preset real-time obstacle avoidance algorithm, the method further includes:

[0053] Determining whether there is a curved portion in the obstacle avoidance path that exceeds the turning capability of the underwater vehicle;

[0054] If so, the curved portion is smoothed according to a preset path optimization strategy to obtain an optimized smooth curve, and then an optimized obstacle avoidance path is determined to control the underwater vehicle to move along the optimized obstacle avoidance path.

[0055] In this solution, the above-mentioned setting is more conducive to realizing the swimming control of the underwater vehicle in practical applications, which is in line with the actual application.

[0056] Furthermore, the preset path optimization strategy is set according to a high-order Bezier curve.

[0057] Furthermore, the high-order Bezier curve is a third-order Bezier curve;

[0058] The curved portion is smoothed according to a preset path optimization strategy, including:

[0059] Determining four key control points and their coordinates that characterize the shape of the curved section;

[0060] The optimized smooth curve is determined according to the third-order Bezier curve formula; the third-order Bezier formula is:

[0061] B(t)=(1-t)3 ·P0+3·(1-t) 2 t·P1+(1-t)·t 2 ·P2+t 3 P3

[0062] Among them, P0 represents the coordinates of the first key control point, P1 represents the coordinates of the second key control point, P2 represents the coordinates of the third key control point, P3 represents the coordinates of the fourth key control point, t is a parameter and t∈[0,1].

[0063] In this solution, the above settings can effectively avoid the optimized obstacle avoidance path from colliding with obstacles.

[0064] In order to solve the above technical problems, the present invention also provides an underwater vehicle, including a control module, an image acquisition module and a travel drive module;

[0065] The control module is connected to the image acquisition module and the travel drive module respectively, and is used to implement the steps of the Aruco code-based underwater vehicle autonomous swimming control method as described above when executing a computer program. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 A flowchart of an underwater vehicle autonomous swimming control method based on Aruco code provided by the present invention;

[0067] Figure 2 A schematic diagram of an initial cruising path provided by the present invention;

[0068] Figure 3 A schematic diagram of the positional relationship between a feasible area of ​​an underwater vehicle and obstacles provided by the present invention;

[0069] Figure 4 A schematic diagram of the structure of an underwater vehicle provided by the present invention;

[0070] Description of reference numerals:

[0071] A-cruise starting point, B-cruise end point, C-obstacle avoidance starting point, D-obstacle avoidance end point, s-preset safety distance, 11-obstacle, 2-control module, 3-image acquisition module, 4-travel drive module. DETAILED DESCRIPTION

[0072] First, those skilled in the art should understand that these implementations are only used to explain the technical principles of the embodiments of the present application, and are not intended to limit the protection scope of the embodiments of the present application. Those skilled in the art can make adjustments to them as needed to adapt to specific application scenarios.

[0073] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0074] Please refer to Figure 1 , Figure 1 The present invention provides a flow chart of an underwater vehicle autonomous swimming control method based on Aruco code.

[0075] The present invention provides an embodiment, an underwater vehicle autonomous swimming control method based on Aruco code, which is applied to a control module 2 in the underwater vehicle. The underwater vehicle also includes an image acquisition module 3 and a travel drive module 4 connected to the control module 2. The underwater vehicle autonomous swimming control method includes:

[0076] S11: Determine a cruise start point A and a cruise end point B of the underwater vehicle in the area to be cruised to obtain an initial cruise path; wherein the area to be cruised includes a plurality of pre-arranged Aruco codes;

[0077] S12: Control the underwater vehicle to move along the initial cruising path through the travel drive module 4, and obtain a first image representing the current position of the underwater vehicle through the image acquisition module 3, so that when it is determined that there are at least two Aruco codes in the first image, the current position coordinates of the underwater vehicle are determined according to the first image and the preset underwater global coordinate map, thereby ensuring that the underwater vehicle moves along the initial cruising path;

[0078] S13: when it is determined through the first image that an obstacle 11 appears on the initial cruising path, an obstacle avoidance starting point C and an obstacle avoidance end point D that are still on the initial cruising path and are at a preset safety distance s from the obstacle 11 are determined according to the position of the obstacle 11;

[0079] S14: Determine an obstacle avoidance path from the obstacle avoidance starting point C to the obstacle avoidance end point D according to a preset real-time obstacle avoidance algorithm to control the underwater vehicle to move along the obstacle avoidance path, and then continue to move along the initial cruising path after avoiding the obstacle 11.

[0080] First of all, it should be noted that the reason why Aruco code is selected for auxiliary positioning here is that Aruco code is easy to detect in vision and has strong scalability, which is more economical and affordable than sonar or ultrasonic positioning. In detail, multiple Aruco codes that can assist in positioning are arranged in advance in the area to be cruised. Preferably, the above-mentioned Aruco codes can be arranged at multiple locations of common cruise routes in the area to be cruised, so that the underwater vehicle can rely on Aruco code to achieve position positioning as much as possible, so as to ensure that the underwater vehicle can recognize at least two Aruco codes through the image acquisition module 3 during the swimming process.

[0081] Specifically, determine the cruise starting point A and the cruise end point B, and then determine the straight line from the cruise starting point A to the cruise end point B as the initial cruise path; place the underwater navigation device in the water, and control the vehicle to move to the cruise starting point A, please refer to Figure 2 As shown, Figure 2 This is a schematic diagram of an initial cruising path provided by the present invention, in which the underwater vehicle is intended to run from the cruising starting point A to the cruising end point B. In addition, the image acquisition module 3 here can be a binocular camera in the underwater vehicle, which captures a first image within the recognition range of the binocular camera. When there are at least two Aruco codes in the first image, the current position coordinates of the underwater vehicle can be determined according to the first image and the preset underwater global coordinate map, and then the current running position of the underwater vehicle can be grasped in real time, providing guarantee for subsequent obstacle avoidance and ensuring that the underwater vehicle moves according to the initial cruising path.

[0082] A preset safety distance s is preset. When it is determined through the first image that an obstacle 11 appears on the initial cruising path, an obstacle avoidance starting point C and an obstacle avoidance end point D which are at the preset safety distance s from the obstacle 11 can be determined, and the obstacle avoidance starting point C and the obstacle avoidance end point D are still on the initial cruising path. Figure 2 The figure also shows an obstacle 11 on the initial cruising path, as well as an obstacle avoidance starting point C and an obstacle avoidance end point D. Figure 2 Due to the limitation of the display focus and observation angle of the picture, only the preset safety distance s between the obstacle avoidance starting point C and the obstacle 11 is marked.

[0083] Obstacle avoidance path is obtained through step S14, and then the underwater vehicle is controlled to move along the obstacle avoidance path. Figure 2 As shown, the obtained obstacle avoidance path is shown and the obstacle avoidance path is indicated by a dotted line in the figure. Finally, after avoiding the obstacle 11, the vehicle continues to move along the initial cruising path.

[0084] In summary, the present application provides an Aruco code-based autonomous swimming control method for underwater vehicles, which realizes positioning by pre-arranging multiple Aruco codes that can assist in positioning in the area to be cruised. The positioning method is reliable and efficient, ensuring that the underwater vehicle moves according to the initial cruise path, and when encountering obstacles 11, it can rely on the preset real-time obstacle avoidance algorithm to avoid them, and finally reliably reaches the cruise terminal B. It can be seen that the scheme can reliably realize the autonomous swimming control of underwater vehicles, realize the perception of the area to be cruised, and is conducive to practical application.

[0085] In some embodiments, the step of determining the preset underwater global coordinate map includes:

[0086] For each Aruco code, a second image including the Aruco code is acquired, and then an underwater reference map based on the Aruco code is established based on the second image;

[0087] Determine any Aruco code in the underwater reference map as the coordinate origin and establish a coordinate system to obtain a preset underwater global coordinate map.

[0088] Specifically, the Aruco codes arranged in the cruising area can be imaged by a binocular camera in the underwater vehicle to obtain a second image, and then an underwater reference map based on the Aruco code is established, and finally a preset underwater global coordinate map is obtained. Preferably, when multiple Aruco codes are numbered, Aruco code No. 0 can be used as the coordinate origin.

[0089] It can be seen that the above method can simply and reliably establish a preset underwater global coordinate map, providing a basis for the real-time positioning of the subsequent underwater vehicle during its swimming process.

[0090] In some embodiments, the preset real-time obstacle avoidance algorithm is the Astar algorithm and the Manhattan distance is used to construct the heuristic function for calculating the cost between the current node and the next node in the Astar algorithm;

[0091] The heuristic function is:

[0092] h(n)=x1-x2+y1-y2+z1-z2

[0093] Among them, (x1, y1, z1) represents the position coordinates of the current node, and (x2, y2, z2) represents the position coordinates of the next node.

[0094] For details, please refer to Figure 3 , Figure 3 A schematic diagram of the positional relationship between a feasible area of ​​an underwater vehicle and an obstacle 11 provided by the present invention, Figure 3 In order to facilitate explanation and clear display, the obstacle 11 is filled with black, and each node in the three-dimensional space corresponds to multiple surrounding nodes; the Astar algorithm determines the cost value of the surrounding 26 nodes in each step of the path search process, and mainly calculates the priority of each node through the following formula:

[0095] f(n)=g(n)+h(n)

[0096] Among them, g(n) represents the path cost from the obstacle avoidance starting point C to the current node, h(n) represents the heuristic function, which is used to determine the cost between the current node and the next node, and f(n) represents the comprehensive priority of the current node. The heuristic function of the traditional Astar algorithm generally uses the Euclidean distance. In this application, the Manhattan distance is used to construct the heuristic function, which makes the calculation in grid maps and discrete environments simpler and more efficient.

[0097] It should also be noted that the path finding process of the Astar algorithm is described as follows:

[0098] The first step is to define two sets, one set is the Openlist set, and the other set is the Closelist set, and initialize the two sets; the second step is to put the obstacle avoidance starting point C into the Openlist set and set its priority to the highest; the third step is to traverse each next node through the above-mentioned node priority determination method, and add these nodes to the Openlist set, and make a judgment in the Openlist set. If the node is not the obstacle avoidance end point D, fill it into the Closelist set; the fourth step is to traverse the neighboring nodes of the node filled in the Closelist set. If its neighboring node is also in the Closelist set, skip filtering the next neighboring node. If its neighboring node is neither in the Closelist set nor in the Openlist set, then the previous node of the neighboring node is used as the parent node, and the node is saved in the Openlist set in priority order; the fifth step is to traverse the Openlist set downward in sequence until the obstacle avoidance end point D is found and the traversal ends, and the obstacle avoidance path can be obtained.

[0099] In some embodiments, after acquiring the first image representing the current position of the underwater vehicle through the image acquisition module 3, the method further includes:

[0100] When it is determined that the number of Aruco codes included in the first image is less than two, the estimated position of the underwater vehicle at the current moment determined at the last moment is used as the actual measured position at the current moment;

[0101] The step of determining the estimated position of the underwater vehicle at time k+1 at time k comprises:

[0102] Determining an estimated position of the underwater vehicle according to a first preset relationship;

[0103] The first preset relationship is:

[0104]

[0105] Among them, P k+1 represents the estimated position of the underwater vehicle at time k+1, P k represents the position of the underwater vehicle at time k, Δt represents the time interval, V k represents the velocity determined by the angular velocity measured by the IMU in the underwater vehicle at time k, and a k Represents the acceleration measured by the IMU at time k.

[0106] Specifically, considering the possibility that two or more Aruco codes are not recognized in the first image, the angular velocity and acceleration are collected by the high-precision IMU (Inertial Measurement Unit) carried by the underwater vehicle itself, and then the estimated position of the underwater vehicle is determined through the above steps to achieve positioning in this case.

[0107] It should also be noted that the estimated speed of the underwater vehicle at time k+1 can also be determined according to the following preset relationship; the preset relationship is:

[0108] V k+1 =V k +a k Δt

[0109] Among them, V k+1 represents the estimated speed at time k+1, V k represents the speed at time k.

[0110] In some embodiments, after taking the estimated position of the underwater vehicle at the current moment determined at the last moment as the measured position at the current moment, the method further includes:

[0111] At time k, determining an estimated attitude angle representing the operating attitude of the underwater vehicle at time k+1 according to a second preset relationship;

[0112] The second preset relationship is:

[0113]

[0114] Among them, q k+1 represents the estimated attitude angle of the underwater vehicle at time k+1, q k represents the attitude angle of the underwater vehicle at time k, τ(a k ) means a k The quaternion update matrix.

[0115] Specifically, the operating posture of the underwater vehicle can be reliably obtained through the above method, which is conducive to better realizing the swimming control of the underwater vehicle.

[0116] In some embodiments, when it is determined that there are at least two Aruco codes in the first image, after determining the current position coordinates of the underwater vehicle according to the first image and the preset underwater global coordinate map, the method further includes:

[0117] At time k, determining the measurement residual according to a third preset relationship;

[0118] The third preset relationship is:

[0119] yk+1 =pos k+1 -pos′ k+1

[0120] Among them, y k+1 Represents the measurement residual at time k+1, pos k+1 represents the measured position of the underwater vehicle at time k+1 determined based on the first image and the preset underwater global coordinate map; pos′ k+1 represents the estimated position determined according to the first preset relationship at time k+1;

[0121] The Kalman gain is calculated according to the fourth preset relationship to obtain the Kalman gain matrix at time k+1;

[0122] The fourth preset relationship is:

[0123]

[0124] Among them, K k+1 represents the Kalman gain matrix at time k+1, C k+1|k is the covariance matrix obtained in the last update, H k+1 represents the Jacobian matrix, R k+1 represents the measurement noise covariance matrix;

[0125] According to y k+1 , K k+1 and the fifth preset relationship to determine the final position state information at time k+1;

[0126] The fifth preset relationship is:

[0127] X k+1|k+1 =X k+1|k +K k+1 y k+1

[0128] Among them, X k+1|k+1 represents the final updated position status information at time k+1, X k+1|k Represents the final position state information determined at time k;

[0129] According to the sixth preset relationship, the covariance matrix C k+1|k Make updates;

[0130] The sixth preset relationship is:

[0131] C k+1|k+1 =(IK k y k )C k+1|k

[0132] Among them, C k+1|k+1represents the updated covariance matrix, and I is the unit matrix.

[0133] Specifically, the above settings can combine the measured position of the underwater vehicle determined based on the first image and the preset underwater global coordinate map, and the estimated position determined according to the first preset relationship, so that the position determination is more accurate. It should also be noted that H here k+1 It can be the first-order derivative of the measurement function; it can be understood that when two or more Aruco codes are included in the first image, the results of the two position determination schemes can be combined through the above steps to make the measurement result more accurate, and when the first image does not include two or more Aruco codes, the position information of the underwater vehicle can be determined only by relying on the first preset relationship.

[0134] In some embodiments, after determining the obstacle avoidance path from the obstacle avoidance starting point C to the obstacle avoidance end point D according to the preset real-time obstacle avoidance algorithm, the method further includes:

[0135] Determine whether there is a curve portion in the obstacle avoidance path that exceeds the turning capability of the underwater vehicle;

[0136] If so, the curved portion is smoothed according to a preset path optimization strategy to obtain an optimized smooth curved path, and then an optimized obstacle avoidance path is determined, so as to control the underwater vehicle to move along the optimized obstacle avoidance path.

[0137] Specifically, considering Figure 2 As shown, the obtained obstacle avoidance path may require the underwater vehicle to make a right-angle turn, but it is difficult to directly achieve this turn in practical applications. Therefore, the curved part is smoothed by a preset path optimization strategy so that the underwater vehicle moves along the optimized obstacle avoidance path, which is more conducive to the swimming control of the underwater vehicle in practical applications.

[0138] In some embodiments, the preset path optimization strategy is set according to a high-order Bezier curve.

[0139] Specifically, a high-order Bezier curve can simply and reliably realize smooth processing of curved parts, so according to the present application, a preset path optimization strategy is set according to the high-order Bezier curve.

[0140] In some embodiments, the high-order Bezier curve is a third-order Bezier curve;

[0141] Smoothing of curved sections according to preset path optimization strategies, including:

[0142] Determine the four key control points and their coordinates that characterize the shape of the curved section;

[0143] The optimized smooth curve is determined according to the third-order Bezier curve formula; the third-order Bezier formula is:

[0144] B(t)=(1-t) 3 ·P0+3·(1-t) 2 t·P1+(1-t)·t 2 ·P2+t 3 P3

[0145] Among them, P0 represents the coordinates of the first key control point, P1 represents the coordinates of the second key control point, P2 represents the coordinates of the third key control point, P3 represents the coordinates of the fourth key control point, t is a parameter and t∈[0,1].

[0146] Specifically, further considering the poor stability of high-order Bezier curves, in order to avoid the optimized obstacle avoidance path from colliding with obstacle 11 as much as possible, selecting a third-order Bezier curve to set a preset path optimization strategy can effectively avoid the collision problem, as described above, and will not be repeated here.

[0147] Please refer to Figure 4 , Figure 4 The present invention is a schematic structural diagram of an underwater vehicle provided by the present invention.

[0148] The underwater vehicle comprises a control module 2, an image acquisition module 3 and a travel drive module 4;

[0149] The control module 2 is connected to the image acquisition module 3 and the travel drive module 4 respectively, and is used to implement the steps of the Aruco code-based underwater vehicle autonomous swimming control method as described above when executing the computer program.

[0150] For an introduction to the underwater vehicle provided in the present invention, please refer to the above-mentioned embodiment of the underwater vehicle autonomous swimming control method based on Aruco code, which will not be described in detail here.

[0151] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

[0152] It should also be noted that, in this specification, relational terms such as first, second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not imply any actual relationship or order between these entities or operations.

Claims

1. An autonomous swimming control method for underwater vehicles based on Aruco code, characterized in that: A control module (2) applied to an underwater vehicle, the underwater vehicle further comprising an image acquisition module (3) and a travel drive module (4) connected to the control module (2), the autonomous swimming control method of the underwater vehicle comprising: Determine a cruising start point (A) and a cruising end point (B) of the underwater vehicle in the area to be cruised to obtain an initial cruising path; wherein the area to be cruised includes a plurality of pre-arranged Aruco codes; The underwater vehicle is controlled to move along the initial cruising path by the travel drive module (4), and a first image representing the current position of the underwater vehicle is acquired by the image acquisition module (3), so that when it is determined that at least two Aruco codes exist in the first image, the current position coordinates of the underwater vehicle are determined according to the first image and a preset underwater global coordinate map, thereby ensuring that the underwater vehicle moves along the initial cruising path; When it is determined through the first image that an obstacle (11) appears on the initial cruising path, an obstacle avoidance starting point (C) and an obstacle avoidance end point (D) that are still on the initial cruising path and are at a preset safety distance (s) from the obstacle (11) are determined according to the position of the obstacle (11); An obstacle avoidance path from the obstacle avoidance starting point (C) to the obstacle avoidance end point (D) is determined according to a preset real-time obstacle avoidance algorithm, so as to control the underwater vehicle to move along the obstacle avoidance path, and then continue to move along the initial cruising path after avoiding the obstacle (11).

2. The Aruco code-based underwater vehicle autonomous swimming control method according to claim 1, characterized in that: The step of determining the preset underwater global coordinate map includes: For each of the Aruco codes, acquiring a second image including the Aruco code, and then establishing an underwater reference map based on the Aruco code based on the second image; Determine any Aruco code in the underwater reference map as the coordinate origin and establish a coordinate system, thereby obtaining a preset underwater global coordinate map.

3. The Aruco code-based underwater vehicle autonomous swimming control method according to claim 1, characterized in that: The preset real-time obstacle avoidance algorithm is the Astar algorithm and the Manhattan distance is used to construct the heuristic function used in the Astar algorithm to calculate the cost between the current node and the next node; The heuristic function is: h(n)=|x1-x2|+|y1-y2|+|z1-z2| Among them, (x1, y1, z1) represents the position coordinates of the current node, and (x2, y2, z2) represents the position coordinates of the next node.

4. The Aruco code-based underwater vehicle autonomous swimming control method according to claim 1, characterized in that: After the image acquisition module (3) acquires a first image representing the current position of the underwater vehicle, the method further comprises: When it is determined that the number of the Aruco codes included in the first image is less than two, taking the estimated position of the underwater vehicle at the current moment determined at the last moment as the measured position at the current moment; The step of determining the estimated position of the underwater vehicle at time k+1 at time k comprises: Determining an estimated position of the underwater vehicle according to a first preset relationship; The first preset relationship is: Among them, P k+1 represents the estimated position of the underwater vehicle at time k+1, P k represents the position of the underwater vehicle at time k, Δt represents the time interval, V k represents the speed determined according to the angular velocity measured by the IMU in the underwater vehicle at time k, a k represents the acceleration measured by the IMU at time k.

5. The Aruco code-based underwater vehicle autonomous swimming control method according to claim 4, characterized in that: After taking the estimated position of the underwater vehicle at the current moment determined at the last moment as the measured position at the current moment, the method further includes: At time k, determining an estimated attitude angle representing the operating attitude of the underwater vehicle at time k+1 according to a second preset relationship; The second preset relationship is: Among them, q k+1 represents the estimated attitude angle of the underwater vehicle at time k+1, q k represents the attitude angle of the underwater vehicle at time k, τ(a k ) means a k The quaternion update matrix.

6. The Aruco code-based underwater vehicle autonomous swimming control method according to claim 4, characterized in that: When it is determined that at least two Aruco codes exist in the first image, after determining the current position coordinates of the underwater vehicle according to the first image and a preset underwater global coordinate map, the method further includes: At time k, determining the measurement residual according to a third preset relationship; The third preset relationship is: and k+1 =pos k+1 -pos′ k+1 Among them, y k+1 Represents the measurement residual at time k+1, pos k+1 represents the measured position of the underwater vehicle at time k+1 determined according to the first image and the preset underwater global coordinate map; pos′ k+1 represents the estimated position determined according to the first preset relationship at time k+1; The Kalman gain is calculated according to the fourth preset relationship to obtain the Kalman gain matrix at time k+1; The fourth preset relationship is: K k+1 =C k+1|k H k T +1 (H k+1 C k+1|k H k T +1 +R k+1 ) -1 Among them, K k+1 represents the Kalman gain matrix at time k+1, C k+1|k is the covariance matrix obtained in the last update, H k+1 represents the Jacobian matrix, R k+1 represents the measurement noise covariance matrix; According to y k+1 , K k+1 and the fifth preset relationship to determine the final position state information at time k+1; The fifth preset relationship is: X k+1|k+1 =X k+1|k +K k+1 y k+1 Among them, X k+1|k+1 represents the final updated position status information at time k+1, X k+1|k Represents the final position state information determined at time k; According to the sixth preset relationship, the covariance matrix C k+1|k Make updates; The sixth preset relationship is: C k+1|k+1 =(I-K k y k )C k+1|k Among them, C k+1|k+1 represents the updated covariance matrix, and I is the unit matrix.

7. The Aruco code-based underwater vehicle autonomous swimming control method according to any one of claims 1 to 6, characterized in that: After determining the obstacle avoidance path from the obstacle avoidance starting point (C) to the obstacle avoidance end point (D) according to the preset real-time obstacle avoidance algorithm, the method further includes: Determining whether there is a curved portion in the obstacle avoidance path that exceeds the turning capability of the underwater vehicle; If so, the curved portion is smoothed according to a preset path optimization strategy to obtain an optimized smooth curve, and then an optimized obstacle avoidance path is determined to control the underwater vehicle to move along the optimized obstacle avoidance path.

8. The Aruco code-based underwater vehicle autonomous swimming control method according to claim 7, characterized in that: The preset path optimization strategy is set according to a high-order Bezier curve.

9. The Aruco code-based underwater vehicle autonomous swimming control method according to claim 8, characterized in that: The high-order Bezier curve is a third-order Bezier curve; The curved portion is smoothed according to a preset path optimization strategy, including: Determining four key control points and their coordinates that characterize the shape of the curved section; The optimized smooth curve is determined according to the third-order Bezier curve formula; the third-order Bezier formula is: B(t)=(1-t) 3 ·P0+3·(1-t) 2 ·t·P1+(1-t)·t 2 ·P2+t 3 ·P3 Among them, P0 represents the coordinates of the first key control point, P1 represents the coordinates of the second key control point, P2 represents the coordinates of the third key control point, P3 represents the coordinates of the fourth key control point, t is a parameter and t∈[0,1].

10. An underwater vehicle, characterized in that: It comprises a control module (2), an image acquisition module (3) and a travel drive module (4); The control module (2) is connected to the image acquisition module (3) and the travel drive module (4) respectively, and is used to implement the steps of the Aruco code-based underwater vehicle autonomous swimming control method as claimed in any one of claims 1 to 9 when executing a computer program.