Unmanned ship surveying and mapping route control method and system with obstacle avoidance function
By using GIS maps, grid division and A-star algorithms in unmanned ships, high-precision route control and obstacle avoidance are achieved, solving the shortcomings of existing unmanned ships in route control and obstacle avoidance, and improving the reliability and efficiency of the task.
Patent Information
- Application Number
- CN202411828535.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-25
AI Technical Summary
Existing unmanned ships have problems such as insufficient precise control capabilities and lack of safety and anti-collision functions in route control and obstacle avoidance, especially in complex wind and waves and changing water environments.
The route is drawn using GIS map, and by calculating the external rectangular area of the route and dividing it into a fixed-size grid, the location of obstacles is detected, and the A-satellite algorithm is used to bypass obstacles, combining RTK positioning and millimeter-wave radar technology to achieve high-precision route control and real-time obstacle recognition.
It improves the accuracy of unmanned ship route control and the flexibility of obstacle avoidance, reduces route deviation and interruption time, and ensures the continuity and safety of tasks.
Smart Images

Figure BDA0005184977810000021 
Figure BDA0005184977810000051 
Figure BDA0005184977810000081
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned ships, and in particular to a method and system for controlling a surveying route of an unmanned ship with an obstacle avoidance function. Background Art
[0002] Unmanned ships have the advantages of high efficiency, high safety and low cost in conducting water and underwater cross-sectional measurement and mapping compared to manned ships. Unmanned ships are usually equipped with measurement and mapping equipment, high-precision positioning RTK and millimeter wave radar.
[0003] When unmanned vessels conduct underwater and above-water cross-section measurements, route planning is the primary step in underwater and above-water terrain mapping. Reasonable route planning can not only improve the efficiency of mapping, but also ensure the accuracy and integrity of the mapping data.
[0004] There are two important functions that need to be met when performing route tasks. One is the precise control of the unmanned ship along the route, and the other is the timely intervention and handling of collision safety issues. The existing unmanned ship control capabilities are weak in this regard. Some unmanned ships will have slow route entry and control deviation when controlling the route in strong winds and waves, and some unmanned ships do not have safety anti-collision functions. How to accurately control unmanned ships through scientific planning; how to enable unmanned ships to avoid complex terrain and potential dangerous areas, accurately navigate along the predetermined path and record surveying and mapping data in real time are important research contents. Summary of the invention
[0005] The main purpose of the present invention is to solve the technical problem of accurate control of manned ships along the route in the prior art. A method for controlling the route of an unmanned ship surveying and mapping with an obstacle avoidance function comprises the following steps:
[0006] Drawing a route on a GIS map, wherein the route is formed by connecting a plurality of points;
[0007] According to the planned route, a circumscribed rectangular area of the route is calculated, and the circumscribed rectangular area is divided into grids of fixed size;
[0008] Detect and obtain the position of the obstacle in the grid, and mark the grid point where the obstacle is located as an obstacle;
[0009] According to the position of the obstacle in the grid, the A-star algorithm is used to bypass the obstacle and move to the subsequent route.
[0010] As a preferred technical solution, the position of obstacles in the grid is detected and obtained, and the grid points where the obstacles are located are marked as obstacles, including:
[0011] Get the lateral distance x from the obstacle to the ship 1 , forward distance y 1 , attitude angle θ 1 ;
[0012] Calculate the east-west offset distance xx and the north-south offset distance yy according to the following formula;
[0013] xx=len*cos(θ)
[0014] yy=len*sin(θ)
[0015] in:
[0016]
[0017] Calculate the longitude and latitude of the obstacle based on the longitude and latitude of the ship;
[0018] Correspond the longitude and latitude of the obstacle to the grid and mark the grid points as obstacles.
[0019] As a preferred technical solution, the A-star algorithm is used to bypass obstacles to the subsequent route according to the location of the obstacles in the grid, including:
[0020] Each grid cell defines a state: 0: passable.
[0021] 1: There is an obstacle and the route is impassable.
[0022] Input parameters:
[0023] Starting point S (xs, ys): current position of the unmanned ship;
[0024] End point G(xg,yg): the nearest target point of the subsequent route;
[0025] Adjacent node definition:
[0026] Using the 8-neighborhood method, each node has at most 8 neighbors.
[0027] The cost of moving between nodes:
[0028] Horizontal or vertical movement: cost is 1;
[0029] Diagonal movement: cost is square root of 2;
[0030] initialization:
[0031] Create two lists:
[0032] Open list: stores the nodes to be processed, initially including the starting point S;
[0033] Close list: stores processed nodes, initially empty;
[0034] Define the cost value of the starting point:
[0035] g(S) = 0: the actual cost from the starting point to the starting point is 0;
[0036] h(S) = EuclideanDistance(S,G): heuristic estimate of the distance from the start point to the end point;
[0037] f(S)=g(S)+h(S): total cost;
[0038] Search process:
[0039] Repeat the following steps until a path is found or the open list is empty:
[0040] Select the current node:
[0041] Select the node with the smallest total cost f = g + h from the open list and set it as the current node C (xc, yc);
[0042] Move C from the open list to the closed list;
[0043] Termination conditions:
[0044] If the current node is the end node G, end the search and return the path;
[0045] Generate neighbor nodes:
[0046] Find all traversable neighbor nodes of the current node C, that is, nodes that are not in the closed list and are not marked as obstacles;
[0047] For each neighbor node N(xn,yn):
[0048] Calculate the actual cost g(N) = g(C) + cost(C,N);
[0049] Calculate the heuristic estimate h(N) = EuclideanDistance(N,G);
[0050] Total cost f(N) = g(N) + h(N);
[0051] Updated open list:
[0052] If neighbor node N is not in the open list:
[0053] Add N to the open list and record its parent node as C.
[0054] If N is already in the open list and the new g(N) value is smaller:
[0055] Update the parent node of N to C, and update its g value and f value;
[0056] Path reconstruction:
[0057] When the end point G is searched, trace back to its parent node from the end point until the start point to generate a path, so as to bypass the obstacles and reach the subsequent route.
[0058] As a preferred technical solution, the method further includes a route control step, including:
[0059] Split the route into multiple line segments, each of which includes a control start point and a control end point;
[0060] Calculate the expected angle α and the measured angle β of the current angle of the ship in real time, and through the PID controller, output the actual running angle. The calculation formula of the actual running angle angle is:
[0061] angle = u(t) + β
[0062] where: u(t) = Kp*e(t) + Ki*∫e(t)dt + Kd*d(e) / d(t)
[0063] where: t is time; u(t) is the output angle error of the controller; Kp, Ki, and Kd are the proportional, integral, and differential coefficients respectively; e(t) is the system error: e(t) = α - β;
[0064] After setting the cruising speed and calculating the control speed Vx in the x direction and the control speed Vy in the y direction, send them to the unmanned ship engine control unit. The calculation formula is:
[0065] Vx = V*cos(angle)
[0066] Vy = V*sin(angle)
[0067] The engine control unit controls the motor operation according to the control parameters.
[0068] As a preferred technical solution, the method further includes inertial influence control, including:
[0069] Dynamically adjust the speed according to the distance d of the ship from the start point / end point:
[0070] d < Rstart: Uniformly accelerate to the cruising speed;
[0071] d > Rend: Uniformly decelerate to ensure accurate arrival at the target point;
[0072] Acceleration stage: V = Vstart + a·t, 0 < t < Tacc
[0073] Deceleration stage: V = Vend - a·t, 0 < t < Tdec
[0074] where a is the acceleration, and Tacc and Tdec are the acceleration and deceleration times;
[0075] Enter the deceleration state in advance at the turning point, and combine the inscribed path adjustment algorithm to achieve smooth turning and avoid yaw. The calculation formula of the ship's speed valive is:
[0076]
[0077] Among them, sdist is the distance from the ship to the starting point or the end point, radius is the acceleration and deceleration operation radius; vstand is the standard set speed.
[0078] The second aspect of the present invention provides an unmanned ship surveying route control system with obstacle avoidance function, comprising:
[0079] A route drawing unit, drawing a route on a GIS map, wherein the route is formed by connecting a plurality of points;
[0080] A grid drawing unit calculates a circumscribed rectangular area of the planned route according to the route, and divides the circumscribed rectangular area into grids of fixed size;
[0081] The obstacle marking unit detects and obtains the position of the obstacle in the grid and marks the grid point where the obstacle is located as an obstacle;
[0082] The obstacle avoidance control unit uses the A-star algorithm to bypass the obstacle and move to the subsequent route according to the position of the obstacle in the grid.
[0083] The third aspect of the present invention provides an electronic device, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via lines; the at least one processor calls the instructions in the memory so that the electronic device executes the above-mentioned unmanned ship surveying route control method with obstacle avoidance function.
[0084] A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer executes the unmanned ship surveying route control method with obstacle avoidance function as described above.
[0085] The present invention has the following beneficial effects:
[0086] Accuracy of route control: This invention introduces high-precision RTK positioning technology, combines PID control, and uses speed vector control to control the engine, so that the route can be kept accurate and stable even in complex and changeable water environments. Compared with traditional unmanned ships, this high-precision control mechanism greatly reduces the risk of deviation from the route and improves the reliability and efficiency of mission execution.
[0087] Flexibility in obstacle avoidance: The present invention introduces millimeter-wave radar technology and performs location settlement of target obstacles. It can identify and update the location information of obstacles in real time, adopt dynamic grid management and A-star algorithm for path planning, and then quickly plan a new detour path. Avoid the hidden dangers of unmanned ships avoiding collisions. This method not only improves the flexibility of obstacle avoidance, but also reduces the route interruption time caused by obstacles, ensuring the continuity of the unmanned ship's mission. In contrast, other unmanned ships may rely on preset map data and have relatively weak response capabilities to emergencies.
[0088] Improvement of orbital entry speed: The present invention significantly improves the speed of the unmanned ship entering the new route segment by encrypting the line segments, that is, adding multiple sub-line segments for control on the basis of the original route. When the unmanned ship has not yet fully entered orbit, the route can be corrected more quickly through larger angle adjustments; once the orbit is successfully entered, it switches back to the large line segment control mode to reduce unnecessary adjustments, thereby achieving efficient and fast route switching. This flexible control strategy is not available in other unmanned ship systems.
[0089] Optimization of turning smoothness: Considering the inertia effect of the unmanned ship, the present invention designs a set of acceleration and deceleration mechanisms, that is, deceleration in advance when approaching a certain distance from the turning point, and then accelerates again to restore to the set speed after leaving the turning point. This mechanism effectively solves the problem of excessive deviation that may occur when traditional unmanned ships turn, ensuring the smoothness and safety of the turning process.
[0090] In summary, the present invention has demonstrated excellent performance in terms of route control, obstacle avoidance, orbit entry speed, and turning smoothness of unmanned ships, providing new ideas and technical support for the development of unmanned ship technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 A schematic diagram for planning routes;
[0092] Figure 2 It is a schematic diagram of the operation grid;
[0093] Figure 3 This is a schematic diagram of millimeter wave radar recognition;
[0094] Figure 4 This is a schematic diagram of the obstacle avoidance of the A-star algorithm;
[0095] Figure 5 This is a schematic diagram of angle control;
[0096] Figure 6 It is a schematic diagram of sub-segment control;
[0097] Figure 7 This is a schematic diagram of acceleration and deceleration control;
[0098] Figure 8 This is the navigation control effect diagram;
[0099] Fig. 9 This is the navigation control effect diagram;
[0100] Fig.10 To simulate the obstacle effect diagram;
[0101] Fig.11 This is the effect diagram of the obstacle avoidance control trajectory. DETAILED DESCRIPTION
[0102] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0103] The present invention aims to solve the problem of how to accurately control the route and avoid obstacles in the route. For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1-11 The first embodiment of the unmanned ship surveying route control method with obstacle avoidance function in the embodiment of the present invention includes:
[0104] Drawing a route on a GIS map, wherein the route is formed by connecting a plurality of points;
[0105] According to the planned route, a circumscribed rectangular area of the route is calculated, and the circumscribed rectangular area is divided into grids of fixed size;
[0106] Detect and obtain the position of the obstacle in the grid, and mark the grid point where the obstacle is located as an obstacle;
[0107] According to the position of the obstacle in the grid, the A-star algorithm is used to bypass the obstacle and move to the subsequent route.
[0108] (1) Determine the task area
[0109] First, draw the route on the GIS map. The route is formed by connecting multiple points, as shown above. Figure 1As shown. The unmanned boat moves in a straight line from the first point to the second point, and then to the third point, until all the points are visited in sequence. At the bend, due to the inertia of the unmanned boat, it will move in an inscribed manner. During the voyage of the boat, the measuring equipment constantly records the latitude and longitude position, water depth, and water quality data.
[0110] (2) Avoidance of obstacles on the route
[0111] Calculate the route coverage rectangle based on the above route. Take out the upper left coordinates and lower right longitude and latitude coordinates of the rectangle, and convert them into plane coordinates through Gauss Croco coordinate conversion. Grid the area. According to the size of the unmanned ship, the size of the grid is 3mx3m. The purpose of gridding is to record whether there are obstacles in the grid, and use the A-star algorithm to bypass the obstacles and execute on the subsequent route.
[0112] When the target is detected by the millimeter wave radar, the longitude and latitude of the obstacle are calculated according to the ship's position and attitude. The radar returns the lateral distance x from the obstacle to the ship. 1 , forward distance y 1 , the high-precision positioning sensor RTK returns the longitude and latitude position and attitude angle θ of the ship 1 . Calculate the south-east offset distance xx and the north-south offset distance yy according to the following formula.
[0113]
[0114] xx=len*cos(θ)
[0115] yy=len*sin(θ)
[0116] After calculating xx, yy, we can get the corresponding longitude and latitude offset, and then calculate the longitude and latitude of the obstacle based on the longitude and latitude of the ship. We can further project the coordinates to the plane through Gauss-Krosko, and then mark the grid point as an obstacle on the grid. We can then use the A-star algorithm to design and calculate a new path and navigate to the route grid point behind the obstacle.
[0117] The A-star algorithm is as follows:
[0118] Each grid cell defines a state: 0: passable.
[0119] 1: There is an obstacle and the route is impassable.
[0120] Input parameters:
[0121] Starting point S (xs, ys): current position of the unmanned ship;
[0122] End point G(xg,yg): the nearest target point of the subsequent route;
[0123] Adjacent node definition:
[0124] Using the 8-neighborhood method, each node has at most 8 neighbors.
[0125] The cost of moving between nodes:
[0126] Horizontal or vertical movement: cost is 1;
[0127] Diagonal movement: cost is square root of 2;
[0128] initialization:
[0129] Create two lists:
[0130] Open list: stores the nodes to be processed, initially including the starting point S;
[0131] Close list: stores processed nodes, initially empty;
[0132] Define the cost value of the starting point:
[0133] g(S) = 0: the actual cost from the starting point to the starting point is 0;
[0134] h(S) = EuclideanDistance(S,G): heuristic estimate of the distance from the start point to the end point;
[0135] f(S)=g(S)+h(S): total cost;
[0136] Search process:
[0137] Repeat the following steps until a path is found or the open list is empty:
[0138] Select the current node:
[0139] Select the node with the smallest total cost f = g + h from the open list and set it as the current node C (xc, yc);
[0140] Move C from the open list to the closed list;
[0141] Termination conditions:
[0142] If the current node is the end node G, end the search and return the path;
[0143] Generate neighbor nodes:
[0144] Find all traversable neighbor nodes of the current node C, that is, nodes that are not in the closed list and are not marked as obstacles;
[0145] For each neighbor node N(xn,yn):
[0146] Calculate the actual cost g(N) = g(C) + cost(C,N);
[0147] Calculate the heuristic estimate h(N) = EuclideanDistance(N,G);
[0148] Total cost f(N) = g(N) + h(N);
[0149] Updated open list:
[0150] If neighbor node N is not in the open list:
[0151] Add N to the open list and record its parent node as C.
[0152] If N is already in the open list and the new g(N) value is smaller:
[0153] Update the parent node of N to C, and update its g value and f value;
[0154] Path reconstruction:
[0155] When the end point G is searched, trace back from the end point to its parent node to the starting point to generate a path, thereby bypassing obstacles and getting to the subsequent route.
[0156] In addition, when the radar does not detect a target during navigation, the obstacles are reset and cancelled on the corresponding grid to achieve dynamic update of the obstacles.
[0157] (3) Route Control
[0158] For the control of the route, the segmentation principle is adopted, and a route segment is taken out for control. One end of the line segment is the starting point of the controlled route, and the other end is the end point of the controlled route. The idea of the route navigation control of the present invention is to adopt the angle control method. The angle of the route is calculated in real time, that is, the expected angle, and the angle from the ship to the end point of the route is the measured angle. When the error between the two angles is very small, it means that the ship is sailing on the set route. The present invention adopts the position PID method to control and solve the angle error.
[0159] Set β to be the current measured angle and ɑ to be the desired angle. Bring it into the PID controller to output the actual operating angle.
[0160] u(t)=Kp*e(t)+Ki*∫e(t)dt+Kd*d(e) / d(t)
[0161] Where: t is time; u(t) is the output angle error of the controller; e(t) is the system error; Kp, Ki, Kd are the proportional, integral, and differential coefficients respectively.
[0162] e(t)=α-β
[0163] angle = u(t) + β; Vx = V * cos(angle); Vy = V * sin(angle);
[0164] V is the set cruising speed. After calculating the control speed Vx in the x - direction and the control speed Vy in the y - direction, they are sent to the engine control unit of the unmanned ship. The engine control unit controls the motor operation according to these control parameters.
[0165] (4) Control for rapid orbit entry
[0166] If the end - point calculation angle is used for a navigation segment, when the navigation line is long, the phenomenon of not being able to enter the orbit quickly will occur. Therefore, the present invention adopts the method of encrypting the line segment. That is, on the original line segment, multiple sub - small line segments are densely sampled, and the control is carried out for the sub - small line segments.
[0167] Due to the use of sub - line segment control, before entering the orbit, the angle error is large, the control angle output by PID and the navigation line angle are large, and such a large angle can quickly enter the orbit. When the unmanned ship has entered the orbit, the sub - line segment points are ignored, and the large - line segment method is continued.
[0168] (5) Inertia influence control
[0169] Due to the driving inertia of the ship, if the turning control is carried out when reaching the target point, there will be a lag phenomenon. Usually, it cannot travel along the navigation line at the turning point. As a result, it will travel outside the navigation line and deviate far.
[0170] The present invention adopts an acceleration and deceleration mechanism. Decelerate at a certain radius when approaching the arrival point, and accelerate to the set navigation line speed within a certain radius from the starting point.
[0171] Define the distance from the ship to the starting point or the end point as sdist, the acceleration and deceleration operation radius as radius, the speed of the ship as valive, and the standard set speed as vstand. The acceleration and deceleration are in the form of uniform acceleration and uniform deceleration.
[0172]
[0173] The method further includes inertia influence control, including:
[0174] Dynamically adjust the speed according to the distance d of the ship from the starting point / end point:
[0175] d < Rstart: Uniformly accelerate to the cruising speed;
[0176] d > Rend: Uniformly decelerate to ensure accurate arrival at the target point;
[0177] Acceleration stage: V = Vstart + a·t, 0 < t < Tacc
[0178] Deceleration stage: V = Vend-a·t,0 <t<Tdec
[0179] Where a is the acceleration, Tacc and Tdec are the acceleration and deceleration times;
[0180] Enter the deceleration state in advance at the turning point, and combine the inscribed path adjustment algorithm to achieve smooth turning and avoid yaw. The calculation formula of the ship's speed valive is:
[0181]
[0182] Among them, sdist is the distance from the ship to the starting point or the end point, radius is the acceleration and deceleration operation radius; vstand is the standard set speed.
[0183] (6) Actual operation results
[0184] See Figure 8-Figure 11 .
[0185] From the analysis of the actual operating results of the experiments shown in the above figure, the present invention has good route control effect and route obstacle avoidance function.
[0186] The above describes the unmanned ship surveying route control method with obstacle avoidance function in the embodiment of the present invention. The following describes the unmanned ship surveying route control system with obstacle avoidance function in the embodiment of the present invention:
[0187] A route drawing unit, drawing a route on a GIS map, wherein the route is formed by connecting a plurality of points;
[0188] A grid drawing unit calculates a circumscribed rectangular area of the planned route according to the route, and divides the circumscribed rectangular area into grids of fixed size;
[0189] The obstacle marking unit detects and obtains the position of the obstacle in the grid and marks the grid point where the obstacle is located as an obstacle;
[0190] The obstacle avoidance control unit uses the A-star algorithm to bypass the obstacle and move to the subsequent route according to the position of the obstacle in the grid.
[0191] An embodiment of the present invention also provides an electronic device, which may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) (for example, one or more processors) and memories, and one or more storage media for storing applications or data (for example, one or more mass storage devices). Among them, the memory and the storage medium may be short-term storage or permanent storage. The program stored in the storage medium may include one or more modules, each module may include a series of instruction operations in the electronic device. Furthermore, the processor may be configured to communicate with the storage medium and execute a series of instruction operations in the storage medium on the electronic device.
[0192] The electronic device may also include one or more power supplies, one or more wired or wireless network interfaces, one or more input and output interfaces, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that the electronic device structure in this embodiment does not constitute a limitation on the electronic device, and may include more or fewer components, or combine certain components, or arrange components differently.
[0193] The structure of an electronic device provided by an embodiment of the present invention may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) (for example, one or more processors) and memories, and one or more storage media for storing applications or data (for example, one or more mass storage devices). Among them, the memories and storage media may be short-term storage or permanent storage. The program stored in the storage medium may include one or more modules, each module may include a series of instruction operations in the electronic device. Furthermore, the processor may be configured to communicate with the storage medium and execute a series of instruction operations in the storage medium on the electronic device.
[0194] The electronic device may also include one or more power supplies, one or more wired or wireless network interfaces, one or more input and output interfaces, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that the electronic device structure does not constitute a limitation on the electronic device, and may include more or less components than the aforementioned, or combine certain components, or arrange the components differently.
[0195] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer executes the steps of the aforementioned method.
[0196] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0197] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0198] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those 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 thereof may be replaced by equivalents. However, these 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 invention.
Claims
1. A method for controlling a surveying route of an unmanned ship with obstacle avoidance function, characterized in that: The following steps are involved: Drawing a route on a GIS map, wherein the route is formed by connecting a plurality of points; According to the planned route, a circumscribed rectangular area of the route is calculated, and the circumscribed rectangular area is divided into grids of fixed size; Detect and obtain the position of the obstacle in the grid, and mark the grid point where the obstacle is located as an obstacle; According to the position of the obstacle in the grid, the A-star algorithm is used to bypass the obstacle to the subsequent route.
2. The method for controlling the route of an unmanned ship surveying and mapping with obstacle avoidance function according to claim 1, characterized in that: The detecting and obtaining the position of the obstacle in the grid and marking the grid point where the obstacle is located as an obstacle includes: Get the lateral distance x1, forward distance y1, and attitude angle θ1 from the obstacle to the ship; Calculate the east-west offset distance xx and the north-south offset distance yy according to the following formula; xx=len*cos(θ) yy=len*sin(θ) in: Calculate the longitude and latitude of the obstacle based on the longitude and latitude of the ship; Correspond the longitude and latitude of the obstacle to the grid and mark the grid points as obstacles.
3. The method for controlling the route of an unmanned ship surveying and mapping with obstacle avoidance function according to claim 1, characterized in that: The method of using the A-star algorithm to bypass the obstacle to the subsequent route according to the position of the obstacle in the grid includes: Each grid cell defines the state: 0: Passable. 1: There is an obstacle and the route is impassable. Input parameters: Starting point S (xs, ys): current position of the unmanned ship; End point G(xg,yg): the nearest target point of the subsequent route; Adjacent node definition: Using the 8-neighborhood method, each node has at most 8 neighbors. The cost of moving between nodes: Horizontal or vertical movement: cost is 1; Diagonal movement: cost is square root of 2; initialization: Create two lists: Open list: stores the nodes to be processed, initially including the starting point S; Close list: stores processed nodes, initially empty; Define the cost value of the starting point: g(S) = 0: the actual cost from the starting point to the starting point is 0; h(S) = EuclideanDistance(S,G): heuristic estimate of the distance from the start point to the end point; f(S)=g(S)+h(S): total cost; Search process: Repeat the following steps until a path is found or the open list is empty: Select the current node: Select the node with the smallest total cost f = g + h from the open list and set it as the current node C (xc, yc); Move C from the open list to the closed list; Termination conditions: If the current node is the end node G, end the search and return the path; Generate neighbor nodes: Find all traversable neighbor nodes of the current node C, that is, nodes that are not in the closed list and are not marked as obstacles; For each neighbor node N(xn,yn: Calculate the actual cost g(N) = g(C) + cost(C,N); Calculate the heuristic estimate h(N) = EuclideanDistance(N,G); Total cost f(N) = g(N) + h(N); Updated open list: If neighbor node N is not in the open list: Add N to the open list and record its parent node as C. If N is already in the open list and the new g(N) value is smaller: Update the parent node of N to C, and update its g value and f value; Path reconstruction: When the end point G is searched, trace back to its parent node from the end point until the start point to generate a path, so as to bypass obstacles and reach the subsequent shipping lanes.
4. The method for controlling the route of an unmanned ship surveying and mapping with obstacle avoidance function according to claim 1, characterized in that: The method further includes a shipping lane control step, including: Split the shipping lane into multiple line segments, each of which includes a control start point and a control end point; Calculate the expected angle α and the measured angle β of the current angle of the ship in real time, and through the PID controller, output the actual operating angle. The calculation formula of the actual operating angle angle is: angle = u(t) + β where: u(t) = Kp * e(t) + Ki * ∫e(t)dt + Kd * d(e) / d(t) where: t is time; u(t) is the output angle error of the controller; Kp, Ki, and Kd are the proportional, integral, and differential coefficients respectively; e(t) is the system error: e(t) = α - β; After setting the cruising speed and calculating the control speed Vx in the x direction and the control speed Vy in the y direction, send them to the unmanned ship engine control unit. The calculation formula is: Vx = V * cos(angle) Vy = V * sin(angle) The engine control unit controls the motor operation according to the control parameters.
5. The method for controlling the route of surveying and mapping an unmanned ship with obstacle avoidance function according to claim 1, characterized in that: The method further includes inertial influence control, including: Dynamically adjust the speed according to the distance d of the ship from the start point / end point: d < Rstart: Uniformly accelerate to the cruising speed; d > Rend: Uniformly decelerate to ensure accurate arrival at the target point; Acceleration stage: V = Vstart + a·t, 0 < t < Tacc Deceleration stage: V = Vend - a·t, 0 < t < Tdec where a is the acceleration, and Tacc and Tdec are the acceleration and deceleration times; Enter the deceleration state in advance at the turning point, and combine the inscribed path adjustment algorithm to achieve smooth turning and avoid yaw. The calculation formula of the ship's speed valive is: where sdist is the distance of the ship from the start point or the end point, and radius is the acceleration and deceleration operation radius; Is the standard set speed.
6. An unmanned ship surveying route control system with obstacle avoidance function, characterized in that: The system includes: A shipping lane drawing unit that draws a shipping lane on a GIS map, and the shipping lane is formed by connecting multiple points; A grid drawing unit that calculates the circumscribed rectangular area of the shipping lane according to the planned shipping lane and divides the circumscribed rectangular area into grids of a fixed size; An obstacle marking unit that detects and obtains the position of the obstacle in the grid and marks the grid points where the obstacle is located as obstacles; An obstacle avoidance control unit that bypasses the obstacle to the subsequent shipping lane according to the position of the obstacle in the grid by using the A* algorithm.
7. An electronic device, the electronic device includes a memory and at least one processor, and instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the electronic device executes each step of the unmanned ship mapping shipping lane control method as described in any one of claims 1-5.
8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, each step of the unmanned ship mapping shipping lane control method as described in any one of claims 1-5 is implemented.