A method and device for unmanned boat path planning with multiple mission points
By converting the task area into a two-dimensional grid and training the Q neural network with dynamic parameters, the real-time and efficiency problems of multi-task point path planning in the marine environment are solved, and the path to complete the task in the shortest time is realized planning.
Patent Information
- Application Number
- CN202311634672.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2043-11-30
AI Technical Summary
The existing path planning methods are difficult to meet the requirements of real-time and efficient unmanned boats in marine environments, especially in water quality sampling tasks at multi-task points, and it is difficult to plan appropriate navigation paths in the shortest time.
By converting the task area into a target two-dimensional grid, and using preset path planning models, combining dynamic parameters such as channel traffic flow density, wind direction, wind speed, flow rate, etc., the Q neural network is trained to generate all task points that pass through the shortest time. Plan the path.
It realizes efficient path planning, can complete multi-task path planning in the shortest time, and improves the navigation efficiency and real-time performance of unmanned boats.
Smart Images

Figure CN117806311B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of path planning, and also to a method and device for planning a path for an unmanned boat with multiple mission points. Background Art
[0002] The marine environment is complex, changeable and full of dangers, and many tasks are not suitable for manned vessels. As an important tool for marine operations, unmanned surface vessels are often used to perform tasks such as water quality sampling at multiple mission points. Unmanned surface vessels carry limited power and energy, and there is a large amount of unknown and changeable environmental information in the ocean. Therefore, it is crucial to have an efficient and reliable path planning method that can plan the shortest navigation time based on the real-time navigation status. Existing path planning methods are mostly used for path planning in static road networks, which is difficult to meet real-time requirements. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a method and device for unmanned boat path planning with multiple mission points, so as to solve the problem that the existing path planning method is difficult to meet the real-time requirements.
[0004] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0005] According to a first aspect of the present invention, a method for unmanned boat path planning with multiple mission points is provided, comprising:
[0006] Get the task area containing multiple task point information;
[0007] Converting the information of the plurality of task points in the task area to obtain a target two-dimensional grid;
[0008] The target two-dimensional grid is input into a preset path planning model to obtain a planned path; the planned path passes through all task points; the preset path planning model is obtained by training based on multiple preset task areas.
[0009] Optionally, converting the information of the plurality of task points in the task area to obtain a target two-dimensional grid includes:
[0010] The task area is converted according to a preset scale and the information of the plurality of task points to obtain a target two-dimensional grid.
[0011] Optionally, the training process of the preset path planning model includes:
[0012] Acquire multiple preset task areas; the preset task areas contain multiple task point information;
[0013] The preset task area is converted according to the preset scale and the information of the plurality of task points to obtain a dynamic two-dimensional grid;
[0014] The preset network model is trained according to the dynamic two-dimensional grid to obtain a preset path planning model.
[0015] Optionally, the preset task area is converted according to the preset scale and the plurality of task point information to obtain a dynamic two-dimensional grid, including:
[0016] The preset task area is converted according to the preset scale and the plurality of task point information to obtain an initial two-dimensional grid;
[0017] The initial two-dimensional grid is set according to the received dynamic parameters to obtain a dynamic two-dimensional grid.
[0018] Optionally, the initial two-dimensional grid is set according to the received dynamic parameters to obtain a dynamic two-dimensional grid, including:
[0019] Receiving dynamic parameters; the dynamic parameters include waterway traffic density, wind direction, flow direction, wind speed, flow speed and real-time heading of the unmanned boat;
[0020] According to the dynamic parameters, the real-time speed of the unmanned boat is calculated;
[0021] The initial two-dimensional grid is set according to the real-time speed of the unmanned boat to obtain a dynamic two-dimensional grid.
[0022] Optionally, the real-time speed of the unmanned boat is calculated according to the dynamic parameters, including:
[0023] According to the waterway traffic flow density, the speed of the unmanned boat affected by the traffic flow density is calculated;
[0024] The formula is:
[0025] Calculate the speed of the unmanned boat affected by wind and the speed of the unmanned boat affected by water according to the wind direction, the flow direction, the wind speed, the flow speed and the real-time heading of the unmanned boat;
[0026] The formula is: V h2 =V1cos(θ1-θ h )δ1,V h3 =V2cos(θ2-θ h )δ2;
[0027] The real-time speed of the unmanned boat is calculated according to the speed of the unmanned boat affected by the traffic flow density, the speed of the unmanned boat affected by the wind force, and the speed of the unmanned boat affected by the water force;
[0028] The formula is: V c =V h1 +Vh2 +V h3 ;
[0029] Among them, V h1 is the speed of the unmanned boat affected by the traffic flow density, v f is the smooth navigation speed, K is the waterway traffic density, K j is the blocking density, V h2 is the speed of the unmanned boat affected by wind, V1 is the wind speed, θ1 is the wind direction, θ h is the real-time heading of the unmanned boat, δ1 is the wind force conversion factor, V h3 is the speed of the unmanned boat after being affected by hydraulic force, V2 is the flow velocity, θ2 is the flow direction, δ2 is the flow force conversion factor, V c The real-time speed of the unmanned boat.
[0030] Optionally, training a preset network model according to the dynamic two-dimensional grid to obtain a preset path planning model includes:
[0031] Initialize the reward function to obtain the initial reward function;
[0032] Initialize the Q neural network to obtain the initial neural network;
[0033] Inputting the dynamic two-dimensional grid into the initial neural network, obtaining the state of the unmanned boat at time t, the action taken by the unmanned boat at time t, and the reward received by the unmanned boat at time t;
[0034] According to the state of the unmanned boat at time t, the action taken by the unmanned boat at time t, the reward received by the unmanned boat at time t and the initial reward function, the state of the unmanned boat at time t+1, the action taken by the unmanned boat at time t+1 and the reward received by the unmanned boat at time t+1 are obtained;
[0035] The state of the unmanned boat at time t+1, the action taken by the unmanned boat at time t+1, and the reward received by the unmanned boat at time t+1 are stored in the experience pool to obtain an updated experience pool;
[0036] The Q neural network is repeatedly trained according to the updated experience pool and the dynamic two-dimensional grid to obtain a preset path planning model.
[0037] According to a second aspect of the present invention, there is provided a multi-mission point unmanned boat path planning device, comprising:
[0038] An acquisition module is used to acquire a task area containing information of multiple task points;
[0039] A processing module, used for converting information of a plurality of task points in the task area to obtain a target two-dimensional grid;
[0040] The planning module is used to input the target two-dimensional grid into a preset path planning model to obtain a planned path; the planned path passes through all task points; the preset path planning model is obtained by training based on multiple preset task areas.
[0041] According to a third aspect of the present invention, there is provided a computing device comprising: a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the unmanned boat path planning method for multiple mission points as described in the first aspect is executed.
[0042] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the multi-mission point unmanned boat path planning method as described in the first aspect.
[0043] The above solution of the present invention includes at least the following beneficial effects:
[0044] The above scheme of the present invention converts the task area into a target two-dimensional grid, and then inputs the target two-dimensional grid into a preset path planning model. The obtained planned path can pass through all task points in the shortest time, and has the advantages of high path planning efficiency and time saving. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a schematic flow chart of a multi-mission point unmanned boat path planning method in an embodiment of the present invention;
[0046] Figure 2 is a schematic diagram of an initial two-dimensional grid in an embodiment of the present invention;
[0047] Figure 3 is a schematic diagram of a two-dimensional grid for simple task area conversion in an embodiment of the present invention;
[0048] Figure 4 is a schematic diagram of a two-dimensional grid for difficult task area conversion in an embodiment of the present invention;
[0049] Figure 5 It is a structural schematic diagram of a multi-task point unmanned boat path planning device in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0051] like Figure 1 As shown, an embodiment of the present invention provides a multi-mission point unmanned boat path planning method, comprising:
[0052] Step 11, obtaining a task area containing information of multiple task points;
[0053] Step 12: converting the information of the plurality of task points in the task area to obtain a target two-dimensional grid;
[0054] Step 13: input the target two-dimensional grid into a preset path planning model to obtain a planned path; the planned path passes through all task points; the preset path planning model is obtained by training based on multiple preset task areas.
[0055] The unmanned boat path planning method for multiple mission points proposed in an embodiment of the present invention converts the mission area into a target two-dimensional grid, and then inputs the target two-dimensional grid into a preset path planning model. The obtained planned path can pass through all mission points in the shortest time, and has the advantages of high path planning efficiency and time saving.
[0056] Specifically, the mission area includes multiple mission points, and the mission points include longitude and latitude information to facilitate determining the locations of the mission points.
[0057] In an optional embodiment, step 12 includes:
[0058] The task area is converted according to a preset scale and the information of the plurality of task points to obtain a target two-dimensional grid.
[0059] Specifically, the preset scale can be 50m, that is, the longitude and latitude of the task area are taken as a unit of 50m to generate a target two-dimensional grid, and according to the longitude and latitude information of the task point in the task area, the coordinates of the task point in the two-dimensional grid are found, and the value of the coordinate in the two-dimensional grid is set to 100.
[0060] In an optional embodiment, the training process of the preset path planning model in step 13 includes:
[0061] Step 131, obtaining a plurality of preset task areas; the preset task areas contain a plurality of task point information;
[0062] Step 132, converting the preset task area according to the preset scale and the plurality of task point information to obtain a dynamic two-dimensional grid;
[0063] Step 133: training a preset network model according to the dynamic two-dimensional grid to obtain a preset path planning model.
[0064] The number of task points and the distances between task points in multiple preset task areas are different, which makes the tasks of the unmanned boat gradually increase. After training the tasks from easy to difficult, the preset path planning model can realize the task of planning the path of the unmanned boat passing through all task points in the shortest time. According to the preset scale of 50m as a unit, multiple preset task areas are converted into two-dimensional grids, which contain the coordinates of multiple task points; multiple two-dimensional grids are used to train the preset network model to obtain the preset path planning model.
[0065] In an optional embodiment, step 132 includes:
[0066] Step 1321, converting the preset task area according to the preset scale and the plurality of task point information to obtain an initial two-dimensional grid;
[0067] Step 1322: Set the initial two-dimensional grid according to the received dynamic parameters to obtain a dynamic two-dimensional grid.
[0068] Specifically, Figure 2 As shown in the figure, first, according to the preset scale of 50m, multiple preset task areas are converted into static two-dimensional grids, that is, the initial two-dimensional grid. According to the latitude and longitude of the task point in the preset task area, the coordinates of the task point in the initial two-dimensional grid are found, and the value of the coordinate in the two-dimensional grid is set to 100, indicating that there is a task point at this location; then, according to the influence of real-time traffic flow density, wind force, water force, etc. on the speed of the unmanned boat in each grid in the task area, the affected speed of the unmanned boat is calculated and filled in the corresponding grid to obtain a dynamic two-dimensional grid, as shown in the figure. Figure 3 and Figure 4 shown. Figures 2 to 4 The arrows in the figure represent unmanned boats.
[0069] In an optional embodiment, step 1322 includes:
[0070] Step 13221, receiving dynamic parameters; the dynamic parameters include waterway traffic flow density, wind direction, flow direction, wind speed, flow speed and real-time heading of the unmanned boat;
[0071] Step 13222: Calculate the real-time speed of the unmanned boat according to the dynamic parameters;
[0072] Step 13223: setting the initial two-dimensional grid according to the real-time speed of the unmanned boat to obtain a dynamic two-dimensional grid.
[0073] The speed of an unmanned boat is generally affected by dynamic parameters such as waterway traffic flow density, wind direction, flow direction, wind speed, and flow speed. Therefore, the real-time speed of the unmanned boat can be calculated through these dynamic parameters and the real-time heading of the unmanned boat, and then the real-time speed of the unmanned boat can be filled into the corresponding grid to obtain a dynamic two-dimensional grid.
[0074] In an optional embodiment, step 13222 includes:
[0075] Step 132221, according to the waterway traffic flow density, calculating the speed of the unmanned boat affected by the traffic flow density;
[0076] The formula is:
[0077] Step 132222: Calculate the speed of the unmanned boat affected by wind and the speed of the unmanned boat affected by water according to the wind direction, the flow direction, the wind speed, the flow speed and the real-time heading of the unmanned boat;
[0078] The formula is: V h2 =V1cos(θ1-θ h )δ1,V h3 =V2cos(θ2-θ h )δ2;
[0079] Step 132223, calculating the real-time speed of the unmanned boat according to the speed of the unmanned boat affected by traffic flow density, the speed of the unmanned boat affected by wind force, and the speed of the unmanned boat affected by water force;
[0080] The formula is: V c =V h1 +V h2 +V h3 ;
[0081] Among them, V h1 is the speed of the unmanned boat affected by the traffic flow density, v f is the unimpeded navigation speed, i.e., the navigation speed of the unmanned boat when the route is unimpeded. In this embodiment, the unimpeded navigation speed is set to 10 kn, K is the traffic flow density of the channel, and K j is the blocking density, which is generally 8.70-11.3 ships / km. In this embodiment, 10 ships / km is taken. V h2 is the speed of the unmanned boat affected by wind, V1 is the wind speed, θ1 is the wind direction, θ h is the real-time heading of the unmanned boat, δ1 is the wind force conversion factor, V h3 is the speed of the unmanned boat after being affected by hydraulic force, V2 is the flow velocity, θ2 is the flow direction, δ2 is the flow force conversion factor, V c The real-time speed of the unmanned boat.
[0082] In this embodiment, the influence of wind and flow on the speed of the unmanned boat is mainly manifested in the component force of the wind and flow force on the hull in the heading direction of the unmanned boat. The extent to which the hull is affected by wind and flow is determined by factors such as the hull structure, draft, and area on the waterline. In this embodiment, the sum of these factors is set as the wind force conversion factor and the flow force conversion factor.
[0083] In an optional embodiment, step 133 includes:
[0084] Step 1331, initializing the reward function to obtain an initial reward function;
[0085] Step 1332, initializing the Q neural network to obtain an initial neural network; specifically, initializing the weight, iteration number threshold, experience pool and iteration number of the Q neural network;
[0086] Step 1333, input the dynamic two-dimensional grid into the initial neural network to obtain the state of the unmanned boat at time t, the action taken by the unmanned boat at time t, and the reward received by the unmanned boat at time t; specifically, input the dynamic two-dimensional grid into the initial neural network to establish the initial state value of the unmanned boat, that is, the state of the unmanned boat at time t, the action taken by the unmanned boat at time t, and the reward received by the unmanned boat at time t.
[0087] Step 1334: According to the state of the unmanned boat at time t, the action taken by the unmanned boat at time t, the reward received by the unmanned boat at time t, and the initial reward function, the state of the unmanned boat at time t+1, the action taken by the unmanned boat at time t+1, and the reward received by the unmanned boat at time t+1 are obtained; the formula is:
[0088] Q t+1 (s t+1 , a t+1 )=Q t (s t , a t )+α×[r+γ×Q(s′,a′)-Q t (s t , a t )];
[0089] Among them, Q t+1 (s t+1 , a t+1 ) is the reward received by the unmanned boat at time t+1, s t+1 is the state of the unmanned boat at time t+1, a t+1 is the action taken by the unmanned boat at time t+1, Q t is the reward received by the unmanned boat at time t, s t is the state of the unmanned boat at time t, a t is the action taken by the unmanned boat at time t, α is the learning rate, r is the discount factor, γ is the immediate reward, and Q(s′, a′) is the optimal reward.
[0090] Step 1335: store the state of the unmanned boat at time t, the action taken by the unmanned boat at time t, and the reward received by the unmanned boat at time t into the experience pool to obtain an updated experience pool; the experience pool is the historical behavior information of the unmanned boat, including multiple groups of behavior sequence pairs, such as the state of the unmanned boat at the current time (time t), the actions taken, and the rewards received.
[0091] Specifically, in this embodiment, a reward function is set for the unmanned boat according to the time it takes for the unmanned boat to complete the task. The reward function is as follows:
[0092]
[0093] Among them, n is the current time step, R n is the reward obtained by the unmanned boat in the current time step. The purpose of this setting is to make the unmanned boat pass through all task points in the shortest possible time within the specified time step.
[0094] Step 1336: Repeat the training of the Q neural network according to the updated experience pool and the dynamic two-dimensional grid to obtain a preset path planning model. After the updated experience pool is full, repeat the training of the Q neural network and update the weight of the Q neural network until the preset training target is met to obtain the preset path planning model.
[0095] A specific embodiment of the multi-mission point unmanned boat path planning method of the embodiment of the present invention is:
[0096] State space setting. Generate a two-dimensional grid for the task area with a scale unit of 50m, and calculate the coordinates of the task point in the grid according to the latitude and longitude of the task point, and set the value of the coordinate in the two-dimensional grid to a fixed value of 100, so that the model can perceive the task point, such as Figure 2 A specific way to generate a two-dimensional grid for the task area can be:
[0097] Variable description: Mission area longitude span J (minimum value J min ), latitude span W (minimum value W min ), scale e,
[0098] J i =J min +e*i
[0099] W J =W min +e*j
[0100] i max =J / e
[0101] j max =W / e
[0102] pseudocode:
[0103] Traverse the longitude and latitude J of each point d , W d
[0104] From 0 to i max Traverse i
[0105] From 0 to j max Traverse j
[0106] If J d >J i J d <=J i+1
[0107] If W d >W j And W d <=W j+1
[0108] The coordinates of this point are (i, j)
[0109] in (i max , j max )-sized empty grid.
[0110] The influence of real-time traffic flow density on the speed of the unmanned boat is reflected in the state space. For example, the influence of channel traffic flow density on the speed of the unmanned boat is: Among them, V h1 is the speed of the unmanned boat affected by the traffic flow density, v f is the unimpeded navigation speed, i.e., the navigation speed of the unmanned boat when the route is unimpeded. In this embodiment, the unimpeded navigation speed is set to 10 kn, K is the traffic flow density of the channel, and K j is the blocking density, which is generally 8.70-11.3 ships / km, and 10 ships / km is taken in this embodiment; the influence of wind and flow on the speed of the unmanned boat is reflected in the state space, such as the influence of wind and flow on the speed of the unmanned boat is mainly manifested in the component force of wind and flow force on the hull in the heading direction of the unmanned boat. The extent to which the hull is affected by wind and flow is determined by factors such as the hull structure, draft, and waterline surface area. In this embodiment, the sum of these factors is set as the wind force conversion factor and the flow force conversion factor. Therefore, the influence of wind and flow on the speed of the unmanned boat is as follows: V h2 =V1cos(θ1-θ h )δ1,V h3 =V2cos(θ2-θ h )δ2, where V h2 is the speed of the unmanned boat affected by wind, V1 is the wind speed, θ1 is the wind direction, θ h is the real-time heading of the unmanned boat, δ1 is the wind force conversion factor, V h3is the speed of the unmanned boat after being affected by hydraulic force, V2 is the flow velocity, θ2 is the flow direction, and δ2 is the flow force conversion factor; the influence of the three factors on the speed of the unmanned boat is: V c =V h1 +V h2 +V h3 , where V c is the real-time speed of the unmanned boat, that is, the current speed. By setting the value of each grid to the current speed, the dynamic state space setting of deep reinforcement learning can be completed, such as Figure 3 and Figure 4 shown.
[0111] Unmanned boat action space setting. Since a large turn will have a certain impact on the speed of the unmanned boat, the action space is set to five degrees left turn and five degrees right turn in this embodiment to prevent the unmanned boat from making a large turn.
[0112] When training the preset network model, the unmanned boat is first taught to complete the path planning with fewer mission points and closer distances, and then the distance and number of mission points are gradually increased, so that the unmanned boat can eventually complete the path planning of multiple mission points at any distance, such as Figure 3 , Figure 4 As shown. Figure 2 , Figure 3 and Figure 4 In the figure, the position with a value of 100 is the location of the mission point, and the arrow is the location of the unmanned boat at the current time step. First, plan the path that is closer to the mission point, such as Figure 3 As shown in the figure, since the distances between the mission points are relatively short, it is relatively easy for the unmanned boat to learn how to sail through each mission point from the current position in the shortest time. Load the preset network model trained under simple tasks and perform path planning tasks with long distances between mission points, such as Figure 4 After a lot of simulation training, the unmanned boat has learned how to plan from the current position to each mission point. It has a certain ability to perceive the mission point and optimize the path. It will be much easier for it to complete a relatively difficult task than to complete the task in the initial state.
[0113] The simulation environment for training the preset network model includes the following contents: simulation time step n = 1s, that is, the calculation cycle is 1s; the latitude and longitude of the unmanned boat at each time step are calculated according to the speed and heading of the unmanned boat; it is judged whether the unmanned boat has reached the maximum simulation time step of 250 (the maximum simulation time step is a training cycle, which can be set as needed), and the training is restarted after reaching the maximum simulation time step. According to the latitude and longitude of the unmanned boat, it is judged whether the unmanned boat exceeds the mission area, whether it is in the grid where the mission point is located, and whether it has passed all mission points.
[0114] The content that assists in training the preset network model includes:
[0115] Set the initial task for the unmanned boat, set two task points with a distance of 100m, and train the model in a simulation environment until the model can sail through all task points in the shortest time, and save the model. Load the trained model, randomly set two task points with a distance of 100m, so that the task points of the unmanned boat are different each time. Train the model until the unmanned boat can sail through all task points in the shortest time when facing any two task points, and save the model. Gradually increase the number of task points and the distance between task points, so that the tasks of the unmanned boat gradually increase. Load the model trained under easier tasks, train the model under more difficult tasks, and save the model after the unmanned boat can sail through all task points in the shortest time. Repeat the previous step, and finally after training the tasks from easy to difficult, the unmanned boat can complete the shortest time path planning task of any distance and multiple task points.
[0116] The reward function setting includes the following: when the unmanned boat sails beyond the mission area, the reward for the unmanned boat is -1000; when the unmanned boat does not pass all mission points within 250 time steps, the reward for the unmanned boat is -1000; when the unmanned boat sails to the mission point, the reward for the unmanned boat is 100-n; when the unmanned boat is sailing, the reward for the unmanned boat is the current time step-n; when the unmanned boat passes all mission points, the reward for the unmanned boat is 1000-n.
[0117] The unmanned boat path planning method for multiple mission points of the embodiment of the present invention comprehensively considers the influence of traffic flow density, wind direction, wind speed, flow direction, and flow speed on the navigation speed of the unmanned boat. In the simulation training, the unmanned boat is made to pass through all mission points in the shortest time, so that the path planned by the trained preset path planning model according to the real-time state can pass through all mission points in the shortest time. And it greatly reduces the time cost of the algorithm in practical application, and can decompose the path planning task of long-distance multi-mission points into multiple tasks with gradually increasing difficulty, avoiding the problems such as the difficulty of model loss function convergence or the need for a large amount of training due to the high difficulty of long-distance multi-mission point path planning.
[0118] The unmanned boat in the embodiment of the present invention may also be other unmanned water devices such as an unmanned ship.
[0119] like Figure 5 As shown, an embodiment of the present invention provides a multi-mission point unmanned boat path planning device 200, comprising:
[0120] An acquisition module 201 is used to acquire a task area containing information of multiple task points;
[0121] The processing module 302 is used to convert the information of the plurality of task points in the task area to obtain a target two-dimensional grid;
[0122] The planning module 203 is used to input the target two-dimensional grid into a preset path planning model to obtain a planned path; the planned path passes through all task points; the preset path planning model is obtained by training based on multiple preset task areas.
[0123] The unmanned boat path planning device for multiple mission points proposed in an embodiment of the present invention converts the mission area into a target two-dimensional grid, and then inputs the target two-dimensional grid into a preset path planning model. The obtained planned path can pass through all mission points in the shortest time, and has the advantages of high path planning efficiency and time saving.
[0124] Optionally, converting the information of the plurality of task points in the task area to obtain a target two-dimensional grid includes:
[0125] The task area is converted according to a preset scale and the information of the plurality of task points to obtain a target two-dimensional grid.
[0126] Optionally, the training process of the preset path planning model includes:
[0127] Acquire multiple preset task areas; the preset task areas contain multiple task point information;
[0128] The preset task area is converted according to the preset scale and the information of the plurality of task points to obtain a dynamic two-dimensional grid;
[0129] The preset network model is trained according to the dynamic two-dimensional grid to obtain a preset path planning model.
[0130] Optionally, the preset task area is converted according to the preset scale and the plurality of task point information to obtain a dynamic two-dimensional grid, including:
[0131] The preset task area is converted according to the preset scale and the plurality of task point information to obtain an initial two-dimensional grid;
[0132] The initial two-dimensional grid is set according to the received dynamic parameters to obtain a dynamic two-dimensional grid.
[0133] Optionally, the initial two-dimensional grid is set according to the received dynamic parameters to obtain a dynamic two-dimensional grid, including:
[0134] Receiving dynamic parameters; the dynamic parameters include waterway traffic density, wind direction, flow direction, wind speed, flow speed and real-time heading of the unmanned boat;
[0135] According to the dynamic parameters, the real-time speed of the unmanned boat is calculated;
[0136] The initial two-dimensional grid is set according to the real-time speed of the unmanned boat to obtain a dynamic two-dimensional grid.
[0137] Optionally, the real-time speed of the unmanned boat is calculated according to the dynamic parameters, including:
[0138] According to the waterway traffic flow density, the speed of the unmanned boat affected by the traffic flow density is calculated;
[0139] The formula is:
[0140] Calculate the speed of the unmanned boat affected by wind and the speed of the unmanned boat affected by water according to the wind direction, the flow direction, the wind speed, the flow speed and the real-time heading of the unmanned boat;
[0141] The formula is: V h2 =V1cos(θ1-θ h )δ1,V h3 =V2cos(θ2-θ h )δ2;
[0142] The real-time speed of the unmanned boat is calculated according to the speed of the unmanned boat affected by the traffic flow density, the speed of the unmanned boat affected by the wind force, and the speed of the unmanned boat affected by the water force;
[0143] The formula is: V c =V h1 +V h2 +V h3 ;
[0144] Among them, V h1 is the speed of the unmanned boat affected by the traffic flow density, v f is the smooth navigation speed, K is the waterway traffic density, K j is the blocking density, V h2 is the speed of the unmanned boat affected by wind, V1 is the wind speed, θ1 is the wind direction, θ h is the real-time heading of the unmanned boat, δ1 is the wind force conversion factor, V h3 is the speed of the unmanned boat after being affected by hydraulic force, V2 is the flow velocity, θ2 is the flow direction, δ2 is the flow force conversion factor, V c The real-time speed of the unmanned boat.
[0145] Optionally, training a preset network model according to the dynamic two-dimensional grid to obtain a preset path planning model includes:
[0146] Initialize the reward function to obtain the initial reward function;
[0147] Initialize the Q neural network to obtain the initial neural network;
[0148] Inputting the dynamic two-dimensional grid into the initial neural network, obtaining the state of the unmanned boat at time t-1, the action taken by the unmanned boat at time t-1, and the reward received by the unmanned boat at time t-1;
[0149] According to the state of the unmanned boat at time t-1, the action taken by the unmanned boat at time t-1, the reward received by the unmanned boat at time t-1 and the initial reward function, the state of the unmanned boat at time t, the action taken by the unmanned boat at time t and the reward received by the unmanned boat at time t are obtained;
[0150] The state of the unmanned boat at time t, the action taken by the unmanned boat at time t, and the reward received by the unmanned boat at time t are stored in the experience pool to obtain an updated experience pool;
[0151] The Q neural network is repeatedly trained according to the updated experience pool and the dynamic two-dimensional grid to obtain a preset path planning model.
[0152] It should be noted that the device is a device corresponding to the above method, and all implementations in the above method embodiment are applicable to the embodiment of the device and can achieve the same technical effect. This embodiment will not be repeated.
[0153] The embodiment of the present invention further provides a computing device, comprising: a processor, and a memory storing a computer program, wherein when the computer program is executed by the processor, the method described in any one of the above embodiments is executed. All implementations in the above method embodiments are applicable to the embodiments of the device, and can achieve the same technical effects. They will not be described in detail in this embodiment.
[0154] The embodiment of the present invention further provides a computer-readable storage medium on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the above embodiments. All implementations in the above method embodiments are applicable to the embodiments of the device and can achieve the same technical effects. They will not be described in detail in this embodiment.
[0155] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A multi-task point unmanned boat path planning method, characterized in that: include: Get the task area containing multiple task point information; Converting the information of the plurality of task points in the task area to obtain a target two-dimensional grid; Inputting the target two-dimensional grid into a preset path planning model to obtain a planned path; The planned path passes through all task points; The preset path planning model is obtained by training according to a plurality of preset task areas; The training process of the preset path planning model includes: Acquire multiple preset task areas; the preset task areas contain multiple task point information; The preset task area is converted according to the preset scale and the information of the plurality of task points to obtain a dynamic two-dimensional grid; Training a preset network model according to the dynamic two-dimensional grid to obtain a preset path planning model; The preset task area is converted according to the preset scale and the plurality of task point information to obtain a dynamic two-dimensional grid, including: The preset task area is converted according to the preset scale and the plurality of task point information to obtain an initial two-dimensional grid; The initial two-dimensional grid is set according to the received dynamic parameters to obtain a dynamic two-dimensional grid; The initial two-dimensional grid is set according to the received dynamic parameters to obtain a dynamic two-dimensional grid, including: Receiving dynamic parameters; the dynamic parameters include waterway traffic density, wind direction, flow direction, wind speed, flow speed and real-time heading of the unmanned boat; According to the dynamic parameters, the real-time speed of the unmanned boat is calculated; The initial two-dimensional grid is set according to the real-time speed of the unmanned boat to obtain a dynamic two-dimensional grid; The real-time speed of the unmanned boat is calculated based on the dynamic parameters, including: According to the waterway traffic flow density, the speed of the unmanned boat affected by the traffic flow density is calculated; The formula is: Calculate the speed of the unmanned boat affected by wind and the speed of the unmanned boat affected by water according to the wind direction, the flow direction, the wind speed, the flow speed and the real-time heading of the unmanned boat; The formula is: V h2 = V1cos(θ1 - θ h ), V h3 = V2cos(θ2 - θ h ); The real-time speed of the unmanned boat is calculated according to the speed of the unmanned boat affected by the traffic flow density, the speed of the unmanned boat affected by the wind force, and the speed of the unmanned boat affected by the water force; The formula is: V c =V h1 +V h2 +V h3 ; Among them, V h1 is the speed of the unmanned boat affected by the traffic flow density, v f is the smooth navigation speed, K is the waterway traffic density, K j is the blocking density, V h2 is the speed of the unmanned boat affected by wind, V1 is the wind speed, θ1 is the wind direction, θ h is the real-time heading of the unmanned boat, δ1 is the wind force conversion factor, V h3 is the speed of the unmanned boat after being affected by hydraulic force, V2 is the flow velocity, θ2 is the flow direction, δ2 is the flow force conversion factor, V c The real-time speed of the unmanned boat.
2. The multi-mission point unmanned boat path planning method according to claim 1 is characterized in that: The information of the plurality of task points in the task area is converted to obtain a target two-dimensional grid, including: The task area is converted according to a preset scale and the information of the plurality of task points to obtain a target two-dimensional grid.
3. The multi-mission point unmanned boat path planning method according to claim 1 is characterized in that: The preset network model is trained according to the dynamic two-dimensional grid to obtain a preset path planning model, including: Initialize the reward function to obtain the initial reward function; Initialize the Q neural network to obtain the initial neural network; Inputting the dynamic two-dimensional grid into the initial neural network, obtaining the state of the unmanned boat at time t, the action taken by the unmanned boat at time t, and the reward received by the unmanned boat at time t; According to the state of the unmanned boat at time t, the action taken by the unmanned boat at time t, the reward received by the unmanned boat at time t and the initial reward function, the state of the unmanned boat at time t+1, the action taken by the unmanned boat at time t+1 and the reward received by the unmanned boat at time t+1 are obtained; The state of the unmanned boat at time t+1, the action taken by the unmanned boat at time t+1, and the reward received by the unmanned boat at time t+1 are stored in the experience pool to obtain an updated experience pool; The Q neural network is repeatedly trained according to the updated experience pool and the dynamic two-dimensional grid to obtain a preset path planning model.
4. A multi-task point unmanned boat path planning device, characterized in that: include: An acquisition module is used to acquire a task area containing information of multiple task points; A processing module, used for converting information of a plurality of task points in the task area to obtain a target two-dimensional grid; A planning module, used for inputting the target two-dimensional grid into a preset path planning model to obtain a planned path; The planned path passes through all task points; The preset path planning model is obtained by training according to a plurality of preset task areas; The training process of the preset path planning model includes: Acquire multiple preset task areas; the preset task areas contain multiple task point information; The preset task area is converted according to the preset scale and the information of the plurality of task points to obtain a dynamic two-dimensional grid; Training a preset network model according to the dynamic two-dimensional grid to obtain a preset path planning model; The preset task area is converted according to the preset scale and the plurality of task point information to obtain a dynamic two-dimensional grid, including: The preset task area is converted according to the preset scale and the plurality of task point information to obtain an initial two-dimensional grid; The initial two-dimensional grid is set according to the received dynamic parameters to obtain a dynamic two-dimensional grid; The initial two-dimensional grid is set according to the received dynamic parameters to obtain a dynamic two-dimensional grid, including: Receiving dynamic parameters; the dynamic parameters include waterway traffic density, wind direction, flow direction, wind speed, flow speed and real-time heading of the unmanned boat; According to the dynamic parameters, the real-time speed of the unmanned boat is calculated; The initial two-dimensional grid is set according to the real-time speed of the unmanned boat to obtain a dynamic two-dimensional grid; The real-time speed of the unmanned boat is calculated based on the dynamic parameters, including: According to the waterway traffic flow density, the speed of the unmanned boat affected by the traffic flow density is calculated; The formula is: Calculate the speed of the unmanned boat affected by wind and the speed of the unmanned boat affected by water according to the wind direction, the flow direction, the wind speed, the flow speed and the real-time heading of the unmanned boat; The formula is: V h2 = V1cos(θ1 - θ h ), V h3 = V2cos(θ2 - θ h ); The real-time speed of the unmanned boat is calculated according to the speed of the unmanned boat affected by the traffic flow density, the speed of the unmanned boat affected by the wind force, and the speed of the unmanned boat affected by the water force; The formula is: V c =V h1 +V h2 +V h3 ; Among them, V h1 is the speed of the unmanned boat affected by the traffic flow density, v f is the smooth navigation speed, K is the waterway traffic density, K j is the blocking density, V h2 is the speed of the unmanned boat affected by wind, V1 is the wind speed, θ1 is the wind direction, θ h is the real-time heading of the unmanned boat, δ1 is the wind force conversion factor, V h3 is the speed of the unmanned boat after being affected by hydraulic force, V2 is the flow velocity, θ2 is the flow direction, δ2 is the flow force conversion factor, V c The real-time speed of the unmanned boat.
5. A computing device, characterized in that: include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 3 is performed.
6. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Improved D*Lite unmanned ship path planning method for complex environment
CN116954212A
Self-adaptive track control method of unmanned surface vessel
CN117111594A