Indoor unmanned aerial vehicle dynamic obstacle avoidance flight method, program product, equipment and medium

By establishing a mapping between a two-dimensional coordinate system and a three-dimensional environment model in an indoor drone, and combining ultra-wideband positioning and lidar technology, the flight path can be dynamically adjusted, solving the problem of autonomous obstacle avoidance for indoor drones in dynamic obstacle environments, and achieving efficient and safe indoor flight.

CN121806918APending Publication Date: 2026-04-07ZHUHAI UNITECH POWER TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies consume significant computational resources and are insufficient in handling dynamic obstacles during autonomous positioning and obstacle avoidance of indoor drones. They are particularly prone to failure under varying lighting conditions or in mirrored environments, leading to a high risk of collisions.

Method used

By establishing a mapping between a two-dimensional coordinate system and a three-dimensional environment model, and integrating ultra-wideband positioning and lidar technologies, the positions of UAVs and moving objects are acquired in real time. A forward-looking waypoint geometric correction algorithm is used to dynamically adjust the flight path to avoid collisions.

Benefits of technology

It enables efficient and safe flight of UAVs in complex and dynamic indoor environments, reduces collision accidents, ensures mission continuity and the safety of ground personnel, and improves the reliability and accuracy of autonomous obstacle avoidance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121806918A_ABST
    Figure CN121806918A_ABST
Patent Text Reader

Abstract

The invention provides an indoor unmanned aerial vehicle dynamic obstacle avoidance flight method, a program product, electronic equipment and a storage medium. The method comprises the steps that a two-dimensional coordinate system corresponding to an indoor operation area and an initial flight route are acquired; determining a safety area corresponding to the moving body based on the positioning label carried by the moving body; acquiring second position information of the unmanned aerial vehicle in the three-dimensional environment model in real time, and determining a two-dimensional projection coordinate; judging whether the dimensional projection coordinates are located in the safety area at the current moment or not; if yes, the position of at least one waypoint to fly in the initial flight route is adjusted, so that the two-dimensional projection coordinates corresponding to the adjusted waypoint are located outside the safe area, and the unmanned aerial vehicle is controlled to continue to fly according to the adjusted flight route; and if not, controlling the unmanned aerial vehicle to continuously fly according to the initial flight route. The positions of the moving object and the unmanned aerial vehicle are accurately tracked, and the flight path of the unmanned aerial vehicle is smoothly adjusted before a collision risk occurs, so that the safety is improved.
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) control, and more specifically, to an indoor UAV dynamic obstacle avoidance flight method, program product, equipment, and medium. Background Technology

[0002] With the development of the low-altitude economy, drones are increasingly used in indoor scenarios, such as equipment inspection, warehouse inventory, and exhibition hall guidance. Indoor environments typically lack GPS signals and are characterized by complex structures and numerous dynamic obstacles, placing higher demands on drones' autonomous positioning and obstacle avoidance capabilities. Currently, the industry primarily relies on technologies such as SLAM (Simultaneous Localization and Mapping), visual obstacle avoidance, radio frequency positioning, or multi-sensor fusion to achieve navigation and safe flight for indoor drones. However, these existing solutions still have significant limitations: SLAM technology requires real-time environmental mapping, consuming significant computational resources, and is insufficient in handling dynamic obstacles or blind spots; visual solutions are greatly affected by lighting and texture, and are prone to failure in environments with mirrored or solid-color walls. Summary of the Invention

[0003] The purpose of this application is to provide an indoor unmanned aerial vehicle (UAV) dynamic obstacle avoidance flight method, program product, electronic device and storage medium to improve the above-mentioned problems.

[0004] In a first aspect, embodiments of this application provide a method for dynamic obstacle avoidance flight of an indoor unmanned aerial vehicle (UAV), comprising: acquiring a two-dimensional coordinate system corresponding to an indoor work area, and a three-dimensional environment model constructed based on the indoor work area using a lidar; establishing a mapping relationship between the three-dimensional environment model and the two-dimensional coordinate system on a horizontal plane; planning an initial flight path of the UAV based on the three-dimensional environment model, the flight path including multiple sequentially executed waypoints with three-dimensional coordinates; acquiring, in real time, the first position information of the mobile body in the two-dimensional coordinate system based on a positioning tag carried by a mobile body within the indoor work area and an ultra-wideband positioning system pre-deployed in the indoor work area, and determining the position information based on the first position information. The system dynamically determines the safe zone corresponding to the moving object based on the changes in the flight path; it acquires the second position information of the UAV in the 3D environment model in real time and determines the two-dimensional projection coordinates of the next waypoint to be flown in the initial flight path in the two-dimensional coordinate system; it determines whether the two-dimensional projection coordinates of the next waypoint to be flown are within the safe zone at the current moment; if so, it adjusts the position of at least one waypoint to be flown in the initial flight path whose two-dimensional projection coordinates fall within the safe zone, obtains the adjusted flight path, and ensures that the two-dimensional projection coordinates of the adjusted waypoints are outside the safe zone, and controls the UAV to continue flying according to the adjusted flight path; if not, it controls the UAV to continue flying according to the initial flight path.

[0005] In the aforementioned implementation process, a precise mapping between a two-dimensional monitoring coordinate system and a three-dimensional flight environment model was established. By integrating ultra-wideband high-precision dynamic positioning and lidar autonomous positioning technologies, an indoor UAV collaborative safety flight system was constructed. This embodiment can track the positions of moving objects and UAVs in real time and accurately. Before a collision risk occurs, it dynamically and smoothly adjusts the UAV's flight path through a forward-looking waypoint geometry correction algorithm, thereby reducing collision accidents caused by reaction delays, sensor blind spots, or environmental interference. Compared to traditional obstacle avoidance methods relying on emergency stops or single sensors, this improves the active safety and mission continuity of UAV operations in complex and dynamic indoor environments, while also ensuring the safety of ground personnel to a certain extent, achieving reliable and efficient human-machine collaborative operations.

[0006] Optionally, in this embodiment of the application, adjusting the position of at least one waypoint in the initial flight path whose two-dimensional projected coordinates fall within the safe area to obtain the adjusted flight path includes: if the two-dimensional projected coordinates of the next waypoint are located within the safe area at the current moment, traversing all waypoints after the current waypoint in the initial flight path, horizontally projecting the three-dimensional coordinates of each waypoint onto the two-dimensional coordinate system to obtain a two-dimensional projected coordinate sequence; identifying the waypoints to be adjusted that fall within the safe area in the two-dimensional projected coordinate sequence; adjusting the two-dimensional projected coordinates of the waypoints to be adjusted based on the current waypoint of the UAV and the real-time safe area, and mapping the adjusted two-dimensional projected coordinates onto the three-dimensional environment model based on the mapping relationship between the three-dimensional environment model and the two-dimensional coordinate system to obtain the adjusted flight path.

[0007] In the aforementioned implementation process, comprehensive prediction of potential collision risks is achieved through traversal and identification. Based on geometrical planar adjustments, a computationally efficient and logically clear obstacle avoidance path generation method is provided, capable of calculating the optimal detour point in a short time, ensuring rapid response. Through precise coordinate inverse mapping and 3D reconstruction, the abstract obstacle avoidance logic is transformed into a flight trajectory that the UAV can execute accurately, maintaining the spatial integrity and safety of the mission. This improves the reliability, accuracy, and overall operational safety of the UAV's autonomous obstacle avoidance in dynamic indoor environments, enabling the UAV to continuously and smoothly complete inspection or operational tasks while ensuring absolute personnel safety.

[0008] Optionally, in this embodiment of the application, based on the current waypoint of the UAV and the real-time safe zone, the two-dimensional projected coordinates of the waypoint to be adjusted are adjusted to obtain the adjusted flight path, including: determining the intersection of the horizontal or vertical line connecting the two-dimensional projected coordinates of the waypoint to be adjusted with the boundary of the safe zone as two candidate waypoints; selecting a target candidate waypoint from the two candidate waypoints, wherein the target candidate waypoint satisfies the following condition: the line connecting it as the starting point and the next waypoint that has not fallen into the safe zone does not pass through the interior of the safe zone; generating an adjusted waypoint outside the safe zone based on the target candidate waypoint and a preset buffer distance; and obtaining the adjusted flight path based on the adjusted waypoint.

[0009] In the above implementation process, a clear path option is provided by calculating the geometric intersection with the boundary of the safe zone; the global safety of the selected path segment is ensured through geometric filtering logic; various system errors are effectively reduced by introducing buffer distance extrapolation operations, and a solid safety redundancy is established; finally, three-dimensional flight commands that can be directly and safely executed are generated through coordinate mapping and sequence recombination. This improves the accuracy, safety, and real-time performance of UAVs in replanning flight routes near dynamic obstacles, and reduces the risk of secondary collisions or frequent flight path modifications caused by imperfect obstacle avoidance logic.

[0010] Optionally, in this embodiment of the application, the intersection of the horizontal or vertical line connecting the two-dimensional projected coordinates of the waypoint to be adjusted with the boundary of the safe area is determined as two candidate waypoints. This includes: if the UAV's flight direction is along the positive or negative axis of the horizontal axis of the two-dimensional coordinate system, the intersection of the horizontal line connecting the two-dimensional projected coordinates of the waypoint to be adjusted with the boundary of the safe area is determined as two candidate waypoints; if the UAV's flight direction is along the positive or negative axis of the vertical axis of the two-dimensional coordinate system, the intersection of the vertical line connecting the two-dimensional projected coordinates of the waypoint to be adjusted with the boundary of the safe area is determined as two candidate waypoints.

[0011] In the aforementioned implementation process, intelligent judgment and geometric calculation based on real-time flight direction ensure that each obstacle avoidance candidate point generated by the UAV follows its original flight trend. This reduces unreasonable, inefficient, and even dangerous maneuvers that might result from arbitrarily selected obstacle avoidance directions (e.g., suddenly requiring a vertical turn while moving horizontally). It improves the rationality, predictability, and flight efficiency of dynamic route adjustments, making the UAV's obstacle avoidance behavior smoother, thereby fundamentally enhancing the overall behavioral safety and mission reliability of the autonomous flight system in complex dynamic environments.

[0012] Optionally, in this embodiment of the application, based on the positioning tag carried by the mobile body in the indoor work area and the ultra-wideband positioning system pre-deployed in the indoor work area, the first position information of the mobile body in the two-dimensional coordinate system is obtained in real time, including: the ultra-wideband positioning system receives short-pulse ultra-wideband signals emitted by the positioning tag through multiple fixed base stations; multiple fixed base stations form a positioning network covering the entire work area; the positioning tag is an ultra-wideband positioning tag; by measuring the arrival time difference of the short-pulse ultra-wideband signal from the positioning tag to different fixed base stations, the distance information between the positioning tag and each fixed base station is calculated; based on the distance information and the coordinates of multiple fixed base stations in the two-dimensional coordinate system, a triangulation algorithm is used to calculate and output the coordinates of the positioning tag in the two-dimensional coordinate system in real time as the first position information of the mobile body.

[0013] In the aforementioned implementation process, a dedicated ultra-wideband positioning network was constructed to address the challenge of missing indoor GPS signals. By precisely measuring the subtle time differences in wireless signal propagation and employing geometric calculation algorithms, abstract radio frequency signals were transformed into reliable spatial coordinates. This improved the system's accuracy, real-time performance, and reliability in perceiving the location of dynamic obstacles. It provides indispensable, high-quality data input for subsequent safety decisions and dynamic flight path adjustments by UAVs based on precise location information, serving as the fundamental prerequisite and key guarantee for the realization of the entire indoor UAV safe flight solution.

[0014] Optionally, in this embodiment of the application, the three-dimensional environment model constructed by the lidar based on the indoor working area includes: controlling a drone equipped with lidar to scan the indoor environment and obtain raw point cloud data; processing the raw point cloud data to generate a three-dimensional point cloud model; aligning the horizontal reference plane of the three-dimensional point cloud model with the two-dimensional coordinate system, and establishing a proportional conversion relationship between the two coordinates.

[0015] In the above implementation process, by constructing a high-precision, digital indoor three-dimensional environment model and accurately spatially associating it with a two-dimensional planar map used for monitoring and scheduling, the integrity, accuracy, and consistency of environmental information expression are improved, providing a unified and reliable spatial benchmark for the precise positioning, flight path planning, and fusion calculation of UAVs with two-dimensional dynamic safety information in three-dimensional space.

[0016] Optionally, in this embodiment, the safe zone is determined by a preset safe distance and real-time first position information; determining whether the two-dimensional projected coordinates of the next waypoint to be flown are within the safe zone at the current moment includes: extracting the three-dimensional coordinates of the next waypoint to be flown from the initial flight path, and horizontally projecting the three-dimensional coordinates onto the two-dimensional coordinate system to obtain the two-dimensional projected coordinates of the next waypoint to be flown; the next waypoint to be flown is the next waypoint that the UAV will fly to according to the initial flight path; calculating the distance between the two-dimensional projected coordinates and the first position information of the moving body at the current moment; determining whether the distance exceeds the safe distance: if not, then determining that the two-dimensional projected coordinates of the next waypoint to be flown are within the safe zone at the current moment.

[0017] In the aforementioned implementation process, by extracting and projecting flight intentions in real time, the system achieves prediction of future states; by accurately calculating dynamic distances, it quantifies complex spatial safety relationships into a clear numerical value; and by comparing with fixed safety thresholds in real time, it achieves rapid and automatic identification of collision risks. This enhances the system's proactive perception and real-time judgment of potential hazards, enabling the UAV to initiate obstacle avoidance responses in the critical time before a collision occurs, thereby enhancing the active safety and overall reliability of autonomous flight in environments with dynamic human presence.

