Unmanned aerial vehicle autonomous landing control method based on two-dimensional code position calculation
By using the ROS distributed architecture and finite state machine design, combined with a fault-tolerant position backtracking mechanism, the accuracy and stability issues of traditional UAV autonomous landing technology in complex environments were solved, enabling smooth autonomous landing of UAVs in situations such as gusts of wind and QR code obstruction.
Patent Information
- Application Number
- CN202511411219.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-01-23
AI Technical Summary
Traditional QR code-guided autonomous landing technology for drones faces problems such as low landing accuracy and control instability in complex environments. In particular, when there are sudden wind disturbances or visual obstruction of the QR code, control commands are prone to change, affecting the smoothness of the landing trajectory.
The system adopts a ROS-based distributed architecture, combined with a finite state machine and a fault-tolerant position backtracking mechanism. Through dynamic state boundaries and event-driven state machine design, it enables smooth transitions between the UAV's search, alignment, and landing states, selects appropriate position or speed control strategies, and guides the UAV back to the nearest valid position point to restore recognition when the QR code is lost.
It improves the landing accuracy and control stability of UAVs in complex environments, avoids control oscillations and command jumps, ensures the continuity and smoothness of the landing trajectory, and enhances the robustness and reliability of the system.
Smart Images

Figure CN121386887A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of unmanned aerial vehicle autonomous landing, in particular to an unmanned aerial vehicle autonomous landing control method based on two-dimensional code position solution. BACKGROUND
[0002] The unmanned aerial vehicle autonomous landing technology based on two-dimensional code recognition is an important application direction in the field of visual navigation. The technology provides a centimeter-level precision position reference for unmanned aerial vehicles by deploying specific coded two-dimensional code markers on the ground. Compared with the traditional GPS / INS combined navigation mode, the positioning stability in complex indoor and outdoor environments is significantly improved.
[0003] In the unmanned aerial vehicle autonomous landing technology based on two-dimensional code guidance, the traditional control architecture mostly adopts a phased discrete switching strategy, for example, the landing process is divided into independent stages such as "global search-pose alignment-vertical landing", and the stage switching is triggered based on a pre-set fixed threshold. Although this method simplifies the system design, it faces significant limitations in actual application: on the one hand, the fixed threshold is difficult to adapt to dynamic changes in complex environments, for example, when the unmanned aerial vehicle pose oscillates due to sudden wind disturbance, the stage may be repeatedly switched due to temporary over-standard, increasing the risk of control instability; on the other hand, the hard switching between discrete stages lacks a transition mechanism, when the two-dimensional code is temporarily lost due to visual obstruction or the pose estimation has noise, the control command may jump, affecting the smoothness of the landing trajectory. SUMMARY
[0004] In view of the problems existing in the prior art, the purpose of the present application is to provide an unmanned aerial vehicle autonomous landing control method based on two-dimensional code position solution to solve the problems of low landing precision, control instability and the like caused by GPS / INS positioning inaccuracy or environmental interference.
[0005] The present application provides an unmanned aerial vehicle autonomous landing control method based on two-dimensional code position solution, comprising the following steps:
[0006] 1) Construct a control system based on ROS distributed architecture, the system at least includes a camera acquisition node, a two-dimensional code detection node and an off-board control node;
[0007] 2) The off-board control node runs a finite state machine, based on the pose information of the unmanned aerial vehicle relative to the two-dimensional code solved by the two-dimensional code detection node and the dynamic boundary conditions, smoothly migrates between search, alignment and landing different states;
[0008] 3) According to the current state of the finite state machine, select and execute position control or speed control strategy to guide the unmanned aerial vehicle to realize autonomous landing;
[0009] 4) When the QR code detection is lost, trigger the fault-tolerant position backtracking mechanism to guide the UAV to return to the last recorded valid position point to recover the QR code recognition and continue the landing process.
[0010] Further, the state layer of the finite state machine includes an initial state (no_id), a long-distance deviation state (long_dev), a long-distance center state (long_center), a mid-distance deviation state (mid_dev), a mid-distance center state (mid_center), and a low-distance center state (low_center).
[0011] Further, the state transition conditions of the finite state machine are dynamically adjusted based on at least one of the following factors: horizontal distance deviation (Δx, Δy) of the UAV from the center of the QR code; yaw angle deviation (ψ); continuously detected nested QR code ID combination and its stability; number of frames of continuous QR code loss.
[0012] Further, the position control strategy controls the UAV pose by calculating the target position point and yaw angle in the North-East-Down (NED) coordinate system; and the speed control strategy controls the UAV motion by calculating the three-dimensional velocity vector (Vx, Vy, Vz) and yaw angular velocity (ω) in the NED coordinate system.
[0013] Further, the fault-tolerant position backtracking mechanism records the historical position point when the UAV is in the long-distance center state (long_center), the mid-distance center state (mid_center), or the low-distance center state (low_center), and uses the position point for backtracking when the QR code is lost.
[0014] Further, the offboard control node switches the UAV to the Offboard mode when the following conditions are met simultaneously: the UAV is in the return mode; the QR code is effectively detected; and the relative height of the UAV to the ground is less than a preset safety height threshold.
[0015] Further, the condition for triggering the final landing mode (LandMode) is that the horizontal positioning deviation is less than a first threshold, the yaw angle error is less than a second threshold, and the relative height is lower than a third threshold.
[0016] The second aspect of the present application provides a UAV autonomous landing control device based on QR code position calculation, comprising:
[0017] a camera acquisition module for acquiring environment images;
[0018] a QR code detection module for processing the images to calculate the three-dimensional position deviation and yaw angle deviation of the UAV relative to the QR code;
[0019] a flight state machine module for migrating between multiple states of searching, aligning and landing based on the pose deviation and dynamic boundary conditions, and selecting a corresponding control strategy according to a current state;
[0020] a fault-tolerant position backtracking module for guiding the UAV to return to a last recorded valid position point to recover the QR code recognition when the QR code detection is lost;
[0021] a communication and control module for realizing low-latency data interaction between the camera acquisition module, the QR code detection module, the flight state machine module and the flight control system through a ROS distributed architecture and a DDS communication middleware.
[0022] The third aspect of the present application provides an electronic device, comprising:
[0023] a processor; and
[0024] a memory having computer readable instructions stored thereon, the computer readable instructions being executed by the processor to implement the method described above.
[0025] The fourth aspect of the present application provides a computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method described above.
[0026] The present application can better adapt to dynamic environments such as sudden wind and light changes through dynamic state boundaries and event-driven state machines, and avoid control oscillation caused by fixed thresholds. The smooth migration between states and the application of the speed loop control make the entire landing process trajectory continuous and smooth, avoiding instruction jumps. The intelligent position backtracking mechanism and the exception handling logic (such as the long_fluct state) embedded in the state machine effectively deal with the situation of temporary loss or unstable recognition of the QR code, and improve the robustness of the system. The distributed architecture based on ROS and the strict mode switching conditions ensure the reliability of the system communication and the safety of the operation. BRIEF DESCRIPTION OF DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0028] Figure 1 a flowchart of a UAV autonomous landing control method based on QR code position calculation according to an embodiment of the present application;
[0029] Figure 2A node architecture diagram of a UAV autonomous landing control system based on two-dimensional code position solution in an embodiment of the present application;
[0030] Figure 3 A finite state machine (FSM) state transition diagram for autonomous landing control in an embodiment of the present application. DETAILED DESCRIPTION
[0031] To make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0032] As shown in Figure 1 , the UAV autonomous landing control method based on two-dimensional code position solution of the present application includes the following steps:
[0033] Step S110: A control system based on a ROS distributed architecture is constructed, and the system at least includes a camera acquisition node, a two-dimensional code detection node and an off-board control node;
[0034] Step S120: The off-board control node runs a finite state machine, and based on the pose information of the UAV relative to the two-dimensional code solved by the two-dimensional code detection node and the dynamic boundary condition, smooth transition is performed between different states of search, alignment and landing;
[0035] Step S130: According to the current state of the finite state machine, a position control or speed control strategy is selected and executed to guide the UAV to achieve autonomous landing;
[0036] Step S140: When the two-dimensional code detection is lost, a fault-tolerant position backtracking mechanism is triggered to guide the UAV to return to the last recorded valid position point to restore the two-dimensional code recognition and continue the landing process.
[0037] In an embodiment of the present application, the system hardware platform in step S110 adopts a Swirco RK3588 embedded development board as a core processor, establishes MAVLink protocol communication with a PX4 flight control through a double UART interface, and constructs a hardware control basis for UAV autonomous landing. After the system is powered on, the preset systemd service is automatically executed, and the following initialization processes are completed in turn: first, the serial communication parameters (baud rate 921600) are configured, the camera driver adaptation module is loaded to identify the accessed high-definition camera module (working resolution is 1920x1080, frame rate is 30fps), and then three key ROS2 Humble nodes are started in parallel to constitute a complete control link, as shown in Figure 2 .
[0038] The camera acquisition node (camera_pub_node) implements image capture based on the OpenCV framework. In the initialization stage, it automatically loads the pre-calibrated camera intrinsic matrix to perform real-time distortion correction and publishes the corrected RGB image in the sensor_msgs / msg / Image message format to the / image topic.
[0039] The QR code detection node (aruco_detect_node) subscribes to the / image topic for input and uses an optimized ArUco marker detection algorithm to calculate the relative pose. It outputs a custom uORB message containing the three-dimensional position deviation (Δx, Δy, Δz) and the yaw angle deviation (Δψ) to the / pose topic. Δx and Δy define the lateral offset of the QR code center in the drone body coordinate system (X-axis pointing forward, Y-axis pointing right), and Δψ represents the directional deviation in radians.
[0040] The offboard control node (offboard_control_node) serves as the decision center and implements safe switching of the Offboard mode through multi-dimensional state verification and hierarchical condition triggering mechanism, ensuring strict operational safety of the drone in the scenarios of waypoint task execution and autonomous landing in the final segment. The mode switching logic of the offboard control node is deeply coupled with the PX4 flight control state machine and task planning characteristics. The design of preset conditions is based on the following key considerations: 1) The drone must be in the PX4 predefined Return mode before starting Offboard control, which is designed to avoid potential risks during system initialization. When the drone completes the preset waypoint task, it will be forced to enter the Return mode, at which point the flight control has automatically taken over navigation control and stabilized hovering above the target landing area, effectively preventing accidental triggering of autonomous landing due to early detection of the ground QR code during takeoff. Meanwhile, the built-in obstacle avoidance and position keeping functions of the Return mode provide a stable initial state for subsequent visual positioning. 2) The drone effectively detects the QR code to avoid random switching to the Offboard mode, ensuring the safety of the drone. 3) Height safety threshold constraint. Mode switching is allowed only when the relative height of the drone to the ground is less than the height safety threshold of 5m. This threshold design is based on two engineering considerations: one is control reliability, at this height, the effective field of view angle of the downward-looking camera can completely cover the designed QR code board, ensuring the continuous stability of visual positioning. The second is fault tolerance, if positioning abnormalities occur in the Offboard mode, the impact energy caused by the emergency landing of the drone at low altitude can be effectively absorbed by the landing gear cushion structure.
[0041] The node subscribes to the / pose topic and has a three-step process, search phase, alignment phase and landing phase. The search phase starts when the UAV enters the Return mode after completing the preset waypoint task, and when the aircraft approaches the preset landing area, the two-dimensional code is recognized and the Offboard mode is switched. In addition, when the two-dimensional code is not detected for 30 frames, the node guides the aircraft to return to the last valid recognition position, and by dynamically adjusting the flight height and yaw angle, the visual capture condition is reconstructed to ensure that the UAV can recognize the two-dimensional code again. In the alignment phase, the system implements multi-mode control based on the state machine, and adopts different control strategies according to different states. In the initial correction phase, by setting the target position point and yaw angle parameters in the North-East-Down (NED) coordinate system, the UAV is driven to quickly approach the target at the maximum safe speed; when entering the precise adjustment phase, the speed loop control mode is switched, and based on the real-time pose deviation, the three-dimensional velocity vector (Vx = Kp·Δx, Vy = Kp·Δy) and yaw rate Smooth deceleration and heading fine-tuning are achieved. The landing mode trigger condition strictly follows the multi-sensor fusion criterion: when the horizontal positioning deviation is less than 0.08 meters, the yaw angle error is less than 15°, and the relative height is lower than 0.3 meters, the system will hand over the control to the PX4 built-in landing algorithm, switch to the land mode, and achieve smooth landing.
[0042] To ensure safety and controllability during pose adjustment, the speed control uses amplitude limiting processing. For speed control, the speed limit is set so that the angular velocity does not exceed 0.349 and the linear speed absolute value does not exceed the limit parameter.
[0043] In an embodiment of the present application, the state layer of the finite state machine in step S120 includes an initial state (no_id), a long-distance deviation state (long_dev), a long-distance center state (long_center), a mid-distance deviation state (mid_dev), a mid-distance center state (mid_center), and a low-distance center state (low_center). The initial state layer is no_id, indicating that no valid two-dimensional code is currently detected. The long-distance intermediate positioning state layer includes the long_center state and the long_dev state; the mid-distance intermediate positioning state layer includes the mid_center state and the mid_dev state; and the low-distance positioning state layer includes the low_center state. The long_center state is used to describe the position state of the UAV when it is close to the central axis of the landing two-dimensional code at a long distance, the long_dev state is used to describe the position state of the UAV when it is not close to the central axis of the landing two-dimensional code at a long distance, the mid_center state is used to describe the position state of the UAV when it is close to the central axis of the landing two-dimensional code at a mid distance, the mid_dev state is used to describe the position state of the UAV when it is not close to the central axis of the landing two-dimensional code at a mid distance, and the long_fluct state is used to describe the position state of the detection result mutation or the large change of the inter-frame detection result.
[0044] In an embodiment of the present application, the entire process of two-dimensional code assisted landing based on the state machine in step S130 is as follows: when the two-dimensional code is detected (alarm=True), the return mode (return) is met, and the height is less than the landing height, the flight control is allowed to switch to the Offboard mode. The two-dimensional code includes two-dimensional code identifiers (IDs 1, 2, 3, 4, 5, and 6) of different sizes, which are used to provide pose references in different distance ranges.
[0045] When in the return mode and the height is lower than the safety threshold, if the two-dimensional code with ID 6 (the largest size, used for long-distance identification) is detected, and the horizontal deviations (Δx and Δy) are both greater than 0.5 meters, the long_dev state is migrated to, and a position control strategy is adopted to set a target point to drive the UAV to move towards the center of the two-dimensional code.
[0046] If the two-dimensional code with ID 6 is detected and the horizontal deviations are both less than 0.5 meters, the long_center state is migrated to, and a speed control strategy is adopted for fine adjustment.
[0047] In the long_center state, if the two-dimensional codes with IDs 1, 2, 3, and 4 (smaller sizes, used for mid and low distances) are detected at the same time, the mid_center state is migrated to, and the speed control is continued to be used for fine adjustment until the deviation is less than 0.12 meters.
[0048] In the mid_center state, if a two-dimensional code with ID 5 (minimum size, for close range) is detected and the horizontal deviation is less than 0.05 meters, the low_center state is migrated to, the Land mode instruction is triggered, and landing is completed.
[0049] In any state, if a two-dimensional code is not detected for 30 consecutive frames, a position backtracking mechanism is triggered, and the unmanned aerial vehicle is controlled to return to the last valid position recorded in the state.
[0050] Specifically, the initial state is no_id,
[0051] When only a nested two-dimensional code with ID 6 (maximum size, for long-distance recognition) is detected, and the x-axis and y-axis distances are both less than 0.5 m, the long_dev state is entered from the initial state, indicating that the current unmanned aerial vehicle is far from the landing plane and has a large distance from the two-dimensional code center. Therefore, a position control strategy is adopted, the x-axis and y-axis differences Δx and Δy and the yaw angle of the unmanned aerial vehicle obtained through the / pose topic subscription are solved, the target position in the north-east coordinate system with the takeoff point as the origin is calculated, and the yaw angle is the deviation angle. The calculation formula is as follows:
[0052] x = x0-(cos θ * Δx + sin θ * Δy)
[0053] y = y0-(-sin θ * Δx + Cos θ * Δy)
[0054] Where θ is the yaw angle of the unmanned aerial vehicle in the NED coordinate system, x0 and y0 are the local positions of the unmanned aerial vehicle obtained through subscription, x and y are the target positions, and Δx and Δy are the x-axis and y-axis deviations of the unmanned aerial vehicle from the two-dimensional code.
[0055] When only a nested two-dimensional code with ID 6 is detected, and the x-axis and y-axis distances in the pose information are both less than 0.5 m, the long_center state is entered from the initial state, indicating that the current unmanned aerial vehicle is far from the landing plane but close to the two-dimensional code center. Velocity control is used for fine tuning. The velocity control vector is similar to the position calculation method, and the formula is as follows:
[0056] vx = -(cos θ * Δx + sin θ * Δy) * Kp
[0057] vy = -(-sin θ * Δx + cos θ * Δy) * Kp
[0058]
[0059] wherein vx and vy are target linear velocities in x and y directions in the NED coordinate system, Δx and Δy are deviations of the UAV from the QR code in x and y directions, θ is the yaw angle of the UAV in the NE coordinate system, and Kp is a proportional coefficient. is a target yaw angular velocity.
[0060] When the UAV pose is adjusted, if the distance from the QR code center is detected to be less than 0.25 m and the deviation angle is less than 20 degrees, the UAV height is started to be lowered, and the deviation of the QR code is detected in real time through a callback function.
[0061] In the long_dev state, if the nested QR code is not detected, the long_dev state is entered into the initial state, and the hovering state is maintained.
[0062] If only the nested QR code with id 6 is detected, and the x-axis deviation and the y-axis deviation are both less than 0.5 m, the long_dev state is entered into the long_center state, which means that the UAV is moved to the direction of aligning with the QR code center through the above position control strategy.
[0063] If the change in the nested QR code id is large in the detection process for 5 consecutive frames, the long_dev state is entered into the long_fluct state; wherein if the nested QR code id detected in each frame is changing, it is considered that the change in the nested QR code id is large, which means that the current QR code detection state is unstable, and the detection result is illegal, and therefore the hovering strategy is maintained.
[0064] In the long_center state, if the nested QR code is not detected, the long_center state is entered into the initial state, and the hovering state is maintained.
[0065] If the nested QR codes with ids 1, 2, 3, and 4 are detected at the same time, the long_center state is entered into the mid_center state, which means that the UAV is getting closer to the landing plane by lowering the height, and no large deviation occurs in the horizontal direction during the height adjustment process, and the fine adjustment will be performed through the speed control strategy until the distance from the QR code center is less than 0.12 m. After the fine adjustment process is completed, the height will continue to be lowered.
[0066] If any two of the nested QR codes with ids 1, 2, 3, and 4 are detected at the same time, the long_center state is entered into the mid_dev state, which means that the UAV is getting closer to the landing plane by lowering the height, but a large deviation occurs in the horizontal direction during the height adjustment process, and the pose adjustment will be performed through the position control strategy until the mid_center state is entered.
[0067] If only id=6 is detected in 8 consecutive frames, the state machine will transit from long_fluct to long_dev, indicating that the detection state is stable.
[0068] If id=5 is detected in mid_center state, and both x and y deviation are less than 0.05m, the state machine will transit from mid_center to low_center, indicating that both the pose and height of UAV satisfy the landing requirement, and the command of switching to landing mode will be sent.
[0069] If id=1, 2, 3, 4 are detected in mid_dev state, the state machine will transit from mid_dev to mid_center, indicating that the UAV is moving towards the center of the QR code by the position control strategy. The strategy and related parameters used in the state transition process are shown in Table 1.
[0070] Table 1 State transition strategy description table
[0071]
[0072]
[0073]
[0074] The intelligent judgment mechanism based on state machine can significantly improve the response ability of UAV to flight anomalies. By clearly defining the state nodes such as mid_center and mid_dev and their transition conditions, the system can analyze the flight state transition in real time. For example, when detecting the state transition from mid_center to mid_dev, it can be inferred that there is an abnormal situation of crosswind interference. By distinguishing between transient jitter and sustained interference through state transition, the root cause of the abnormality can be traced back according to the migration path, and the corresponding dynamic compensation strategy can be triggered.
[0075] In an embodiment of the present application, the system integrates a fault-tolerant mechanism. When no_id is detected for 30 consecutive frames, it represents that the UAV has not acquired valid visual positioning information for a long time. In order to continue the landing process, the system will start a position backtracking strategy to make the UAV move towards the last recorded position. In the three states of long_center, mid_center and low_center, the UAV pose is close to the center positive area of the two-dimensional code, and the recorded coordinate points have a high probability of detecting the two-dimensional code. Therefore, the historical position is recorded in the backtracking function of the three states. By guiding the UAV to move towards the memory position, the visual observation link can be reconstructed to recover the two-dimensional code identification, and the continuity of the landing process is ensured. This mechanism can effectively deal with sudden crosswind interference and other situations, and ensure that the UAV can still autonomously recover the landing process after losing the two-dimensional code.
[0076] The present application provides a UAV autonomous landing control device based on two-dimensional code position solution, comprising:
[0077] A camera acquisition module is configured to acquire environment images.
[0078] A two-dimensional code detection module is configured to process the images and solve the three-dimensional position deviation and yaw angle deviation of the UAV relative to the two-dimensional code.
[0079] A flight state machine module is configured to migrate between multiple states of searching, aligning and landing based on the pose deviation and dynamic boundary conditions, and select a corresponding control strategy according to the current state.
[0080] A fault-tolerant position backtracking module is configured to guide the UAV to return to the last recorded valid position point to recover the two-dimensional code identification when the two-dimensional code detection is lost.
[0081] A communication and control module is configured to realize low-latency data interaction between the camera acquisition module, the two-dimensional code detection module, the flight state machine module and the flight control system through the ROS distributed architecture and the DDS communication middleware.
[0082] In summary, the present application realizes high-reliability and high-precision autonomous landing of the UAV in a complex environment through innovative state machine design and fault-tolerant mechanism. The present application is not limited by the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the spirit of the present application.
[0083] In addition, in the exemplary embodiments of the present disclosure, an electronic device capable of implementing the above method is also provided, comprising a processor; and a memory having computer readable instructions stored thereon, the computer readable instructions being executed by the processor to implement the above method.
[0084] Those skilled in the art can understand that each aspect of the present application can be implemented as a system, a method or a program product. Therefore, each aspect of the present application can be embodied in a form of entirely hardware, entirely software (including firmware, microcode, etc.), or a combination of hardware and software, which can be collectively referred to as "circuitry", "module" or "system".
[0085] The electronic device is in the form of a general computing device. Components of the electronic device can include, but are not limited to, the at least one processing unit described above, the at least one storage unit described above, a bus connecting different system components, including the storage unit and the processing unit, a display unit.
[0086] The storage unit stores program codes, which can be executed by the processing unit, so that the processing unit performs steps according to various exemplary embodiments of the present application described in the "Exemplary Method" part of the present specification. For example, the processing unit can perform steps S110 to S140 as shown in FIG. 1. Figure 1
[0087] The storage unit can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) and / or a cache memory, and can further include a read-only memory (ROM).
[0088] The storage unit can further include programs / utilities with a set of (at least one) program modules, such as an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which can include implementation of a network environment.
[0089] The bus can be one or more of several types of bus structures, including a storage unit bus or storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus structures.
[0090] The electronic device can also be in communication with one or more external devices such as a keyboard or a pointing and / or selection device, and / or other devices via the I / O interface. Further, an electronic device could also communicate to and / or with other computing devices such as host computing devices or servers, via the network adapter. In this regard, the network adapter can enable the electronic device to communicate with various distributed components or host computing devices with which it is in communication. As will be appreciated, the network adapter can include any of a wide variety of appropriate logic to enable the electronic device to interface to any of a wide variety of other devices or systems. Such communication can be facilitated by way of any electronic processing and / or computing system using hardware, software, and / or any combination of the two. In this regard, the electronic device can be a part of a larger network, which can include many different components, systems, and / or computing devices.
[0091] From the above description of the embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the disclosure can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, or the like) or a network, and includes a plurality of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the methods according to the embodiments of the disclosure.
[0092] In the example embodiments of the disclosure, a computer readable storage medium is also provided, which stores a program product capable of implementing the above-mentioned method of the specification. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code for causing a terminal device to perform the steps described in the above-mentioned "example method" section of the specification according to various example embodiments of the present disclosure when the program product is run on the terminal device.
[0093] The program product for implementing the above-mentioned method according to the embodiments of the present disclosure can take the form of a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, device, or apparatus.
[0094] The program product can employ any combination of one or more computer-readable media. The computer-readable media can be a computer-readable storage medium or a computer-readable signal medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0095] The computer-readable signal medium can include a computer-readable storage medium that is propagated as a carrier wave. The computer-readable signal medium can further be any computer-readable medium that is not a storage medium. The computer-readable signal medium can be a computer-readable storage medium that is a propagated signal on a computer-readable storage medium.
[0096] The program code embodied on the computer-readable media can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0097] The program code can be executed by one or more programmable processors, which can be implemented in one or more computer devices including any combination of a microprocessor, a microcontroller, a digital signal processor, or other processing circuitry. The program code can be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer device, partly on the user's computer device, as a stand-alone software package, partly on the user's computer device and partly on a remote computer device or entirely on the remote computer device or server. In the latter scenario, the remote computer device can be connected to the user's computer device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer device such as through the Internet using an Internet Service Provider. The program code can also be downloaded to the user's computer device from the remote computer device or server through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer device such as through the Internet using an Internet Service Provider.
[0098] In addition, the above-described flowcharts are merely illustrative of the processes included in the method according to the exemplary embodiments of the present application, and are not intended to limit the present application. It is readily understood that the processes shown in the above-described flowcharts do not indicate or limit the time sequence of the processes. In addition, it is readily understood that the processes can be executed synchronously or asynchronously, for example, in a plurality of modules.
[0099] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
[0100] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the claims that follow.
Claims
1. A method for controlling autonomous landing of a UAV based on position solution of a two-dimensional code, characterized in that, The method comprises the following steps: 1) constructing a control system based on ROS distributed architecture, the system comprising at least a camera acquisition node, a two-dimensional code detection node and an offboard control node; 2) the offboard control node running a finite state machine, based on the pose information of the unmanned aerial vehicle relative to the two-dimensional code calculated by the two-dimensional code detection node and the dynamic boundary condition, smoothly migrating between search, alignment and landing states; 3) according to the current state of the finite state machine, selecting and executing a position control or speed control strategy to guide the unmanned aerial vehicle to achieve autonomous landing; 4) when the two-dimensional code detection is lost, triggering a fault-tolerant position backtracking mechanism to guide the unmanned aerial vehicle to return to the last recorded valid position point to restore two-dimensional code recognition and continue the landing process.
2. The method of claim 1, wherein, The state layer of the finite state machine comprises an initial state (no_id), a long-distance deviation state (long_dev), a long-distance center state (long_center), a medium-distance deviation state (mid_dev), a medium-distance center state (mid_center) and a close-distance center state (low_center).
3. The method of claim 1, wherein, The state migration condition of the finite state machine is dynamically adjusted based on at least one of the following factors: horizontal distance deviation (Δx, Δy) of the unmanned aerial vehicle from the center of the two-dimensional code; yaw angle deviation (ψ); continuously detected nested two-dimensional code ID combination and its stability; number of frames of two-dimensional code loss.
4. The method of claim 1, wherein, The position control strategy controls the unmanned aerial vehicle pose by calculating the target position point and yaw angle in the North-East-Down (NED) coordinate system; the speed control strategy controls the unmanned aerial vehicle motion by calculating the three-dimensional velocity vector (Vx, Vy, Vz) and yaw angular velocity (ω) in the NED coordinate system.
5. The method of claim 2, wherein, The fault-tolerant position backtracking mechanism records the historical position point when the unmanned aerial vehicle is in the long-distance center state (long_center), the medium-distance center state (mid_center) or the close-distance center state (low_center), and uses the position point for backtracking when the two-dimensional code is lost.
6. The method of claim 1, wherein, The offboard control node switches the unmanned aerial vehicle to the Offboard mode when the following conditions are met simultaneously: the unmanned aerial vehicle is in the return mode; the two-dimensional code is effectively detected; and the relative height of the unmanned aerial vehicle to the ground is less than a preset safety height threshold.
7. The method of claim 1, wherein, The condition for triggering the final landing mode (Land Mode) is that the horizontal positioning deviation is less than a first threshold, the yaw angle error is less than a second threshold, and the relative height is lower than a third threshold.
8. An unmanned aerial vehicle autonomous landing control device based on two-dimensional code position solution, characterized in that, It comprises: a camera acquisition module for acquiring environment images; a two-dimensional code detection module for processing images to calculate the three-dimensional position deviation and yaw angle deviation of the unmanned aerial vehicle relative to the two-dimensional code; a flight state machine module for migrating between multiple states of search, alignment and landing based on the pose deviation and dynamic boundary condition, and selecting a corresponding control strategy according to the current state; a fault-tolerant position backtracking module for guiding the unmanned aerial vehicle to return to the last recorded valid position point to restore two-dimensional code recognition when the two-dimensional code detection is lost. A communication and control module is configured to realize low-delay data interaction between the camera acquisition module, the two-dimensional code detection module, the flight state machine module and the flight control system through the ROS distributed architecture and the DDS communication middleware.
9. An electronic device, comprising: The method comprises: a processor; and a memory having stored thereon computer readable instructions which, when executed by the processor, implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the memory and is executed by the processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Unmanned aerial vehicle landing system, unmanned aerial vehicle landing control method and unmanned aerial vehicle
CN120044979A