Unmanned boat route planning method, system and storage medium
Optimizing unmanned boat routes through clustering, undirected connectivity graphs and DP trajectory compression algorithms, solving the problems of slow convergence speed and excessive turn of route planning algorithms, and improving navigation safety and efficiency.
Patent Information
- Application Number
- CN202210597763.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2042-05-30
AI Technical Summary
The unmanned boat route planning algorithm converges slowly, and the number of path turns and angle amplitudes are too large, which affects navigation safety and efficiency.
By obtaining AIS data for clustering, building an undirected connectivity graph, calculating the initial path, performing navigation area sampling and branch expansion, using DP trajectory compression algorithm and angle optimization, optimize routes to reduce steering points and corners.
It improves the convergence speed of navigation planning algorithms, optimizes routes, reduces the collision risk of unmanned boats, and improves navigation safety performance and efficiency.
Smart Images

Figure CN114935933B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship route planning, and in particular to an unmanned boat route planning method, system and storage medium. Background Art
[0002] Unmanned boats are a new type of boats with autonomous environmental perception, autonomous planning and autonomous navigation capabilities. They can be deployed in dangerous waters to complete various military tasks, and they play a unique role in shipping, maritime affairs and water environment monitoring. The actual movement of ships is very complex, with characteristics such as large time lag, large inertia, and nonlinearity. In related technologies, the route planning algorithm for unmanned boats is often difficult to converge. At the same time, the planned route also has problems such as the number of path turns and the magnitude of the angle between paths, which seriously affects the path tracking of unmanned boats and increases the risk of collision of unmanned boats. Summary of the invention
[0003] In order to solve at least one of the above technical problems, the present invention proposes an unmanned boat route planning method, system and storage medium, which can effectively improve the algorithm convergence speed, optimize the planned route, and effectively improve the navigation safety performance and efficiency of the unmanned boat.
[0004] On the one hand, an embodiment of the present invention provides a method for unmanned watercraft route planning, comprising the following steps:
[0005] Acquire AIS data, and perform clustering according to the AIS data to obtain cluster points;
[0006] Constructing an undirected connected graph according to the clustering points;
[0007] Calculate an initial path according to the undirected connected graph;
[0008] Constructing a navigation area according to the navigation points on the initial path; wherein the clustering points on the initial path are used as the navigation points;
[0009] Sampling and branch expansion are performed according to the navigation area to obtain a first planned route;
[0010] Performing path compression on the first planned route according to the DP trajectory compression algorithm to obtain a second planned route;
[0011] Determining that a curvature change of a first path segment of the second planned route is greater than a preset curvature, and performing corner optimization on the first path segment to obtain a second path segment;
[0012] A target planned route is obtained according to the second planned route and the second path segment.
[0013] According to an unmanned boat route planning method of an embodiment of the present invention, there are at least the following beneficial effects: In this embodiment, AIS data is first acquired and clustered according to the AIS data to obtain cluster points. Then, an undirected connected graph is constructed according to the obtained cluster points to calculate the initial path through the undirected connected graph. In this embodiment, the cluster points on the initial path are used as navigation points, and a navigation area is constructed according to the navigation points on the initial path. Then, sampling and branch expansion are performed according to the navigation area to obtain a first planned route. At the same time, in this embodiment, the path compression of the first planned route is performed by the DP trajectory compression algorithm to obtain a second planned route, so as to achieve path pruning of the planned path and alleviate the problem of too many turning points in the planned path. In addition, in this embodiment, when it is determined that the curvature of the first path segment of the second planned route is greater than the preset curvature, the first path segment is optimized to obtain a second path segment, so as to alleviate the problem that some path segments in the second planned route have too large turning angles and are not conducive to ship tracking, and at the same time increase the risk of ship collision, and then the target planned route is obtained according to the second planned route combined with the second path segment. This embodiment obtains the initial path through undirected connected graph calculation, and uses the initial path as the prior information of the algorithm, which effectively improves the convergence speed of the algorithm in the navigation planning process, and optimizes the planned route through the DP trajectory compression algorithm and corner optimization, effectively improving the navigation safety performance and efficiency of the unmanned boat.
[0014] According to some embodiments of the present invention, clustering the AIS data to obtain cluster points includes:
[0015] K-means clustering is performed based on the ship position information in the AIS data using Euclidean distance as a standard to obtain cluster points.
[0016] According to some embodiments of the present invention, calculating the initial path according to the undirected connected graph includes:
[0017] According to the target point and the starting point, the shortest path of the undirected connected graph is solved by Dijkstra algorithm to obtain the initial path.
[0018] According to some embodiments of the present invention, constructing a navigation area according to navigation points on the initial path includes:
[0019] A square area with a preset side length is constructed with each of the navigation points as the center to obtain the navigation area corresponding to each of the navigation points.
[0020] According to some embodiments of the present invention, the step of sampling and branch expansion according to the navigation area to obtain a first planned route includes:
[0021] Setting the navigation area corresponding to the second navigation point of the initial path as the current navigation area;
[0022] Constructing random sampling points according to the current navigation area;
[0023] Searching according to the random sampling point to obtain a first tree branch node closest to the random sampling point;
[0024] Constructing a second branch node according to the first branch node and the random sampling point;
[0025] Determine that the branch formed by the first branch node and the second branch node does not pass through an obstacle, and add the second branch node to the expansion tree;
[0026] Determine that the distance between the second tree branch node and the first navigation point meets a first preset range, and set the navigation area of the next navigation point connected to the first navigation point as the current navigation area;
[0027] Determine whether the distance between the leaf node of the expansion tree and the last navigation point of the initial path satisfies the second preset range, and connect the leaf node and the last navigation point to obtain the first planned route.
[0028] According to some embodiments of the present invention, constructing random sampling points according to the current navigation area includes:
[0029] Construct a random number function;
[0030] Generate a random number according to the random number function;
[0031] Determine that the random number is greater than a threshold, and select a random point according to a map as the random sampling point;
[0032] It is determined that the random number is less than or equal to the threshold, and a random point is selected as the random sampling point according to the current navigation area.
[0033] According to some embodiments of the present invention, the step of performing corner optimization on the first path segment to obtain the second path segment includes:
[0034] Set the crop length;
[0035] Constructing a first path point and a second path point according to the cutting length; wherein the first path point and the corner point of the first path segment constitute a fourth path segment, the second path point and the corner point of the first path segment constitute a fifth path segment, and the fourth path segment and the fifth path segment are both equal to the cutting length;
[0036] Connecting the first path point and the second path point to obtain a third path segment;
[0037] It is determined that the third path segment does not pass through the obstacle, the third path segment is added to the first path segment, and the corner point is deleted to obtain the second path segment.
[0038] On the other hand, an embodiment of the present invention further provides an unmanned boat route planning system, comprising:
[0039] A clustering module, used to obtain AIS data and perform clustering based on the AIS data to obtain cluster points;
[0040] A first construction module is used to construct an undirected connected graph according to the cluster points;
[0041] An initial path calculation module, used to calculate an initial path according to the undirected connected graph;
[0042] A second construction module is used to construct a navigation area according to the navigation points on the initial path; wherein the cluster points on the initial path are used as the navigation points;
[0043] A first planning module, used for performing sampling and branch expansion according to the navigation area to obtain a first planned route;
[0044] A second planning module, used for performing path compression on the first planned route according to a DP trajectory compression algorithm to obtain a second planned route;
[0045] a path segment optimization module, configured to determine that a curvature change of a first path segment of the second planned route is greater than a preset curvature, and to optimize a corner of the first path segment to obtain a second path segment;
[0046] The third planning module is used to obtain a target planned route according to the second planned route and the second path segment.
[0047] On the other hand, an embodiment of the present invention further provides an unmanned boat route planning system, comprising:
[0048] at least one processor;
[0049] at least one memory for storing at least one program;
[0050] When the at least one program is executed by the at least one processor, the at least one processor implements the unmanned watercraft route planning method as described in the above embodiment.
[0051] On the other hand, an embodiment of the present invention further provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the unmanned watercraft route planning method as described in the above embodiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a flow chart of an unmanned boat route planning method provided by an embodiment of the present invention;
[0053] Figure 2 This is a principle block diagram of an unmanned boat route planning system provided by an embodiment of the present invention;
[0054] Figure 3 is a schematic diagram of the path angle calculation principle provided by an embodiment of the present invention;
[0055] Figure 4 is a schematic diagram of a path before corner optimization provided by an embodiment of the present invention;
[0056] Figure 5 It is a schematic diagram of the path angle optimization provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The embodiments described in the embodiments of this application should not be regarded as limitations of this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0058] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0060] Unmanned boats are a new type of boats with autonomous environmental perception, autonomous planning and autonomous navigation capabilities. They can be deployed in dangerous waters to complete various military tasks, and they play a unique role in shipping, water affairs and water environment monitoring. Among them, global path planning is a key technology for unmanned boats to complete tasks and reach target locations. How to plan a safe and economical navigation path is crucial to the mission execution of unmanned boats. The actual movement of ships is relatively complex, with characteristics such as large time lag, large inertia and nonlinearity. For the global path planning of ships, the safety of the path, the range and the maneuverability of the ship are usually considered. In related technologies, the path planning algorithm of unmanned boats often has a poor convergence speed. At the same time, most algorithms do not consider the pros and cons of the planned path, resulting in some poor navigation that seriously affects the path tracking of unmanned boats and increases the risk of collision of unmanned boats.
[0061] Based on this, an embodiment of the present invention provides an unmanned boat route planning method, system and storage medium, which can effectively improve the algorithm convergence speed, optimize the planned route, and effectively improve the navigation safety performance and efficiency of the unmanned boat. Figure 1 The method of the embodiment of the present invention includes but is not limited to step S110, step S120, step S130, step S140, step S150, step S160, step S170 and step S180.
[0062] Specifically, the method application process of the embodiment of the present invention includes but is not limited to the following steps:
[0063] S110: Acquire AIS data, and perform clustering according to the AIS data to obtain cluster points.
[0064] S120: Construct an undirected connected graph according to the cluster points.
[0065] S130: Calculate an initial path according to the undirected connected graph.
[0066] S140: constructing a navigation area according to the navigation points on the initial path, wherein the clustering points on the initial path are used as navigation points.
[0067] S150: Sampling and branch expansion are performed according to the navigation area to obtain a first planned route.
[0068] S160: Compress the first planned route according to the DP trajectory compression algorithm to obtain a second planned route.
[0069] S170: Determine that a curvature change of a first path segment of a second planned route is greater than a preset curvature, and perform corner optimization on the first path segment to obtain a second path segment.
[0070] S180: Obtain a target planned route according to the second planned route and the second path segment.
[0071] During the working process of this specific embodiment, this embodiment first obtains AIS (Automatic Identification System) data, that is, AIS data, and then clusters the obtained AIS data to obtain cluster points. Further, this embodiment constructs an undirected connected graph based on the cluster points to reduce the complexity of the graph through the undirected connected graph, which is more conducive to solving the navigation path, that is, the initial path. Then, this embodiment calculates the initial path based on the undirected connected graph. Specifically, this embodiment calculates the initial path based on the undirected connected graph according to the navigation starting point and target point of the unmanned boat combined with the undirected connected graph. This embodiment uses the initial path as the prior information path of the unmanned boat route planning algorithm to provide navigation information for the path search of the unmanned boat route planning to alleviate the problem of slow convergence of the algorithm. Further, this embodiment constructs a navigation area based on the navigation points on the initial path. Among them, this embodiment uses the cluster points on the initial path as navigation points, that is, the navigation points correspond one to one with the cluster points on the initial path. Then, this embodiment performs sampling and branch expansion according to the navigation area to obtain the first planned route. Specifically, this embodiment samples the navigation area with a certain probability from the starting point to the end point of the initial path, and performs branch expansion to obtain the first planned route. This embodiment uses the initial path as prior information, so that the first planned route can be quickly expanded, which effectively improves the convergence speed of the unmanned watercraft route planning algorithm. Furthermore, this embodiment compresses the path of the first planned route through the DP trajectory compression algorithm to obtain the second planned route. Specifically, the DP trajectory compression algorithm can delete the turning points with slight changes on the planned path, and identify the turning points that meet the actual navigation. Since different paths have different requirements for the path compression level, DP trajectory compression algorithms with different parameters are required. This embodiment constructs a DP trajectory compression algorithm with adaptive parameters to cope with different environments and path requirements. This embodiment first calculates the maximum distance D from the line connecting the starting point and the end point in the first planned route, and uses the maximum distance D as the initial parameter of the DP trajectory compression algorithm. Then this embodiment executes the DP trajectory compression algorithm according to the initial function, and determines whether the obtained path crosses the obstacle. When it is determined that the obtained path passes through an obstacle, the maximum distance D is decremented, and then the decremented D is used as a parameter of the DP trajectory compression algorithm and the DP trajectory compression algorithm is executed again. When the obtained path does not pass through an obstacle, the path is returned to obtain the second planned route.
[0072] In this embodiment, the turning points of the second planned route obtained after path compression by the DP trajectory compression algorithm are greatly reduced, but there may be too large corners in the path, for example, the corners of adjacent paths are greater than 60 degrees, which may easily cause accidents such as ship collisions, and are not conducive to ship tracking. Further, in this embodiment, the curvature change of the first path segment of the second planned route is determined to be greater than the preset curvature, and the first path segment is optimized to obtain the second path segment. Specifically, when this embodiment determines that the curvature change of a certain path segment in the second planned route is greater than the preset curvature, the path segment is optimized to obtain the optimized path segment, that is, the second path segment. It should be noted that in complex ports or sea areas, there may be multiple path segments in the second planned route with a curvature change greater than the preset curvature. In this embodiment, the first path segment with a curvature change greater than the preset curvature is optimized to obtain the corresponding second path segment after the optimization of each first path segment. Further, in this embodiment, the target planned route is obtained according to the second path segment and the second planned route. Specifically, this embodiment deletes the first path segment whose curvature change is greater than the preset curvature in the second planned route, and adds the second path segment obtained after the first path segment is optimized by the corner to the corresponding position of the first path segment, so as to construct a complete route, that is, the target planned route. This implementation first uses the initial path as the prior information path of the unmanned boat route planning algorithm to effectively improve the algorithm convergence speed, and then optimizes the planned route by constructing the DP trajectory compression algorithm with adaptive parameters and corner optimization, thereby effectively improving the navigation safety performance and efficiency of the unmanned boat.
[0073] In some embodiments of the present invention, clustering is performed based on AIS data to obtain cluster points, including but not limited to:
[0074] According to the ship position information in the AIS data, K-means clustering is performed with Euclidean distance as the standard to obtain cluster points.
[0075] In this specific embodiment, after obtaining the AIS data, this embodiment performs clustering according to the AIS data to obtain clustering points. Specifically, the places where the ship passes are all feasible and barrier-free. Therefore, this embodiment uses the ship position information in the AIS data as the prior information for path planning, and guides the unmanned boat route planning algorithm to expand to feasible areas and targets to improve the convergence speed of the algorithm. However, there are generally a large number of ships in the port, and the ship data is very large, so it is difficult to directly construct an undirected connected graph. This embodiment performs K-means clustering based on the Euclidean distance as the standard according to the ship position information in the AIS data to obtain clustering points of the ship position. This embodiment greatly reduces the complexity of the undirected connected graph by performing K-means clustering on the ship position information based on the Euclidean distance, thereby making it easier to calculate the initial path. It should be noted that the Mercator projection of the geographic coordinates (B, L) obtains the corresponding plane coordinates (x, y), and the calculation method is shown in the following formulas (1) and (2):
[0076] x=Kq (1)
[0077] y=K(L-L0) (2)
[0078] in, L0 is the longitude of the origin, B0 is the base latitude, e is the first eccentricity, and α is the length of the major semi-axis of the Earth's ellipsoid.
[0079] In some embodiments of the present invention, the initial path is calculated based on the undirected connected graph, including but not limited to:
[0080] According to the target point and the starting point, the Dijkstra algorithm is used to solve the shortest path of the undirected connected graph to obtain the initial path.
[0081] In this specific embodiment, after constructing an undirected connected graph based on cluster points, this embodiment calculates the initial path through the undirected connected graph, so as to use the initial path as the prior information of the unmanned boat route planning algorithm, thereby improving the convergence speed of the algorithm. Specifically, this embodiment combines the undirected connected graph, the target point and the starting point, and solves the shortest path of the undirected connected graph through the Dijkstra algorithm, thereby obtaining the initial path. This embodiment calculates the shortest path from the starting point to the target point in the undirected connected graph through the Dijkstra algorithm, and uses the shortest path as the initial path. Since the initial path is the shortest path from the starting point to the target point in the undirected connected graph, this embodiment uses the initial path as the prior information path of the algorithm to provide navigation information for the search path, thereby effectively improving the convergence speed of the unmanned boat route planning algorithm.
[0082] In some embodiments of the present invention, the navigation area is constructed according to the navigation points on the initial path, including but not limited to:
[0083] A square area with a preset side length is constructed with each navigation point as the center to obtain a navigation area corresponding to each navigation point.
[0084] In some embodiments of the present invention, this embodiment uses each cluster point on the initial path as a navigation point, and constructs a navigation area based on these navigation points. Specifically, after clustering the ship position information in the AIS data to obtain cluster points, this embodiment uses these cluster points as navigation points. Furthermore, this embodiment uses each navigation point as the center to construct a square area with a preset side length to obtain a navigation area corresponding to each navigation point. Exemplarily, for navigation point A1, the preset side length is set to S, and a square area is constructed with navigation point A1 as the center of the square area and the preset side length S as the side length of the square. The square area is the navigation area corresponding to navigation point A1. This embodiment constructs a square area with a preset side length with each navigation point as the center to obtain a navigation area corresponding to each navigation point.
[0085] In some embodiments of the present invention, sampling and branch expansion are performed according to the navigation area to obtain a first planned route, including but not limited to:
[0086] Set the navigation area corresponding to the second navigation point of the initial path as the current navigation area.
[0087] Construct random sampling points based on the current navigation area.
[0088] The first branch node closest to the random sampling point is obtained by searching the random sampling point.
[0089] A second branch node is constructed according to the first branch node and the random sampling points.
[0090] It is determined that the branch formed by the first branch node and the second branch node does not pass through an obstacle, and the second branch node is added to the expansion tree.
[0091] It is determined that the distance between the second tree branch node and the first navigation point meets a first preset range, and the navigation area of the next navigation point connected to the first navigation point is set as the current navigation area.
[0092] Determine whether the distance between the leaf node of the expansion tree and the last navigation point of the initial path meets the second preset range, and connect the leaf node and the last navigation point to obtain the first planned route.
[0093] In this specific embodiment, this embodiment first sets the navigation area corresponding to the second navigation point of the initial path as the current navigation area. Among them, this implementation starts from the starting point of the initial path to the end point of the initial path, that is, the target point, and expands the branches, connecting each navigation point in sequence from the starting point to the target point. The starting point of the initial path is the first navigation point, and the target point of the initial path is the last navigation point. Further, this embodiment constructs random sampling points according to the set current navigation area. Then, this embodiment searches for the branch node closest to the random sampling point based on the random sampling point to obtain the nearest branch node, that is, the first branch node. Further, this embodiment constructs a second branch node based on the first branch node and the random sampling point. Exemplarily, the branch length is set to L1, and the random sampling point q is constructed according to the current navigation area. rand Then according to the random sampling point q rand Search and get the branch node closest to the random sampling point, that is, the first branch node q near . near q rand The branch with a length of L1 is extended in the direction as node q new, that is, the second branch node. Further, the present embodiment determines whether the branch formed by the first branch node and the second branch node passes through an obstacle. When it is determined that the branch formed by the first branch node and the second branch node does not pass through an obstacle, the second branch node is added to the expansion tree to achieve branch expansion. In addition, when it is determined that the branch formed by the first branch node and the second branch node passes through an obstacle, the second branch node is discarded and the node is searched again. Further, when it is determined that the distance between the second branch node and the first navigation point meets the first preset range, the navigation area of the next navigation point connected to the first navigation point is set as the current navigation area. After determining that the branch of the expansion tree is extended to the first preset range of the first navigation point, the present embodiment sets the navigation area constructed by the next navigation point connected to the first navigation point as the current navigation area, and then constructs a new random sampling point according to the current navigation area, and re-searches to obtain the first branch node closest to the random sampling point, and constructs the second branch node according to the first branch node and the new random sampling point. At the same time, it is determined whether the branch formed by the first branch node and the newly constructed second branch node passes through an obstacle, thereby achieving branch expansion of the expansion tree. This implementation determines whether the distance between the constructed second branch node and a certain navigation point (i.e., the first navigation point) meets the first preset range. When it is determined that the distance meets the first preset range, the navigation area of the next navigation point (i.e., the next navigation point connected to the first navigation point) is set as the current navigation area, and iteratively executes the steps of constructing random sampling points according to the current navigation area, searching for the first branch node closest to the random sampling point according to the random sampling point, constructing the second branch node according to the first branch node and the random sampling point, and determining that the branch formed by the first branch node and the second branch node does not pass through an obstacle, and adding the second branch node to the expansion tree, thereby realizing the expansion of branches from the initial path starting point to the target point. At the same time, by taking the initial path as prior information, the algorithm can be quickly guided to expand branches to the target point, which effectively improves the convergence speed of the algorithm.
[0094] Furthermore, in this embodiment, when it is determined that the distance between the leaf node of the expansion tree and the last navigation point of the initial path meets the second preset range, the leaf node is connected to the last navigation point to obtain the first planned route. When it is determined that the leaf node of the expansion tree is extended to the vicinity of the target point (i.e., the last navigation point of the initial path), that is, the distance between the leaf node and the target point meets the second preset range, the leaf node is connected to the target point, and the branch expansion is stopped. The branch expansion process is completed and a complete expansion tree is obtained. Then, the shortest path is searched from the obtained expansion tree as the first planned route.
[0095] In some embodiments of the present invention, random sampling points are constructed according to the current navigation area, including but not limited to:
[0096] Construct a random number function.
[0097] Generates random numbers using a random number function.
[0098] Make sure the random number is greater than the threshold and select a random point according to the map as the random sampling point.
[0099] Determine whether the random number is less than or equal to the threshold, and select a random point as a random sampling point according to the current navigation area.
[0100] In this specific embodiment, this embodiment first constructs a random number function, and generates a random number through the random number function. When it is determined that the generated random number is greater than the threshold, a random point is selected from the map as a random sampling point. When it is determined that the generated random number is less than or equal to the threshold, a random point is selected as a random sampling point according to the current navigation area. Specifically, the formula for obtaining the random sampling point in this embodiment is shown in the following formula (3):
[0101]
[0102] Wherein, rand() is a random number function that can generate a random number between [0,1], p is the probability threshold for sampling the current navigation area, and i is the number of the current navigation area. In this embodiment, when the random number generated by rand() is greater than the set threshold p, a random point is selected in the map as the random sampling point q rand Otherwise, a random point is selected in the current navigation area as q rand This embodiment introduces the bias idea to effectively expand the algorithm to the navigation area to alleviate the randomness problem of completely random sampling.
[0103] In some embodiments of the present invention, the first path segment is subjected to corner optimization to obtain the second path segment, including but not limited to:
[0104] Set the crop length;
[0105] The first path point and the second path point are constructed according to the cutting length, wherein the first path point and the corner point of the first path segment constitute the fourth path segment, the second path point and the corner point of the first path segment constitute the fifth path segment, and the fourth path segment and the fifth path segment are both equal to the cutting length.
[0106] The first path point and the second path point are connected to obtain a third path segment.
[0107] It is determined that the third path segment does not pass through an obstacle, the third path segment is added to the first path segment, and the corner point is deleted to obtain a second path segment.
[0108] In this specific embodiment, this embodiment sets the clipping angle, constructs the first path point and the second path point according to the clipping length, and then connects the first path point and the second path point to obtain a third path segment. When it is determined that the third path segment does not pass through an obstacle, the third path segment is added to the first path segment and the corner point is deleted to obtain the second path segment, thereby achieving corner optimization. Specifically, the calculation method of the corner between adjacent paths is as follows: Figure 3 As shown, q i ,q i+1 and q i+2 are the three path points on the first path segment, q i =(x i ,y i ), q i+1 =(x i+1 ,y i+1 ), q i+2 =(x i+2 ,y i+2 ). Angle α i+1 The calculation formula is shown in the following formula (4):
[0109]
[0110] Wherein, k1 and k2 are respectively shown as follows:
[0111]
[0112]
[0113] When the present embodiment determines that the curvature change of the first path segment is greater than a preset curvature, the first path segment is optimized at a corner to obtain a second path segment. Specifically, the present embodiment first sets the clipping length. Then, the first path point and the second path point are constructed according to the clipping length. Among them, the first path point and the corner point of the first path segment constitute the fourth path segment, the second path point and the corner point of the first path segment constitute the fifth path segment, and the fourth path segment and the fifth path segment are both equal to the clipping length. Furthermore, the present embodiment connects the first path point and the second path point to obtain a third path segment. When it is determined that the third path segment does not pass through an obstacle, the present embodiment adds the third path segment to the first path segment and deletes the corner point to obtain the second path segment. Exemplarily, the present embodiment first sets the clipping length to C. Refer to Figure 4 and Figure 5 , q in the figure i+1 ,q i+2 and q i+3 Three path points form the first path segment, where q i+2 is the corner point of the first path segment, and the rounded rectangle is an obstacle. Figure 5 As shown, q new1is the first path point constructed according to the clipping length, q new2 is a second path point constructed according to the trimming length. The first path point and the corner point of the first path segment constitute the fourth path segment q new1 q i+2 , the second path point and the corner point of the first path segment form the fifth path segment q i+2 q new2 ,q i+2 q new2 =q new1 q i+2 = C. At the same time, this embodiment connects the first path point and the second path point to obtain a third path segment q new1 q new2 , and determine the third path segment q new1 q new2 Whether to pass through the obstacle. When determining the third path segment q new1 q new2 If the obstacle is not passed, it is determined that the third path segment is feasible, and the third path segment q new1 q new2 Add to the first path segment and change the corner point q i+2 Delete, so that q i+1 q new1 ,q new1 q new2 and q new2 q i+3 The new path segment, i.e., the second path segment, is formed to optimize the turning angle of the path segment with excessive curvature. In addition, when it is determined that the third path segment passes through an obstacle, the cutting length is readjusted. For example, the cutting length is adjusted to half of the original length, i.e. Then, the first path point and the second path point are reconstructed according to the adjusted clipping length, and it is determined whether the newly constructed third path segment passes through the obstacle. By repeating the above steps, the corner optimization of the first path segment whose curvature change is greater than the preset curvature is completed, and the optimized second path segment is combined with the second planned route. The corresponding first path segment in the second planned route is replaced by the second path segment, thereby achieving corner optimization of the second planned route and obtaining the target planned route.
[0114] An embodiment of the present invention further provides an unmanned boat route planning system, comprising:
[0115] The clustering module is used to obtain AIS data and cluster the AIS data to obtain cluster points.
[0116] The first building module is used to build an undirected connected graph according to the cluster points.
[0117] The initial path calculation module is used to calculate the initial path according to the undirected connected graph.
[0118] The second construction module is used to construct a navigation area according to the navigation points on the initial path, wherein the cluster points on the initial path are used as navigation points.
[0119] The first planning module is used to perform sampling and branch expansion according to the navigation area to obtain a first planned route.
[0120] The second planning module is used to compress the path of the first planned route according to the DP trajectory compression algorithm to obtain the second planned route.
[0121] The path segment optimization module is used to determine that the curvature change of the first path segment of the second planned route is greater than a preset curvature, and optimize the corner of the first path segment to obtain a second path segment.
[0122] The third planning module is used to obtain a target planned route according to the second planned route and the second path segment.
[0123] Reference Figure 2 One embodiment of the present invention further provides an unmanned boat route planning system, comprising:
[0124] At least one process 210 .
[0125] At least one memory 220 is used to store at least one program.
[0126] When at least one program is executed by at least one processor 210, the at least one processor implements the unmanned watercraft route planning method described in the above embodiment.
[0127] An embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by one or more control processors, for example, to execute the steps described in the above embodiment.
[0128] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0129] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A route planning method for an unmanned boat, characterized in that: The following steps are involved: Acquire AIS data, and perform clustering according to the AIS data to obtain cluster points; Constructing an undirected connected graph according to the clustering points; Calculate an initial path according to the undirected connected graph; Constructing a navigation area according to the navigation points on the initial path; wherein the clustering points on the initial path are used as the navigation points; Sampling and branch expansion are performed according to the navigation area to obtain a first planned route; Performing path compression on the first planned route according to the DP trajectory compression algorithm to obtain a second planned route; Determining that a curvature change of a first path segment of the second planned route is greater than a preset curvature, and performing corner optimization on the first path segment to obtain a second path segment; Obtaining a target planned route according to the second planned route and the second path segment; Wherein, constructing a navigation area according to the navigation points on the initial path includes: Taking each of the navigation points as the center to construct a square area with a preset side length, to obtain the navigation area corresponding to each of the navigation points; The step of sampling and branch expansion according to the navigation area to obtain a first planned route includes: Setting the navigation area corresponding to the second navigation point of the initial path as the current navigation area; Constructing random sampling points according to the current navigation area; Searching according to the random sampling point to obtain a first branch node closest to the random sampling point; Constructing a second branch node according to the first branch node and the random sampling point; Determine that the branch formed by the first branch node and the second branch node does not pass through an obstacle, and add the second branch node to the expansion tree; Determine that the distance between the second tree branch node and the first navigation point meets a first preset range, and set the navigation area of the next navigation point connected to the first navigation point as the current navigation area; Determine whether the distance between the leaf node of the expansion tree and the last navigation point of the initial path meets a second preset range, and connect the leaf node and the last navigation point to obtain the first planned route.
2. The unmanned watercraft route planning method according to claim 1, characterized in that: The clustering is performed according to the AIS data to obtain cluster points, including: K-means clustering is performed based on the ship position information in the AIS data using Euclidean distance as a standard to obtain cluster points.
3. The unmanned watercraft route planning method according to claim 1, characterized in that: The step of calculating an initial path according to the undirected connected graph comprises: According to the target point and the starting point, the shortest path of the undirected connected graph is solved by Dijkstra algorithm to obtain the initial path.
4. The unmanned watercraft route planning method according to claim 1, characterized in that: The constructing random sampling points according to the current navigation area includes: Construct a random number function; Generate a random number according to the random number function; Determine that the random number is greater than a threshold, and select a random point according to a map as the random sampling point; It is determined that the random number is less than or equal to the threshold, and a random point is selected as the random sampling point according to the current navigation area.
5. The unmanned watercraft route planning method according to claim 1, characterized in that: The step of performing corner optimization on the first path segment to obtain a second path segment includes: Set the crop length; Constructing a first path point and a second path point according to the cutting length; wherein the first path point and the corner point of the first path segment constitute a fourth path segment, the second path point and the corner point of the first path segment constitute a fifth path segment, and the fourth path segment and the fifth path segment are both equal to the cutting length; Connecting the first path point and the second path point to obtain a third path segment; It is determined that the third path segment does not pass through the obstacle, the third path segment is added to the first path segment, and the corner point is deleted to obtain the second path segment.
6. An unmanned boat route planning system, characterized in that: include: A clustering module, used to obtain AIS data and perform clustering based on the AIS data to obtain cluster points; A first construction module is used to construct an undirected connected graph according to the cluster points; An initial path calculation module, used to calculate an initial path according to the undirected connected graph; A second construction module is used to construct a navigation area according to the navigation points on the initial path; wherein the cluster points on the initial path are used as the navigation points; A first planning module, used for performing sampling and branch expansion according to the navigation area to obtain a first planned route; A second planning module, used for performing path compression on the first planned route according to a DP trajectory compression algorithm to obtain a second planned route; a path segment optimization module, configured to determine that a curvature change of a first path segment of the second planned route is greater than a preset curvature, and to optimize a corner of the first path segment to obtain a second path segment; A third planning module, configured to obtain a target planned route according to the second planned route and the second path segment; Wherein, constructing a navigation area according to the navigation points on the initial path includes: Taking each of the navigation points as the center to construct a square area with a preset side length, to obtain the navigation area corresponding to each of the navigation points; The step of sampling and branch expansion according to the navigation area to obtain a first planned route includes: Setting the navigation area corresponding to the second navigation point of the initial path as the current navigation area; Constructing random sampling points according to the current navigation area; Searching according to the random sampling point to obtain a first branch node closest to the random sampling point; Constructing a second branch node according to the first branch node and the random sampling point; Determine that the branch formed by the first branch node and the second branch node does not pass through an obstacle, and add the second branch node to the expansion tree; Determine that the distance between the second tree branch node and the first navigation point meets a first preset range, and set the navigation area of the next navigation point connected to the first navigation point as the current navigation area; Determine whether the distance between the leaf node of the expansion tree and the last navigation point of the initial path meets a second preset range, and connect the leaf node and the last navigation point to obtain the first planned route.
7. An unmanned boat route planning system, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the unmanned watercraft route planning method as described in any one of claims 1 to 5.
8. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the unmanned watercraft route planning method as described in any one of claims 1 to 5 when executed by the processor.
Citation Information
Patent Citations
Path planning method, robot and computer readable storage medium
CN110986953A
Pirate area ship route planning method and system, electronic equipment and storage medium
CN113961004A