[0018] Secondly, this application also provides an indoor unmanned aerial vehicle (UAV) dynamic obstacle avoidance flight device, including: a coordinate system mapping module for acquiring a two-dimensional coordinate system corresponding to the indoor work area, and a three-dimensional environment model constructed based on the indoor work area using a lidar; establishing a mapping relationship between the three-dimensional environment model and the two-dimensional coordinate system on a horizontal plane; an initial flight path planning module for planning the initial flight path of the UAV based on the three-dimensional environment model, the flight path including multiple sequentially executed waypoints with three-dimensional coordinates; and a safe distance determination module for acquiring the first position information of the mobile body in the two-dimensional coordinate system in real time based on the positioning tag carried by the mobile body within the indoor work area and the ultra-wideband positioning system pre-deployed in the indoor work area, and... Based on the changes in the first position information, the safe zone corresponding to the moving body is dynamically determined; the waypoint determination module is used to acquire the second position information of the UAV in the three-dimensional environment model in real time, and determine the two-dimensional projection coordinates of the next waypoint in the initial flight path in the two-dimensional coordinate system; the adjustment module is used to determine whether the two-dimensional projection coordinates of the next waypoint are located within the safe zone at the current moment; if so, the position of at least one waypoint in the initial flight path whose two-dimensional projection coordinates fall within the safe zone is adjusted to obtain the adjusted flight path, so that the two-dimensional projection coordinates corresponding to the adjusted waypoints are outside the safe zone, and the UAV is controlled to continue flying according to the adjusted flight path; if not, the UAV is controlled to continue flying according to the initial flight path.

[0019] Thirdly, embodiments of this application also provide a computer program product, including computer program instructions, which are executed by a processor to perform the method provided in the first aspect or any implementation thereof.

[0020] Fourthly, embodiments of this application also provide an electronic device, including: a processor and a memory, the memory storing computer program instructions, which are executed by the processor to perform the method provided in the first aspect or any implementation thereof.

[0021] Fifthly, embodiments of this application also provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, perform the method provided in the first aspect or any implementation thereof.

[0022] This application presents an indoor UAV dynamic obstacle avoidance flight method, program product, electronic equipment, and storage medium. By establishing a precise mapping between a two-dimensional monitoring coordinate system and a three-dimensional flight environment model, and integrating ultra-wideband high-precision dynamic positioning and lidar autonomous positioning technologies, a collaborative safe flight system for indoor UAVs is constructed. The embodiments of this application can track the positions of moving objects and UAVs in real time and accurately. Before a collision risk occurs, a forward-looking waypoint geometric correction algorithm dynamically and smoothly adjusts the UAV's flight path, effectively reducing collision accidents caused by reaction delays, sensor blind spots, or environmental interference. Compared to traditional obstacle avoidance methods that rely on emergency stops or single sensors, this method improves the active safety and mission continuity of UAV operations in complex and dynamic indoor environments, while also ensuring the safety of ground personnel to a certain extent, achieving reliable and efficient human-machine collaborative operations. Attached Figure Description

[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 A flowchart illustrating an indoor unmanned aerial vehicle (UAV) dynamic obstacle avoidance flight method provided in this application embodiment; Figure 2 A schematic diagram of the security area provided in the embodiments of this application; Figure 3 This is a schematic diagram of a first flight route provided in an embodiment of this application; Figure 4This is a schematic diagram of a second flight route provided in an embodiment of this application; Figure 5 This is a schematic diagram of two candidate waypoints provided in an embodiment of this application; Figure 6 A schematic diagram of the adjusted waypoints provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0025] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this application.

[0027] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0028] Please see Figure 1 The illustrated diagram shows a flowchart of an indoor drone dynamic obstacle avoidance flight method provided in this application embodiment. The indoor drone dynamic obstacle avoidance flight method provided in this application embodiment can be applied to electronic devices, which may include physical devices such as servers, PCs, tablets, or smartphones, or virtual devices such as virtual machines or containers. The electronic device can be a single device, a combination of multiple devices, or a cluster of a large number of devices. The indoor drone dynamic obstacle avoidance flight method may include: Step S110: Obtain the two-dimensional coordinate system corresponding to the indoor work area, and the three-dimensional environment model constructed based on the indoor work area using LiDAR; establish a mapping relationship between the three-dimensional environment model and the two-dimensional coordinate system on the horizontal plane.

[0029] Step S120: Plan the initial flight path of the UAV based on the three-dimensional environment model. The flight path includes multiple waypoints that are executed sequentially and have three-dimensional coordinates.

[0030] Step S130: Based on the positioning tag carried by the mobile body in the indoor work area and the ultra-wideband positioning system pre-deployed in the indoor work area, the first position information of the mobile body in the two-dimensional coordinate system is obtained in real time, and the safe area corresponding to the mobile body is dynamically determined according to the change of the first position information.

[0031] Step S140: Acquire the second position information of the UAV in the three-dimensional environment model in real time, and determine the two-dimensional projection coordinates of the next waypoint to be flown in the two-dimensional coordinate system in the initial flight path.

[0032] Step S150: Determine whether the two-dimensional projected coordinates of the next waypoint to be flown are within the safe area at the current moment; if yes, adjust the position of at least one waypoint to be flown in the initial flight path so that the two-dimensional projected coordinates fall within the safe area, obtain the adjusted flight path, so that the two-dimensional projected coordinates corresponding to the adjusted waypoints are outside the safe area, and control the UAV to continue flying according to the adjusted flight path; if no, control the UAV to continue flying according to the initial flight path.

[0033] Step S110 establishes the precise spatial digital foundation upon which the UAV's flight depends. First, a two-dimensional coordinate system can be established based on computer-aided design (CAD) drawings of the indoor work area. These drawings must accurately reflect the static layout of indoor walls, fixed equipment, etc. A specific corner point on the drawing (such as the bottom left corner) can be set as the origin O to establish a planar XY coordinate system covering the entire work area. This coordinate system serves as a unified reference for all planar positional information.

[0034] Secondly, the 3D environment model is constructed by scanning with a drone equipped with LiDAR. LiDAR acquires precise distance and angle information of a large number of points in the surrounding environment by emitting laser beams and measuring their reflection time, forming "point cloud" data. The drone can be controlled to fly along a predetermined path, collecting data from all directions and multiple angles. Then, through algorithms such as point cloud registration, denoising, and surface reconstruction, these discrete point clouds are transformed into a continuous and accurate 3D model, where each point has X, Y, and Z coordinates.

[0035] A mapping relationship is established on the horizontal plane, for example, by spatially aligning the projection of the 3D model onto the horizontal plane (XY plane) with the aforementioned CAD drawings. This is achieved by identifying common feature points (such as room corners), calculating a scaling factor K and possible rotation and translation parameters, ensuring that the (X,Y) coordinates of any point in 3D space can be accurately mapped to a position in the 2D coordinate system according to this relationship, thereby establishing a coordinate association between 3D flight and 2D planar monitoring.

[0036] In step S120, the initial flight path refers to a sequence of spatial waypoints connected sequentially to form a complete flight mission. Each waypoint is a data structure containing three-dimensional coordinates (X, Y, Z) and may also include attitude, velocity, and other commands. For example, operators or automated planning algorithms can manually click or automatically generate a series of waypoints on a 3D model visualization interface according to the needs of inspection, photography, or other operations. These waypoints are located within a safe flight corridor, avoiding known static obstacles, and taking into account the UAV's maneuverability. After planning is completed, a structured flight path file is generated, which is uploaded to the UAV's flight control system as the reference path for its mission execution. This flight path is static and pre-set, and dynamic obstacles have not yet been considered.

[0037] In step S130, real-time, high-precision tracking and safety boundary definition of indoor dynamic obstacles (moving objects) are achieved. Moving objects refer to workers or ground-based mobile machinery, and the positioning tags they carry are ultra-wideband (UWB) tags that actively transmit signals. The UWB positioning system consists of a network of multiple fixed base stations pre-deployed on indoor ceilings, walls, or other fixed equipment.

[0038] The positioning tag periodically emits short pulse signals. Multiple base stations receive these signals and, by precisely measuring the time difference of arrival and combining this with the known base station coordinates, use a triangulation algorithm to calculate the tag's real-time position information (i.e., X, Y coordinates) in a two-dimensional coordinate system. The safe zone is an area centered on the tag's real-time position, with a preset safe distance as its radius or length; for example, it is a circular area. This area is dynamically updated in real-time on the system monitoring map as the position (center) of the moving object changes. The safe distance is a fixed value preset based on factors such as the drone's rotor size and personnel safety margin. The safe distance defines the minimum no-fly buffer space that must be reserved for the moving object.

[0039] In step S140, the second position information refers to the real-time pose of the UAV in the global 3D environment model, including position and attitude. This can be achieved through sensor fusion between the UAV's onboard LiDAR and Inertial Measurement Unit (IMU), for example, by using algorithms such as FAST-LIO. This combines the local point cloud features scanned by the LiDAR with the high-precision motion predictions provided by the IMU in a short time, and matches them with the pre-loaded global 3D point cloud model, thereby estimating the UAV's accurate and stable six-degree-of-freedom pose in real time.

[0040] After acquiring the current pose of the UAV, the initial flight path stored in its flight controller is read to find the next waypoint to be flown after the currently completed waypoint. The 3D coordinates (X, Y, Z) of this waypoint are then converted to 2D projected coordinates in a 2D coordinate system, ignoring the altitude Z, and only the horizontal component (X, Y) is taken. Based on the mapping relationship (scale K) established in step S110, this point represents the planar position where the UAV will arrive as originally planned.

[0041] In step S150, a collision risk assessment is first performed: the two-dimensional projected coordinates of the next waypoint to be flown are calculated, along with the straight-line distance between the two-dimensional projected coordinates and the center coordinates of the moving body at the current moment. This distance is compared with the safety radius. If the distance is less than or equal to the safety radius, a potential collision risk is determined, triggering the route adjustment process. The route adjustment is implemented as follows: starting from the current waypoint to be flown, all subsequent waypoints are traversed backwards, identifying those "risk waypoints" whose projected points fall within the current safe area.

[0042] For each risk waypoint, geometric corrections are performed on a two-dimensional plane. Using the approximate flight direction of the UAV (horizontal or vertical) as a reference, a straight line parallel to the flight direction is drawn through the projection point of the risk waypoint. This line intersects the safety circle at two points. The correct intersection point is selected such that the broken line formed from the UAV's current position to this intersection point, and then to the next waypoint outside the safety circle, does not pass through the intersection point inside the circle. Instead of directly using this intersection point, a small buffer distance is moved outward along the straight line from this intersection point, thus determining a new two-dimensional projected coordinate system absolutely outside the safety circle. Then, using the inverse mapping relationship from step S110, combined with the original flight altitude (Z coordinate) of the risk waypoint, the new two-dimensional coordinates are calculated back to three-dimensional space, generating an adjusted waypoint with new X and Y coordinates and the original Z coordinates.

[0043] The new waypoint replaces the corresponding risky waypoint in the original route and reconnects with subsequent unaffected waypoints, forming a smoothly adjusted flight path that bypasses the dynamic safety zone. Finally, the system sends the adjusted route segment or command to the UAV flight controller in real time, controlling it to fly along the new path. If no risk is detected, the UAV continues to fly along the initial route.

[0044] In the implementation of the above embodiments, a precise mapping between a two-dimensional monitoring coordinate system and a three-dimensional flight environment model is established, and ultra-wideband high-precision dynamic positioning and lidar autonomous positioning technologies are integrated to construct an indoor UAV collaborative safe flight system. This embodiment can track the positions of moving objects and UAVs in real time and accurately, and dynamically and smoothly adjust the UAV's flight path before a collision risk occurs through a forward-looking waypoint geometry correction algorithm, thereby effectively reducing collision accidents caused by reaction delays, sensor blind spots, or environmental interference. Compared to traditional obstacle avoidance methods that rely on emergency stops or single sensors, this improves the active safety and mission continuity of UAV operations in complex and dynamic indoor environments, while also ensuring the safety of ground personnel to a certain extent, achieving reliable and efficient human-machine collaborative operations.

[0045] Optionally, in this embodiment of the application, adjusting the position of at least one waypoint to be flown within the safe area in the initial flight path to obtain the adjusted flight path includes: If the two-dimensional projected coordinates of the next waypoint to be flown are within the safe area at the current moment, then all waypoints to be flown after the current waypoint in the initial flight path are traversed, and the three-dimensional coordinates of each waypoint to be flown are horizontally projected onto the two-dimensional coordinate system to obtain a two-dimensional projected coordinate sequence; then the waypoints to be adjusted that fall within the safe area in the two-dimensional projected coordinate sequence are identified.

[0046] Once it is determined that the next waypoint for the UAV is within a safe area, starting from the current waypoint, all subsequent waypoints recorded in the initial flight path file are accessed sequentially. Each waypoint is a data structure containing three-dimensional spatial coordinates (X, Y, Z). Its horizontal X and Y coordinates are extracted and converted into two-dimensional projected coordinates in a two-dimensional monitoring coordinate system using a pre-calibrated scale factor K and coordinate offset.

[0047] The geometric relationship between each projected point in the sequence and the circular safety zone centered on the personnel's location and with a safe distance as its radius is determined at the current moment. By calculating the distance between the projected point and the center of the circle and comparing whether this distance is less than or equal to the safe radius, all points falling within the safe distance can be identified. The original 3D waypoints corresponding to these points are then marked as waypoints to be adjusted. Waypoints to be adjusted represent airspace that has been temporarily designated as a no-fly zone at the current moment due to the presence of personnel.

[0048] Based on the UAV's current waypoint and the real-time safe zone, the two-dimensional projected coordinates of the waypoint to be adjusted are adjusted, and based on the mapping relationship between the three-dimensional environment model and the two-dimensional coordinate system, the adjusted two-dimensional projected coordinates are mapped onto the three-dimensional environment model to obtain the adjusted flight path.

[0049] For each identified waypoint to be adjusted, a safe new position is calculated on a two-dimensional plane. The core principle of the adjustment is to ensure that the new position avoids the safe zone while remaining as close as possible to the original planned path, thus guaranteeing flight continuity and efficiency. It should be noted that the flight path from the current waypoint to the adjusted waypoint cannot cross the safe zone. For example, even if the current waypoint and the adjusted waypoint are located in opposite directions of the safe zone, a flight path from the current waypoint to the adjusted waypoint that passes through the safe zone is not permitted. The adjusted two-dimensional projection can be redefined, or a new waypoint can be planned so that the resulting flight path does not cross the safe zone.

[0050] In the implementation of the above embodiments: through traversal and identification, a comprehensive prediction of potential collision risks is achieved. Based on geometric rule-based planar adjustment, a computationally efficient and logically clear obstacle avoidance path generation method is provided, which can calculate the optimal detour point in a short time, ensuring reaction speed. Through precise coordinate inverse mapping and 3D reconstruction, the abstract obstacle avoidance logic is transformed into a flight trajectory that the UAV can execute accurately, maintaining the spatial integrity and safety of the mission. This improves the reliability, accuracy, and overall operational safety of the UAV's autonomous obstacle avoidance in dynamic indoor environments, enabling the UAV to continuously and smoothly complete inspection or operational tasks while ensuring the absolute safety of personnel.

[0051] Optionally, in this embodiment of the application, based on the current waypoint of the UAV and the real-time safe zone, the two-dimensional projected coordinates of the waypoint to be adjusted are adjusted to obtain the adjusted flight path, including: The intersection of the horizontal or vertical line connecting the two-dimensional projected coordinates of the waypoint to be adjusted with the boundary of the safe zone is determined as two candidate waypoints. The horizontal or vertical line is not an actual drawn line, but rather a virtual reference line passing through the projection point and parallel to the UAV's current primary flight direction. For example, the horizontal line corresponds to the equation Y = constant 1 in the two-dimensional coordinate system, and the vertical line corresponds to the equation X = constant 2 in the two-dimensional coordinate system.

[0052] The flight direction is determined based on the positional relationship between the current waypoint and the previous waypoint: if the change in X-coordinate is greater than the change in Y-coordinate, it is considered horizontal flight, with the reference line being Y = constant (this constant is equal to the Y value of the projection point); otherwise, it is considered vertical flight, with the reference line being X = constant. The boundary of the safe zone can be a circle with the real-time position of the moving body as its center and the safe distance as its radius. The process of determining two candidate waypoints essentially involves solving the equation of the intersection point of the aforementioned line and circle.

[0053] Choose a target waypoint from two candidate waypoints. The target waypoint must satisfy the following condition: the line connecting it to the next waypoint that has not fallen into the safe zone does not pass through the interior of the safe zone.

[0054] Connect the two candidate waypoints to this "next safe waypoint" with line segments to form two candidate paths. Calculate the positional relationship between each candidate line segment and the circular safe area. This is done by determining whether the shortest distance from the line segment to the center of the circle is less than the radius and whether the point of minimum distance falls between the two endpoints of the line segment. If the shortest distance from the line segment to the center is greater than or equal to the radius, or if it is less than the radius but the nearest point is not within the line segment's interval, then the line segment is determined not to pass through the interior of the safe area. The candidate waypoint that meets this condition is selected as the target candidate waypoint.

[0055] Based on the target candidate waypoints and the preset buffer distance, adjusted waypoints outside the safe zone are generated. The preset buffer distance is a small positive number set comprehensively based on factors such as the overall system positioning error, UAV control accuracy, and response latency; its purpose is to establish an additional safety redundancy.

[0056] Starting from the target waypoint (i.e., the selected intersection point), move the point along a previously determined reference line (horizontal or vertical) away from the center of the circular safety zone by a distance equal to the buffer distance. For example, if the reference line is horizontal (with a fixed Y-value) and the center is to the left of the target waypoint, the X-coordinate of the new point will increase by a buffer distance value, while the Y-coordinate remains unchanged. This translation operation ensures that the distance between the adjusted waypoint's two-dimensional projected coordinates and the center is strictly greater than the safety radius, placing it outside the safety zone.

[0057] Based on the adjusted waypoints, the adjusted flight path is obtained. The mapping relationship between the 3D environment model and the 2D coordinate system (i.e., the known scaling factor) can be used to backcalculate the X and Y coordinates of the adjusted waypoints from their 2D coordinates back into the 3D global coordinate system. The Z coordinate of the original waypoint to be adjusted is kept unchanged because obstacle avoidance mainly occurs in the horizontal plane; vertical task planning, such as avoiding the ceiling and maintaining inspection altitude, should be retained. This generates a new 3D waypoint with new (X, Y) coordinates and the original Z coordinates.

[0058] In the implementation of the above embodiments: by calculating the geometric intersection with the boundary of the safe area, clear path options are provided; through geometric filtering logic, the global safety of the selected path segment is ensured; by introducing the extrapolation operation of buffer distance, various system errors are effectively reduced, and a solid safety redundancy is established; finally, through coordinate mapping and sequence recombination, a three-dimensional flight command that can be directly and safely executed is generated. This improves the accuracy, safety, and real-time performance of UAVs in replanning flight routes near dynamic obstacles, and reduces the risk of secondary collisions or frequent flight path modifications caused by imperfect obstacle avoidance logic.

[0059] Optionally, in this embodiment of the application, the intersection of the horizontal or vertical line connecting the two-dimensional projected coordinates of the waypoint to be adjusted with the boundary of the safe area is determined as two candidate waypoints, including: If the UAV's flight direction is along the positive or negative axis of the horizontal axis of the two-dimensional coordinate system, then the intersection of the horizontal line connecting the two-dimensional projected coordinates of the waypoint to be adjusted and the boundary of the safe area is determined as two candidate waypoints.

[0060] If the UAV's flight direction is along the positive or negative axis of the two-dimensional coordinate system, then the intersection of the vertical line connecting the two-dimensional projected coordinates of the waypoint to be adjusted and the boundary of the safe area is determined as two candidate waypoints.

[0061] The flight direction of a UAV can be predefined or determined in real time based on the position vector between its current waypoint and the previous waypoint. For example, the three-dimensional coordinates of two consecutive waypoints can be obtained from the flight control unit or flight path sequence, and their vector difference (ΔX, ΔY) on the two-dimensional projection plane can be calculated. The main flight axis is determined by comparing the absolute values ​​of ΔX and ΔY: if |ΔX| is greater than |ΔY|, the flight direction is determined to be mainly along the horizontal axis (X-axis) of the two-dimensional coordinate system, i.e., the positive axis (eastward) or the negative axis (westward); conversely, if |ΔY| is greater than |ΔX|, the flight direction is determined to be mainly along the vertical axis (Y-axis), i.e., the positive axis (northward) or the negative axis (southward).

[0062] After determining the flight direction, if the flight is along the X-axis, a horizontal line is constructed. This is a straight line passing through the projected coordinates of the waypoint and parallel to the X-axis, mathematically expressed as Y = Y_point (where Y_point is the Y-coordinate of the projected point). If the flight is along the Y-axis, a vertical line is constructed, that is, a straight line passing through the projected point and parallel to the Y-axis. The intersection of this line with the safe zone is then used as a candidate waypoint.

[0063] In the implementation of the above embodiments: based on intelligent judgment and geometric calculation of real-time flight direction, each obstacle avoidance candidate point generated by the UAV follows its original flight trend. This reduces unreasonable, inefficient, or even dangerous maneuvers that may result from arbitrarily selected obstacle avoidance directions (e.g., suddenly requiring a vertical turn while moving horizontally). It improves the rationality, predictability, and flight efficiency of dynamic route adjustments, making the UAV's obstacle avoidance behavior smoother, thereby fundamentally enhancing the overall behavioral safety and mission reliability of the autonomous flight system in complex dynamic environments.

[0064] Optionally, in this embodiment of the application, based on the positioning tag carried by the mobile body within the indoor work area and the ultra-wideband positioning system pre-deployed in the indoor work area, the first position information of the mobile body in the two-dimensional coordinate system is obtained in real time, including: The ultra-wideband positioning system receives short-pulse ultra-wideband signals transmitted from positioning tags through multiple fixed base stations; multiple fixed base stations form a positioning network covering the entire work area; the positioning tags are ultra-wideband positioning tags.

[0065] Ultra-wideband (UWB) positioning systems utilize non-sinusoidal narrow pulses for communication. For example, multiple fixed base stations can be deployed in a specific geometric configuration (such as triangles or quadrilaterals) on the ceiling or walls of an indoor work area. These base stations achieve precise time synchronization through a wired network or wireless clock synchronization mechanism, collectively forming a positioning network covering the work area. Positioning tags are UWB tags issued to each worker or mobile device. These tags actively broadcast short-pulse UWB signals at a fixed high-frequency period (e.g., 10-100 times per second). The fixed base stations deployed in various locations act as receivers, continuously monitoring the channel. When they receive a pulse signal from the tag, they accurately record the arrival timestamp of the signal.

[0066] By measuring the time difference of arrival of short-pulse ultra-wideband signals from the positioning tag to different fixed base stations, the distance information between the positioning tag and each fixed base station is calculated.

[0067] The time difference of arrival (TDOA) refers to the difference in timestamps between the arrival times of the same pulse signal at any two different base stations in the network. Since all base stations maintain a highly consistent clock reference through a synchronization mechanism, the system can accurately calculate the time difference ΔT_AB between the arrival time of a tag signal at base station A and base station B. Given the known speed of electromagnetic wave propagation, this time difference directly corresponds to the difference in path length the signal travels from the tag to these two base stations, allowing the calculation of a set of equations relating the relative distances between the location tag and each fixed base station.

[0068] Based on distance information and the coordinates of multiple fixed base stations in a two-dimensional coordinate system, a triangulation algorithm is used to calculate and output the coordinates of the positioning tag in the two-dimensional coordinate system in real time, which serves as the first location information of the mobile body.

[0069] The coordinates of the fixed base station in the two-dimensional coordinate system are known quantities that are precisely measured or pre-entered into the system using indoor CAD drawings during system deployment. A triangulation algorithm is used to calculate and output the coordinates of the positioning tag in the two-dimensional coordinate system in real time, serving as the initial location information of the moving object.

[0070] In the implementation of the above embodiment: by constructing a dedicated ultra-wideband positioning network, the problem of missing indoor GPS signals is improved; by accurately measuring the subtle time difference of wireless signal propagation and using geometric calculation algorithms, abstract radio frequency signals are transformed into reliable spatial coordinates. This improves the system's perception accuracy, real-time performance, and reliability of dynamic obstacle positions, providing indispensable, high-quality data input for subsequent safety decisions and dynamic flight path adjustments by UAVs based on precise location information. This is the fundamental prerequisite and key guarantee for the realization of the entire indoor UAV safe flight solution.

[0071] Optionally, in this embodiment of the application, the three-dimensional environment model constructed by lidar based on the indoor work area includes: The system controls a drone equipped with a lidar to scan the indoor environment and acquire raw point cloud data. A lidar is an active remote sensing sensor that calculates distance by emitting a laser beam and measuring the time it takes for it to reflect back from an object's surface. Raw point cloud data is a collection of unprocessed, discrete three-dimensional points acquired by the lidar; each point contains information such as its three-dimensional coordinates (X, Y, Z) and reflection intensity.

[0072] The scanning area needs to cover the entire indoor working area and have a certain degree of overlap. During flight scanning, the lidar rotates and scans at a high frequency, acquiring a large number of ranging points in the surrounding environment in real time. Simultaneously, the UAV's flight control system or synchronous recording equipment records the POS data (i.e., the UAV's own position and attitude information, usually from GPS / IMU fusion, but in indoor environments without GPS, it mainly relies on IMU and visual or laser odometry) for each frame of point cloud. By transforming the lidar measurements from its own coordinate system to the UAV's body coordinate system, and then combining this with the POS data to transform it to the global coordinate system, raw point cloud data with timestamps and spatial locations can be obtained. For structurally complex areas, layered or multi-angle flight may be necessary to obtain more comprehensive data.

[0073] The raw point cloud data is processed to generate a 3D point cloud model. First, point cloud registration is performed, which uses algorithms such as Iterative Closest Point (ICP) to align point cloud fragments obtained from multiple scans and different perspectives into a unified global coordinate system, forming a complete environmental point cloud.

[0074] Next, point cloud denoising is performed, using methods such as statistical filtering and radius filtering to remove outliers and noise points caused by sensor errors or dynamic objects (such as people moving during scanning). Then, point cloud simplification is performed to reduce the number of points while maintaining model accuracy, improving subsequent processing efficiency. Finally, 3D reconstruction is conducted using algorithms such as multi-view dense matching and surface reconstruction, including Poisson reconstruction, to transform the discrete point cloud into a continuous triangular mesh model or a denser, regular point cloud model. Texture mapping may also be applied to enhance visualization. The resulting 3D point cloud model forms the basis for UAV path planning and spatial analysis.

[0075] Align the horizontal reference plane of the 3D point cloud model with the 2D coordinate system and establish the proportional conversion relationship between the two coordinates.

[0076] A horizontal reference plane typically refers to a plane parallel to the indoor ground plane, which can be obtained by extracting ground points from a 3D point cloud and fitting them. A 2D coordinate system is a planar reference system established based on CAD drawings of the indoor work area. The scaling relationship refers to the scaling ratio between the 3D model coordinates and the 2D drawing coordinates, as well as possible rotation and translation parameters.

[0077] First, the 3D point cloud model needs to be horizontally corrected to ensure that its Z-axis is consistent with the direction of gravity. At least three corresponding, easily identifiable feature control points should be manually selected on the 3D point cloud model and CAD drawings, such as room corner points or the center point of a column.

[0078] These points have 3D coordinates (X3D, Y3D, Z3D) in the 3D model and corresponding 2D coordinates (X2D, Y2D) on the drawing. By ignoring the height Z, a similarity transformation is performed between the X and Y coordinates of the 3D points and their 2D coordinates. This transformation typically includes a scaling factor (i.e., scale K), a rotation angle, and a translation vector. The least squares method is used to solve for these parameters, ensuring an optimal match between the 3D point cloud projected onto the 2D plane and the corresponding points on the CAD drawing. This establishes a mapping relationship from 3D model coordinates to 2D drawing coordinates. Subsequently, the system can transform any 3D point to a unified 2D monitoring plane using this relationship, and conversely, can map coordinates and commands on the 2D plane back to 3D space through an inverse transformation.

[0079] In the implementation of the above embodiments: by constructing a high-precision, digital indoor three-dimensional environment model and making it accurately spatially correlated with a two-dimensional planar map used for monitoring and scheduling, the integrity, accuracy and consistency of environmental information expression are improved, providing a unified and reliable spatial benchmark for the precise positioning, flight path planning and fusion calculation of UAVs in three-dimensional space and two-dimensional dynamic safety information.

[0080] Optionally, in this embodiment, the safe zone is determined by a preset safe distance and real-time first position information; determining whether the two-dimensional projected coordinates of the next waypoint are located within the safe zone at the current moment includes: The three-dimensional coordinates of the next waypoint are extracted from the initial flight path, and the three-dimensional coordinates are horizontally projected onto the two-dimensional coordinate system to obtain the two-dimensional projected coordinates of the next waypoint. The next waypoint is the next waypoint that the UAV will fly to according to the initial flight path.

[0081] Using the mapping relationships established during the environmental modeling phase (i.e., the scale factor K and the coordinate origin offset), the coordinates in these 3D models are converted into coordinates in the 2D coordinate system used for monitoring. The calculated (X_2D, Y_2D) are the 2D projected coordinates of the waypoint, representing the corresponding position of the waypoint on the indoor floor plan.

[0082] Calculate the distance between the two-dimensional projected coordinates and the first position information of the moving body at the current moment.

[0083] The initial location information of the moving object at the current moment is provided in real time by the ultra-wideband (UWB) positioning system, and consists of coordinates in the same two-dimensional coordinate system. Distance is calculated mathematically using the Euclidean distance formula between two points.

[0084] Determine if the distance exceeds the safe distance: If not, determine that the two-dimensional projected coordinates of the next waypoint are within the safe area at the current moment.

[0085] The safe distance is a pre-defined positive constant based on factors such as safety regulations, drone size, personnel activity space, and system errors. It defines the minimum circular restricted area radius around the moving vehicle. Determining whether the distance exceeds the safe distance involves comparing the real-time distance with the safe distance. If the real-time distance is greater than the safe distance, the two-dimensional projected coordinates of the drone's next waypoint are determined to be within the current safe area (i.e., the circular restricted area) centered on the personnel's current position and with the safe distance as the radius. This determination serves as the decision signal that triggers the subsequent dynamic flight path adjustment process.

[0086] In the implementation of the above embodiments: by extracting and projecting flight intentions in real time, the system achieves prediction of future states; by accurately calculating dynamic distances, complex spatial safety relationships are quantified into a clear numerical value; and by comparing with fixed safety thresholds in real time, rapid and automatic identification of collision risks is achieved. This enhances the system's forward-looking perception and real-time judgment of potential hazards, enabling the UAV to initiate obstacle avoidance responses in the critical time before a collision occurs, thereby enhancing the active safety and overall reliability of autonomous flight in environments with dynamic personnel presence.

[0087] Please see Figure 2 The diagram shows a security area provided in an embodiment of this application.

[0088] In one optional embodiment, personnel or ground moving objects are constantly and dynamically moving, and UWB positioning personnel information is sent to the system in real time for monitoring; drones, during flight based on lidar, also send their positioning information to the system in real time for monitoring; the timing interval can be set to, for example, 0.1 seconds; under certain conditions, the system can receive the position of personnel, ground moving objects, and drones at every moment in a timely manner. Under UWB radar positioning, the position of the moving worker is the center point, and the coordinates H1 (X1, Y1) are recorded, with a set safety distance of m meters; indicating that drones are not allowed to fly within m meters; a circle is formed with H1 as the center point and m as the radius, and the area inside the circle is the safety zone. During the movement of personnel, the current positioning information of the personnel is sent to the system in real time for monitoring.

[0089] The UAV flight based on lidar positioning detects the waypoint of the next three-dimensional coordinate system (X, Y, Z) that has not yet flown during real-time flight and records it as coordinate H2. The distance between H1 (X1, Y1) and H2 (X2, Y3) is calculated by multiplying or dividing the X and Y coordinates of H2 by the scale K value. It is then determined whether the distance is less than m meters. If it is not less than m meters, the UAV continues to fly.

[0090] The calculation formula can be:

[0091] Where d is the real-time distance, the above formula is the application of Euclidean distance in a two-dimensional plane.

[0092] Please see Figure 3 The diagram shown is a schematic representation of a first flight path provided in an embodiment of this application; and Figure 4 The diagram shown is a second flight route provided in an embodiment of this application; If the real-time distance is less than or equal to the safe distance, it indicates a collision risk; the system iterates through the set of coordinates of the remaining unflyed waypoints; for waypoints with a distance less than m from H1, their X and Y coordinates are modified so that the X and Y values ​​of the waypoints are outside the circle centered at H1 with a radius of m. Figure 3 The diagram shows that no collision hazard was detected during personnel / ground mobile equipment and drone operations. Figure 4 This shows situations where a collision hazard is detected during personnel / ground mobile equipment or drone operations, meaning a waypoint adjustment is necessary.

[0093] Please see Figure 5 The diagram shown illustrates two candidate waypoints provided in an embodiment of this application.

[0094] With H1 as the center point and a radius of m, find the set of points on the dense point cloud data whose X or Y value matches the X or Y value of the "follow-up waypoint" of the drone entering the circle (if the drone is flying up and down, take the Y value; if the drone is flying left and right, take the X value), and form a line; find the point of the circle corresponding to the safe area of ​​the line, forming a tangent point, and shift the tangent point to the left or right by an X value (if the drone is flying left and right, shift it up or down by a Y value).

[0095] Because it will generate 2 tangent points ( Figure 5 (In the gray dot), therefore, one of the two tangent points needs to be selected as the newly adjusted waypoint; the judgment criterion is: the line connecting the newly adjusted waypoint to the next waypoint not in the circle does not pass through the circle corresponding to the safe area, thus selecting the target waypoint from the two candidate waypoints.

[0096] Please see Figure 6 The diagram shows the adjusted waypoints provided in the embodiments of this application.

[0097] After identifying potential waypoints, for safety redundancy, the potential waypoints can be offset by a preset buffer distance according to the flight direction, generating adjusted waypoints outside the safe zone. This ensures the adjusted waypoints are not on the "circle corresponding to the safe zone," providing a certain degree of safety redundancy. The preset buffer distance can be determined based on the UAV's positioning error range, the positioning error range of the ultra-wideband positioning system for the moving object, the UAV's response latency, and the maximum speed of the moving object.

[0098] This application provides an indoor unmanned aerial vehicle (UAV) dynamic obstacle avoidance flight device, including: The coordinate system mapping module is used to obtain a two-dimensional coordinate system corresponding to the indoor work area, as well as a three-dimensional environment model constructed based on the indoor work area using LiDAR; a mapping relationship is established between the three-dimensional environment model and the two-dimensional coordinate system on the horizontal plane; The initial flight path planning module is used to plan the initial flight path of the UAV based on the three-dimensional environment model. The flight path includes multiple waypoints that are executed sequentially and have three-dimensional coordinates. The safe distance determination module is used to acquire the first position information of the mobile body in the two-dimensional coordinate system in real time based on the positioning tag carried by the mobile body in the indoor work area and the ultra-wideband positioning system pre-deployed in the indoor work area, and dynamically determine the safe area corresponding to the mobile body according to the change of the first position information. The waypoint determination module is used to acquire the second position information of the UAV in the three-dimensional environment model in real time, and determine the two-dimensional projection coordinates of the next waypoint in the initial flight path in the two-dimensional coordinate system; The adjustment module is used to determine whether the two-dimensional projected coordinates of the next waypoint are located within the safe area at the current moment. If so, the module adjusts the position of at least one waypoint in the initial flight path whose two-dimensional projected coordinates fall within the safe area to obtain the adjusted flight path, so that the two-dimensional projected coordinates of the adjusted waypoints are outside the safe area, and controls the UAV to continue flying according to the adjusted flight path. If not, the module controls the UAV to continue flying according to the initial flight path.

[0099] It should be understood that this device corresponds to the above-described embodiment of the indoor UAV dynamic obstacle avoidance flight method and is capable of performing the various steps involved in the above-described method embodiment. The specific functions of this device can be found in the description above, and detailed descriptions are omitted here to avoid repetition. The device includes at least one software functional module that can be stored in memory or embedded in the device's operating system (OS) in the form of software or firmware.

[0100] Please see Figure 7 The diagram shows a structural schematic of an electronic device provided in an embodiment of this application. An electronic device 300 provided in this application includes a processor 310 and a memory 320. The memory 320 stores machine-readable instructions executable by the processor 310. When the machine-readable instructions are executed by the processor 310, the method described above is performed.

[0101] Figure 7 The components shown can be implemented using hardware, software, or a combination thereof. Electronic device 300 may be a physical device, such as a server or PC, or a virtual device, such as a virtual machine or virtualization container. Furthermore, electronic device 300 is not limited to a single device; it can be a combination of multiple devices or a cluster of numerous devices.

[0102] This application also provides a storage medium storing a computer program, which is executed by a processor to perform the above-described method.

[0103] The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0104] This application also provides a computer program product, including computer program instructions, which are executed by a processor to perform the method described above.

