Method for tracking unmanned vehicle by unmanned aerial vehicle based on vision

Through visual detection and deep learning prediction combined with path optimization algorithms, safe and smooth UAV trajectories are generated, which solves the safety, visibility and smoothness problems in UAV tracking and unmanned vehicle technology, and improves the reliability of tracking. and real-time.

CN118736449AActive Publication Date: 2024-10-01ROBOTICS RESEARCH CENTER OF YUYAO CITY +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410883410.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-10-01
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

Existing drone tracking unmanned vehicle technology has challenges in terms of safety, visibility and smoothness. In particular, targets are easily lost in extreme situations, and the reliability of existing solutions is poor.

Method used

Using a vision-based method, the monocular camera and yolov8 target detection algorithm or AprilTag are used for real-time target detection and positioning, combined with the deep learning Transformer model to predict motion trajectories, and the informed RRT* algorithm and piecewise Bezier curve are used to generate smooth and safe trajectory.

Benefits of technology

It enables the UAV to avoid obstacles during tracking, keep the target unmanned vehicle within the visible range, ensure the safety and smoothness of the trajectory, improve the reliability and real-time performance of tracking, and adapt to various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736449A_ABST
    Figure CN118736449A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of unmanned aerial vehicles, and discloses a method for tracking an unmanned vehicle by an unmanned aerial vehicle based on vision, and the method comprises the steps: firstly, enabling the unmanned aerial vehicle to accurately determine the position of the unmanned vehicle in real time through employing a YOLOV8 target detection technology or an Apriltag technology; and then, on the basis of a deep learning transformer architecture, a future motion track of the unmanned vehicle can be predicted according to past motion data. Prediction information is input into a front-end path search module, and an informed RRT * algorithm is applied, so that an effective tracking path is quickly generated in a complex environment. Then, a series of flight corridors are obtained through expansion on the front-end path points; and finally, the unmanned aerial vehicle performs trajectory optimization on the path by using a segmented Bezier curve, and generates a safe and dynamically feasible path in a series of flight corridors. The method provided by the invention meets the requirements of the unmanned aerial vehicle for efficient, accurate and safe tracking of the unmanned vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of unmanned aerial vehicles, and in particular relates to a method for unmanned aerial vehicle tracking based on vision. Background Art

[0002] In the past decade, drone technology has developed rapidly and has played a role in many fields, such as logistics and transportation, environmental monitoring, agricultural spraying, etc. With the continuous improvement of the computing power and sensors of drone onboard computers, the ability of drones in target tracking has also been greatly improved. Drone tracking technology involves many aspects of technology, including target detection technology, trajectory prediction technology, autonomous navigation technology, motion control technology, etc. Drone tracking of unmanned vehicles is a challenging problem. Generally speaking, there are three main technical challenges: First, safety. When tracking unmanned vehicles, drones should avoid collisions with surrounding obstacles and targets. Second, visibility. Drones should keep unmanned vehicles within visible range to avoid being blocked by obstacles. Third, smoothness. The trajectory should be kept smooth to avoid motion blur of the observed unmanned vehicles.

[0003] At present, the traditional method of tracking unmanned vehicles by drones is not only difficult to ensure the safety and stability of the trajectory, but also in the face of some extreme situations, such as when the unmanned vehicle suddenly turns or accelerates or decelerates, the target is very easy to lose, making the reliability of the existing solution poor. There is still a large gap in the existing reliable solution of drone tracking unmanned vehicles. Summary of the invention

[0004] The purpose of the present invention is to provide a method for tracking an unmanned vehicle by a drone based on vision to solve the above-mentioned technical problems.

[0005] In order to solve the above technical problems, the specific technical solution of the method for tracking unmanned vehicles by unmanned aerial vehicles based on vision of the present invention is as follows:

[0006] A method for tracking an unmanned vehicle by a drone based on vision comprises the following steps:

[0007] Step 1: The drone is equipped with a monocular camera, and uses the yolov8 target detection algorithm or AprilTag based on vision to detect the target unmanned vehicle in real time and locate it;

[0008] Step 2: Predict the trajectory of the target unmanned vehicle. After the unmanned vehicle is successfully identified and located, use the trained deep learning Transformer model to predict the trajectory of the unmanned vehicle based on its historical trajectory.

