CN116820136B - Unmanned aerial vehicle path optimization method and device based on RRT algorithm - Google Patents

Unmanned aerial vehicle path optimization method and device based on RRT algorithm Download PDF

Info

Publication number
CN116820136B
CN116820136B CN202311075418.4A CN202311075418A CN116820136B CN 116820136 B CN116820136 B CN 116820136B CN 202311075418 A CN202311075418 A CN 202311075418A CN 116820136 B CN116820136 B CN 116820136B
Authority
CN
China
Prior art keywords
flight
sampling
point
preset
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311075418.4A
Other languages
Chinese (zh)
Other versions
CN116820136A (en
Inventor
任柏松
羡春辉
白秀军
甘兴利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiong'an Guochuang Center Technology Co ltd
Original Assignee
Xiong'an Guochuang Center Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiong'an Guochuang Center Technology Co ltd filed Critical Xiong'an Guochuang Center Technology Co ltd
Priority to CN202311075418.4A priority Critical patent/CN116820136B/en
Publication of CN116820136A publication Critical patent/CN116820136A/en
Application granted granted Critical
Publication of CN116820136B publication Critical patent/CN116820136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The application relates to the technical field of unmanned aerial vehicle application, and provides an unmanned aerial vehicle path optimization method and device based on an RRT algorithm. In the method, the flight step length of the unmanned aerial vehicle is determined based on the total area occupation ratio of each obstacle in the target flight area; sampling a circular curve determined based on a current flight starting point and a flight step length by adopting a preset area sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point; acquiring the cost value of each candidate flight point forming a path with the current flight starting point based on the position of the obstacle and the position of the flight ending point; and determining a new current flight starting point based on the candidate flight points corresponding to the cost values meeting the preset path cost conditions, and the like until the preset termination conditions are met. The method improves the path searching speed and avoids the randomness of path generation.

Description

Unmanned aerial vehicle path optimization method and device based on RRT algorithm
Technical Field
The application relates to the technical field of unmanned aerial vehicle application, in particular to an unmanned aerial vehicle path optimization method and device based on an RRT algorithm.
Background
The RRT (Rapid-Exploring Random Tree) algorithm is called a fast expanding random tree method, and is a sampling-based method for path planning by generating random points in a feasible space. In the execution process of the method for rapidly expanding the random tree, firstly, random sampling in the space is carried out, then, the starting point is used as a root node of the expanding tree, and searching is carried out on surrounding nodes. And selecting a feasible node as a path point through collision detection, and adding the feasible node into a root node list. And continuously guiding the search tree to a blank area, constructing a random tree route map with a path until the expansion tree reaches the end point range, and finally reversely searching a root node of the upper stage of the path point from the end point to the start point, thereby forming a feasible path serving as a flight route. RRT advantage: the environment is not required to be accurately modeled, so that the operand and the program complexity are reduced; the method has probability completeness, and a feasible path can be planned as long as a path exists; various dynamics and kinematics constraints are conveniently added; the problem of local minimum value is avoided, and the situations of dead circulation and collision are rarely caused; the method has the characteristic of fast planning in a local area, and can quickly avoid barriers by a random sampling method. RRT disadvantage: because the outward searching from the nodes has a certain blindness and diversity, routes generated by each path are different; meanwhile, the planned route is very tortuous, has no optimality, is mostly not the shortest path, and causes long planning time in random exploration; the global map is needed to be known in advance during planning, and the planning can be performed after the global map is explored in practice, which belongs to offline planning.
That is, the existing RRT algorithm generates multiple paths with random generated path points and non-optimal paths, which results in long planning time, time waste and reduced working efficiency.
Disclosure of Invention
The embodiment of the application aims to provide an unmanned aerial vehicle path optimization method and device based on an RRT algorithm, which are used for solving the problems existing in the prior art, avoiding the randomness of path generation and improving the path searching efficiency.
In a first aspect, an unmanned aerial vehicle path optimization method based on an RRT algorithm is provided, and the method may include:
determining the flight step length of the unmanned aerial vehicle based on the total area occupation ratio of each obstacle in the target flight area;
sampling a circular curve determined based on a current flight starting point and the flight step length by adopting a preset area sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point;
acquiring the cost value of each candidate flight point forming a path with the current flight starting point respectively based on the position of the obstacle and the position of the flight ending point;
based on the candidate flight points corresponding to the cost values meeting the preset path cost conditions, determining a new current flight starting point, and returning to the execution step: and sampling a circular curve determined based on the current flight starting point and the flight step length by adopting a preset area sampling algorithm until a preset termination condition is met.
In an alternative implementation, determining a flight step of the unmanned aerial vehicle based on a total area occupation ratio of each obstacle in a target flight area, including:
acquiring a first number of randomly generated reference points in the target flight area;
determining a second number of reference points contained within the obstacle region based on the position of each obstacle in the obstacle region in the target flight region;
determining an obstacle duty cycle based on a ratio of the second number to the first number;
calculating the duty ratio of the obstacle by adopting a preset step algorithm to obtain the flight step length of the unmanned aerial vehicle;
the preset step algorithm is expressed as:
where c is the obstacle duty cycle and step is the flight step.
In an optional implementation, a preset area sampling algorithm is adopted to sample a circular curve determined based on a current flight starting point and the flight step length, so as to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point, including:
taking the current flight starting point as a circle center and taking the flight step length as a radius to obtain a circular curve;
sampling points on the circular curve based on the position and the flight step length of the current flight starting point by adopting a preset sampling algorithm aiming at a preset direction to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point;
the preset direction is a positive direction or a negative direction of an x-axis of a coordinate system established by taking the current flight starting point as a circle center.
In an optional implementation, a preset sampling algorithm is adopted, and based on the position of the current flight starting point and the flight step length, the points on the circular curve are sampled to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point, including:
adopting a preset abscissa sampling algorithm, and sampling the abscissa of the points on the circular curve based on the abscissa of the current flight starting point and the flight step length to obtain the abscissa of a preset number of sampling points corresponding to the current flight starting point;
and acquiring the ordinate of a preset number of sampling points corresponding to the current flight starting point based on the ordinate of the current flight starting point and the difference value between the abscissa of each sampling point and the abscissa of the current flight starting point by adopting a preset ordinate sampling algorithm.
In an alternative implementation, determining a cost value for each candidate flight point to form a path with the current flight start point based on the position of the obstacle and the position of the flight end point includes:
screening the positions of the candidate flight points based on the positions of the obstacles and the positions of the flight end points to obtain a plurality of feasible flight points;
and calculating the cost value of the path formed by each feasible flying point and the current flying starting point respectively by adopting a preset path cost algorithm.
In an alternative implementation, based on the position of the obstacle and the position of the flight end point, screening each candidate flight point to obtain a plurality of feasible flight points includes:
acquiring four sections of sampling curves of the circular curve, wherein the four sections of sampling curves are divided by using an x axis and a y axis of a coordinate system established by the circle center of the circular curve;
determining sampling priorities of the four sections of sampling curves based on distances from points on the four sections of sampling curves to the flight end point;
detecting whether paths between each candidate flight point and the flight end point respectively intersect with the area determined by the position of the obstacle according to the sampling priority of the four sections of sampling curves;
screening out target candidate flight points corresponding to paths which do not intersect with the position of the obstacle according to the detection result;
and determining the target candidate flight point as a feasible flight point.
In an optional implementation, calculating a cost value of a path formed by each feasible flight point and the current flight starting point respectively by adopting a preset path cost algorithm includes:
determining a cost adjustment value based on the sampling priority of the four sections of sampling curves and the flight step length;
and determining the cost value of a path formed by the corresponding feasible flight point and the current flight starting point based on the distance value between each feasible flight point and the current flight starting point and the cost adjustment value.
In a second aspect, an unmanned aerial vehicle path optimization device based on an RRT algorithm is provided, and the device may include:
a determining unit, configured to determine a flight step length of the unmanned aerial vehicle based on a total area occupation ratio of each obstacle in a target flight area in the target flight area;
the sampling unit is used for sampling a circular curve determined based on a current flight starting point and the flight step length by adopting a preset area sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point;
an acquisition unit, configured to acquire a cost value of a path formed by each candidate flight point and the current flight start point, based on the position of the obstacle and the position of the flight end point;
the determining unit is further configured to determine a new current flight start point based on the candidate flight points corresponding to the cost values that meet the preset path cost condition, and return to the executing step: and sampling a circular curve determined based on the current flight starting point and the flight step length by adopting a preset area sampling algorithm until a preset termination condition is met.
In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory are in communication with each other via the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of the above first aspects when executing a program stored on a memory.
In a fourth aspect, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the method steps of any of the first aspects.
In the unmanned aerial vehicle path optimization method based on the RRT algorithm, the flight step length of the unmanned aerial vehicle is determined based on the total area occupation ratio of each obstacle in the target flight area; sampling a circular curve determined based on a current flight starting point and a flight step length by adopting a preset area sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point; acquiring the cost value of each candidate flight point forming a path with the current flight starting point based on the position of the obstacle and the position of the flight ending point; based on the candidate flight points corresponding to the cost values meeting the preset path cost conditions, determining a new current flight starting point, and returning to the execution step: and sampling a circular curve determined based on the current flight starting point and the flight step length by adopting a preset area sampling algorithm until a preset termination condition is met. The method can self-adaptively and rapidly explore the random tree, and the path searching speed is improved and the randomness of path generation is avoided by selecting the step length according to the duty ratio of the obstacle and completely new heuristic searching for the target node.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a scene diagram of an unmanned aerial vehicle path optimization method based on an RRT algorithm according to an embodiment of the present application;
fig. 2 is a schematic flow chart of an unmanned aerial vehicle path optimization method based on an RRT algorithm according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a sampling point on a circular curve according to an embodiment of the present application;
FIG. 4 is a schematic diagram of sampling points on another circular curve according to an embodiment of the present application;
FIG. 5 is a schematic diagram of sampling points on a circular curve according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of an unmanned aerial vehicle path optimization device based on an RRT algorithm according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The unmanned aerial vehicle path optimization method based on the RRT algorithm provided by the embodiment of the application can be applied to a scene graph shown in fig. 1, and as shown in fig. 1, the scene can comprise: unmanned aerial vehicle and route optimization platform.
The path optimization platform is used for executing the path optimization method provided by the application and controlling the unmanned aerial vehicle to fly based on the path determined by the method.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and not for limitation of the present application, and embodiments of the present application and features of the embodiments may be combined with each other without conflict.
Fig. 2 is a flow chart of an unmanned aerial vehicle path optimization method based on an RRT algorithm according to an embodiment of the present application. As shown in fig. 2, the method may include:
step S210, determining the flight step length of the unmanned aerial vehicle based on the total area occupation ratio of each obstacle in the target flight area.
In the implementation, a priori map corresponding to a target flight area is required to be acquired first, and a reference point is randomly generated according to the size of the map, so that a first number of the randomly generated reference point in the target flight area is acquired;
determining a second number of reference points contained within the obstacle region based on the position of each obstacle in the obstacle region in the target flight region; determining the ratio of the obstacle based on the ratio of the second number to the first number;
and then, calculating the duty ratio of the obstacle by adopting a preset step algorithm to obtain the flight step length of the unmanned aerial vehicle.
In one example, the preset step algorithm may be expressed as:the method comprises the steps of carrying out a first treatment on the surface of the Where c is the obstacle duty cycle and step is the flight step.
In some implementations, a total area of each obstacle in the target flight area may be obtained; the ratio of the total area to the area of the target flight area may also be used to obtain the obstacle occupancy ratio.
And S220, sampling a circular curve determined based on the current flight starting point and the flight step length by adopting a preset area sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point.
The current flight starting point is a current stop point of the unmanned aerial vehicle, namely a departure point of each flight of the unmanned aerial vehicle, and if the unmanned aerial vehicle is just started and has not taken off, the current flight starting point is a manually specified departure point.
In the specific implementation, a current flight starting point is used as a circle center, and a flight step length is used as a radius to obtain a circular curve;
aiming at a preset direction, a preset sampling algorithm is adopted, and based on the position of the current flight starting point and the flight step length, the points on the circular curve are sampled to obtain a preset number m of candidate flight points corresponding to the current flight starting point and corresponding positions, namely the preset number m of candidate flight points are m points on the circular curve; wherein the preset direction is the positive direction of the x-axis of the coordinate system established by taking the current flight starting point as the center of a circleOr negative direction->
Specifically, a preset abscissa sampling algorithm is adopted, and based on the abscissa of the current flight starting point and the flight step length, the abscissa of the points on the circle curve is sampled to obtain the abscissa of the preset number m of sampling points corresponding to the current flight starting point, wherein the abscissa can be in the positive directionUpper abscissa +.>Or negative direction->Upper abscissa +.>A schematic diagram of the sampling points on the circular curve is shown in fig. 3.
In one example, the preset abscissa sampling algorithm may be expressed as:
wherein step is the flight step length,for the i-th sampling point in the positive direction +.>On the abscissa,/->For the i-th sample point in the negative direction +.>On the abscissa,/->For the abscissa of the current flight starting point, m is the number of candidate flight points, and the value range of i is [1, m]。
And acquiring the ordinate of the preset number m of sampling points corresponding to the current flight starting point based on the ordinate of the current flight starting point and the difference value between the abscissa of each sampling point and the abscissa of the current flight starting point by adopting a preset ordinate sampling algorithm.
In one example, the preset ordinate sampling algorithm may be expressed as:
wherein,for the i-th sampling point in the positive direction +.>Ordinate on the upper>For the i-th sample point in the negative direction +.>Ordinate on the upper>Is the ordinate of the current flight start point, +.>
Thereby, a preset number m of candidate flight points and corresponding positions may be stored in the candidate target point list a.
Step S230, determining the cost value of each candidate flight point forming a path with the current flight starting point based on the position of the obstacle and the position of the flight ending point.
In specific implementation, the positions of candidate flight points are screened based on the positions of the obstacles and the positions of the flight terminals to obtain a plurality of feasible flight points X rand And the corresponding location. Specifically, the flight end points and the candidate flight points can be formed into paths respectively, the area where the obstacle is located is determined based on the position of the obstacle, whether each path intersects with the edge of the area where the obstacle is located or passes through the area where the obstacle is located is judged, if yes, collision of the path is indicated, the candidate flight points corresponding to the path are deleted, and accordingly candidate flight points corresponding to all paths which cannot collide can be obtained, namely a feasible flight point X rand . The route formed by the flight terminal point and the candidate flight point refers to a connecting line of the coordinate point of the flight terminal point and the coordinate point of the candidate flight point.
And storing the obtained plurality of feasible flying points and corresponding positions into a path node list vertex.
Then, calculating each feasible flying point X by adopting a preset path cost algorithm rand And forming the cost value of the path with the current flight starting point respectively. In particular, due to the viable flight point X rand The method does not collide with a path formed by the flight end point, and obtains all feasible flight points X rand The path lengths of the paths are formed with the current flight starting point respectively, and the path length of each path can be determined to be the cost value of the corresponding path.
Step S240, determining a new current flight starting point based on the candidate flight points corresponding to the cost values meeting the preset path cost conditions, and returning to the step S220 until the preset termination conditions are met.
In one embodiment, the meeting the preset path cost condition may be meeting a condition that the path length is minimum.
After obtaining the path length of each path, the candidate flying point (or "feasible flying point X") corresponding to the shortest path length is obtained rand ") is determined as a new current flight start point, and then returns to step S220 until a preset termination condition is satisfied: until the flight end point is a feasible flight point X of the iterated current flight start point rand Until that point.
In one example, as shown in fig. 4, after determining that the flight step length and the flight end point are the point B, taking the point a as the current flight start point to obtain a circular curve L1, and sampling the circular curve L1 by adopting a preset area sampling algorithm to obtain a series of current candidate flight points E and corresponding positions corresponding to the point a.
For any current candidate flying point E, detecting whether a path formed by the current candidate flying point E and a point B collides with the obstacle or not based on the position of the obstacle, screening a series of current candidate flying points E, determining the shortest path from the paths formed by the screened current candidate flying points E and the point B, and determining the current candidate flying point E corresponding to the shortest path as a new point A.
In another embodiment, for a target candidate flight point (or "target feasible flight point X" corresponding to a cost value satisfying a preset path cost condition rand ") may determine a new current flight start point by a determination algorithm of the current flight start point of the following formula.
The determination algorithm for the current flight start point can be expressed as:
wherein,for the new current flight start, +.>For the current flight start, +.>Feasible flying point X for target rand Coordinate difference of the coordinates of (a) and the coordinates of the current flight start point,/->Feasible flying point X for target rand And the distance value between the current flight starting point.
Further, the screening of candidate flying points and the calculation of the cost value based on the above step S230 may also be determined in the following manner.
(1) Screening candidate flight points:
four sections of sampling curves of the circular curve are obtained, and the four sections of sampling curves are divided by using an x axis and a y axis of a coordinate system established by the center of the circular curve;
determining the sampling priority of the four sections of sampling curves based on the distance from the point on the four sections of sampling curves to the flight end point; specifically, the distance between the middle point and the flight end point on the four sections of sampling curves can be calculated, the priority of the sampling curve where the sampling point with the smallest distance is located is recorded as 1, the sampling point on the sampling curve is preferentially selected, the priority of the sampling curve symmetrical to the sampling curve with the center of a circle is recorded as 3, and the priority of the other two sampling curves is recorded as 2.
Detecting whether each candidate flight point is intersected with a region determined by the position of the obstacle or not according to the sampling priority of the four sections of sampling curves; screening out target candidate flight points corresponding to paths intersecting the positions of the obstacles according to the detection result; and determining the target candidate flight point as a feasible flight point X _rand
Specifically, according to the sampling priority of the four sections of sampling curves, firstly detecting whether the candidate flight points on the sampling curves with the priority of 1 respectively intersect with the area determined by the position of the obstacle or not, when the candidate flight points on the sampling curves are deleted, detecting the candidate flight points on the two sections of sampling curves with the priority of 2, and if the candidate flight points on the two sections of sampling curves are deleted, detecting the candidate flight points on the sampling curves with the priority of 3.
(2) For cost value calculation:
determining a cost adjustment value based on the sampling priority and the flight step length of the four-section sampling curve;
wherein, the cost adjustment value may be expressed as:
in the method, in the process of the application,representing the priority of the sampling curve +.>Is the flight step length.
Thereafter, based on each feasible flying point X rand Distance value and cost adjusting value between the current flight starting point and the current flight starting point respectively, and corresponding feasible flight point X is determined rand The cost value of the path is formed with the current flight start point.
The cost value can be expressed as:wherein->To adjust the value->Is the distance value between any feasible flight point and the current flight starting point.
At this time, the preset path cost condition is satisfied to satisfy the condition that the cost value is minimum, namely, the candidate flight point (or "feasible flight point X") corresponding to the calculated minimum cost value is obtained rand ”)。
Furthermore, the above method adopts a path optimization method with a fixed flight step length in the path optimization process, and in some embodiments, a narrow gap is formed between different obstacles in the target flight area, so as to avoid collision with the obstacle, the flight can be performed through the narrow gap by continuously changing the flight step length.
Specifically, in step S230, the positions of the candidate flight points are screened based on the positions of the obstacle and the positions of the flight end points to obtain a plurality of feasible flight points X rand After the corresponding positions, space analysis can be performed according to the positions of the plurality of feasible flying points, and the flying angles formed by the continuously adjacent feasible flying points and the current flying start point in the plurality of feasible flying points are determined, as shown in fig. 5, M and N are obstacles, point A is the current flying start point, point B is the flying end point, and the flying angles formed by the continuously adjacent feasible flying points a, B and c are Q.
If the flight angle is not less than the preset angle threshold, the path optimization method of step S230-step S240 is performed.
If the flight angle is smaller than the preset angle threshold, it is determined that a narrow gap channel exists in the current flight area, at this time, the product of the sine value of the flight angle and the flight step obtained in step S210 may be determined as a new flight step, and step S220 is executed in a return manner. That is, the calculation formula of the new flight step can be expressed as:the method comprises the steps of carrying out a first treatment on the surface of the Wherein c is the duty ratio of the obstacle, step is the flight step length, and Q is the flight angle.
Or after the correspondence between different flight angles and different flight steps is stored in advance, the correspondence may be searched to obtain a target flight step corresponding to the flight angle, and the target flight step is determined to be a new flight step, and the execution step S220 is returned.
Alternatively, a determined step-size network model for determining a flight step size may be trained in advance, and the flight angle is input into the determined step-size network model, so as to obtain a target flight step size output by the determined step-size network model, and determine the target flight step size as a new flight step size, and return to executing step S220.
The step length network model is determined by carrying out iterative training on collected historical training data, the neural network model to be trained is obtained, and the historical training data can comprise training samples of different historical current flight starting points and different flight angles corresponding to the historical current flight starting points, and real flight step lengths which are used as sample labels and correspond to the different flight angles and can pass through in a flying mode.
Further, in order to improve the accuracy of the model, in the process of determining the step-size network model training, a particle swarm algorithm parameter optimization algorithm can be adopted to optimize parameters of the feature extraction network, and the current position and the current speed of each particle in the particle swarm are initialized; the current position comprises a plurality of weight submatrices and bias vectors;
calculating a current fitness value for each particle based on the current position of each particle;
for any weight submatrix, calculating a new current speed of each particle according to the current position, the historical optimal position and the configured global optimal position of each particle in the weight submatrix, acquiring the new current position of each particle according to the new current speed, and returning to the execution step: and calculating the current adaptive value of each particle based on the current position of each particle until a preset stopping condition is met, and determining the finally obtained current position as a weight matrix and a bias vector corresponding to the global optimal position.
Corresponding to the method, the embodiment of the application also provides an unmanned aerial vehicle path optimization device based on the RRT algorithm, as shown in fig. 6, which comprises the following steps:
a determining unit 610, configured to determine a flight step size of the unmanned aerial vehicle based on a total area ratio of each obstacle in a target flight area in the target flight area;
the sampling unit 620 is configured to sample a circular curve determined based on a current flight start point and the flight step length by using a preset area sampling algorithm, so as to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight start point;
an obtaining unit 630, configured to obtain a cost value of a path formed by each candidate flight point and the current flight start point, based on the position of the obstacle and the position of the flight end point;
the determining unit 610 is further configured to determine a new current flight start point based on the candidate flight points corresponding to the cost values that satisfy the preset path cost condition, and return to executing the step: and sampling a circular curve determined based on the current flight starting point and the flight step length by adopting a preset area sampling algorithm until a preset termination condition is met.
The functions of each functional unit of the unmanned aerial vehicle path optimization device based on the RRT algorithm provided by the embodiment of the present application may be implemented through the steps of the method, so the specific working process and the beneficial effects of each unit in the unmanned aerial vehicle path optimization device based on the RRT algorithm provided by the embodiment of the present application are not repeated herein.
The embodiment of the present application further provides an electronic device, as shown in fig. 7, including a processor 710, a communication interface 720, a memory 730, and a communication bus 740, where the processor 710, the communication interface 720, and the memory 730 complete communication with each other through the communication bus 740.
A memory 730 for storing a computer program;
processor 710, when executing the program stored on memory 730, performs the following steps:
determining the flight step length of the unmanned aerial vehicle based on the total area occupation ratio of each obstacle in the target flight area;
sampling a circular curve determined based on a current flight starting point and the flight step length by adopting a preset area sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point;
acquiring the cost value of each candidate flight point forming a path with the current flight starting point respectively based on the position of the obstacle and the position of the flight ending point;
based on the candidate flight points corresponding to the cost values meeting the preset path cost conditions, determining a new current flight starting point, and returning to the execution step: and sampling a circular curve determined based on the current flight starting point and the flight step length by adopting a preset area sampling algorithm until a preset termination condition is met.
The communication bus mentioned above may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
Since the implementation manner and the beneficial effects of the solution to the problem of each device of the electronic apparatus in the foregoing embodiment may be implemented by referring to each step in the embodiment shown in fig. 2, the specific working process and the beneficial effects of the electronic apparatus provided by the embodiment of the present application are not repeated herein.
In yet another embodiment of the present application, a computer readable storage medium is provided, where instructions are stored, which when executed on a computer, cause the computer to perform the unmanned aerial vehicle path optimization method based on the RRT algorithm according to any one of the above embodiments.
In yet another embodiment of the present application, a computer program product containing instructions that, when run on a computer, cause the computer to perform the RRT algorithm-based unmanned aerial vehicle path optimization method of any of the above embodiments is also provided.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present application without departing from the spirit or scope of the embodiments of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims and the equivalents thereof, it is intended that such modifications and variations be included in the embodiments of the present application.

Claims (6)

1. An unmanned aerial vehicle path optimization method based on an RRT algorithm is characterized by comprising the following steps:
determining the flight step length of the unmanned aerial vehicle based on the total area occupation ratio of each obstacle in the target flight area;
sampling a circular curve determined based on a current flight starting point and the flight step length by adopting a preset area sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point;
acquiring the cost value of each candidate flight point forming a path with the current flight starting point respectively based on the position of the obstacle and the position of the flight ending point;
based on the candidate flight points corresponding to the cost values meeting the preset path cost conditions, determining a new current flight starting point, and returning to the execution step: sampling a circular curve determined based on the current flight starting point and the flight step length by adopting a preset area sampling algorithm until a preset termination condition is met;
wherein determining a cost value for each candidate flight point to form a path with the current flight start point based on the position of the obstacle and the position of the flight end point, comprises:
screening the positions of the candidate flight points based on the positions of the obstacles and the positions of the flight end points to obtain a plurality of feasible flight points;
calculating the cost value of each feasible flying point forming a path with the current flying starting point by adopting a preset path cost algorithm;
based on the position of the obstacle and the position of the flight end point, screening each candidate flight point to obtain a plurality of feasible flight points, wherein the method comprises the following steps:
acquiring four sections of sampling curves of the circular curve, wherein the four sections of sampling curves are divided by using an x axis and a y axis of a coordinate system established by the circle center of the circular curve;
determining sampling priorities of the four sections of sampling curves based on distances from points on the four sections of sampling curves to the flight end point;
detecting whether paths between each candidate flight point and the flight end point respectively intersect with the area determined by the position of the obstacle according to the sampling priority of the four sections of sampling curves;
screening out target candidate flight points corresponding to paths which do not intersect with the position of the obstacle according to the detection result;
and determining the target candidate flight point as a feasible flight point.
2. The method of claim 1, wherein determining a flight step size of the drone based on a total area occupation ratio of each obstacle in a target flight zone in the target flight zone comprises:
acquiring a first number of randomly generated reference points in the target flight area;
determining a second number of reference points contained within the obstacle region based on the position of each obstacle in the obstacle region in the target flight region;
determining an obstacle duty cycle based on a ratio of the second number to the first number;
calculating the duty ratio of the obstacle by adopting a preset step algorithm to obtain the flight step length of the unmanned aerial vehicle;
the preset step algorithm is expressed as:
where c is the obstacle duty cycle and step is the flight step.
3. The method of claim 1, wherein sampling a circular curve determined based on a current flight start point and the flight step size using a preset area sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight start point, comprises:
taking the current flight starting point as a circle center and taking the flight step length as a radius to obtain a circular curve;
sampling points on the circular curve based on the position and the flight step length of the current flight starting point by adopting a preset sampling algorithm aiming at a preset direction to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point;
the preset direction is a positive direction or a negative direction of an x-axis of a coordinate system established by taking the current flight starting point as a circle center.
4. The method of claim 3, wherein sampling points on the circular curve based on the position of the current flight start point and the flight step size using a preset sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight start point, comprising:
adopting a preset abscissa sampling algorithm, and sampling the abscissa of the points on the circular curve based on the abscissa of the current flight starting point and the flight step length to obtain the abscissa of a preset number of sampling points corresponding to the current flight starting point;
and acquiring the ordinate of a preset number of sampling points corresponding to the current flight starting point based on the ordinate of the current flight starting point and the difference value between the abscissa of each sampling point and the abscissa of the current flight starting point by adopting a preset ordinate sampling algorithm.
5. The method of claim 1, wherein calculating a cost value for each feasible flying point to form a path with the current flying start point, respectively, using a preset path cost algorithm, comprises:
determining a cost adjustment value based on the sampling priority of the four sections of sampling curves and the flight step length;
and determining the cost value of a path formed by the corresponding feasible flight point and the current flight starting point based on the distance value between each feasible flight point and the current flight starting point and the cost adjustment value.
6. An unmanned aerial vehicle path optimizing device based on an RRT algorithm, the device comprising:
a determining unit, configured to determine a flight step length of the unmanned aerial vehicle based on a total area occupation ratio of each obstacle in a target flight area in the target flight area;
the sampling unit is used for sampling a circular curve determined based on a current flight starting point and the flight step length by adopting a preset area sampling algorithm to obtain a preset number of candidate flight points and corresponding positions corresponding to the current flight starting point;
an acquisition unit, configured to acquire a cost value of a path formed by each candidate flight point and the current flight start point, based on the position of the obstacle and the position of the flight end point;
the determining unit is further configured to determine a new current flight start point based on the candidate flight points corresponding to the cost values that meet the preset path cost condition, and return to the executing step: sampling a circular curve determined based on the current flight starting point and the flight step length by adopting a preset area sampling algorithm until a preset termination condition is met;
the acquisition unit is specifically configured to:
acquiring four sections of sampling curves of the circular curve, wherein the four sections of sampling curves are divided by using an x axis and a y axis of a coordinate system established by the circle center of the circular curve;
determining sampling priorities of the four sections of sampling curves based on distances from points on the four sections of sampling curves to the flight end point;
detecting whether paths between each candidate flight point and the flight end point respectively intersect with the area determined by the position of the obstacle according to the sampling priority of the four sections of sampling curves;
screening out target candidate flight points corresponding to paths which do not intersect with the position of the obstacle according to the detection result;
determining the target candidate flight point as a feasible flight point;
and calculating the cost value of the path formed by each feasible flying point and the current flying starting point respectively by adopting a preset path cost algorithm.
CN202311075418.4A 2023-08-25 2023-08-25 Unmanned aerial vehicle path optimization method and device based on RRT algorithm Active CN116820136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311075418.4A CN116820136B (en) 2023-08-25 2023-08-25 Unmanned aerial vehicle path optimization method and device based on RRT algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311075418.4A CN116820136B (en) 2023-08-25 2023-08-25 Unmanned aerial vehicle path optimization method and device based on RRT algorithm

Publications (2)

Publication Number Publication Date
CN116820136A CN116820136A (en) 2023-09-29
CN116820136B true CN116820136B (en) 2023-12-05

Family

ID=88120531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311075418.4A Active CN116820136B (en) 2023-08-25 2023-08-25 Unmanned aerial vehicle path optimization method and device based on RRT algorithm

Country Status (1)

Country Link
CN (1) CN116820136B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108681787A (en) * 2018-04-28 2018-10-19 南京航空航天大学 Based on the unmanned plane method for optimizing route for improving the two-way random tree algorithm of Quick Extended
CN108983780A (en) * 2018-07-24 2018-12-11 武汉理工大学 One kind is based on improvement RRT*The method for planning path for mobile robot of algorithm
CN109948834A (en) * 2019-02-11 2019-06-28 中国科学院地理科学与资源研究所 The public Track Design method in unmanned plane low latitude
CN110926477A (en) * 2019-12-17 2020-03-27 湘潭大学 Unmanned aerial vehicle route planning and obstacle avoidance method
WO2021013110A1 (en) * 2019-07-19 2021-01-28 深圳市道通智能航空技术有限公司 Target tracking-based unmanned aerial vehicle obstacle avoidance method and apparatus, and unmanned aerial vehicle
CN114879666A (en) * 2022-04-22 2022-08-09 华中科技大学 RRT algorithm-based water surface unmanned ship path planning method and device
CN115248592A (en) * 2022-01-10 2022-10-28 齐齐哈尔大学 Multi-robot autonomous exploration method and system based on improved rapid exploration random tree
CN116627162A (en) * 2023-04-03 2023-08-22 大连理工大学 Multi-agent reinforcement learning-based multi-unmanned aerial vehicle data acquisition position optimization method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108681787A (en) * 2018-04-28 2018-10-19 南京航空航天大学 Based on the unmanned plane method for optimizing route for improving the two-way random tree algorithm of Quick Extended
CN108983780A (en) * 2018-07-24 2018-12-11 武汉理工大学 One kind is based on improvement RRT*The method for planning path for mobile robot of algorithm
CN109948834A (en) * 2019-02-11 2019-06-28 中国科学院地理科学与资源研究所 The public Track Design method in unmanned plane low latitude
WO2021013110A1 (en) * 2019-07-19 2021-01-28 深圳市道通智能航空技术有限公司 Target tracking-based unmanned aerial vehicle obstacle avoidance method and apparatus, and unmanned aerial vehicle
CN110926477A (en) * 2019-12-17 2020-03-27 湘潭大学 Unmanned aerial vehicle route planning and obstacle avoidance method
CN115248592A (en) * 2022-01-10 2022-10-28 齐齐哈尔大学 Multi-robot autonomous exploration method and system based on improved rapid exploration random tree
CN114879666A (en) * 2022-04-22 2022-08-09 华中科技大学 RRT algorithm-based water surface unmanned ship path planning method and device
CN116627162A (en) * 2023-04-03 2023-08-22 大连理工大学 Multi-agent reinforcement learning-based multi-unmanned aerial vehicle data acquisition position optimization method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于一种改进A*算法的移动机器人路径规划;孙炜 等;《湖南大学学报》;全文 *
基于改进 RRT算法的路径规划研究;王北辰;《CNKI》;全文 *
基于蚁群算法的水下潜器全局路径规划技术研究;刘利强 等;《系统仿真学报》;全文 *

Also Published As

Publication number Publication date
CN116820136A (en) 2023-09-29

Similar Documents

Publication Publication Date Title
CN109540142B (en) Robot positioning navigation method and device, and computing equipment
WO2020173044A1 (en) Route planning method and device for unmanned aerial vehicle, storage medium and computer apparatus
CN111680747B (en) Method and apparatus for closed loop detection of occupancy grid subgraphs
WO2023103692A1 (en) Decision planning method for autonomous driving, electronic device, and computer storage medium
CN109341698B (en) Path selection method and device for mobile robot
CN111982127A (en) Lightweight-3D obstacle avoidance method
CN114913386A (en) Training method of multi-target tracking model and multi-target tracking method
CN114705196B (en) Self-adaptive heuristic global path planning method and system for robot
CN111562786A (en) Multi-stage optimized unmanned ship path planning method and device
CN114764249A (en) Real-time obstacle avoidance path planning method, system, device and medium
CN103383451A (en) Method for optimizing radar weak target detection based on constant side length gradient weighting graph cut
CN114593743A (en) Path planning method and device based on improved bidirectional RRT algorithm
CN115512175A (en) Model training method, point cloud data processing device, point cloud data processing equipment and storage medium
CN113139696B (en) Trajectory prediction model construction method and trajectory prediction method and device
CN112000126A (en) Whale algorithm-based multi-unmanned-aerial-vehicle collaborative searching multi-dynamic-target method
CN115560771A (en) Sampling-based path planning method and device and automatic driving equipment
CN116182859A (en) Path planning method and device, equipment and storage medium
CN114137562A (en) Multi-target tracking method based on improved global nearest neighbor
CN116820136B (en) Unmanned aerial vehicle path optimization method and device based on RRT algorithm
CN112925313A (en) Avoidance processing method and device for robot, electronic device and medium
CN112197783A (en) Two-stage multi-sampling RRT path planning method considering locomotive direction
WO2023242223A1 (en) Motion prediction for mobile agents
US20240202393A1 (en) Motion planning
CN112595333B (en) Road navigation data processing method and device, electronic equipment and storage medium
CN113849400A (en) Test scene library generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant