Method and device for following a drone, electronic equipment and storage medium

By calculating the absolute heading angle and horizontal distance of the drone and the gimbal camera, and combining this with position information, drone target recognition and tracking are achieved. This solves the problems of high stability and cost of drone follow-up flight, and improves the effectiveness and stability of follow-up flight.

CN121232862BActive Publication Date: 2026-03-03SIYI TECH (SHENZHEN) CO LTD
2 Cites 0 Cited by

Patent Information

Application Number
CN202511794138.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-03
Estimated Expiration
2045-12-02

AI Technical Summary

Technical Problem

Existing drone tracking technologies suffer from poor tracking stability and high costs, especially when affected by factors such as obstruction, deformation, motion blur, and lighting conditions, making it difficult to effectively track targets.

Method used

By acquiring the UAV's position information and attitude angles in real time, calculating the absolute heading angle and horizontal distance of the gimbal camera, and combining the UAV's position information for target identification and tracking, the UAV is controlled to fly to the target position. Geometric calculations and Euler angle conversions are used to reduce reliance on target GPS positioning and visual tracking.

Benefits of technology

It achieves stability and cost reduction in drone follow-up flight, and ensures the accuracy of heading angle under tilt gimbal conditions through error compensation, thereby improving the effectiveness of follow-up flight.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121232862B_ABST
    Figure CN121232862B_ABST
Patent Text Reader

Abstract

The application provides a method and device for following a target by a UAV, an electronic device and a storage medium. The method comprises the following steps: acquiring position information and an attitude angle of the UAV in real time; controlling a gimbal camera to capture the target so that the target is located at a preset position of a shooting picture, and acquiring a relative attitude angle from a gimbal base to a gimbal lens; calculating an absolute heading angle of the gimbal camera according to the attitude angle of the UAV and the relative attitude angle; acquiring a pitch angle of the gimbal camera, and calculating a horizontal distance between the UAV and the target through geometric calculation according to the pitch angle of the gimbal camera and a height of the UAV; calculating an initial position of the target based on the position information, the absolute heading angle and the horizontal distance of the UAV; controlling the gimbal camera to track the target, calculating a target tracking position of the UAV based on a real-time position of the target and the initial absolute heading angle and the horizontal distance; and controlling the UAV to fly to the target tracking position. The application guarantees the stability of the UAV in following the target and reduces the cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of unmanned aerial vehicle (UAV) technology, specifically to a method, apparatus, electronic device, and storage medium for UAV follow-flying. Background Technology

[0002] With the continuous development of drone technology, its application areas are also constantly expanding. One important application scenario for drones is target tracking using an onboard gimbal. Currently, most drone automatic follow-flying technologies rely on commercially available platforms that integrate the gimbal and the drone (such as mainstream consumer-grade follow-fly drones). Their core characteristic is the deep integration of the flight control system, gimbal drive, and target recognition module into a single hardware architecture. Such integrated solutions, through customized development by manufacturers, can achieve basic follow-flying functionality.

[0003] Existing drone tracking solutions typically include GPS-based distance following or target locking based on simple vision algorithms. However, GPS-based distance following, which relies primarily on the basic "follow" mode of open-source flight controllers, requires the target to carry GPS and transmit its position to the flight controller via the MAVLink protocol, resulting in high costs. On the other hand, computer vision-based target locking is affected by factors such as occlusion, deformation, motion blur, and lighting conditions, making it impossible to guarantee that the drone can effectively track the target in real time. Summary of the Invention

[0004] To address the technical problems of poor flight stability and high cost in existing drone flight tracking technologies, this application proposes a drone flight tracking method, device, electronic equipment, and storage medium.

[0005] According to the first aspect of this application, a method for drone follow-flying is proposed, comprising:

[0006] The location information and attitude angle of the UAV are acquired in real time, and the location information of the UAV includes longitude, latitude and altitude;

[0007] During the target recognition stage, the gimbal camera is controlled to capture the target so that the target is in a preset position in the field of view of the gimbal camera, and the relative attitude angle between the gimbal base and the gimbal lens is obtained.

[0008] The absolute heading angle of the gimbal camera is calculated based on the attitude angle of the UAV and the relative attitude angle from the gimbal base to the gimbal lens.

[0009] The pitch angle of the gimbal camera is obtained, and the horizontal distance between the drone and the target is calculated geometrically based on the pitch angle of the gimbal camera and the altitude of the drone.

[0010] Based on the UAV's position information, the absolute heading angle, and the horizontal distance, the initial position of the target is calculated;

[0011] During the target tracking phase, the gimbal camera is controlled to track the target. Based on the real-time position of the target, the absolute heading angle and the horizontal distance of the target at the initial position, the target tracking position of the UAV is calculated.

[0012] Control the drone to fly to the target tracking position.

[0013] Preferably, calculating the absolute heading angle of the gimbal camera based on the attitude angle of the UAV and the relative attitude angle from the gimbal base to the gimbal lens includes:

[0014] Based on the attitude angle of the UAV, construct the first rotation matrix Cnb1 from the navigation coordinate system to the flight control carrier coordinate system;

[0015] Based on the relative attitude angle between the gimbal base and the gimbal lens, a second rotation matrix Cb1b2 is constructed from the flight control carrier coordinate system to the gimbal lens coordinate system;

[0016] Calculate the third rotation matrix Cnb2 from the navigation coordinate system to the gimbal lens coordinate system, where Cnb2 = Cnb1 * Cb1b2;

[0017] The third rotation matrix Cnb2 is converted into Euler angles, and the heading angle is extracted as the absolute heading angle.

[0018] Preferably, the expression for the first rotation matrix Cnb1 is as follows:

[0019]

[0020] Wherein, α1, β1, and γ1 are the pitch angle, roll angle, and heading angle of the UAV, respectively;

[0021] The expression for the second rotation matrix Cb1b2 is as follows:

[0022]

[0023] in, α 2. β 2. γ 2 represents the relative pitch angle, relative roll angle, and relative yaw angle from the gimbal base to the gimbal lens, respectively.

[0024] The absolute heading angle is calculated using the following formula:

[0025] Yaw = arctan(-C12, C22)

[0026] Wherein, Yaw is the absolute heading angle, C12 is the element in the first row and second column of the third rotation matrix Cnb2, and C22 is the element in the second row and second column of the third rotation matrix Cnb2.

[0027] Preferably, the horizontal distance is calculated using the following formula:

[0028] L = H / tan(pitch)

[0029] Where L is the horizontal distance, H is the altitude of the UAV, and pitch is the tilt angle of the gimbal camera.

[0030] Preferably, the method further includes:

[0031] During the target tracking phase, the focal length of the gimbal lens is adjusted based on the horizontal distance calculated in real time.

[0032] Preferably, calculating the initial position of the target based on the location information of the UAV, the absolute heading angle, and the horizontal distance includes:

[0033] The position B of the target is calculated using the following formula:

[0034] B.lat = A.lat + (L * cos(Yaw)) / R

[0035] B.lon = A.lon + (L * sin(Yaw)) / cos(A.lon) / R

[0036] Wherein, A.lat and A.lon are the latitude and longitude of the UAV, respectively; B.lat and B.lon are the latitude and longitude of the target, respectively; L is the horizontal distance; Yaw is the absolute heading angle; and R is the Earth's radius.

[0037] Preferably, calculating the target tracking position of the UAV based on the real-time position of the target, the absolute heading angle of the target at its initial position, and the horizontal distance includes:

[0038] The target tracking position C of the UAV is calculated using the following formula:

[0039] C.lat = B'.lat + (L0* cos(Yaw0 + 180°)) / R

[0040] C.lon = B'.lon + (L0*sin(Yaw0 + 180°)) / cos(B'.lon) / R