[0009] Step 3: Global path search: Based on the current position of the target unmanned vehicle and the predicted future motion trajectory, an exploratory random tree is established using the informed RRT* algorithm to effectively search for paths and find a path from the current position of the drone to the tracking target.

[0010] Step 4: Trajectory optimization. For the path generated in step 3, incremental expansion is performed at each discrete path point to construct a series of flight corridors. Then, a smooth, safe, and dynamically feasible path is generated within the flight corridor using piecewise Bezier curves.

[0011] Furthermore, the step 1 uses the lightest yolov8n in yolov8 as the algorithm model. The yolov8 algorithm includes the following specific steps:

[0012] After using yolov8 to obtain the detection frame of the unmanned vehicle, the width of the target detection frame is w, and the length is d. The coordinates of the two diagonal points of the target detection frame are [x1, y1], [x2, y2].

[0013] w=y2-y1

[0014]

[0015] Combine the camera internal parameters to obtain the position of the center of mass of the unmanned vehicle:

[0016]

[0017] f x ,f y ,c x ,c y They represent the focal length of the camera's x-axis, the focal length of the y-axis, the horizontal coordinate of the camera's principal point, and the vertical coordinate of the camera's principal point, respectively.

[0018] Furthermore, the algorithm steps of using AprilTag to detect the target unmanned vehicle in real time and locate it are as follows: adaptive threshold segmentation; find contours and use Union-find to find connected domains; perform straight line fitting on the contours and find candidate convex quadrilaterals; decode the quadrilaterals, identify the tag coordinate transformation, and convert to the world coordinate system;

[0019] When a tag appears in the scene, first calculate the gradient image of the scene image; then extract the straight lines in the scene and detect the square corners; then get the square area and key corners, and homomorphically map the square area to a square; match the mapped square with the Tags library to determine whether it is a tag; then, based on the imaging principle of the camera, the three-dimensional coordinates in the camera coordinate system are calculated according to the camera focal length and the size of the tag to determine the position of the tags.

[0020] Furthermore, the structure of the Transformer in step 2 includes an encoder and a decoder, wherein the encoder includes multiple multi-head attention modules and a fully connected layer network, and the decoder includes a multi-head attention module and a feedforward neural network. Residual connections are used between modules and normalization is performed. The loss function used for model training is the smooth-L1 loss function:

[0021]

[0022] Where y i is the true value, f(x i ) is the predicted value, n is the number of predicted positions, and the unmanned vehicle will p N predicted positions corresponding to the time It is expressed as:

[0023]

[0024] Furthermore, the step 3 uses a greedy method to decouple it into a multi-objective path search problem. n Define a non-occluded region Φ x , Φ n is set as the destination of the nth path search problem. Further, the informed RRT* algorithm process described in step 3 is as follows:

[0025] Step 3.1 Initialize the random tree: select an initial node in the state space as the root node of the tree; Step 3.2 Set the elliptical sampling area, the focus of the area is the start and end point, and the major axis a is equal to half the length of the initial path, that is:

[0026] a=c_best / 2

[0027] Where c_best is the initial path length, and the minor axis b and focal length c are calculated based on the properties of the ellipse:

[0028] a 2 =b 2 +c 2

[0029] Step 3.3 Ellipse sampling: Sampling is performed within the set ellipse sampling area to obtain a random point x_rand;

[0030] Step 3.4 Find the nearest neighbor node: Find the node x_near that is closest to x_rand in the tree:

[0031] x near =argmin(dist(x rand , x))

[0032] dist uses Euclidean distance;

[0033] Step 3.5 Expand the tree: Starting from x_near and ending at x_rand, generate a new node sequence along the path from x_near to x_rand. In the process of adding new nodes, calculate the cost of each node and update the parent node and cost of the node.

[0034] Step 3.6 Find a feasible path: If a new node x_new is added to the tree T, check whether the path from the starting point to x_new is feasible. If it is feasible, check whether a path from the starting point to the target point is found. If a feasible path is found, the algorithm may enter the optimization stage or end; Step 3.7 Optimize the path: Optimize the tree T to reduce the cost of the path by reconnecting nodes and pruning useless branches. If a shorter path is found in subsequent iterations, update the value of c_best and recalculate the size and shape of the elliptical sampling area;

[0035] Step 3.8 Repeat: Repeat steps 3.2 to 3.7 until a feasible path is found or the specified number of iterations is reached;

[0036] If a feasible path is found, start from the end point and trace back to the starting point along the tree structure to get the path, otherwise the output is that a feasible path cannot be found.

[0037] Furthermore, in step 4, according to a series of discrete position points sampled in step 3, a small polygon is generated for each discrete point along the speed direction, and then expanded along the surroundings to obtain a collision-free convex polygon flight corridor.

[0038] The entire trajectory is represented by a piecewise Bezier curve:

[0039]

[0040] Where σ is the dimension of the Bezier curve, represents the i-th control point of the j-th segment, t0, t1, ..., t n are the timestamps of the start and end points,

[0041] A scaling factor α is introduced for each segment according to its duration j ;

[0042] A quintic piecewise Bezier curve (m=5) is used as the trajectory parameterization. The k-order derivative of the Bezier curve passes through the control point It is expressed as:

[0043]

[0044] Formulate your tracking problem as follows:

[0045]

[0046] The first line is the optimization objective function, which is expressed as minimizing the acceleration loss and minimizing the time. ρ is an adjustable time weight parameter. The first constraint represents the initial position and terminal position constraints of the trajectory. The second constraint represents the maximum speed and acceleration constraints. The third constraint is the flight corridor constraint, which ensures that the generated trajectory can avoid obstacles. The fourth constraint is the visible area constraint. There is a visible area for each target prediction point to ensure that the tracking drone can detect the target unmanned vehicle in real time. The fifth constraint is the distance constraint between the drone and the target unmanned vehicle. There should be a certain distance from the target unmanned vehicle in both the horizontal and vertical directions. The sixth constraint is that the duration of the output trajectory is greater than or equal to the duration of the target predicted trajectory. The constraints are softened and added to the objective function. The gradient is solved using L-BFGS. The L-BFGS algorithm uses the curvature information of the previous m iterations to approximate the update of the Hessian matrix or its inverse matrix:

[0047] The change s of the independent variable x twice:

[0048] s i =x i+1 -x i

[0049] The gradient change y between two iterations is:

[0050]

[0051] L-BFGS update formula:

[0052]

[0053] Where H k+1 is the Hessian matrix of the k+1th iteration or its approximation of the inverse matrix, V i For i and i The matrix is ​​used to update the approximate Hessian matrix or its inverse matrix. is the initial Hessian matrix or its inverse matrix approximation, usually taken as the unit matrix or diagonal matrix, ρ k is a positive number used to adjust the accuracy of the approximation, and its value is usually S k For k-m , ..., s k-1 The matrix formed.

[0054] The vision-based method of tracking an unmanned vehicle by a drone of the present invention has the following advantages:

[0055] (1) The method used in the present invention allows the drone to achieve obstacle avoidance while maintaining a certain distance from the target unmanned vehicle during tracking of the unmanned vehicle, thereby ensuring the safety of the tracking process.

[0056] (2) The method used in the present invention is highly flexible. The UAV will update the motion trajectory in a timely manner according to the trajectory trend of the target unmanned vehicle to ensure that the target unmanned vehicle does not leave the detection range of the UAV.

[0057] (3) The method used in the present invention is highly efficient. After detecting the position of the vehicle, a large amount of point cloud data is not processed, but the vehicle is regarded as a particle to predict and generate a trajectory. At the same time, a fast path search algorithm and trajectory optimization algorithm are used, with fast calculation speed, ensuring the real-time generation of the UAV trajectory.

[0058] (4) The method used in the present invention is applicable to a wide range of scenarios. Whether in an open scene or in a complex scene with many obstacles, the drone can effectively track the unmanned vehicle in real time. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is the overall flow chart of drone tracking unmanned vehicle.

[0060] Figure 2 It is the Yolov8 network diagram.

[0061] Figure 3 This is a plan comparison chart.

[0062] Figure 4 It is the Transformer structure diagram.

[0063] Figure 5 It is a flow chart of UAV motion planning.

[0064] Figure 6 This is a schematic diagram of the Informed RRT* algorithm.

[0065] Figure 7 It is a schematic diagram of Example 1.

[0066] Figure 8 This is a schematic diagram of Example 2. DETAILED DESCRIPTION

[0067] In order to better understand the purpose, structure and function of the present invention, the following is a further detailed description of a vision-based drone tracking unmanned vehicle method of the present invention in conjunction with the accompanying drawings.

[0068] like Figure 1 As shown, a method for tracking an unmanned vehicle by a drone based on vision of the present invention comprises the following steps:

[0069] Step 1: Equip the drone with a monocular camera to obtain visual information of the target object. Use the yolov8 target detection algorithm or AprilTag based on vision to detect the target unmanned vehicle in real time and locate it.

[0070] like Figure 2 As shown, the lightest yolov8n in yolov8 is used as the algorithm model. The yolov8 algorithm includes the following specific steps:

[0071] After using yolov8 to obtain the detection frame of the unmanned vehicle, the width of the target detection frame is w, the length is d, and the coordinates of the two diagonal points of the target detection frame are [x1, y1] and [x2, y2].

[0072] w=y2-y1

[0073]

[0074] Combine the camera internal parameters to obtain the position of the center of mass of the unmanned vehicle:

[0075]

[0076] f x ,f y ,c x ,c y They represent the focal length of the camera's x-axis, the focal length of the y-axis, the horizontal coordinate of the camera's principal point, and the vertical coordinate of the camera's principal point, respectively.

[0077] The solution of using particles to represent the target in the present invention is compared with the solution of using point clouds to perceive the whole vehicle. Figure 3 As shown in the figure, since the trajectory is predicted, the mass points of the moving object can be known and predicted in advance, so the point cloud can be replaced by mass points, which greatly reduces the calculation and increases the stability of judgment.

[0078] In order to achieve real-time detection and positioning of the target unmanned vehicle, the drone in this embodiment is equipped with a monocular camera to obtain visual information of the target object. The AprilTag marker recognition system is used to quickly identify and locate the target unmanned vehicle, thereby realizing the function of monitoring and tracking the target vehicle. The algorithm steps are as follows: adaptive threshold segmentation; find contours, use Union-find to find connected domains; perform linear fitting on the contours to find candidate convex quadrilaterals; decode the quadrilaterals, identify the Tag coordinate transformation, and convert to the world coordinate system; fast decoding and accurate positioning.

[0079] When a tag appears in the scene, the gradient image of the scene image will be calculated first; then the straight lines in the scene will be extracted and the square corners will be detected; then the square area and key corners of the protruding square will be obtained, and the square area will be homomorphically mapped to a square; the mapped square will be matched with the Tags library to determine whether it is a tag; then according to the imaging principle of the camera, the three-dimensional coordinates in the camera coordinate system will be calculated according to the camera focal length and the size of the tag (openmv will generate a three-dimensional coordinate system with itself as the coordinate origin), so as to determine the position of the tags.

[0080] Step 2: Predict the motion trajectory of the target unmanned vehicle. After the unmanned vehicle is successfully identified and located, use the trained deep learning Transformer model to predict the motion trajectory of the unmanned vehicle based on its historical motion trajectory.

[0081] like Figure 4 As shown, since the trajectory is predicted, the mass points of the moving object can be known and predicted in advance, so the point cloud can be replaced by mass points instead of relying on the point cloud, which greatly reduces the computing power and increases the stability of the judgment.

[0082] The Transformer structure mainly consists of two parts: the encoder and the decoder. The encoder contains multiple multi-head attention modules and a fully connected layer network, and the decoder contains a multi-head attention module and a feedforward neural network. Residual connections are used between modules and normalization is performed.

[0083] The loss function used in model training is the smooth-L1 loss function:

[0084]

[0085] Where y i is the true value, f(x i ) is the predicted value, n is the number of predicted positions, and the unmanned vehicle will p N predicted positions corresponding to the time It is expressed as:

[0086]

[0087] Step 3: Global path search, based on the current position of the target unmanned vehicle and the predicted future motion trajectory, such as Figure 5 As shown in the figure, the informed RRT* algorithm is used. An exploration random tree is established to effectively search for paths and find a path from the current position of the drone to the tracking target.

[0088] Using the greedy method, decoupled into a multi-objective path search problem, each predicted position z n Define a non-occluded region Φ n , Φn is set as the destination of the nth path search problem.

[0089] like Figure 6 As shown, the global path search informed RRT* algorithm process is as follows:

[0090] Step 3.1 Initialize the random tree: Select an initial node in the state space as the root node of the tree.

[0091] Step 3.2 sets the elliptical sampling area, the focus of which is the starting point and the end point, and the major axis a is equal to half the length of the initial path, that is:

[0092] a=c_best / 2

[0093] Where c_best is the initial path length. The minor axis b and focal length c are calculated based on the properties of the ellipse.

[0094] a 2 =b 2 +c 2

[0095] Step 3.3 Ellipse sampling: Sampling is performed within the set ellipse sampling area to obtain a random point x_rand.

[0096] Step 3.4 Find the nearest neighbor node: Find the node x_near that is closest to x_rand in the tree.

[0097] X near =argmin(dist(x ra n d , x))

[0098] dist uses Euclidean distance.

[0099] Step 3.5 Expand the tree: Generate a new node sequence along the path from x_near to x_rand, starting from x_near and ending at x_rand. In the process of adding new nodes, calculate the cost of each node and update the node's parent node and cost.

[0100] Step 3.6 Find a feasible path: If a new node x_new is added to the tree T, check if the path from the starting point to x_new is feasible. If feasible, check if a path from the starting point to the target point is found. If a feasible path is found, the algorithm may enter the optimization phase or end.

[0101] Step 3.7 Optimize the path: Optimize the tree T to reduce the cost of the path by reconnecting nodes and pruning useless branches. If a shorter path is found in subsequent iterations, update the value of c_best and recalculate the size and shape of the elliptical sampling area.

[0102] Step 3.8 is repeated: Steps 3.2 to 3.7 are repeated until a feasible path is found or the specified number of iterations is reached.

[0103] If a feasible path is found, start from the end point and trace back to the starting point along the tree structure to get the path. Otherwise, the output is that a feasible path cannot be found.

[0104] Step 4: Trajectory optimization: For the path generated in step 3, incremental expansion is performed at each discrete path point to construct a series of flight corridors. Then, a smooth, safe, and dynamically feasible path is generated in the flight corridor through a piecewise Bezier curve.

[0105] According to the series of discrete position points sampled in step 3, a small polygon is generated for each discrete point along the speed direction, and then expanded around to obtain a collision-free convex polygon flight corridor.

[0106] The entire trajectory is represented by a piecewise Bezier curve:

[0107]

[0108] Where σ is the dimension of the Bezier curve, represents the i-th control point of the j-th segment, t0, t1, ..., t n are the timestamps of the start and end points. Since the Bezier curve is defined on a fixed interval [0,1], and the trajectory duration of each segment may vary, we introduce a scaling factor α for each segment according to its duration. j .

[0109] A quintic piecewise Bezier curve (m=5) is used as the trajectory parameterization. The k-order derivative of the Bezier curve can be obtained by controlling the points It is expressed as:

[0110]

[0111] Formulate your tracking problem as follows:

[0112]

[0113] The first line is the optimization objective function, which is expressed as minimizing the jerk loss and minimizing the time, and ρ is an adjustable time weight parameter. The first constraint represents the initial and final position constraints of the trajectory; the second constraint represents the maximum speed and acceleration constraints; the third constraint is the flight corridor constraint, which ensures that the generated trajectory can avoid obstacles; the fourth constraint is the visible area constraint, and there is a visible area for each target prediction point to ensure that the tracking drone can detect the target unmanned vehicle in real time; the fifth constraint is the distance constraint between the drone and the target unmanned vehicle, which should be at a certain distance from the target unmanned vehicle in both the horizontal and vertical directions. The sixth constraint is that the duration of the output trajectory is greater than or equal to the duration of the target predicted trajectory.

[0114] The constraints are softened and added to the objective function, and the solution is solved using L-BFGS with the help of gradient. The L-BFGS algorithm uses the curvature information of the previous m iterations to approximate the update of the Hessian matrix or its inverse matrix.

[0115] The change s of the independent variable x twice:

[0116] s i =x i+1 -x i

[0117] The gradient change y between two iterations is:

[0118]

[0119] L-BFGS update formula:

[0120]

[0121] Where H k+1 is the Hessian matrix of the k+1th iteration or its approximation of the inverse matrix, V i For i and i The matrix is ​​used to update the approximate Hessian matrix or its inverse matrix. is the initial Hessian matrix or its inverse matrix approximation, usually taken as the unit matrix or diagonal matrix, ρ k is a positive number used to adjust the accuracy of the approximation, and its value is usually S k For k-m , ..., s k-1 The matrix formed.

