Ship route planning method based on dynamic window method
Through the dynamic window method, the ship route planning is optimized, and the problems of navigation safety and efficiency in complex environments are solved, and efficient obstacle avoidance and safe navigation are achieved in maritime navigation.
Patent Information
- Application Number
- CN202210527548.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-05-16
AI Technical Summary
Under complex marine environments and weather conditions, it is difficult for the existing technology to quickly and effectively plan an economical and safe route for ships, especially in the fields of coast guard search and rescue and national defense. Navigation safety and efficiency are urgently needed. .
The ship route planning method based on the dynamic window method is adopted. By obtaining the initial position and motion parameters of ships and obstacles, a kinematic model is established and the dynamic window method is used to find the optimization in the velocity sampling space. The route is optimized according to the evaluation function and dynamic avoidance is drawn. Obstacle trajectory diagram to ensure navigation safety and efficiency.
This method effectively avoids static obstacles and dynamic hazardous areas in complex environments, improves navigation economy and efficiency, ensures navigation safety, and has important application value in maritime navigation navigation systems.
Smart Images

Figure CN114859925B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship route planning in ship navigation safety, and in particular to a ship route planning method based on a dynamic window method. Background Art
[0002] During the navigation process of ships, it is necessary to formulate safe and efficient routes in real time, which is also the basis for ships to go out to sea to perform tasks. With the rapid development of digital ocean technology, intelligent marine navigation is no longer limited to the original fixed routes. In the emergency search and rescue work of the Coast Guard, it is more urgent to quickly formulate the shortest route. In the field of national defense, the navigation environment is more complex, which requires seafarers to plan reasonable routes in order to accurately, safely, covertly and timely complete the navigation tasks assigned by superiors, and create conditions for better winning modern wars. In the complex marine environment and weather conditions, quickly and effectively planning an economical and safe route for ships is of great significance to trade shipping and military missions. Summary of the invention
[0003] The purpose of the present invention is to overcome the above-mentioned technical deficiencies and provide a ship route planning method based on the dynamic window method, which can quickly and effectively plan an economical and safe route for the ship under complex marine environment and weather conditions, thereby ensuring navigation safety and improving the economy and efficiency of navigation.
[0004] In order to achieve the above technical objectives, in a first aspect, the technical solution of the present invention provides a ship route planning method based on a dynamic window method, comprising the following steps:
[0005] Obtain the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the destination position;
[0006] Establishing a ship kinematics model, and determining an evaluation function of the ship kinematics model according to the ship initial position and ship motion parameters, the obstacle initial position, the obstacle motion parameters and the destination position;
[0007] Determine a speed sampling space, and use a dynamic window method to optimize the speed sampling space according to the evaluation function to obtain the optimal path of the current movement;
[0008] Determining whether the current optimal motion path reaches the destination position;
[0009] If the current optimal motion path reaches the destination position, a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position is drawn according to the current optimal motion path.
[0010] Compared with the prior art, the beneficial effects of the present invention include:
[0011] The ship route planning method based on the dynamic window method provided by the technical solution of the present invention aims at avoiding static obstacles and dynamic dangerous areas, and establishes a ship route planning model by weighting the ship heading score, route distance score, navigation speed score and forward simulation trajectory time through the evaluation function. The ship route planning model of the present invention not only ensures navigation safety, but also improves the economy and efficiency of navigation, and has very important application value for the marine navigation system.
[0012] According to some embodiments of the present invention, after determining whether the current optimal motion path reaches the destination location, the method includes the following steps:
[0013] If the current optimal motion path does not reach the destination location, determining whether the number of optimization searches using the dynamic window method currently reaches a preset value;
[0014] If the number of optimization searches using the dynamic window method currently does not reach a preset value, the dynamic window method is used again to optimize the current optimal motion path in the speed sampling space according to the evaluation function.
[0015] According to some embodiments of the present invention, after determining whether the number of optimization searches using the dynamic window method currently reaches a preset value, the following steps are included:
[0016] If the number of optimization searches using the dynamic window method reaches the preset value, the output is that the optimal path has not been found.
[0017] According to some embodiments of the present invention, the ship motion parameters include: ship initial velocity, ship acceleration and ship heading;
[0018] The obstacle motion parameters include: obstacle initial velocity, obstacle acceleration and obstacle direction.
[0019] According to some embodiments of the present invention, determining the evaluation function of the ship kinematic model comprises the steps of:
[0020] According to the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the position of the destination, the angle between the heading of the ship at the end of the simulation trajectory and the target, the distance between the ship and the nearest obstacle on the current trajectory and the speed value of the ship on the current trajectory are calculated;
[0021] The evaluation function is calculated based on the angle between the heading of the ship when it reaches the end of the simulated trajectory and the target, the distance between the ship and the nearest obstacle on the current trajectory, the speed value of the ship's current trajectory, the first weight parameter, the second weight parameter and the third weight parameter.
[0022] According to some embodiments of the present invention, the type evaluation function is determined as:
[0023] G(v,ω)=σ(α·heading(v,ω)+β·dist(v,ω)+γ·velocity(v,ω))
[0024] Among them, heading(v, ω) represents the angle between the heading of the ship when it reaches the end of the simulated trajectory and the target, dist(v, ω) represents the distance between the ship and the nearest obstacle on the current trajectory, velocity(v, ω) represents the velocity value of the current trajectory of the ship; α represents the first weight parameter, β represents the second weight parameter, and γ represents the third weight parameter.
[0025] According to some embodiments of the present invention, the method of using the dynamic window method to optimize the current motion optimal path in the speed sampling space according to the evaluation function comprises the steps of:
[0026] In the process of searching for the next optimal path, all currently feasible speeds and feasible angular speeds are traversed in the speed sampling space, and the current best evaluation, optimal speed, and optimal angular speed are obtained through the evaluation function, and the optimal path of the current motion is obtained by optimization.
[0027] In a second aspect, the technical solution of the present invention provides a ship route planning device based on a dynamic window method, comprising:
[0028] An initial state acquisition unit, used to acquire the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the destination position;
[0029] An evaluation function unit, used for establishing a ship kinematics model, and determining an evaluation function of the ship kinematics model according to the ship initial position and ship motion parameters, obstacle initial position, obstacle motion parameters and destination position;
[0030] A path optimization unit, used to determine a speed sampling space, and use a dynamic window method to optimize the speed sampling space according to the evaluation function to obtain the optimal path for the current movement;
[0031] A path determination unit, used to determine whether the current optimal movement path reaches the destination position;
[0032] A dynamic obstacle avoidance trajectory drawing unit is used to draw a dynamic obstacle avoidance trajectory from the initial position of the ship to the destination position according to the current optimal movement path when the current optimal movement path reaches the destination position.
[0033] In a third aspect, the technical solution of the present invention provides an electronic device, including:
[0034] at least one processor;
[0035] and a memory communicatively coupled to the at least one processor;
[0036] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor implements the ship route planning method based on the dynamic window method as described in any one of the first aspects.
[0037] In a fourth aspect, the technical solution of the present invention provides a computer-readable storage medium, wherein the computer instructions are used to enable the computer to execute the ship route planning method based on the dynamic window method as described in any one of the first aspects.
[0038] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, wherein the abstract drawings are identical to one of the drawings in the specification:
[0040] Figure 1 A flow chart of a ship route planning method based on a dynamic window method provided by one embodiment of the present invention;
[0041] Figure 2 A flow chart of a ship route planning method based on a dynamic window method provided by another embodiment of the present invention;
[0042] Figure 3 An overall framework diagram of a dynamic window method of a ship route planning method based on a dynamic window method provided by another embodiment of the present invention;
[0043] Figure 4 A position relationship diagram of each step of optimization in a ship route planning method based on a dynamic window method provided by another embodiment of the present invention;
[0044] Figure 5 A trajectory diagram of a ship route planning model for avoiding static obstacles and dynamic danger areas in a ship route planning method based on a dynamic window method provided in another embodiment of the present invention;
[0045] Figure 6 The block diagram is a block diagram of an electronic device for implementing the ship route planning method based on the dynamic window method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0047] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0048] The present invention provides a ship route planning method based on a dynamic window method. Aiming at avoiding static obstacles and dynamic dangerous areas, a ship route planning model is established by weighting the ship heading score, route distance score, navigation speed score and forward simulation trajectory time through an evaluation function. The ship route planning model of the present invention not only ensures navigation safety, but also improves the economy and efficiency of navigation, and has very important application value for marine navigation systems.
[0049] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0050] Reference Figure 1 , Figure 1 A flow chart of a ship route planning method based on a dynamic window method is provided for one embodiment of the present invention; the ship route planning method based on a dynamic window method includes but is not limited to the following steps:
[0051] Step S110, obtaining the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the destination position;
[0052] Step S120, establishing a ship kinematics model and determining an evaluation function of the ship kinematics model;
[0053] Step S130, determining the speed sampling space, and using the dynamic window method to optimize the speed sampling space according to the evaluation function to obtain the optimal path of the current motion;
[0054] Step S140, determining whether the current optimal motion path reaches the destination position;
[0055] Step S150: If the current optimal motion path reaches the destination position, a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position is drawn according to the current optimal motion path.
[0056] In one embodiment, a ship route planning method based on a dynamic window method includes the steps of: obtaining an initial position and ship motion parameters of a ship, an initial position of an obstacle, obstacle motion parameters and a destination position; establishing a ship kinematic model, and determining an evaluation function of the ship kinematic model based on the initial position and ship motion parameters of the ship, the initial position of an obstacle, obstacle motion parameters and the destination position; determining a speed sampling space, and using a dynamic window method to optimize the current optimal motion path in the speed sampling space according to the evaluation function; determining whether the current optimal motion path reaches the destination position; if the current optimal motion path reaches the destination position, drawing a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position according to the current optimal motion path.
[0057] The ship route planning method based on the dynamic window method aims at avoiding static obstacles and dynamic dangerous areas. The ship route planning model is established by weighting the ship heading score, route distance score, navigation speed score and forward simulation trajectory time through the evaluation function. The ship route planning model of the present invention not only ensures navigation safety, but also improves the economy and efficiency of navigation, and has very good practical value.
[0058] Reference Figures 2 to 5 , Figure 2 A flow chart of a ship route planning method based on a dynamic window method provided by another embodiment of the present invention; Figure 3 An overall framework diagram of a dynamic window method of a ship route planning method based on a dynamic window method provided by another embodiment of the present invention; Figure 4 A position relationship diagram of each step of optimization in a ship route planning method based on a dynamic window method provided by another embodiment of the present invention; Figure 5 A trajectory diagram of a ship route planning model of a ship route planning method based on a dynamic window method, which is provided in another embodiment of the present invention, avoids static obstacles and dynamic danger areas.
[0059] In one embodiment, the ship route planning method based on the dynamic window method includes the following steps:
[0060] 1. Simulate the sea conditions and position of the ship sailing at sea, set the initial position and motion parameters of the ship, the initial position and motion parameters of the obstacle, and the destination position;
[0061] 2. Establish the ship kinematic model, the parameters are: maximum speed (m / s), maximum rotation speed (rad / s), acceleration (m / ss), rotation acceleration (rad / ss), speed resolution (m / s), speed resolution (rad / s);
[0062] 3. The overall algorithm framework of the dynamic window method, in which the model evaluation function is determined as: G(v,ω)=σ(α·heading(v,ω)+β·dist(v,ω)+γ·velocity(v,ω)). In the formula, the optimal speed and optimal angular velocity are obtained through the value of G(v,ω); heading(v,ω) represents the angle between the heading of the ship at the end of the simulated trajectory and the target at the currently set sampling speed; dist(v,ω) represents the distance to the nearest obstacle on the current trajectory; velocity(v,ω) is used to evaluate the speed of the current trajectory, and the greater the speed, the higher the score; α, β, γ are three parameters, representing the weight of each function item. Items to be evaluated:
[0063]
[0064]
[0065] velocity(v,ω)=|v i |;
[0066] (x i ,y i ),(x e ,y e ),(x obs ,y obs ) represent the current coordinates, the end point position, and the coordinates of the obstacle closest to the current moment respectively; v i Indicates the current speed;
[0067] After calculation, it is necessary to normalize and then add them together. The normalization principle is to divide each item by the sum of each item. That is:
[0068]
[0069] 4. Determine the speed sampling space. According to the maximum and minimum speed limits of the simulated ship, the speed V s (v,ω) (represents the ship's linear velocity and angular velocity respectively) satisfies: V s ={(v,ω),v min ≤v≤v max Considering the constraints of driving force, there is a maximum acceleration and deceleration limit, and the speed space is further constrained, using V d Assume that the current linear velocity is v c , the current angular velocity is ω c , the time interval is t, then the achievable speed V at the next moment d (v,ω) satisfies the following conditions: The final velocity sampling space is V r =Vs ∩V d ;
[0070] 5. Perform the i-th step of dynamic window method path optimization. When looking for the next optimal path, V r In the traversal of all the current feasible speeds and feasible angular velocities, the current best evaluation, best speed, and best angular velocity are obtained through the evaluation function, thereby completing the current optimal path of motion. The relationship between the next moment and the current position is: Where (x i ,y i ),(x i+1 ,y i+1 ) represent the current and next moment coordinate positions respectively, v i ,θ i They represent the current speed and deflection angle respectively. The related position relationship is shown in the attached figure. Figure 4 As shown;
[0071] 6. Loop step (5) and store the current optimal speed, optimal angular velocity and motion trajectory until the destination is reached;
[0072] 7. After the optimization is completed, draw a dynamic obstacle avoidance trajectory from the starting point to the destination.
[0073] Table 1 Simulation modeling parameters
[0074]
[0075]
[0076] The simulation modeling process of the ship route planning method based on the dynamic window method proposed in the present invention aims at avoiding static obstacles and dynamic dangerous areas, which not only ensures navigation safety but also improves the economy and efficiency of navigation. It is particularly suitable for the research of various marine navigation systems by engineering designers in ocean condition information, and provides a scientific and reasonable mathematical model for designing a route planning system with excellent performance.
[0077] In one embodiment, a ship route planning method based on a dynamic window method includes the steps of: obtaining an initial position and ship motion parameters of a ship, an initial position of an obstacle, obstacle motion parameters and a destination position; establishing a ship kinematic model, and determining an evaluation function of the ship kinematic model based on the initial position and ship motion parameters of the ship, the initial position of an obstacle, obstacle motion parameters and the destination position; determining a speed sampling space, and using a dynamic window method to optimize the current optimal motion path in the speed sampling space according to the evaluation function; determining whether the current optimal motion path reaches the destination position; if the current optimal motion path reaches the destination position, drawing a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position according to the current optimal motion path.
[0078] After determining whether the current optimal motion path has reached the destination, the method includes the following steps: if the current optimal motion path has not reached the destination, determining whether the number of optimization searches using the dynamic window method has reached a preset value, wherein the preset value may be set to 5000, but this embodiment does not limit it, and may also be other values, such as 4000 or 6000; if the number of optimization searches using the dynamic window method has not reached the preset value, the dynamic window method is used again to search in the speed sampling space according to the evaluation function to obtain the current optimal motion path.
[0079] In one embodiment, a ship route planning method based on a dynamic window method includes the steps of: obtaining an initial position and ship motion parameters of a ship, an initial position of an obstacle, obstacle motion parameters and a destination position; establishing a ship kinematic model, and determining an evaluation function of the ship kinematic model based on the initial position and ship motion parameters of the ship, the initial position of an obstacle, obstacle motion parameters and the destination position; determining a speed sampling space, and using a dynamic window method to optimize the current optimal motion path in the speed sampling space according to the evaluation function; determining whether the current optimal motion path reaches the destination position; if the current optimal motion path reaches the destination position, drawing a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position according to the current optimal motion path.
[0080] After determining whether the current optimal path of the movement has reached the destination, the method includes the following steps: if the current optimal path of the movement has not reached the destination, determining whether the number of optimization searches using the dynamic window method has reached a preset value, which may be 5000; if the number of optimization searches using the dynamic window method has not reached the preset value, using the dynamic window method again to optimize the current optimal path of the movement in the speed sampling space according to the evaluation function; if the number of optimization searches using the dynamic window method has reached the preset value, outputting that the optimal path has not been found.
[0081] In one embodiment, a ship route planning method based on a dynamic window method includes the following steps: obtaining the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle, and the destination position; establishing a ship kinematic model, and determining the evaluation function of the ship kinematic model according to the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle, and the destination position; determining a speed sampling space, and using a dynamic window method to optimize the current motion optimal path in the speed sampling space according to the evaluation function; determining whether the current motion optimal path reaches the destination position; if the current motion optimal path reaches the destination position, drawing a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position according to the current motion optimal path. The ship motion parameters include: the initial speed of the ship, the acceleration of the ship, and the heading of the ship; the obstacle motion parameters include: the initial speed of the obstacle, the acceleration of the obstacle, and the direction of the obstacle.
[0082] In one embodiment, a ship route planning method based on a dynamic window method includes the steps of: obtaining an initial position and ship motion parameters of a ship, an initial position of an obstacle, obstacle motion parameters and a destination position; establishing a ship kinematic model, and determining an evaluation function of the ship kinematic model based on the initial position and ship motion parameters of the ship, the initial position of an obstacle, obstacle motion parameters and the destination position; determining a speed sampling space, and using a dynamic window method to optimize the current optimal motion path in the speed sampling space according to the evaluation function; determining whether the current optimal motion path reaches the destination position; if the current optimal motion path reaches the destination position, drawing a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position according to the current optimal motion path.
[0083] Determining the evaluation function of the ship kinematic model includes the following steps:
[0084] According to the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the position of the destination, the angle between the heading of the ship when it reaches the end of the simulation trajectory and the target, the distance between the ship and the nearest obstacle on the current trajectory and the speed value of the ship's current trajectory are calculated; according to the angle between the heading of the ship when it reaches the end of the simulation trajectory and the target, the distance between the ship and the nearest obstacle on the current trajectory, the speed value of the ship's current trajectory, the first weight parameter, the second weight parameter and the third weight parameter, the evaluation function is calculated.
[0085] The evaluation function is determined as:
[0086] G(v,ω)=σ(α·heading(v,ω)+β·dist(v,ω)+γ·velocity(v,ω))
[0087] Among them, heading(v, ω) represents the angle between the heading of the ship when it reaches the end of the simulated trajectory and the target, dist(v, ω) represents the distance between the ship and the nearest obstacle on the current trajectory, velocity(v, ω) represents the velocity value of the current trajectory of the ship; α represents the first weight parameter, β represents the second weight parameter, and γ represents the third weight parameter.
[0088] In one embodiment, a ship route planning method based on a dynamic window method includes the steps of: obtaining an initial position and ship motion parameters of a ship, an initial position of an obstacle, obstacle motion parameters and a destination position; establishing a ship kinematic model, and determining an evaluation function of the ship kinematic model based on the initial position and ship motion parameters of the ship, the initial position of an obstacle, obstacle motion parameters and the destination position; determining a speed sampling space, and using a dynamic window method to optimize the current optimal motion path in the speed sampling space according to the evaluation function; determining whether the current optimal motion path reaches the destination position; if the current optimal motion path reaches the destination position, drawing a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position according to the current optimal motion path.
[0089] The dynamic window method is used to optimize the current optimal path of the movement in the speed sampling space according to the evaluation function, including the following steps: in the process of finding the optimal path for the next step, all the current feasible speeds and feasible angular velocities are traversed in the speed sampling space, the current best evaluation, optimal speed, and optimal angular velocity are obtained through the evaluation function, and the optimal path of the current movement is optimized.
[0090] The present invention also provides a ship route planning device based on a dynamic window method, comprising:
[0091] An initial state acquisition unit, used to acquire the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the destination position;
[0092] An evaluation function unit is used to establish a ship kinematics model and determine an evaluation function of the ship kinematics model according to the ship's initial position and ship motion parameters, the obstacle's initial position, the obstacle's motion parameters and the destination position;
[0093] The path optimization unit is used to determine the speed sampling space and use the dynamic window method to optimize the current motion optimal path in the speed sampling space according to the evaluation function;
[0094] A path determination unit, used to determine whether the current optimal movement path reaches the destination position;
[0095] The dynamic obstacle avoidance trajectory drawing unit is used to draw a dynamic obstacle avoidance trajectory from the initial position of the ship to the destination position according to the current optimal movement path when the current optimal movement path reaches the destination position.
[0096] Reference below Figure 6 , which shows a block diagram of an electronic device 900 suitable for implementing an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0097] like Figure 6 As shown, the electronic device 900 may include a processing device 901, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. The processing device 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processing device 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processing device 901 performs the various methods and processes described above.
[0098] In the RAM 903, various programs and data necessary for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0099] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0100] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present invention are executed. Alternatively, in other embodiments, the processing device 901 can be configured to execute a ship route planning method based on a dynamic window method by any other appropriate means (for example, by means of firmware).
[0101] The computer-readable medium of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0102] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0103] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0104] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0105] Obtain the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the destination position;
[0106] Establishing a ship kinematics model, and determining an evaluation function of the ship kinematics model according to the ship's initial position and ship motion parameters, the obstacle's initial position, the obstacle's motion parameters and the destination position;
[0107] Determine the speed sampling space, and use the dynamic window method to optimize the current motion optimal path in the speed sampling space according to the evaluation function;
[0108] Determine whether the current optimal motion path reaches the destination;
[0109] If the current optimal motion path reaches the destination position, a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position is drawn according to the current optimal motion path.
[0110] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0111] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0112] The modules involved in the embodiments of the present invention may be implemented by software or hardware, wherein the name of a module does not limit the module itself in some cases.
[0113] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof, etc.
[0114] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0115] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server) or a computing system that includes middleware components (e.g., an application server) or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein) or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0118] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services. The server may also be a server of a distributed system, or a server combined with a blockchain.
[0119] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning technology, big data processing technology, knowledge graph technology, and other major directions.
[0120] Cloud computing refers to a technology system that uses network access to elastically scalable shared physical or virtual resource pools. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for technical applications such as artificial intelligence and blockchain, as well as model training.
[0121] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution provided by the present invention can be achieved, and this document does not limit this.
[0122] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A ship route planning method based on a dynamic window method, characterized in that: The following steps are involved: Obtain the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the destination position; Establishing a ship kinematics model, and determining an evaluation function of the ship kinematics model according to the ship initial position and ship motion parameters, the obstacle initial position, the obstacle motion parameters and the destination position; Determine a speed sampling space, and use a dynamic window method to optimize the speed sampling space according to the evaluation function to obtain the optimal path of the current motion; Determining whether the current optimal motion path reaches the destination position; If the current optimal motion path reaches the destination position, a dynamic obstacle avoidance trajectory diagram from the initial position of the ship to the destination position is drawn according to the current optimal motion path; The step of determining the evaluation function of the ship kinematic model comprises the following steps: According to the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the position of the destination, the angle between the heading of the ship at the end of the simulation trajectory and the target, the distance between the ship and the nearest obstacle on the current trajectory and the speed value of the ship on the current trajectory are calculated; The evaluation function is calculated based on the angle between the heading of the ship at the end of the simulated trajectory and the target, the distance between the ship and the nearest obstacle on the current trajectory, the speed value of the current trajectory of the ship, the first weight parameter, the second weight parameter and the third weight parameter; The evaluation function is determined as: in, It represents the angle between the ship’s heading at the end of the simulated trajectory and the target. Indicates the distance between the ship and the nearest obstacle on the current track. Indicates the speed value of the current track of the ship; α indicates the first weight parameter, β indicates the second weight parameter, and γ indicates the third weight parameter; The method of using the dynamic window method to optimize the current motion optimal path in the velocity sampling space according to the evaluation function comprises the following steps: In the process of searching for the next optimal path, all currently feasible speeds and feasible angular speeds are traversed in the speed sampling space, and the current best evaluation, optimal speed, and optimal angular speed are obtained through the evaluation function, and the optimal path of the current motion is obtained by optimization.
2. The ship route planning method based on the dynamic window method according to claim 1 is characterized in that: After determining whether the current optimal motion path reaches the destination location, the method includes the following steps: If the current optimal motion path does not reach the destination location, determining whether the number of optimization searches using the dynamic window method currently reaches a preset value; If the number of optimization searches using the dynamic window method currently does not reach a preset value, the dynamic window method is used again to optimize the current optimal motion path in the speed sampling space according to the evaluation function.
3. The ship route planning method based on the dynamic window method according to claim 2 is characterized in that: After determining whether the number of optimization searches using the dynamic window method has reached a preset value, the method includes the following steps: If the number of optimization searches using the dynamic window method reaches the preset value, the output is that the optimal path has not been found.
4. The ship route planning method based on the dynamic window method according to claim 1 is characterized in that: The ship motion parameters include: ship initial speed, ship acceleration and ship heading; The obstacle motion parameters include: obstacle initial velocity, obstacle acceleration and obstacle direction.
5. A ship route planning device based on a dynamic window method, characterized in that: include: An initial state acquisition unit, used to acquire the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the destination position; An evaluation function unit, used for establishing a ship kinematics model, and determining an evaluation function of the ship kinematics model according to the ship initial position and ship motion parameters, obstacle initial position, obstacle motion parameters and destination position; A path optimization unit, used to determine a speed sampling space, and use a dynamic window method to optimize the speed sampling space according to the evaluation function to obtain the optimal path for the current movement; A path determination unit, used to determine whether the current optimal movement path reaches the destination position; A dynamic obstacle avoidance trajectory drawing unit, configured to draw a dynamic obstacle avoidance trajectory from the initial position of the ship to the destination position according to the current optimal motion path when the current optimal motion path reaches the destination position; The evaluation function of determining the ship kinematic model comprises: According to the initial position and motion parameters of the ship, the initial position of the obstacle, the motion parameters of the obstacle and the position of the destination, the angle between the heading of the ship at the end of the simulation trajectory and the target, the distance between the ship and the nearest obstacle on the current trajectory and the speed value of the ship on the current trajectory are calculated; The evaluation function is calculated based on the angle between the heading of the ship at the end of the simulated trajectory and the target, the distance between the ship and the nearest obstacle on the current trajectory, the speed value of the current trajectory of the ship, the first weight parameter, the second weight parameter and the third weight parameter; The evaluation function is determined as: in, It represents the angle between the ship’s heading at the end of the simulated trajectory and the target. Indicates the distance between the ship and the nearest obstacle on the current track. Indicates the speed value of the current track of the ship; α indicates the first weight parameter, β indicates the second weight parameter, and γ indicates the third weight parameter; The method of using the dynamic window method to optimize the current motion optimal path in the velocity sampling space according to the evaluation function includes: In the process of searching for the next optimal path, all currently feasible speeds and feasible angular speeds are traversed in the speed sampling space, and the current best evaluation, optimal speed, and optimal angular speed are obtained through the evaluation function, and the optimal path of the current motion is obtained by optimization.
6. An electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor implements the ship route planning method based on the dynamic window method as described in any one of claims 1-4.
7. A computer-readable storage medium, wherein: The computer instructions are used to enable the computer to execute the ship route planning method based on the dynamic window method according to any one of claims 1-4.