[0041] Wherein, B'.lat and B'.lon are the latitude and longitude of the target calculated in real time, respectively; C.lat and C.lon are the latitude and longitude of the target tracking position, respectively; Yaw0 and L0 are the absolute heading angle and horizontal distance of the target at the initial position, respectively; and R is the Earth's radius.

[0042] According to a second aspect of this application, a drone follow-flying device is proposed, comprising:

[0043] The acquisition module is configured to acquire the location information and attitude angle of the UAV in real time. The location information of the UAV includes longitude, latitude and altitude.

[0044] The target recognition module is configured to control the gimbal camera to capture the target during the target recognition stage, so that the target is in a preset position in the field of view of the gimbal camera, and to obtain the relative attitude angle between the gimbal base and the gimbal lens.

[0045] An angle calculation module is configured to calculate the absolute heading angle of the gimbal camera based on the attitude angle of the UAV and the relative attitude angle from the gimbal base to the gimbal lens.

[0046] The ranging module is configured to acquire the pitch angle of the gimbal camera and, based on the pitch angle of the gimbal camera and the altitude of the UAV, calculate the horizontal distance between the UAV and the target using geometric calculations.

[0047] The positioning module is configured to calculate the initial position of the target based on the location information of the UAV, the absolute heading angle, and the horizontal distance;

[0048] The target tracking module is configured to control the gimbal camera to track the target during the target tracking phase, and calculate the target tracking position of the UAV based on the real-time position of the target, the absolute heading angle of the target at the initial position, and the horizontal distance.

[0049] The follow-fly module is configured to control the drone to fly to the target tracking position.

[0050] According to a third aspect of this application, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement a drone follow-flying method as provided in any embodiment of the first aspect above.

[0051] According to a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a drone follow-flying method as provided in any embodiment of the first aspect above.

[0052] This application proposes a method, apparatus, electronic device, and storage medium for drone-to-target tracking. In the target recognition stage, the drone's position information and the attitude angles of the drone and gimbal camera are first acquired. The absolute heading angle of the gimbal camera and the horizontal distance between the drone and the target are calculated. Then, combining the drone's position information, the absolute heading angle of the gimbal camera, and the horizontal distance between the drone and the target, the initial position of the target is calculated. In the target tracking stage, the target tracking position of the drone is derived by reverse engineering using the real-time calculated target position and the initial absolute heading angle and horizontal distance, thereby achieving target tracking. This application does not rely on target GPS positioning or vision-based target tracking, enabling simple and effective control of the drone to track the target, ensuring drone tracking stability, and reducing costs.

[0053] Furthermore, this application calculates the absolute heading angle of the gimbal by using the attitude angle of the UAV and the relative attitude angle between the gimbal base and the gimbal lens. Compared with the traditional method of directly reading the heading angle of the gimbal through the attitude sensor, this application compensates for the error of the heading angle of the gimbal when the gimbal tilts, which further ensures the stability of the UAV following the flight. Attached Figure Description

[0054] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and, together with the description, serve to explain the principles of the invention. Other embodiments and many anticipated advantages of the embodiments will be readily recognized as they become better understood through reference to the following detailed description. Elements in the drawings are not necessarily to scale. The same reference numerals refer to corresponding similar parts.

[0055] Figure 1 This is a flowchart of a drone follow-flying method according to a specific embodiment of this application;

[0056] Figure 2 This is a schematic diagram of a drone follow-flying device according to a specific embodiment of this application;

[0057] Figure 3 This is a schematic diagram of an electronic device according to a specific embodiment of the present application. Detailed Implementation

[0058] The features and exemplary embodiments of various aspects of the present invention will now be described in detail. To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the invention.

[0059] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0060] This application proposes a method for drone follow-flying. Figure 1 A flowchart illustrating a drone follow-flying method according to a specific embodiment of this application is shown, as follows: Figure 1 As shown, the method includes the following steps:

[0061] Step S101: Acquire the UAV's position information and attitude angle in real time. The UAV's position information includes longitude, latitude, and altitude.