[0122] Example 1: Figure 7As shown, in the urban delivery scenario, the unmanned vehicle is responsible for transporting goods from one place to another on the city streets, and the drone tracks and monitors the unmanned vehicle to ensure the smooth progress of the vehicle's transportation task. The drone may encounter obstacles such as tall buildings or tree branches during the tracking process. Through the method of the present invention, the drone can effectively track and monitor the delivery unmanned vehicle, and can also track the unmanned vehicle in time when the unmanned vehicle suddenly turns or accelerates or decelerates.

[0123] Example 2: Figure 8 As shown, in some shooting scenes, the unmanned vehicle is driving in a wide outdoor space, and the drone is equipped with a high-definition camera to track and shoot the unmanned vehicle. The drone should ensure that it can shoot high-quality videos and pictures during the tracking process. Through the method of the present invention, the drone can track the unmanned vehicle safely and smoothly based on vision, which can effectively ensure the high quality requirements of shooting videos and pictures.

[0124] It is to be understood that the present invention is described by some embodiments, and it is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the scope of protection of the present invention.

Claims

1. A method for tracking an unmanned vehicle by a drone based on vision, characterized in that: The steps include: Step 1: The drone is equipped with a monocular camera, and uses the yolov8 target detection algorithm or AprilTag based on vision to detect the target unmanned vehicle in real time and locate it; Step 2: Predict the trajectory of the target unmanned vehicle. After the unmanned vehicle is successfully identified and located, use the trained deep learning Transformer model to predict the trajectory of the unmanned vehicle based on its historical trajectory. Step 3: Global path search: Based on the current position of the target unmanned vehicle and the predicted future motion trajectory, an exploratory random tree is established using the informed RRT* algorithm to effectively search for paths and find a path from the current position of the drone to the tracking target. Step 4: Trajectory optimization. For the path generated in step 3, incremental expansion is performed at each discrete path point to construct a series of flight corridors. Then, a smooth, safe, and dynamically feasible path is generated within the flight corridor using piecewise Bezier curves.

2. The method for tracking an unmanned vehicle using a drone based on vision according to claim 1, characterized in that: Step 1 uses the lightest yolov8n in yolov8 as the algorithm model. The yolov8 algorithm includes the following specific steps: After using yolov8 to obtain the detection frame of the unmanned vehicle, the width of the target detection frame is w, and the length is d. The coordinates of the two diagonal points of the target detection frame are [x1, y1], [x2, y2]. w=y2-y1 Combine the camera internal parameters to obtain the position of the center of mass of the unmanned vehicle: f x ,f y ,c x ,c y They represent the focal length of the camera's x-axis, the focal length of the y-axis, the horizontal coordinate of the camera's principal point, and the vertical coordinate of the camera's principal point, respectively.

3. The method for tracking an unmanned vehicle using a drone based on vision according to claim 1, characterized in that: The algorithm steps for using AprilTag to detect and locate the target unmanned vehicle in real time are as follows: Adaptive threshold segmentation; Find contours and use Union-find to find connected domains; Fit contours with straight lines to find candidate convex quadrilaterals; Decode quadrilaterals, identify tag coordinate transformations, and convert to the world coordinate system; When a tag appears in the scene, first find the gradient image of the scene image; then extract the straight lines in the scene and detect the square corners; then get the square area and key corners of the protruding square, and homomorphically map the square area to a square; match the mapped square with the tags library to determine whether it is a tag; Then, according to the imaging principle of the camera, the three-dimensional coordinates in the camera coordinate system are calculated according to the camera focal length and the size of the tag to determine the position of the tags.

4. The method for tracking an unmanned vehicle using a drone based on vision according to claim 1, characterized in that: The structure of the Transformer in step 2 includes an encoder and a decoder, wherein the encoder includes multiple multi-head attention modules and a fully connected layer network, and the decoder includes a multi-head attention module and a feedforward neural network. Residual connections are used between modules and normalization is performed. The loss function used in model training is the smooth-L1 loss function: Where y i is the true value, f(x i ) is the predicted value, n is the number of predicted positions, and the N predicted positions corresponding to the unmanned vehicle in the future Tp time It is expressed as:

5. The method for tracking an unmanned vehicle using a drone based on vision according to claim 1, characterized in that: The step 3 uses a greedy method to decouple it into a multi-objective path search problem. n Define a non-occluded region Φ n , Φ n is set as the destination of the nth path search problem.

6. The method for tracking an unmanned vehicle using a drone based on vision according to claim 1, characterized in that: The informed RRT* algorithm process described in step 3 is as follows: Step 3.1 Initialize the random tree: select an initial node in the state space as the root node of the tree; Step 3.2 sets the elliptical sampling area, the focus of which is the starting point and the end point, and the major axis a is equal to half the length of the initial path, that is: a=c_best / 2 Where c_best is the initial path length, and the minor axis b and focal length c are calculated based on the properties of the ellipse: a 2 =b 2 +c 2 Step 3.3 Ellipse sampling: Sampling is performed within the set ellipse sampling area to obtain a random point x_rand; Step 3.4 Find the nearest neighbor node: Find the node x_near that is closest to x_rand in the tree: x near =argmin(dist(x rand ,x)) dist uses Euclidean distance; Step 3.5 Expand the tree: Starting from x_near and ending at x_rand, generate a new node sequence along the path from x_near to x_rand. In the process of adding new nodes, calculate the cost of each node and update the parent node and cost of the node. Step 3.6 Find a feasible path: If a new node x_new is added to the tree T, check whether the path from the starting point to x_new is feasible. If it is feasible, check whether a path from the starting point to the target point is found. If a feasible path is found, the algorithm may enter the optimization stage or end. Step 3.7 Optimize the path: Optimize the tree T to reduce the cost of the path by reconnecting nodes and pruning useless branches. If a shorter path is found in subsequent iterations, update the value of c_best and recalculate the size and shape of the elliptical sampling area. Step 3.8 Repeat: Repeat steps 3.2 to 3.7 until a feasible path is found or the specified number of iterations is reached; If a feasible path is found, start from the end point and trace back to the starting point along the tree structure to get the path, otherwise the output is that a feasible path cannot be found.

7. The method for tracking an unmanned vehicle using a drone based on vision according to claim 1, characterized in that: The step 4 generates a small polygon along the speed direction for each discrete point according to a series of discrete position points sampled in step 3, and then expands it around to obtain a collision-free convex polygon flight corridor. The entire trajectory is represented by a piecewise Bezier curve: Where σ is the dimension of the Bezier curve, represents the i-th control point of the j-th segment, t0, t1, ..., t n are the timestamps of the start and end points, A scaling factor α is introduced for each segment according to its duration j ; A quintic piecewise Bezier curve (m=5) is used as the trajectory parameterization. The k-order derivative of the Bezier curve passes through the control point It is expressed as: Formulate your tracking problem as follows: T≥T p , The first line is the optimization objective function, which is expressed as minimizing the acceleration loss and minimizing the time. ρ is an adjustable time weight parameter. The first constraint represents the initial position and terminal position constraints of the trajectory. The second constraint represents the maximum speed and acceleration constraints. The third constraint is the flight corridor constraint, which ensures that the generated trajectory can avoid obstacles. The fourth constraint is the visible area constraint. There is a visible area for each target prediction point to ensure that the tracking drone can detect the target unmanned vehicle in real time. The fifth constraint is the distance constraint between the drone and the target unmanned vehicle. There should be a certain distance from the target unmanned vehicle in both the horizontal and vertical directions. The sixth constraint is that the duration of the output trajectory is greater than or equal to the duration of the target predicted trajectory. The constraints are softened and added to the objective function. The gradient is solved using L-BFGS. The L-BFGS algorithm uses the curvature information of the previous m iterations to approximate the update of the Hessian matrix or its inverse matrix: The change s of the independent variable x twice: s i =x i+1 -x i The gradient change y between two iterations is: L-BFGS update formula: Where H k+1 is the Hessian matrix of the k+1th iteration or its approximation of the inverse matrix, V i For i and i The matrix is ​​used to update the approximate Hessian matrix or its inverse matrix. is the initial Hessian matrix or its inverse matrix approximation, usually taken as the unit matrix or diagonal matrix, ρ k is a positive number used to adjust the accuracy of the approximation, and its value is usually S k For k-m , ..., s k-1 The matrix formed.

Citation Information

Cited By

  • Multi-rotor unmanned aerial vehicle trajectory planning method based on active perception

    CN119759052A