Track generation method for elastic target tracking with visibility ensured by unmanned aerial vehicle
Technical Field
The invention relates to the technical field of unmanned aerial vehicle navigation, in particular to a track generation method for tracking an elastic target of an unmanned aerial vehicle for ensuring visibility.
Background
The unmanned aerial vehicle comprises a multi-rotor unmanned aerial vehicle, a fixed-wing unmanned aerial vehicle and a mixed-wing unmanned aerial vehicle, and when tracking task navigation is carried out, at least the following three points are required to be ensured to be met; b. physical limitation on the power of the machine body itself; c. maintains a proper observation distance with the target and avoids being blocked by an obstacle.
To ensure flight safety of the unmanned aerial vehicle, obstacle maps of surrounding environments, no-fly zone information, and other existing airlines of the unmanned aerial vehicle are generally generated in an offline or online updated manner to provide collision information generated by subsequent unmanned aerial vehicle tracks, such as a three-dimensional occupancy grid map, a Euclidean distance map, or a point cloud map. In order to ensure that the navigation track meets the physical flight limitation of the unmanned aerial vehicle, the complex dynamics limitation of the body itself should be met by the track, such as the limitation of the maximum rolling speed, the motor thrust or the maximum inclination angle and other actual physical quantities required by tracking the track. Finally, the need for continuous tracking is often achieved by climbing and at different heights at the target, which is however difficult to achieve in complex environments such as indoors, especially in obstructed environments.
For autonomous tracking of moving objects by unmanned aerial vehicles, it has been a challenge for MBZ international robots (Mohamed Bin Zayed International Robotics Challenge) in recent years, and one of the topics for this game in 2017 was the positioning, tracking and landing of unmanned aerial vehicles on low-speed mobile platforms with a given pattern drawn, as shown in fig. 1. The method does not involve searching and identifying targets, has GPS assistance and is open in environment, and the positioning, planning and control performances of the unmanned aerial vehicle are mainly examined. The match champion scheme uses RTK (differential GPS) to integrate a visual inertial odometer to estimate the pose of the unmanned aerial vehicle, uses a laser radar to perform collision detection with a moving target, positions a marker under a fish-eye lens by utilizing quadrilateral detection, directly obtains a 3D position according to the scale information of the known marker, and finally uses nonlinear MPC to perform tracking control. However, the game requires a specific template for the target, the target moves slowly, and the environment is simpler; at the same time, the method also relies on satellite navigation.
In recent years, unmanned aerial vehicles are widely applied to auxiliary photography, and the tracking technology of the unmanned aerial vehicle has corresponding new achievements. Nageli et al propose a real-time roll-optimized planner while optimizing the trajectory of the robot and the control of the head, as shown in fig. 2, and similarly Penin et al construct a Nonlinear Model Predictive Control (NMPC) and solve with Sequential Quadratic Programming (SQP). However, these approaches are too strong for the assumption that the dynamic object is an ellipsoid, and also fail to address static obstacles that are structured in the environment.
Jeon proposes a graph search based front-end path generator and a safe flight corridor based trajectory optimizer, as shown in fig. 3. The former generates a series of suitable observation points by sample searching, which are followed by a subsequent optimizer that smoothes the trajectory. However, this approach consumes significant computational effort during the sampling phase, while it also assumes that the global map is known and is also unsuitable for tracking of unknown environments.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a track generation method for tracking an elastic target, which ensures visibility of an unmanned aerial vehicle.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
1. the track generation method for the elastic target tracking of the unmanned aerial vehicle for ensuring the visibility is characterized by comprising the following steps of:
1. front-end path search and optimization preprocessing
Based on historically observed dynamic target states, predictions are made for the trajectory z k for the target over a future T p time:
Wherein, For the number of predicted future positions of the tracked object,For a time corresponding to each location of the target in the future;
Meanwhile, considering the conditions of distance maintenance and shielding, defining a non-shielding observation area phi k for each target predicted position z k;
to obtain a suitable topology to aid in subsequent trajectory optimization, a path needs to be found that passes sequentially through the ending region Φ 1,Φ2,...;Φk set as kth a, and the cost function and heuristic function are respectively as follows:
fk(n)=gk(n)+hk(n)
wherein, a is a general graph search method, where f represents minimum cost estimation, g represents cost function, and h represents heuristic function; And The horizontal and vertical components of the distance between the extended node n and the target predicted position point z k; d d is the desired distance of the drone from the target; in addition to nodes that hit obstacles, nodes that are at a suitable distance but are occluded are also considered non-expandable nodes; the stopping condition of the single step path search is n epsilon phi k, and each termination point s k is set as the starting point of the next step search until the last step is completed;
After a path is obtained that ensures safety and visibility, a safety flight corridor can be created along the path:
Wherein, For the number of convex polyhedrons contained in the flight corridor,Representing the analytical expression of the ith convex polyhedron, A i、bi is the intersection of one side space of each face of the convex polyhedron represented by a linear inequality;
For each target predicted position z k and one visual point s k as seeds, a sector-shaped visual area is designed:
where ζ k represents the angular bisector vector of the sector;
2. Back end trajectory optimization
Recording the total length T of the desired trajectory, letting the time gap T be equal to or greater than Tp and setting the target to be a trade-off between minimizing total length and minimizing energy, then flexible tracking of the target can be attributed to the following optimization problem:
T≥Tp
Wherein, Is the objective function of the optimization problem, p [s-1] represents the 0,1,..s-1 derivative of p; p (1) represents the first derivative of p; p (t) is the future trajectory of the unmanned aerial vehicle,AndAnd is not in a start-end state, ρ is an artificially adjustable energy and time optimized weight coefficient, v m and a m are respectively the maximum speed and maximum acceleration constraints of the unmanned aerial vehicle,D l,du is the distance range expected to be kept between the unmanned aerial vehicle and the target, and T p is the expected track duration;
Then the gradient AndThe method can be as follows:
c i,Ti represents the i-th element of the vector c, T, respectively; beta (s) (t) represents the s-derivative of beta (t).
Further, in the trajectory optimization at the back end, MINCO trajectory classes of s=3 are used, and the number of trajectory segments m=2m P is set to provide a sufficient degree of freedom.
Further, in the back-end trajectory optimization, the calculation of several other constraints of the optimization problem is as follows:
1. penalty function method for relative time integral
For the dynamics constraint and obstacle avoidance constraint, a threshold penalty function may be set as follows:
the constraint of continuous time can be converted into integral penalty, and then the following sampling penalty function is used for constructing the objective function and gradient of soft constraint:
★={h,v,a}
Wherein, The integral coefficient is calculated according to a trapezoidal formula, kappa i is the discrete integral number of each track section, and χ is a weight vector;
2. Absolute time construction objective function method
Since the motion prediction of the target is a series of discrete exact points in time in the futureAssuming t k is at the j-th segment of the trajectory, i.e.:
the gradients for c and T can be calculated as follows:
I.e., the derivative of p (t k), i.e., the derivative of p at t k;
however, the duration of each track segment is to be optimized, and which segment each time point belongs to varies with the optimization of time; this can lead to discontinuities in the target gradient, making optimization fail; fortunately, although the gradient pair c and T are discontinuous, after a MINCO transformation, the gradient pair q and T are continuous;
For distance keeping constraint, namely constraint of keeping safe distance while keeping track with a target, as the unmanned aerial vehicle lacks the degree of freedom of an independent pitch angle, different forms of objective functions are set for vertical delta v and horizontal delta h direction components of the distance, and for the former, tolerance of the distance in the vertical direction is set And for the latter, a penalty function of C 2 is set:
where d l,du is the upper and lower limits of the desired tracking distance, respectively, and ε is a very small constant; then this objective function can be written as:
Wherein the method comprises the steps of AndThe vertical and horizontal distances of p (t k) and z k, respectively;
For the constraint of shielding, given an adjustable angle tolerance value theta ∈, the following cost function is designed:
3. time constraint cancellation
Time relaxation constraint, i.e.
It can be replaced by a differential homoembryo transformation with a new variable τ= (τ 1,τ2,...,τM) which is transformed as follows:
in this way, the time constraint is eliminated.
The invention has the beneficial effects that: according to the invention, the path search algorithm of safety and shielding is considered at the same time, and the shielding cost function can be analytically measured without constructing a Euclidean distance function (ESDF). In addition, a unique distance-keeping cost function structure is designed for tracking problems in the invention. Experiments prove that compared with the prior art, the method has great improvement in quality and efficiency.
Drawings
FIG. 1 is a schematic diagram of a prior art MBZIRC moving object tracking given a target template;
FIG. 2 is a schematic diagram of a prior art scroll-based optimization planner implementation;
FIG. 3 is a schematic diagram of a prior art implementation of a method for generating observation points at the front end and trailing end waypoint tracking and smoothing;
FIG. 4 is a schematic representation of an implementation of a prior art method of creating a safe flight corridor from a given path;
FIG. 5 is an exemplary diagram of defining an unobstructed observation area Φ k for each target prediction position z k in embodiment 1 of the present invention;
FIG. 6 is a schematic view of a sector-shaped viewing area in embodiment 1 of the present invention;
FIG. 7 is a graph showing the penalty function of C 2 in example 1 of the present invention;
FIG. 8 is a schematic diagram of the implementation of verification in a complex simulation environment in embodiment 2 of the present invention;
fig. 9 is a schematic diagram showing the distribution of tracked objects in the FOV of the unmanned aerial vehicle according to three different embodiments of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings, and it should be noted that, while the present embodiment provides a detailed implementation and a specific operation process on the premise of the present technical solution, the protection scope of the present invention is not limited to the present embodiment.
Example 1
The implementation of the method of the present embodiment is based on two techniques:
1. Safety flight corridor
The trajectory planning of the unmanned aerial vehicle requires that the front end provide an abstract map representation, and the safety flight corridor is one of the very representative representation modes. The flight corridor is a safe area consisting of a series of convex polyhedrons connected end to end for providing safety constraints for back-end trajectory optimization.
In this embodiment, a method [8] for generating a safe flight corridor from a given path is adopted, as shown in fig. 4, and a safe path (p 0→p1→p2→p3.) composed of several segments is given, and the algorithm uses the directivity of the path to generate an ellipsoid (fig. 4 (a)) containing no obstacle, and then generates a final safe flight corridor (fig. 4 (b)) through the continuous expansion of the ellipsoid.
2. MINCO track classes
The motion track of the robot has various characterization modes, and MINCO track class [9] adopted in the embodiment is a polynomial track class and s-order MINCO for minimizing the control output quantity:
where p (t) is a trajectory expressed in M dimensions with M-th segment n=2s—1 order polynomial, and the i-th segment trajectory is expressed as:
Is a coefficient matrix of the i-th segment polynomial, β (T) = (1, t..t.), T N)T is a natural basis time vector t= (T 1,T2,...,TM)T,Ti is the duration of the i-th segment trajectory.
All MINCO track classes are parameterized with only q and T. Where q= (q 1,q2,...,qM-1),qi is the waypoint through which the track passes. Evaluating an entire track with q and T can be done by a transformation of linear complexity as follows:
This allows any one of the second order continuous objective functions And the gradient obtained therefrom can be applied to the MINCO locus expressed in terms of q and T. More precisely, the objective function may be calculated as follows:
The above transformation then provides a method of linear complexity from AndTo calculateAndAn outer optimizer may then efficiently optimize the objective function.
Based on the above technology, the embodiment provides a track generation method for ensuring visibility of an elastic target by an unmanned aerial vehicle, which is mainly divided into a front end part and a rear end part:
1. front-end path search and optimization preprocessing
Based on historically observed dynamic target states, predictions are made for the trajectory z k for the target over a future T p time:
Wherein, For the number of predicted future positions of the tracked object,For the moment corresponding to each future location of the target.
While considering distance preservation and occlusion, this embodiment defines an unobstructed observation area Φ k for each target predicted position z k, as shown in FIG. 5.
To obtain a suitable topology to aid in subsequent trajectory optimization, a path needs to be found that passes through Φ 1,Φ2 in sequence. Considering efficiency issues, using a greedy strategy, the problem is broken down into multiple smaller multi-objective path search problems. Φ k is set as the end-point region of the kth a, and the cost function and heuristic function are shown below, respectively:
fk(n)=gk(n)+hk(n)
wherein, a is a general graph search method, where f represents minimum cost estimation, g represents cost function, and h represents heuristic function; And The horizontal and vertical components of the distance of the extended node n from the target predicted location point z k, respectively. d d is the desired distance between the drone and the target. In addition to nodes that hit obstacles, nodes that are at a suitable distance but are occluded are also considered non-expandable nodes. The stop condition for the single step path search is n ε Φ k, and each termination point s k is set as the start of the next step search until the last step is completed.
After a path is obtained that ensures safety and visibility, a safety flight corridor can be created along the path:
Wherein, For the number of convex polyhedrons contained in the flight corridor,Representing an analytical expression of the ith convex polyhedron, a i、bi is the intersection of one side space of each face of the convex polyhedron represented by a linear inequality.
For each target predicted position z k and one visual point s k as seeds, the present embodiment designs a sector-shaped visual area:
Where ζ k represents the angular bisector vector of the sector, θ k is half the sector angle size, as shown in fig. 6.
2. Back end trajectory optimization
The total duration T of the desired trajectory in this embodiment should be equal to T p, however, the attainment of the final state by the drone in a fixed time may in some cases result in the dynamic constraints not being met, for example when the target moves faster than the chaser. Thus, the time gap T+.gtp is made and the goal is set to a trade-off that minimizes the total time length and minimizes the energy. Subsequently, flexible tracking of targets can be attributed to the following optimization problem:
T≥Tp
Wherein, Is the objective function of the optimization problem, p [s-1] represents the 0,1,..s—1 derivative of p. p (1) represents the first derivative of p. p (t) is the future trajectory of the unmanned aerial vehicle,AndAnd is not in the start and end states, p is an artificially adjustable energy and time optimized weight coefficient, v m and a m are respectively the maximum speed and maximum acceleration constraints of the unmanned aerial vehicle,D l,du is the range of distances the drone is expected to maintain from the target, and T p is the expected trajectory duration, which is an abstract representation of the safe area.
The present embodiment uses MINCO track classes of s=3, and sets the track segment number m=2m P to provide a sufficient degree of freedom. Then the gradientAndThe method can be as follows:
c i,Ti represents the i-th element of the vector c, T, respectively; beta (3) (t) represents the 3 rd derivative of beta (t).
The other several constraints of the optimization problem described above are calculated as follows:
1. penalty function method for relative time integral
For the dynamics constraint and obstacle avoidance constraint, a threshold penalty function may be set as follows:
the constraint of continuous time can be converted into integral penalty, and then the following sampling penalty function is used for constructing the objective function and gradient of soft constraint:
★={h,v,a}
Wherein, The integral coefficient is calculated according to a trapezoidal formula, kappa i is the discrete integral number of each track section, and χ is a weight vector.
2. Absolute time construction objective function method
Since the motion prediction of the target is a series of discrete exact points in time in the futureAssuming t k is at the j-th segment of the trajectory, i.e.:
the gradients for c and T can be calculated as follows:
I.e. the derivative of p (t k), i.e. the derivative of p at t k.
However, the duration of each segment of the trajectory is to be optimized, and which segment each time point belongs to varies with optimization over time. This can lead to discontinuities in the target gradient, which can fail optimization. Fortunately, although the gradient pair c and T are discontinuous, the gradient pair q and T are continuous after a MINCO transformation.
For distance maintenance constraints, i.e. constraints that keep track of objects while keeping a safe distance, different forms of objective functions are set for the vertical (δ v) and horizontal (δ h) direction components of distance due to the lack of freedom of the unmanned aerial vehicle to stand alone pitch angles. As for the former, the embodiment sets a tolerance of a distance in the vertical directionAnd for the latter, a penalty function of C 2 is designed:
The shape of which is shown in fig. 7. Where d l,du is the upper and lower limits of the desired tracking distance, respectively, and ε is a small constant.
Then this objective function can be written as:
Wherein the method comprises the steps of AndThe vertical and horizontal distances of p (t k) and z k, respectively.
For the constraint of shielding, given an adjustable angle tolerance value theta ∈, the following cost function is designed:
3. time constraint cancellation
Time relaxation constraint, i.e.
It can be replaced by a differential homoembryo transformation with a new variable τ= (τ 1,τ2,...,τM) which is transformed as follows:
in this way, the time constraint is eliminated.
Example 2
This example demonstrates the method of example 1 in a complex simulation environment and compares the efficiency and quality with the currently prevailing schemes.
FIG. 8 (a) illustrates the path of a tracked object in a complex simulation environment; FIG. 8 (b) shows the velocity projection of a target in an unmanned view image; FIG. 8 (c) shows failure rates for three schemes (Han, wang, example 1 method).
Under three different schemes, the distribution contrast of the tracked object in the unmanned aerial vehicle FOV is shown in fig. 9 (a), (b), and (c), respectively.
The time spent by each calculation task under the three different schemes is shown in table 1.
TABLE 1
It can be seen that the example 1 method exceeds the current mainstream technology in both efficiency and quality. Wherein t path,tcorridor,tESDF,toptimize,ttotal represents the path search, the establishment of a flight corridor, the establishment of a euclidean distance function, the trajectory optimization and the total time, respectively.
Various modifications and variations of the present invention will be apparent to those skilled in the art in light of the foregoing teachings and are intended to be included within the scope of the following claims.