[0105] It should be understood that the disclosed apparatus and methods can also be implemented in other ways, given the several embodiments provided in this application. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0106] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0107] The above description is only an optional implementation of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this application should be covered within the protection scope of the embodiments of this application.

Claims

1. A method for dynamic obstacle avoidance flight of an indoor unmanned aerial vehicle (UAV), characterized in that, include: A two-dimensional coordinate system corresponding to the indoor work area is obtained, as well as a three-dimensional environment model constructed based on the indoor work area using LiDAR; the three-dimensional environment model and the two-dimensional coordinate system are mapped onto a horizontal plane. The initial flight path of the UAV is planned based on the three-dimensional environment model. The flight path includes multiple waypoints that are executed sequentially and have three-dimensional coordinates. Based on the positioning tag carried by the mobile body in the indoor work area and the ultra-wideband positioning system pre-deployed in the indoor work area, the first position information of the mobile body in the two-dimensional coordinate system is obtained in real time, and the safe area corresponding to the mobile body is dynamically determined according to the change of the first position information. The second position information of the UAV in the three-dimensional environment model is acquired in real time, and the two-dimensional projection coordinates of the next waypoint to be flown in the initial flight path are determined in the two-dimensional coordinate system. Determine whether the two-dimensional projected coordinates of the next waypoint to be flown are within the safe area at the current time; If yes, adjust the position of at least one waypoint in the initial flight path so that the two-dimensional projected coordinates fall within the safe area to obtain an adjusted flight path, so that the two-dimensional projected coordinates corresponding to the adjusted waypoints are outside the safe area, and control the UAV to continue flying according to the adjusted flight path; if no, control the UAV to continue flying according to the initial flight path.

2. The method according to claim 1, characterized in that, Adjusting the position of at least one waypoint within the safe area in the initial flight path, to obtain the adjusted flight path, includes: If the two-dimensional projected coordinates of the next waypoint to be flown are located within the safe area at the current time, then all waypoints to be flown after the current waypoint in the initial flight path are traversed, and the three-dimensional coordinates of each waypoint to be flown are horizontally projected onto the two-dimensional coordinate system to obtain a two-dimensional projected coordinate sequence. Identify waypoints to be adjusted that fall within the safe area in the two-dimensional projected coordinate sequence; Based on the current waypoint of the UAV and the real-time safe zone, the two-dimensional projected coordinates of the waypoint to be adjusted are adjusted, and based on the mapping relationship between the three-dimensional environment model and the two-dimensional coordinate system, the adjusted two-dimensional projected coordinates are mapped onto the three-dimensional environment model to obtain the adjusted flight path.

3. The method according to claim 2, characterized in that, Based on the current waypoint of the UAV and the real-time safe zone, the two-dimensional projected coordinates of the waypoint to be adjusted are adjusted to obtain the adjusted flight path, including: The intersection of the horizontal or vertical line connecting the two-dimensional projected coordinates of the waypoint to be adjusted with the boundary of the safe area is determined as two candidate waypoints; Select a target waypoint from the two candidate waypoints. The target waypoint satisfies the following condition: the line connecting it as the starting point and the next waypoint that has not fallen into the safe area does not pass through the interior of the safe area. Based on the target candidate waypoints and the preset buffer distance, an adjusted waypoint outside the safe zone is generated; Based on the adjusted waypoints, the adjusted flight path is obtained.

4. The method according to claim 3, characterized in that, The intersection of the horizontal or vertical line connecting the two-dimensional projected coordinates of the waypoint to be adjusted with the boundary of the safe area is determined as two candidate waypoints, including: If the flight direction of the UAV is along the positive or negative axis of the horizontal axis of the two-dimensional coordinate system, then the intersection of the horizontal line connecting the two-dimensional projected coordinates of the waypoint to be adjusted and the boundary of the safe area is determined as the two candidate waypoints. If the UAV's flight direction is along the positive or negative axis of the vertical axis of the two-dimensional coordinate system, then the intersection of the vertical line connecting the two-dimensional projected coordinates of the waypoint to be adjusted with the boundary of the safe area is determined as the two candidate waypoints.

5. The method according to claim 1, characterized in that, Based on the positioning tag carried by the mobile body within the indoor work area, and the ultra-wideband positioning system pre-deployed within the indoor work area, the first position information of the mobile body in the two-dimensional coordinate system is obtained in real time, including: The ultra-wideband positioning system receives short-pulse ultra-wideband signals emitted by the positioning tag through the multiple fixed base stations; the multiple fixed base stations form a positioning network covering the entire work area; the positioning tag is an ultra-wideband positioning tag; By measuring the time difference of arrival of the short-pulse ultra-wideband signal from the positioning tag to different fixed base stations, the distance information between the positioning tag and each fixed base station is calculated. Based on the distance information and the coordinates of the multiple fixed base stations in the two-dimensional coordinate system, a triangulation algorithm is used to calculate and output the coordinates of the positioning tag in the two-dimensional coordinate system in real time, which serves as the first location information of the mobile body.

6. The method according to claim 1, characterized in that, A three-dimensional environment model constructed using lidar based on the indoor work area includes: Control a drone equipped with LiDAR to scan the indoor environment and acquire raw point cloud data; The original point cloud data is processed to generate a three-dimensional point cloud model; Align the horizontal reference plane of the three-dimensional point cloud model with the two-dimensional coordinate system, and establish the proportional conversion relationship between the two coordinates.

7. The method according to claim 1, characterized in that, The safe zone is determined by a preset safe distance and the real-time first position information; determining whether the two-dimensional projected coordinates of the next waypoint are located within the safe zone at the current moment includes: The three-dimensional coordinates of the next waypoint are extracted from the initial flight path, and the three-dimensional coordinates are horizontally projected onto the two-dimensional coordinate system to obtain the two-dimensional projected coordinates of the next waypoint; the next waypoint is the next waypoint that the UAV will fly to according to the initial flight path. Calculate the distance between the two-dimensional projected coordinates and the first position information of the moving body at the current moment; Determine whether the distance exceeds the safe distance: if not, determine that the two-dimensional projected coordinates of the next waypoint to be flown are within the safe area at the current time.

8. A computer program product, characterized in that, It includes computer program instructions that, when executed by a processor, perform the method as described in any one of claims 1 to 7.

9. An electronic device, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, perform the method as described in any one of claims 1 to 7.