Unmanned ship path planning method and related equipment
By using water depth information and fluid mechanics theory in unmanned boat path planning, combined with the A* algorithm, the problems of local optimal solutions and low safety are solved, and more efficient and safer path planning is achieved.
Patent Information
- Application Number
- CN202411014093.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-08
AI Technical Summary
The existing unmanned boat path planning algorithms are prone to fall into local optimal solutions and do not consider risk factors such as water depth, resulting in low safety and low efficiency of planned paths.
By drawing safe iso-deep lines based on water depth information, modeling sea areas using raster method, combining fluid mechanics theory and flowline method for global path planning, and using improved A* algorithm for local path planning, correcting global paths to improve paths Safety and efficiency.
The path planning of unmanned boats in complex sea areas has been effectively optimized, local optimal solutions have been avoided, and the safety and planning efficiency of the path have been improved, ensuring that the path meets sea area restrictions, and providing a reliable navigation path for unmanned boats.
Smart Images

Figure CN118915754A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of unmanned boat control technology, and in particular, relates to an unmanned boat path planning method and related equipment. Background Art
[0002] With the rapid development of technologies such as communication, navigation and artificial intelligence, unmanned boats have become an important direction in the field of ship research. Due to their small size, shallow draft, easy deployment and high maneuverability, unmanned boats are widely used in tasks such as port patrol, maritime rescue and marine resource exploration. Path planning, as one of the core technologies for autonomous navigation of unmanned boats, directly affects their navigation efficiency, safety and task completion quality. However, most algorithms only focus on the shortest path or the lowest energy consumption goals when planning paths, often ignoring safety, and the planned path results are prone to local optimal solution problems. In addition, the characteristics and potential risk factors of the marine environment are often simplified or ignored. In actual navigation, ships are affected by hydrological factors such as water depth and shallow waters, and are prone to risks such as grounding or collision. Summary of the invention
[0003] The embodiment of the present application provides an unmanned boat path planning method, which can solve the problem that the path planning in the prior art falls into a local optimal solution and does not consider risk factors such as water depth, resulting in low safety and low planning efficiency of the planned path.
[0004] In a first aspect, an embodiment of the present application provides a method for unmanned boat path planning, comprising:
[0005] Based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat, a safety isobath is drawn, and the safety isobath is used as a constraint condition to model the target sea area through a grid method to obtain a target sea area model;
[0006] According to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the global path information of the target unmanned boat in the target sea area is planned by fluid mechanics theory and streamline method;
[0007] According to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the local path information of the target unmanned boat in the target sea area is planned by a preset A* algorithm;
[0008] The global path information is corrected based on the local path information to obtain a target path of the target unmanned boat in the target sea area.
[0009] Optionally, the step of drawing a safety depth contour based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat includes:
[0010] Acquire sea condition data of the target sea area and attribute data of the target unmanned boat, and calculate minimum safe water depth data of the target unmanned boat based on the sea condition data and the attribute data;
[0011] The elevation data and water depth data of each point in the target sea area are obtained, and the safety isobath is drawn according to the minimum safe water depth data, the elevation data and the water depth data. The expression form of each point in the target sea area is plane coordinates, and the water depth information includes sea condition data, elevation data and water depth data.
[0012] Optionally, the step of using the safety isobath as a constraint condition and modeling the target sea area by a grid method to obtain a target sea area model comprises:
[0013] Gray-scale the nautical chart of the target sea area to obtain an initial gray-scale image;
[0014] resizing the initial grayscale image to obtain a target grayscale image, wherein each grid block in the target grayscale image corresponds to each area in the nautical chart;
[0015] Binarization is performed on the target grayscale image by a grid method to obtain an inaccessible area and a accessible area in the target grayscale image;
[0016] The navigable area is divided according to the safety isobaths to obtain navigable areas and unnavigable areas in the navigable area, thereby completing the modeling of the target sea area.
[0017] Optionally, the step of planning the global path information of the target unmanned boat in the target sea area by fluid mechanics theory and streamline method based on the starting point data and the end point data of the target unmanned boat according to the target sea area model includes:
[0018] In the navigable area of the target sea area model, initial path information is calculated by a preset path planning algorithm based on the starting point data and the end point data of the target unmanned boat;
[0019] The flow field model of the navigable area is established by fluid mechanics theory, and the flow field model satisfies the mass conservation equation and the momentum conservation equation;
[0020] Solving and calculating the state in the flow field model based on the streamline method to obtain state data;
[0021] The initial path information is corrected according to the state data to obtain the global path information of the target unmanned boat in the target sea area.
[0022] Optionally, the preset A* algorithm includes a path evaluation function, and the path evaluation function is:
[0023] F(n)=g(n)+h(n)
[0024] Among them, F(n) is the total cost from the starting data to the target point n on the path, g(n) is the actual cost from the starting data to the target point n on the path in the running environment, and h(n) is the estimated cost of the best path from the target point n on the path to the end data;
[0025] The preset A* algorithm also includes an estimation function, and the estimation function is a Euclidean distance function.
[0026] Optionally, the step of planning the local path information of the target unmanned boat in the target sea area by a preset A* algorithm based on the starting point data and the end point data of the target unmanned boat according to the target sea area model includes:
[0027] In the navigable area of the target sea area model, based on the starting point data and the end point data of the target unmanned boat, a preset A* algorithm is used to determine the path nodes of the target unmanned boat in the target sea area under the constraint of a preset safety distance;
[0028] Check whether any three consecutive path nodes in the target sea area are collinear by using a preset vector and a preset collinearity condition;
[0029] If any three consecutive path nodes are collinear, then determine the redundant nodes among any three consecutive path nodes;
[0030] If any three consecutive path nodes are not collinear, then according to the travel direction of the target unmanned boat, the first path node of any three consecutive path nodes is taken as the head node, the second path node of any three consecutive path nodes is taken as the middle node, and the third path node of any three consecutive path nodes is taken as the tail node, and the first travel distance when the target unmanned boat travels from the head node to the middle node and then to the tail node is calculated, and the second travel distance when the target unmanned boat travels directly from the head node to the tail node is calculated;
[0031] When the second travel distance is less than the first travel distance, and the path from the head node directly to the tail node meets the preset safety distance, the middle node is used as a redundant node;
[0032] Redundant nodes are deleted from the path nodes to obtain local path information of the target unmanned boat in the target sea area.
[0033] Optionally, the step of deleting redundant nodes in the path nodes to obtain local path information of the target unmanned boat in the target sea area includes:
[0034] Deleting redundant nodes from the path nodes to obtain a target path node;
[0035] The planned path composed of the target path nodes is smoothed by using a spline interpolation method to obtain local path information of the target unmanned boat in the target sea area.
[0036] On the other hand, the present application provides an unmanned boat path planning device, the device comprising:
[0037] A data acquisition module is used to draw a safety isobath based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat, and use the safety isobath as a constraint condition to model the target sea area through a grid method to obtain a target sea area model;
[0038] A global path planning module is used to plan the global path information of the target unmanned boat in the target sea area based on the target sea area model, the starting point data and the end point data of the target unmanned boat, through the theory of fluid mechanics and the streamline method;
[0039] A local path planning module is used to plan the local path information of the target unmanned boat in the target sea area according to the target sea area model and based on the starting point data and the end point data of the target unmanned boat through a preset A* algorithm;
[0040] A correction module is used to correct the global path information based on the local path information to obtain a target path of the target unmanned boat in the target sea area.
[0041] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0043] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0044] By drawing safety isobaths based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat, and taking the safety isobaths as constraints, the target sea area is modeled by the grid method to obtain a target sea area model; according to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the global path information of the target unmanned boat in the target sea area is planned by fluid mechanics theory and streamline method; according to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the local path information of the target unmanned boat in the target sea area is planned by a preset A* algorithm; based on the local path information, the global path information is corrected to obtain the target path of the target unmanned boat in the target sea area. By establishing a target sea area model that takes into account water depth restrictions, the environmental modeling of the target sea area is more accurate, so that the subsequently planned path meets the navigation restrictions of the unmanned boat, and effectively optimizes the safety of the unmanned boat in complex sea areas; the streamline method is used for global path planning of the target unmanned boat, and the preset A* algorithm is used for local path planning of the target unmanned boat to avoid the planned path results from easily falling into the local optimal solution, effectively optimizing the path planning efficiency of the unmanned boat in complex sea areas. In the global planning stage, computational fluid dynamics technology is used to provide a smooth, globally optimized path for the unmanned boat to avoid falling into the local optimal solution; in the local planning stage, for areas with complex environments or many obstacles, the improved A* algorithm is used and the safety distance is considered for detailed planning. Finally, the global path information and local path information are combined to provide a reliable path for the unmanned boat in a complex marine environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 It is a flowchart of an unmanned boat path planning method provided by an embodiment of the present application;
[0047] Figure 2 This is a schematic diagram of a target sea area model in an unmanned boat path planning method provided in an embodiment of the present application;
[0048] Figure 3 It is a structural schematic diagram of an unmanned boat path planning device provided in one embodiment of the present application;
[0049] Figure 4 is a structural block diagram of an electronic device in one embodiment;
[0050] Figure 5 FIG. 4 is a structural block diagram of a computer storage medium in another embodiment. DETAILED DESCRIPTION
[0051] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0052] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0053] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0054] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0055] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0056] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0057] Figure 1 A schematic flow chart of an unmanned boat path planning method provided by the present application is shown. An embodiment of the present application provides an unmanned boat path planning method, including:
[0058] S101, drawing safety isobaths based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat, and using the safety isobaths as constraints to model the target sea area through a grid method to obtain a target sea area model;
[0059] Exemplarily, simulating obstacles as a collection of small squares is equivalent to binary replacement of all objects in the scene, where obstacles are 1 and non-obstacles are 0.
[0060] Exemplarily, the safety depth contour is a depth contour related to the ship's draft and set on an electronic nautical chart.
[0061] In a possible implementation, the step of drawing a safety depth contour based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat includes:
[0062] Acquire sea condition data of the target sea area and attribute data of the target unmanned boat, and calculate minimum safe water depth data of the target unmanned boat based on the sea condition data and the attribute data;
[0063] The elevation data and water depth data of each point in the target sea area are obtained, and the safety isobath is drawn according to the minimum safe water depth data, the elevation data and the water depth data. The expression form of each point in the target sea area is plane coordinates, and the water depth information includes sea condition data, elevation data and water depth data.
[0064] Exemplarily, the spherical coordinates (longitude and latitude) of the earth are converted into plane coordinates using the Mercator projection suitable for ocean research, which can be specifically expressed as:
[0065] x=R(θ-θ0)
[0066]
[0067] Where R is the radius of the earth; θ is the longitude; θ0 is the central meridian; ψ is the latitude; Represents the logarithmic transformation of latitude, and obtains the plane coordinates of each point in the target sea area.
[0068] The minimum safe water depth data of the target unmanned boat is calculated based on the sea condition data (wave height and surplus water depth) and the attribute data (draft depth of the unmanned boat), which can be specifically expressed as:
[0069]
[0070] Among them, H min represents the minimum safe water depth of the unmanned boat; D represents the draft of the unmanned boat, which is 3.5 meters; H w represents the wave height, which is 0.6 meters; C represents the surplus water depth, which is 1 meter, and H is obtained. min Take 6.7 meters.
[0071] Exemplarily, the elevation data and water depth data of each point in the target sea area, and the safety isobaths are drawn according to the minimum safe water depth data, the elevation data and the water depth data, and the water depth data points that meet the conditions are screened and connected to draw the safety isobaths, as follows:
[0072] depth(x,y)≥H min
[0073] Among them, depth(x,y) represents the water depth information of each data point.
[0074] In a possible implementation, the step of using the safety isobath as a constraint condition and modeling the target sea area by a grid method to obtain a target sea area model includes:
[0075] Gray-scale the nautical chart of the target sea area to obtain an initial gray-scale image;
[0076] resizing the initial grayscale image to obtain a target grayscale image, wherein each grid block in the target grayscale image corresponds to each area in the nautical chart;
[0077] Binarization is performed on the target grayscale image by a grid method to obtain an inaccessible area and a accessible area in the target grayscale image;
[0078] The navigable area is divided according to the safety isobaths to obtain navigable areas and unnavigable areas in the navigable area, thereby completing the modeling of the target sea area.
[0079] For example, Figure 2 As shown, grayscale processing is performed on the sea chart of the target sea area to obtain an initial grayscale image, which specifically includes:
[0080] I=rgb2gray(Img)
[0081] Among them, I represents a grayscale image, Img represents an imported color chart image, and rgb2gray represents a function for converting a color image into a grayscale image.
[0082] The initial grayscale image is resized to a new size so that each grid block corresponds to a specific area on the image, and the target grayscale image is obtained, including:
[0083] B=imresize(I,[a / scale,b / scale])
[0084] Among them, B represents the adjusted image (target grayscale image); a represents the pixel length of the image in the x direction, which is 300 units; b represents the pixel length of the image in the y direction, which is 300 units; scale represents the side length of each grid block, which is 1 unit.
[0085] The target grayscale image is binarized by the grid method, that is, the grayscale value range of the grayscale image B is mapped from 0-255 to 0 or 1, where 0 represents black (obstacle) and 1 represents white (passable area), as follows:
[0086] J = floor(B / 255)
[0087] Among them, J represents the binarized image, floor is the rounding function, each pixel value of B is divided by 255 and rounded up to achieve mapping the grayscale value to 0 or 1.
[0088] The non-navigable area and the navigable area within the navigable area are divided as follows:
[0089] J(x,y)=0
[0090] J(x,y)=1
[0091] When J(x, y) = 0, it indicates that the area is a non-navigable area (for example, obstacles, shoals, etc.), and when J(x, y) = 1, it indicates that the area is a navigable area, that is, the modeling of the target sea area is completed.
[0092] S102, planning the global path information of the target unmanned boat in the target sea area by fluid mechanics theory and streamline method according to the target sea area model and based on the starting point data and the end point data of the target unmanned boat;
[0093] In a possible implementation, the step of planning the global path information of the target unmanned boat in the target sea area by fluid mechanics theory and streamline method based on the target sea area model and the starting point data and the end point data of the target unmanned boat includes:
[0094] In the navigable area of the target sea area model, initial path information is calculated by a preset path planning algorithm based on the starting point data and the end point data of the target unmanned boat;
[0095] The flow field model of the navigable area is established by fluid mechanics theory, and the flow field model satisfies the mass conservation equation and the momentum conservation equation;
[0096] Solving and calculating the state in the flow field model based on the streamline method to obtain state data;
[0097] The initial path information is corrected according to the state data to obtain the global path information of the target unmanned boat in the target sea area.
[0098] Exemplarily, in the navigable area of the target sea area model, the optimal feasible path is found from the starting point (starting point data) to the target point (end point data), as follows:
[0099] x start ∈Ω free
[0100] x goal ∈Ω free
[0101] Ω free =Ω / Ω obs
[0102] ψ(t):[0,T]→Ω free
[0103] ψ(0)=x start
[0104] ψ(T)=x goal
[0105] Among them, x start , x goal represents the starting point and the end point, Ω represents all possible state spaces, Ω obs Indicates the existence of obstacle space, Ω free represents the free space without collision with obstacles, ψ(t) represents the path function, which is defined on the time interval [0, T], where T is 200 seconds, and ψ(0) represents the starting point of the path at time t = 0. start , ψ(T) means that at time t = T, the end point of the path is x goal .
[0106] The flow field model is established based on fluid mechanics. The model satisfies the mass conservation equation and momentum conservation equation as follows:
[0107]
[0108] in, represents the rate of change of velocity component u in the x direction, represents the rate of change of velocity component v in the y direction, u is the velocity component of the fluid in the x direction, and v is the velocity component of the fluid in the y direction. is the instantaneous rate of change of velocity in the u direction, is the instantaneous rate of change of velocity in the v direction, and represents the convection term, describing the influence of the velocity component of the fluid in the x direction on itself, and represents the convection term, describing the influence of the velocity component of the fluid in the y direction on itself, ρ represents the fluid density, p represents the fluid pressure, and Represents the effect of pressure gradient force on the velocity component.
[0109] The process of solving the global path planning based on the streamline method can be understood as follows: using the SpaceClaim numerical simulation software of ANSYS FLUENT, a physical model of the surrounding environment of the target sea area is constructed, and the Fluent Meshing geometric processing function is used to mesh the established model. The number of grids is 102694, the number of nodes is 129267, and the mesh quality is above 0.3. There will be no negative volume to affect the simulation, which meets the Fluent calculation requirements. After the fluid analysis model is established, the flow domain boundary and initial physical quantities are set. In the simulation process, it usually starts from the initial conditions, and then the final flow field solution is obtained by iterative equations. The fluid boundary conditions are set to the velocity inlet, velocity outlet and outer wall. The control equation uses the inviscid Euler equation, the dimension uses the three-dimensional double-precision mode, the solver uses the steady-state, pressure-based solver, and the velocity expression method selects the absolute velocity. Set the working pressure under working conditions to a standard atmospheric pressure, check the gravity effect, and since the y-axis is vertically upward, set the y-direction acceleration to -9.81m / s. 2 , which is opposite to the acceleration due to gravity. The default value of working density is 1.225kg / m 3 .
[0110] The state in the flow field model is solved and calculated based on the streamline method. The streamline is a smooth curve composed of different fluid particles at the same time, which is tangent to the direction of the velocity vector. The expression of the streamline is:
[0111]
[0112] Where dx represents a small displacement in the x direction, dy represents a small displacement in the y direction, u(x,y) represents the x-direction velocity component of the fluid at the (x,y) position, and v(x,y) represents the y-direction velocity component of the fluid at the (x,y) position. It represents the ratio of the displacement of the fluid in the x direction to the velocity component in the x direction at that location. It represents the ratio of the displacement of the fluid in the y direction to the velocity component in the y direction at that location. The streamline method is used to obtain the visualized vector field from the three-dimensional CFD simulation results and generate the global optimal path.
[0113] S103, planning the local path information of the target unmanned boat in the target sea area by using a preset A* algorithm according to the target sea area model and based on the starting point data and the end point data of the target unmanned boat;
[0114] In a possible implementation, the preset A* algorithm includes a path evaluation function, and the path evaluation function is:
[0115] F(n)=g(n)+h(n)
[0116] Among them, F(n) is the total cost from the starting data to the target point n on the path, g(n) is the actual cost from the starting data to the target point n on the path in the running environment, and h(n) is the estimated cost of the best path from the target point n on the path to the end data;
[0117] The preset A* algorithm also includes an estimation function, and the estimation function is a Euclidean distance function.
[0118] In a possible implementation, the step of planning the local path information of the target unmanned boat in the target sea area by using a preset A* algorithm based on the starting point data and the end point data of the target unmanned boat according to the target sea area model includes:
[0119] In the navigable area of the target sea area model, based on the starting point data and the end point data of the target unmanned boat, a preset A* algorithm is used to determine the path nodes of the target unmanned boat in the target sea area under the constraint of a preset safety distance;
[0120] Check whether any three consecutive path nodes in the target sea area are collinear by using a preset vector and a preset collinearity condition;
[0121] If any three consecutive path nodes are collinear, then determine the redundant nodes among any three consecutive path nodes;
[0122] If any three consecutive path nodes are not collinear, then according to the travel direction of the target unmanned boat, the first path node of any three consecutive path nodes is taken as the head node, the second path node of any three consecutive path nodes is taken as the middle node, and the third path node of any three consecutive path nodes is taken as the tail node, and the first travel distance when the target unmanned boat travels from the head node to the middle node and then to the tail node is calculated, and the second travel distance when the target unmanned boat travels directly from the head node to the tail node is calculated;
[0123] When the second travel distance is less than the first travel distance, and the path from the head node directly to the tail node meets the preset safety distance, the middle node is used as a redundant node;
[0124] Redundant nodes are deleted from the path nodes to obtain local path information of the target unmanned boat in the target sea area.
[0125] Exemplarily, the A* algorithm using Manhattan distance as the estimation function moves in four adjacent directions of the current node as follows:
[0126] h(n)=x m -x n +y m -y n
[0127] However, using Manhattan distance as the estimation function will produce many turning points, causing the path to appear jagged. If the eight adjacent directions of the current node are moved and Euclidean distance is used as the estimation function, the path will have fewer turning angles. The connected area search direction and the length of the path are measured by Euclidean distance, as follows:
[0128]
[0129] Among them, g(n) is the distance from the starting point to the current node, h(n) is the estimated distance from the current node to the target node, (x m ,y m ) is the coordinate of the target point, (x n ,y n ) are the coordinates of the current node.
[0130] In order to ensure that the planned route is far away from the edge of the dangerous area, the "safe distance" constraint is introduced. Assume that the current node is Current(x,y), the neighbor node to be expanded is Neighbor(x,y), and the obstacle position is Obstacle(x i ,y i ), then the distance from Neighbor(x,y) to the nearest obstacle can be expressed as follows:
[0131]
[0132] Among them, x Neighbor Indicates the x-coordinate and y-coordinate of the neighbor node Neighbor Indicates the y coordinate of the neighbor node, d(Neighbor i ,Obstacle) represents the distance from the neighbor node Neighbor (x, y) to be expanded to the nearest obstacle, d min Represents the safety distance threshold. This embodiment sets three different safety distances through comparison, which are 0, 5, and 10 unit lengths respectively.
[0133] Delete redundant nodes on the same line, check whether the three consecutive nodes A(x1,y1)B(x2,y2)C(x3,y3) in the path are on the same line, and define the vector and as follows:
[0134]
[0135] If the collinearity condition is met, as follows:
[0136]
[0137] Then prove that the vector and Collinear, because A→B and B→C have a common point B, so A, B, C are collinear, then node B is a redundant node, eliminate this node, the path changes from A→B→C to A→C.
[0138] Delete the redundant nodes in the redundant inflection points. If the non-collinearity condition is met and after the safety distance test and path length comparison, the result is as follows:
[0139]
[0140] Where P is any point on the line A→C, (x i ,y i ) are the coordinates of obstacle i.
[0141] If the path length of A→C is shorter than that of A→B→C and meets the safety distance requirement, you can consider deleting the redundant inflection point B.
[0142] In a possible implementation manner, the step of deleting redundant nodes in the path nodes to obtain local path information of the target unmanned boat in the target sea area includes:
[0143] Deleting redundant nodes from the path nodes to obtain a target path node;
[0144] The planned path composed of the target path nodes is smoothed by using a spline interpolation method to obtain local path information of the target unmanned boat in the target sea area.
[0145] Exemplarily, spline interpolation is used for smoothing, as follows:
[0146] P(t)=(1-t) 3 P0+3(1-t) 2 tP1+3(1-t)t 2 P2+t 3 P3
[0147] Among them, P0, P1, P2, and P3 represent control points on the path; t represents a parameter, which usually ranges from [0,1].
[0148] S104: Correct the global path information based on the local path information to obtain a target path of the target unmanned boat in the target sea area.
[0149] For example, in offshore operations, the geographic location identification modal network can effectively transmit obstacle avoidance warning information to unmanned boats in a specific area through the broadcast function of its geographic location identification, avoiding communication with unmanned boats in irrelevant areas, thereby improving the efficiency and safety of information exchange. Local path planning can be performed based on the geographic location identification of dangerous areas, and 5 unit lengths can be selected as the safe distance for local planning.
[0150] By drawing safety isobaths based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat, and taking the safety isobaths as constraints, the target sea area is modeled by the grid method to obtain a target sea area model; according to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the global path information of the target unmanned boat in the target sea area is planned by fluid mechanics theory and streamline method; according to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the local path information of the target unmanned boat in the target sea area is planned by a preset A* algorithm; based on the local path information, the global path information is corrected to obtain the target path of the target unmanned boat in the target sea area. By establishing a target sea area model that takes into account water depth restrictions, the environmental modeling of the target sea area is more accurate, so that the subsequently planned path meets the navigation restrictions of the unmanned boat, and effectively optimizes the safety of the unmanned boat in complex sea areas; the streamline method is used for global path planning of the target unmanned boat, and the preset A* algorithm is used for local path planning of the target unmanned boat to avoid the planned path results from easily falling into the local optimal solution, effectively optimizing the path planning efficiency of the unmanned boat in complex sea areas. In the global planning stage, computational fluid dynamics technology is used to provide a smooth, globally optimized path for the unmanned boat to avoid falling into the local optimal solution; in the local planning stage, for areas with complex environments or many obstacles, the improved A* algorithm is used and the safety distance is considered for detailed planning. Finally, the global path information and local path information are combined to provide a reliable path for the unmanned boat in a complex marine environment.
[0151] On the other hand, Figure 3 As shown, the present application provides an unmanned boat path planning device, the device comprising:
[0152] The data acquisition module 201 is used to draw a safety depth contour based on the water depth information of the target sea area and the minimum safety water depth data of the target unmanned boat, and use the safety depth contour as a constraint condition to model the target sea area through a grid method to obtain a target sea area model;
[0153] A global path planning module 202 is used to plan the global path information of the target unmanned boat in the target sea area based on the target sea area model, the starting point data and the end point data of the target unmanned boat, through the theory of fluid mechanics and the streamline method;
[0154] The local path planning module 203 is used to plan the local path information of the target unmanned boat in the target sea area according to the target sea area model and based on the starting point data and the end point data of the target unmanned boat through a preset A* algorithm;
[0155] The correction module 204 is used to correct the global path information based on the local path information to obtain the target path of the target unmanned boat in the target sea area.
[0156] Thirdly, Figure 4 As shown, an embodiment of the present application provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: drawing safety depth contours based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat, and taking the safety depth contours as constraints, modeling the target sea area through the grid method to obtain a target sea area model; according to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, planning the global path information of the target unmanned boat in the target sea area through the fluid mechanics theory and the streamline method; according to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, planning the local path information of the target unmanned boat in the target sea area through a preset A* algorithm; and correcting the global path information based on the local path information to obtain the target path of the target unmanned boat in the target sea area.
[0157] Fourthly, Figure 5As shown, an embodiment of the present application provides a computer-readable storage medium 400, which stores a computer program 411. When the computer program is executed by a processor, the following steps are implemented: based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat, a safety isobath is drawn, and the safety isobath is used as a constraint condition, and the target sea area is modeled by a grid method to obtain a target sea area model; according to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the global path information of the target unmanned boat in the target sea area is planned by fluid mechanics theory and streamline method; according to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the local path information of the target unmanned boat in the target sea area is planned by a preset A* algorithm; based on the target sea area model, the global path information is corrected based on the local path information to obtain the target path of the target unmanned boat in the target sea area.
[0158] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0159] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment / terminal equipment and methods can be implemented in other ways. For example, the device / network equipment / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0160] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0161] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for unmanned boat path planning, characterized in that: include: Based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat, a safety isobath is drawn, and the safety isobath is used as a constraint condition to model the target sea area through a grid method to obtain a target sea area model; According to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the global path information of the target unmanned boat in the target sea area is planned by fluid mechanics theory and streamline method; According to the target sea area model, based on the starting point data and the end point data of the target unmanned boat, the local path information of the target unmanned boat in the target sea area is planned by a preset A* algorithm; The global path information is corrected based on the local path information to obtain a target path of the target unmanned boat in the target sea area.
2. The unmanned boat path planning method according to claim 1, characterized in that: The step of drawing the safety depth contour based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat includes: Acquire sea condition data of the target sea area and attribute data of the target unmanned boat, and calculate minimum safe water depth data of the target unmanned boat based on the sea condition data and the attribute data; The elevation data and water depth data of each point in the target sea area are obtained, and the safety isobath is drawn according to the minimum safe water depth data, the elevation data and the water depth data. The expression form of each point in the target sea area is plane coordinates, and the water depth information includes sea condition data, elevation data and water depth data.
3. The unmanned boat path planning method according to claim 1, characterized in that: The step of using the safety isobath as a constraint condition and modeling the target sea area by a grid method to obtain a target sea area model comprises: Gray-scale the nautical chart of the target sea area to obtain an initial gray-scale image; resizing the initial grayscale image to obtain a target grayscale image, wherein each grid block in the target grayscale image corresponds to each area in the nautical chart; Binarization is performed on the target grayscale image by a grid method to obtain an inaccessible area and a accessible area in the target grayscale image; The navigable area is divided according to the safety isobaths to obtain navigable areas and unnavigable areas in the navigable area, thereby completing the modeling of the target sea area.
4. The unmanned boat path planning method according to claim 3, characterized in that: The step of planning the global path information of the target unmanned boat in the target sea area by fluid mechanics theory and streamline method according to the target sea area model and based on the starting point data and the end point data of the target unmanned boat comprises: In the navigable area of the target sea area model, initial path information is calculated by a preset path planning algorithm based on the starting point data and the end point data of the target unmanned boat; The flow field model of the navigable area is established by fluid mechanics theory, and the flow field model satisfies the mass conservation equation and the momentum conservation equation; Solving and calculating the state in the flow field model based on the streamline method to obtain state data; The initial path information is corrected according to the state data to obtain the global path information of the target unmanned boat in the target sea area.
5. The unmanned boat path planning method according to claim 1, characterized in that: The preset A* algorithm includes a path evaluation function, which is: F(n)=g(n)+h(n) Among them, F(n) is the total cost from the starting point data to the target point n on the path, g(n) is the actual cost from the starting point data to the target point n on the path in the running environment, and h(n) is the estimated cost of the best path from the target point n on the path to the end point data; The preset A* algorithm also includes an estimation function, and the estimation function is a Euclidean distance function.
6. The unmanned boat path planning method according to claim 1, characterized in that: The step of planning the local path information of the target unmanned boat in the target sea area by using a preset A* algorithm according to the target sea area model and based on the starting point data and the end point data of the target unmanned boat comprises: In the navigable area of the target sea area model, based on the starting point data and the end point data of the target unmanned boat, a preset A* algorithm is used to determine the path nodes of the target unmanned boat in the target sea area under the constraint of a preset safety distance; Check whether any three consecutive path nodes in the target sea area are collinear by using a preset vector and a preset collinearity condition; If any three consecutive path nodes are collinear, then determine the redundant nodes among any three consecutive path nodes; If any three consecutive path nodes are not collinear, then according to the travel direction of the target unmanned boat, the first path node of any three consecutive path nodes is taken as the head node, the second path node of any three consecutive path nodes is taken as the middle node, and the third path node of any three consecutive path nodes is taken as the tail node, and the first travel distance when the target unmanned boat travels from the head node to the middle node and then to the tail node is calculated, and the second travel distance when the target unmanned boat travels directly from the head node to the tail node is calculated; When the second travel distance is less than the first travel distance, and the path from the head node directly to the tail node meets the preset safety distance, the middle node is used as a redundant node; Redundant nodes are deleted from the path nodes to obtain local path information of the target unmanned boat in the target sea area.
7. The unmanned boat path planning method according to claim 6, characterized in that: The step of deleting redundant nodes in the path nodes to obtain local path information of the target unmanned boat in the target sea area includes: Deleting redundant nodes from the path nodes to obtain a target path node; The planned path composed of the target path nodes is smoothed by using a spline interpolation method to obtain local path information of the target unmanned boat in the target sea area.
8. An unmanned boat path planning device, characterized in that: The device comprises: A data acquisition module is used to draw a safety isobath based on the water depth information of the target sea area and the minimum safe water depth data of the target unmanned boat, and use the safety isobath as a constraint condition to model the target sea area through a grid method to obtain a target sea area model; A global path planning module is used to plan the global path information of the target unmanned boat in the target sea area based on the target sea area model, the starting point data and the end point data of the target unmanned boat, and the fluid mechanics theory and streamline method; A local path planning module is used to plan the local path information of the target unmanned boat in the target sea area according to the target sea area model and based on the starting point data and the end point data of the target unmanned boat through a preset A* algorithm; A correction module is used to correct the global path information based on the local path information to obtain a target path of the target unmanned boat in the target sea area.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
A path planning method for unmanned boat based on geographic information system and multi-criteria analysis
CN119737957A