[0062] In one specific embodiment, the position information and attitude angles of the UAV flight controller are obtained in real time through MAVLink. The position information includes the longitude, latitude and altitude of the UAV flight controller, and the attitude angles include pitch angle, roll angle and heading angle.

[0063] Step S102: In the target recognition stage, control the gimbal camera to capture the target so that the target is in the preset position of the gimbal camera's shooting screen, and obtain the relative attitude angle between the gimbal base and the gimbal lens.

[0064] In one specific embodiment, the gimbal camera is equipped with an AI module. During the target recognition stage, the AI ​​module's target recognition function can identify the target and control the gimbal to rotate and capture the target, ensuring the target is centered in the gimbal camera's field of view. At this time, the relative attitude angle between the gimbal base and the gimbal lens is directly obtained by reading the gimbal's magnetic encoder.

[0065] Step S103: Calculate the absolute heading angle of the gimbal camera based on the attitude angle of the UAV and the relative attitude angle from the gimbal base to the gimbal lens.

[0066] In one specific embodiment, based on the attitude angle of the UAV, a first rotation matrix Cnb1 is constructed from the navigation coordinate system to the flight control carrier coordinate system. The first rotation matrix Cnb1 is a 3×3 rotation matrix, and its specific expression is as follows:

[0067]

[0068] Where α1, β1, and γ1 are the pitch angle, roll angle, and heading angle of the UAV, respectively, n is the navigation coordinate system, and b1 is the flight control carrier coordinate system.

[0069] Based on the relative attitude angle between the gimbal base and the gimbal lens, a second rotation matrix Cb1b2 is constructed from the flight control carrier coordinate system to the gimbal lens coordinate system. The second rotation matrix Cb1b2 is also a 3×3 rotation matrix, and its specific expression is as follows:

[0070]

[0071] in, α 2. β 2. γ 2 represents the relative pitch angle, relative roll angle, and relative yaw angle from the gimbal base to the gimbal lens, respectively, and b2 represents the coordinate system of the gimbal lens.

[0072] Calculate the third rotation matrix Cnb2 from the navigation coordinate system to the gimbal lens coordinate system, where: Cnb2 = Cnb1 * Cb1b2

[0073] Then, the third rotation matrix Cnb2 is converted into Euler angles using the following formula, and the heading angle is extracted as the absolute heading angle of the gimbal camera:

[0074] Yaw = arctan(-C12, C22)

[0075] Where Yaw is the absolute heading angle of the gimbal camera, C12 is the element in the first row and second column of the third rotation matrix Cnb2, and C22 is the element in the second row and second column of the third rotation matrix Cnb2.

[0076] It should be noted that in traditional methods, the heading angle of the gimbal is usually read directly from its attitude sensor (or magnetic encoder) as the final heading angle for subsequent drone tracking calculations. However, this method introduces significant errors when the gimbal tilts. Therefore, in this embodiment, the absolute heading angle of the gimbal camera is calculated using the drone's attitude angle and the relative attitude angle between the gimbal base and the gimbal lens. This compensates for the aforementioned errors, ensuring the effectiveness and stability of the drone tracking.

[0077] Step S104: Obtain the pitch angle of the gimbal camera. Based on the pitch angle of the gimbal camera and the altitude of the UAV, calculate the horizontal distance between the UAV and the target using geometric calculations.

[0078] In one specific embodiment, the pitch angle of the gimbal camera is read by the magnetic encoder of the gimbal, and the horizontal distance between the UAV and the target is calculated using the following formula:

[0079] L = H / tan(pitch)

[0080] Where L is the horizontal distance between the UAV and the target, H is the altitude of the UAV, and pitch is the tilt angle of the gimbal camera.

[0081] By inputting the drone's altitude and the gimbal camera's pitch angle as initial values ​​(i.e., the initial values ​​for the target recognition stage), the initial horizontal distance L0 between the drone and the target can be calculated.

[0082] Step S105: Calculate the initial position of the target based on the UAV's position information, absolute heading angle, and horizontal distance.

[0083] In one specific embodiment, the position B of the target can be calculated using the following formula:

[0084] B.lat = A.lat + (L * cos(Yaw)) / R

[0085] B.lon = A.lon + (L * sin(Yaw)) / cos(A.lon) / R

[0086] Where A.lat and A.lon are the latitude and longitude of the UAV, respectively; B.lat and B.lon are the latitude and longitude of the target, respectively; L is the horizontal distance between the UAV and the target; Yaw is the absolute heading angle of the gimbal camera; and R is the Earth's radius.

[0087] By inputting the above-mentioned UAV position information, absolute heading angle, and horizontal distance as initial values ​​(i.e., initial values ​​in the target identification stage), the initial position B0 of the target can be calculated; by inputting the above-mentioned UAV position information, absolute heading angle, and horizontal distance as real-time calculation values, the real-time position B' of the target can be calculated.

[0088] Step S106: In the target tracking stage, control the gimbal camera to track the target. Based on the real-time position of the target, the absolute heading angle and horizontal distance of the target at the initial position, calculate the target tracking position of the UAV.

[0089] In one specific embodiment, when the gimbal camera is detected to have activated its follow-fly function, the target tracking position C of the UAV can be calculated using the following formula:

[0090] C.lat = B'.lat + (L0* cos(Yaw0 + 180°)) / R

[0091] C.lon = B'.lon + (L0*sin(Yaw0 + 180°)) / cos(B'.lon) / R

[0092] Where B'.lat and B'.lon are the latitude and longitude of the target calculated in real time, respectively; C.lat and C.lon are the latitude and longitude of the target tracking position, respectively; Yaw0 and L0 are the absolute heading angle and horizontal distance of the target at the initial position, respectively; and R is the Earth's radius.

[0093] In one specific embodiment, during the target tracking phase, the focal length of the gimbal lens can be adjusted based on the real-time calculated horizontal distance between the drone and the target, so that the AI ​​module can better track the target.

[0094] Step S107: Control the drone to fly to the target tracking position.

[0095] In one specific embodiment, the calculated target tracking position is sent to the UAV flight controller via MAVLink, and the flight controller controls the UAV to fly to the designated target tracking position to achieve automatic follow-fly function.

[0096] In summary, the drone follow-flying method proposed in this application has the following beneficial effects:

[0097] In the target recognition phase, the UAV's position information, the attitude angles of the UAV and gimbal, and the absolute heading angle of the gimbal and the horizontal distance between the UAV and the target are first acquired. Then, combining the UAV's position information, the gimbal's absolute heading angle, and the horizontal distance between the UAV and the target, the initial position of the target is calculated. In the target tracking phase, the UAV's target tracking position is derived by reverse engineering using the real-time calculated target position and the initial absolute heading angle and horizontal distance, thus enabling the UAV to follow the target. This application does not rely on target GPS positioning and uses vision-based target tracking, enabling simple and effective control of the UAV to follow the target, ensuring the stability of the UAV's following flight, and reducing costs.

[0098] Furthermore, as one of the key inventive points of this application, this application calculates the absolute heading angle of the gimbal camera by using the attitude angle of the UAV and the relative attitude angle between the gimbal base and the gimbal lens. Compared with the traditional method of directly reading the heading angle of the gimbal through the attitude sensor, this application compensates for the error of the heading angle of the gimbal when the gimbal tilts, which further ensures the stability of the UAV following the flight.

[0099] Based on the aforementioned drone follow-flying method, and using the same inventive concept, this application also proposes a drone follow-flying device. Figure 2 A schematic diagram of a drone follow-flying device according to a specific embodiment of this application is shown, such as... Figure 2 As shown, the device includes:

[0100] The acquisition module 201 is configured to acquire the location information and attitude angle of the UAV in real time. The location information of the UAV includes longitude, latitude and altitude.

[0101] The target recognition module 202 is configured to control the gimbal camera to capture the target during the target recognition stage, so that the target is in a preset position in the gimbal camera's shooting frame, and to obtain the relative attitude angle between the gimbal base and the gimbal lens.

[0102] Angle calculation module 203 is configured to calculate the absolute heading angle of the gimbal camera based on the attitude angle of the UAV and the relative attitude angle from the gimbal base to the gimbal lens.

[0103] The ranging module 204 is configured to acquire the pitch angle of the gimbal camera and calculate the horizontal distance between the UAV and the target using geometric calculations based on the pitch angle of the gimbal camera and the altitude of the UAV.

[0104] The positioning module 205 is configured to calculate the initial position of the target based on the UAV's position information, absolute heading angle, and horizontal distance.

[0105] The target tracking module 206 is configured to control the gimbal camera to track the target during the target tracking phase, and calculate the target tracking position of the UAV based on the real-time position of the target, as well as the absolute heading angle and horizontal distance of the target at the initial position.

[0106] Follow-up module 207 is configured to control the drone to fly to the target tracking position.

[0107] Based on the aforementioned drone follow-flying method, and using the same inventive concept, this application also proposes an electronic device.

[0108] Figure 3 A schematic diagram of an electronic device according to a specific embodiment of this application is shown, such as... Figure 3 As shown, the electronic device includes one or more processors 301, a memory 302, a bus 303, and a communication interface 304. The one or more processors 301, the memory 302, and the communication interface 304 are connected via the bus 303. The memory 302 stores one or more programs, which, when executed by one or more processors 301, enable the electronic device to implement the drone-following method provided in any of the above embodiments.

[0109] Based on the above-described drone follow-flying method, and with the same inventive concept, this application also proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the drone follow-flying method provided in any of the above embodiments.

[0110] In the embodiments of this application, it should be understood that the disclosed technical content can be implemented in other ways. The device / system / method embodiments described above are merely illustrative. For example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0111] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0112] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0113] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0114] It is evident that those skilled in the art can make various modifications and alterations to the embodiments of the present invention without departing from the spirit and scope of the invention. In this way, the invention is also intended to cover such modifications and alterations if they fall within the scope of the claims and their equivalents. The word "comprising" does not exclude the presence of other elements or steps not listed in the claims. The simple fact that certain measures are described in mutually different dependent claims does not indicate that a combination of these measures cannot be used for profit. Any reference numerals in the claims should not be considered as limiting the scope.

Claims

1. A method for following a drone, the method comprising: The method comprises the following steps: real-time acquisition of position information and attitude angle of the unmanned aerial vehicle, wherein the position information of the unmanned aerial vehicle comprises longitude, latitude and height; in the target identification stage, the gimbal camera is controlled to capture the target so that the target is in a preset position of a shooting picture of the gimbal camera, and a relative attitude angle from a gimbal base to a gimbal lens is acquired; according to the attitude angle of the unmanned aerial vehicle and the relative attitude angle from the gimbal base to the gimbal lens, an absolute heading angle of the gimbal camera is calculated; an inclination angle of the gimbal camera is acquired, and according to the inclination angle of the gimbal camera and the height of the unmanned aerial vehicle, a horizontal distance between the unmanned aerial vehicle and the target is obtained through geometric calculation; based on the position information of the unmanned aerial vehicle, the absolute heading angle and the horizontal distance, an initial position of the target is calculated; in the target tracking stage, the gimbal camera is controlled to track the target, and based on a real-time position of the target calculated in real time and the absolute heading angle and the horizontal distance of the target at the initial position, a target tracking position of the unmanned aerial vehicle is calculated; the unmanned aerial vehicle is controlled to fly to the target tracking position.

2. The method of claim 1, wherein, The method further comprises the following steps: according to the attitude angle of the unmanned aerial vehicle, a first rotation matrix Cnb1 from a navigation coordinate system to a flight control carrier coordinate system is constructed; according to the relative attitude angle from the gimbal base to the gimbal lens, a second rotation matrix Cb1b2 from the flight control carrier coordinate system to a gimbal lens coordinate system is constructed; a third rotation matrix Cnb2 from the navigation coordinate system to the gimbal lens coordinate system is calculated, wherein Cnb2 = Cnb1 * Cb1b2; the third rotation matrix Cnb2 is converted into Euler angles, and a heading angle thereof is extracted as the absolute heading angle.

3. The method according to claim 2, wherein: the first rotation matrix Cnb1 is expressed as follows: wherein α1, β1 and γ1 are respectively an inclination angle, a roll angle and a heading angle of the unmanned aerial vehicle; the second rotation matrix Cb1b2 is expressed as follows: wherein, α 2, β 2, γ 2are the relative pitch, roll and yaw angles of the gimbal base to the gimbal lens, respectively. the absolute heading angle is calculated by the following formula: Yaw = arctan (-C12, C22) wherein Yaw is the absolute heading angle, C12 is an element of the first row and the second column in the third rotation matrix Cnb2, and C22 is an element of the second row and the second column in the third rotation matrix Cnb2.

4. The method of claim 1, wherein, the horizontal distance is calculated by the following formula: L = H / tan (pitch) wherein L is the horizontal distance, H is the height of the unmanned aerial vehicle, and pitch is the inclination angle of the gimbal camera.

5. The method of claim 4, wherein, The method further comprises the following steps: in the target tracking stage, the focal length of the gimbal lens is adjusted according to the horizontal distance calculated in real time.

6. The method of claim 1, wherein, The method further comprises the following steps: the position B of the target is calculated by the following formula: B.lat = A.lat + (L * cos(Yaw)) / R B. lon = A. lon + (L * sin(Yaw)) / cos(A. lon) / R wherein A. lat and A. lon are latitude and longitude of the UAV respectively, B. lat and B. lon are latitude and longitude of the target respectively, L is the horizontal distance, Yaw is the absolute heading angle, and R is the earth radius.

7. The method of claim 1, wherein, calculating the target tracking position of the UAV based on the real-time position of the target calculated in real time, and the absolute heading angle and the horizontal distance of the target at the initial position, comprises: calculating the target tracking position C of the UAV by the following formula: C. lat = B’. lat + (L0* cos(Yaw0 + 180°)) / R C. lon = B’. lon + (L0* sin(Yaw0 + 180°)) / cos(B’. lon) / R wherein B’. lat and B’. lon are latitude and longitude of the target calculated in real time respectively, C. lat and C. lon are latitude and longitude of the target tracking position respectively, Yaw0 and L0 are the absolute heading angle and the horizontal distance of the target at the initial position respectively, and R is the earth radius.

8. A follow-me device of a drone, characterized by, comprises: an acquisition module configured to acquire position information and attitude angle of a UAV in real time, wherein the position information of the UAV comprises longitude, latitude and altitude; a target identification module configured to control a gimbal camera to capture a target in a target identification stage, so that the target is in a preset position of a shooting picture of the gimbal camera, and to acquire a relative attitude angle from a gimbal base to a gimbal lens; an angle calculation module configured to calculate an absolute heading angle of the gimbal camera according to the attitude angle of the UAV and the relative attitude angle from the gimbal base to the gimbal lens; a distance measurement module configured to acquire a pitch angle of the gimbal camera, and to obtain a horizontal distance between the UAV and the target through geometric calculation according to the pitch angle of the gimbal camera and the altitude of the UAV; a positioning module configured to calculate an initial position of the target based on the position information of the UAV, the absolute heading angle and the horizontal distance; a target tracking module configured to control the gimbal camera to track the target in a target tracking stage, and to calculate a target tracking position of the UAV based on a real-time position of the target calculated in real time, and the absolute heading angle and the horizontal distance of the target at the initial position; a follow-flying module configured to control the UAV to fly to the target tracking position.

9. An electronic device, comprising: comprises: one or more processors; a memory for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the method of any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method of any one of claims 1 to 7. The program is executed by the processor to implement the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Control method, apparatus and device and aircraft

    CN108521801A

  • Unmanned aerial vehicle vision-assisted hovering method based on multi-view-angle vision synchronization tight coupling

    CN114355961A