Simulation test environment rapid generation method for unmanned aerial vehicle visual obstacle avoidance algorithm evaluation
By constructing evaluation indicators for UAV visual obstacle avoidance algorithms, as well as route design and environmental element analysis, and combining them with an automated simulation environment generation framework, the problem of difficulty in constructing simulation environments in existing technologies has been solved. This enables efficient and diversified generation of simulation test environments, supporting rapid iteration and agile verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies struggle to construct simulation and evaluation environments for UAV visual obstacle avoidance algorithms that meet high realism, diversity, and real-time requirements, resulting in significant discrepancies between simulation and reality, high costs, and low efficiency.
By analyzing the evaluation indicators and route design of UAV visual obstacle avoidance algorithms, and combining the influence of environmental factors, a framework for the automated rapid generation of simulation environments is constructed. Environmental factor configuration files are used for parameterized and structured description, and a two-dimensional Poisson disk sampling algorithm is used to randomly generate obstacle positions. Combined with the Unity simulation engine, a simulation test environment can be rapidly generated.
It enables efficient evaluation of visual obstacle avoidance algorithms for multi-rotor UAVs, reduces the gap between simulation and reality, improves the diversity of simulation environments and testing efficiency, and supports rapid iteration and agile verification.
Smart Images

Figure CN121809040A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer simulation testing technology, specifically to a method for rapidly generating simulation test environments for evaluating visual obstacle avoidance algorithms of multi-rotor UAVs. Background Technology
[0002] Simulation evaluation of UAV visual obstacle avoidance algorithms is an important technical means to evaluate and optimize the performance of UAV visual obstacle avoidance algorithms using computer simulation. Simulation allows for convenient acquisition of test data for UAV visual obstacle avoidance algorithms at various task stages, facilitating algorithm debugging and performance optimization, and significantly reducing testing costs. To achieve good algorithm simulation evaluation results and reduce the gap between simulation and reality, it is necessary to construct a simulation test environment that meets the algorithm evaluation conditions and possesses characteristics such as high realism, diversity, and real-time performance. Summary of the Invention
[0003] The purpose of this invention is to provide a method for rapidly generating simulation test environments for evaluating visual obstacle avoidance algorithms of multi-rotor UAVs, so as to realize the automated and rapid construction of diverse and complex scenarios and support the efficient evaluation of visual obstacle avoidance algorithms of multi-rotor UAVs.
[0004] This invention is achieved through the following technical solutions: A method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms includes the following steps: 1. Evaluation Index Analysis and Route Design of Visual Obstacle Avoidance Algorithm for Multi-rotor UAVs The evaluation index analysis and route design of UAV visual obstacle avoidance algorithms should adhere to the principles of independence, completeness, and scientific rigor. Independence is reflected in the independence between evaluation indicators, and indicators at the same level should not have overlapping areas; completeness is reflected in the fact that evaluation indicators should be able to reflect the characteristics of UAV obstacle avoidance tasks and describe the degree of task completion; scientific rigor is reflected in the selection of scientific indicators that can quantify lower-level indicators and obtain data with clear physical meaning.
[0005] Based on design principles, this study analyzes evaluation metrics and designs routes for UAV visual obstacle avoidance algorithms during multiple rounds of simulation tests of UAV visual obstacle avoidance flight missions. Average mission satisfaction is the primary evaluation criterion, and evaluation metrics are determined from multiple dimensions, including flight collision rate, flight efficiency, and flight energy consumption. Furthermore, the study discusses different UAV obstacle avoidance flight mission states, providing reasonable and adaptable algorithm performance evaluation routes for various mission states.
[0006] 2. Simulation Environment Element Analysis The visual obstacle avoidance algorithm for UAVs processes image perception information from visual sensors to obtain the image size and orientation of environmental elements, and then performs path planning to complete obstacle avoidance flight maneuvers. Environmental elements mainly affect the performance of the UAV visual obstacle avoidance algorithm by influencing the difficulty of obstacle recognition, limiting the UAV's passability, and changing the UAV's obstacle avoidance flight path.
[0007] Regarding the ease of obstacle recognition, environmental factors such as lighting conditions, weather conditions, and the visibility of obstacle visual features will affect the algorithm's recognition performance. Ambient light intensity affects the imaging quality of the visual sensor; strong light easily causes image overexposure, while weak light reduces target contrast, making it difficult to extract image feature information. Rain, snow, fog, and other weather conditions blur the edge features of obstacles through scattering, reducing the algorithm's accuracy in recognizing obstacle shapes. Planes with low texture complexity weaken the ability of traditional visual algorithms to extract corner points, rendering feature-based visual algorithms ineffective.
[0008] Regarding the limitations on drone maneuverability, different mission scenarios, types of environmental elements, and the density of environmental element distribution directly constrain drone maneuverability. For example, different mission scenarios such as dense forests, factories, city streets, and ruins have different flyable areas and varying degrees of restriction on drone maneuverability; different types of environmental elements have different levels of passability, such as trees and utility poles; and dense distribution of environmental elements will compress the safe flight space of drones, reducing their maneuverability.
[0009] Regarding altering the obstacle avoidance flight path of drones, the static or dynamic state of obstacles, their deployment type, and other factors will change the drone's obstacle avoidance flight path. Changes in the position and speed of dynamic obstacles require obstacle avoidance algorithms to have real-time prediction capabilities, and avoiding collisions requires frequent calculations and changes to the flight path; designing flight channels by changing the deployment type of obstacles will restrict drones to avoid obstacles by following designated flight channels.
[0010] Based on the above analysis, from the perspective of the impact of simulation environment elements on the key indicators of UAV visual obstacle avoidance algorithm evaluation, the simulation environment elements to be set should mainly include the mission scenario, meteorological elements, obstacle types, obstacle layout types, the proportion of each obstacle, obstacle distribution density, the degree of visual characteristics of obstacles, and the dynamic and static states of obstacles.
[0011] 3. Rapid generation of simulation environment To meet the development needs of UAV visual obstacle avoidance algorithms that require "rapid iteration and agile verification," an automated rapid generation framework for simulation environments for UAV visual obstacle avoidance algorithm evaluation is constructed. This framework uses environmental element configuration files to parameterize, structure, and customize the descriptions of various environmental elements, enabling the rapid generation of UAV visual obstacle avoidance algorithm simulation evaluation environments that meet the required descriptions. The environmental element configuration files should have clear definitions for task scenarios, meteorological elements, obstacle types, obstacle deployment types, the proportion of each obstacle, obstacle distribution density, the visual characteristics of obstacles, and the dynamic and static states of obstacles.
[0012] To enhance the diversity of the simulation test environment, the location of obstacle generation should be able to be randomly changed while maintaining a constant obstacle distribution density, thereby improving the simulation environment's ability to generalize and test obstacle avoidance algorithms. Given the nearest distance between any two obstacles, a two-dimensional Poisson disk sampling algorithm is used to randomly generate an array of sampling point coordinates to obtain the obstacle generation location coordinates. Based on these coordinates, the types and layouts of obstacles are then randomly generated proportionally.
[0013] Finally, the scene is pre-built and obstacle prefabs are created in the Unity simulation engine. A pre-defined algorithm for 2D Poisson disk sampling and proportional random generation of obstacle types and placement types is also provided. Interfaces are provided for configuring environmental elements such as task scene, weather, obstacle types, proportions, and densities in the simulation engine between the external algorithm program and the simulation engine. Then, the external algorithm program reads the configuration file parameters and sends the configuration file information to the simulation engine's pre-defined interface. The simulation engine quickly generates the simulation test environment according to the configuration file requirements, completing the interaction between the external algorithm program and the Unity simulation engine.
[0014] The rapid generation method for simulation test environments of the present invention can provide diverse and variable simulation test environments for the evaluation of visual obstacle avoidance algorithms of multi-rotor UAVs. According to the designed obstacle avoidance algorithm evaluation indicators and routes, the required simulation environment elements are analyzed and constructed. The parameterized, structured and customized description of each environmental element is realized through the environmental element configuration file, and the simulation test environment for visual obstacle avoidance algorithms of multi-rotor UAVs is generated rapidly. Attached Figure Description
[0015] Figure 1 This invention provides evaluation metrics and a roadmap for the UAV visual obstacle avoidance algorithm. Detailed Implementation
[0016] The following will be combined with the appendix Figure 1The technical solutions of the present invention have been clearly and completely described. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] 1. Evaluation Index Analysis and Route Design of Visual Obstacle Avoidance Algorithm for Multi-rotor UAVs The evaluation index analysis and route design of UAV visual obstacle avoidance algorithms should adhere to the principles of independence, completeness, and scientific rigor. Independence is reflected in the independence between evaluation indicators, and indicators at the same level should not have overlapping areas. This avoids redundant calculations of some indicators in the determination of the algorithm's obstacle avoidance capability, reduces unnecessary evaluation indicators, and improves evaluation efficiency. Completeness is reflected in the fact that evaluation indicators should be able to reflect the characteristics of UAV obstacle avoidance tasks and describe the degree of task completion, thereby more comprehensively and accurately reflecting the algorithm's performance. Scientific rigor is reflected in the selection of scientific indicators, and the quantification of lower-level indicators as much as possible to obtain data with clear physical meaning.
[0018] Based on design principles, this study analyzes evaluation metrics and designs routes for UAV visual obstacle avoidance algorithms during multiple rounds of simulation tests of UAV visual obstacle avoidance flight missions. Average mission satisfaction is the primary evaluation criterion, and evaluation metrics are determined from multiple dimensions, including flight collision rate, flight efficiency, and flight energy consumption. Furthermore, the study discusses different UAV obstacle avoidance flight mission states, providing reasonable and adaptable algorithm performance evaluation routes for various mission states.
[0019] Evaluation metrics for UAV visual obstacle avoidance algorithms should include: average task completion progress (AMP) within a specified time, average task time (AMT), average collision rate (ACR), average flight speed (AFV), average flight energy consumption (AEC), and average flight path deviation (APD).
[0020] (1) Average task completion progress within the specified time AMP The metric measures the distance the drone travels to the target point. Mission progress is calculated using vector projection, where vector 'a' is used as the vector from the starting point to the target point, vector 'b' is used as the vector from the starting point to the drone's final position, and vector 'c' = a. b represents the vector from the final position of the UAV to the target point. AMP It can be calculated using the following formula: (2) Average task time AMT The metric measures the average time of the obstacle avoidance algorithm across multiple flight missions. Timing begins at the starting point and ends when the drone reaches the target point, experiences a collision, or the time expires. The arithmetic mean of the times taken across all missions is calculated. AMT .
[0021] (3) Average collision rate ACR The metric is used to measure the obstacle avoidance algorithm's ability to avoid obstacles, and is obtained by counting the proportion of collisions out of all rounds. ACR .
[0022] (4) Average flight speed AFV The metric measures the average speed of a drone traversing an obstacle field to reach its target point. Its speed performance is typically evaluated using the drone's flight time from the starting point to the target. However, to ensure comparability between results from different map sizes and path lengths, a definition is provided. The minimum free path distance from the starting point to the ending point. For the total flight time, the average target speed of the AGV can be calculated as follows: (5) Average flight energy consumption AEC The metric is used to measure the energy consumption of a drone in completing an obstacle avoidance flight mission, expressed as the derivative of the drone's acceleration (jerk). jerk It is represented by the integral of ). In real-world autonomous reconnaissance missions, lower average flight energy consumption means the drone can fly for a longer period, increasing the chances of mission success. Average flight energy consumption AEC It can be calculated as follows: (6) Average flight path deviation APD The metric measures the deviation of a drone's flight path from its origin to its destination from the theoretical minimum free path. Definition Given the total distance the drone flew, the average flight path deviation is... APD It can be calculated as follows: The evaluation route design for UAV visual obstacle avoidance algorithms needs to cover possible UAV obstacle avoidance flight mission states, such as... Figure 1 As shown, the evaluation routes for different flight mission states are classified and divided with mission satisfaction as the primary evaluation criterion, which facilitates a quick and accurate evaluation of the performance of UAV visual obstacle avoidance algorithms.
[0023] Evaluation Route 1: The drone can complete the obstacle avoidance flight mission within the specified time, with an average mission progress of 100%. In this case, the focus is mainly on flight efficiency, i.e., the lower the average mission time, the better the algorithm performance. Simultaneously, average flight speed, average flight energy consumption, and average flight path deviation are statistically calculated.
[0024] Evaluation Route 2: The drone failed to complete the obstacle avoidance flight task within the specified time, with an average task progress of less than 100%, but an average collision rate of 0%. One possibility is that the path planner of the drone's visual obstacle avoidance algorithm gets stuck in a local optimum, maintaining flight but with a chaotic path; another possibility is that the drone only completes a small portion of the task progress and then enters a hovering state. In both cases, the focus is on the average flight speed, i.e., the faster the average flight speed, the better the algorithm performance.
[0025] Evaluation Route 3: The drone failed to complete the obstacle avoidance flight mission within the specified time, with an average mission progress of less than 100% and an average collision rate of more than 0%. In this case, the average mission progress within the specified time is used as the core evaluation indicator, while the algorithm performance is further evaluated from aspects such as average mission time, average flight speed, average flight energy consumption, and average flight path deviation.
[0026] 2. Simulation Environment Element Analysis UAV visual obstacle avoidance algorithms process image perception information from visual sensors to obtain the image size and orientation of environmental elements, and then perform path planning to complete obstacle avoidance flight maneuvers. Environmental elements mainly affect the performance of UAV visual obstacle avoidance algorithms by influencing the ease with which the algorithm can identify obstacles, limiting the UAV's passability, and altering the UAV's obstacle avoidance flight path. This paper analyzes the environmental elements required for the simulation environment based on key performance indicators for UAV visual obstacle avoidance algorithms.
[0027] Regarding the difficulty of obstacle recognition, environmental factors such as lighting conditions, weather conditions, and the visibility of obstacle visual features will affect the algorithm's obstacle recognition performance, impacting key indicators such as average task completion progress, average task time, average collision rate, and average flight speed within a specified time. Ambient light intensity affects the imaging quality of the visual sensor; strong light easily causes image overexposure, while weak light reduces target contrast, making it difficult to extract image feature information. Rain, snow, fog, and other weather conditions blur obstacle edge features through scattering, reducing the algorithm's accuracy in recognizing obstacle shapes. Low-texture-complexity planes weaken the ability of traditional visual algorithms to extract corner points, rendering feature-based visual algorithms ineffective.
[0028] Regarding the limitations on drone maneuverability, different mission scenarios, types of environmental elements, and the density of environmental element distribution directly constrain drone maneuverability, affecting key indicators such as average mission completion progress, average mission time, average collision rate, average flight speed, average flight energy consumption, and average flight path length within a specified time. For example, different mission scenarios such as dense forests, factories, city streets, and ruins have different flyable areas, and the degree of restriction on drone maneuverability also varies; different types of environmental elements have different levels of maneuverability, such as trees and utility poles; dense distribution of environmental elements will compress the safe flight space of drones, reducing maneuverability.
[0029] Regarding altering the obstacle avoidance flight path of drones, the static or dynamic state of obstacles, their deployment type, etc., will change the drone's obstacle avoidance flight path, affecting key indicators such as average task completion progress, average task time, average collision rate, average flight speed, average flight energy consumption, and average flight path length within a specified time. Changes in the position and speed of dynamic obstacles require obstacle avoidance algorithms to have real-time predictive capabilities; avoiding collisions necessitates frequent calculations and changes to the flight path. Designing flight channels by altering the obstacle deployment type will restrict drones to flying along designated flight channels for obstacle avoidance.
[0030] Based on the above analysis, from the perspective of the impact of simulation environment elements on the key indicators of UAV visual obstacle avoidance algorithm evaluation, the simulation environment elements to be set should mainly include the mission scenario, meteorological elements, obstacle types, obstacle layout types, the proportion of each obstacle, obstacle distribution density, the degree of visual characteristics of obstacles, and the dynamic and static states of obstacles.
[0031] The mission scenarios are divided into indoor and outdoor scenarios. Combining the hot spot scenarios of UAV search and reconnaissance missions, the indoor scenarios are selected as factories and warehouses as typical representatives to test the obstacle avoidance performance of UAV obstacle avoidance algorithms in narrow and structured spaces. The outdoor scenarios are selected as forests and city streets as typical representatives to test the robustness of UAV obstacle avoidance algorithms under different external environmental interference environments.
[0032] The meteorological elements mainly set different lighting conditions during the day and night, as well as various weather conditions such as sunny, cloudy, foggy, rainy, and snowy, to test the obstacle avoidance algorithm of the drone in obstacle detection capabilities in overexposed, low-contrast, and dynamic noise scenarios.
[0033] The types of obstacles are mainly considered to be two categories: regular and irregular obstacles. It is also convenient to change the layout type, visual characteristics, and dynamic and static states. The main obstacles include wooden boxes, oil drums, pillars, targets, trees and other obstacles.
[0034] The type of obstacle placement needs to be determined in conjunction with the mission requirements. Multiple similar obstacles are combined into different placement patterns. Based on different types of flight path design schemes such as left-flying, right-flying, and center-crossing, obstacles are placed in a manner such as arrangement, stacking, or leaning.
[0035] The proportion of each obstacle can directly represent the diversity of obstacles in the task scene. It needs to be set in combination with the typical situation of the actual scene, or it can be set reasonably according to the difficulty of the task.
[0036] Obstacle distribution density can be divided into three categories: sparse, medium, and dense, based on scene type. The distribution density of obstacles is determined by defining the range between the closest distances between any two obstacles.
[0037] The visual prominence of obstacles can be categorized into three levels: high prominence, medium prominence, and low prominence. The degree of visual prominence is determined by defining the range of contrast values of the obstacle's surface material.
[0038] The dynamic and static states of obstacles mainly consider the setting of dynamic obstacles. Dynamic obstacles with different moving directions and moving speeds can be set according to the needs of task assessment.
[0039] 3. Rapid generation of simulation environment To meet the development needs of UAV visual obstacle avoidance algorithms that require "rapid iteration and agile verification", an automated rapid generation framework for simulation environment evaluation of UAV visual obstacle avoidance algorithms is constructed. Through environmental element configuration files, each environmental element is described in a parameterized, structured, and customized manner, so as to realize the rapid generation of UAV visual obstacle avoidance algorithm simulation evaluation environment that meets the requirements. Table 1 shows an example of the content of the environmental element configuration file.
[0040] Table 1 Environmental Element Configuration File To enhance the diversity of the simulation test environment, the obstacle generation positions should be able to be randomly changed while maintaining a constant obstacle distribution density, thereby improving the simulation environment's ability to generalize and test obstacle avoidance algorithms. Given the nearest distance between any two obstacles, a two-dimensional Poisson disk sampling algorithm is used to randomly generate an array of sampling point coordinates to obtain the obstacle generation position coordinates. The algorithm flow is shown in Table 2.
[0041] Table 2. Flowchart of the Two-Dimensional Poisson Disk Sampling Algorithm Based on the coordinates of the obstacle generation location, the types and layout of obstacles are randomly generated proportionally. The specific algorithm process is shown in Table 3.
[0042] Table 3. Algorithm Flow for Randomly Generating Obstacle Types and Layout Types on a Proportional Basis The scene is pre-built and obstacle prefabs are created in the Unity simulation engine. A pre-defined algorithm for 2D Poisson disk sampling and proportional random generation of obstacle types and placement types is also provided. Interfaces are provided for configuring environmental elements such as task scene, weather, obstacle types, proportions, and densities in the simulation engine between the external algorithm program and the simulation engine. Then, the external algorithm program reads the configuration file parameters and sends the configuration file information to the simulation engine's pre-defined interface. The simulation engine then quickly generates the simulation test environment according to the configuration file requirements, completing the interaction between the external algorithm program and the Unity simulation engine.
Claims
1. A method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms, characterized by: Includes the following steps: Step 1: Evaluation Index Analysis and Route Design of Visual Obstacle Avoidance Algorithm for Multi-rotor UAVs Analysis of evaluation indicators and route design principles for UAV visual obstacle avoidance algorithms: Evaluation indicators should be independent of each other, and indicators at the same level should not have overlapping ranges; they should be able to reflect the characteristics of UAV obstacle avoidance tasks and describe the degree of task completion; scientific indicators should be selected to quantify lower-level indicators and obtain data with clear physical meaning. Based on the design principles, in multiple rounds of UAV visual obstacle avoidance flight mission simulation tests, the average mission satisfaction is taken as the primary evaluation standard. Evaluation indicators are determined from multiple dimensions such as flight collision rate, flight efficiency, and flight energy consumption. At the same time, the UAV obstacle avoidance flight mission states are discussed in different cases, providing a reasonable algorithm performance evaluation route for different mission states. Step 2: Simulation Environment Element Analysis The UAV visual obstacle avoidance algorithm obtains the image size and orientation of environmental elements by processing the image perception information of the visual sensor, and performs path planning to complete the obstacle avoidance flight action. Environmental elements affect the performance of the UAV visual obstacle avoidance algorithm by influencing the difficulty of the UAV visual obstacle avoidance algorithm to identify obstacles, limiting the UAV's passability, and changing the UAV's obstacle avoidance flight path. From the perspective of the impact of simulation environment elements on the key evaluation indicators of UAV visual obstacle avoidance algorithm, the simulation environment elements set include mission scenario, meteorological elements, obstacle types, obstacle layout types, proportion of each obstacle, obstacle distribution density, visual characteristics of obstacles, and dynamic and static states of obstacles. Step 3: Rapid generation of simulation environment A framework for the automated and rapid generation of simulation environments for evaluating UAV visual obstacle avoidance algorithms is constructed. By using environment element configuration files to parameterize, structure, and customize the descriptions of each simulation environment element, a simulation evaluation environment for UAV visual obstacle avoidance algorithms that meets the requirements can be rapidly generated. The environment element configuration files should have clear definitions of the environment elements.
2. The method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms according to claim 1, characterized in that: In step 1, the evaluation metrics for the UAV visual obstacle avoidance algorithm specifically include: average task completion progress (AMP) within a specified time, average task time (AMT), average collision rate (ACR), average flight speed (AFV), average flight energy consumption (AEC), and average flight path deviation (APD).
3. The method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms according to claim 1, characterized in that: Step 1, the route evaluation specifically includes: Evaluation Route 1: The drone can complete the obstacle avoidance flight mission within the specified time and the average mission progress is 100%. In this case, the focus is on flight efficiency, that is, the lower the average mission time, the better the algorithm performance. At the same time, the average flight speed, average flight energy consumption, and average flight path deviation are statistically calculated. Evaluation Route 2: The drone failed to complete the obstacle avoidance flight task within the specified time, with an average task progress of less than 100% but an average collision rate of 0%. One possibility is that the path planner of the drone's visual obstacle avoidance algorithm got stuck in a local optimum, maintaining the flight state but with a chaotic path. Another possibility is that the drone only completed a small portion of the task progress and then entered a hovering state. In the above cases, we mainly focus on the average flight speed, that is, the faster the average flight speed, the better the algorithm performance. Evaluation Route 3: The drone failed to complete the obstacle avoidance flight mission within the specified time, with an average mission progress of less than 100% and an average collision rate of more than 0%. In this case, the average mission progress within the specified time is used as the core evaluation indicator. At the same time, the algorithm performance is evaluated from the aspects of average mission time, average flight speed, average flight energy consumption, and average flight path deviation.
4. The method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms according to claim 1, characterized in that: In step 2, regarding changing the drone's obstacle avoidance flight path, the dynamic and static state and the type of obstacle placement change the drone's obstacle avoidance flight path. The position and speed changes of dynamic obstacles require the obstacle avoidance algorithm to have real-time prediction capabilities. Avoiding collisions requires frequent calculations and changes to the flight path. By changing the type of obstacle placement to design a flight channel, the drone will be restricted to fly according to the designated flight channel to avoid obstacles.
5. The method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms according to claim 1, characterized in that: In step 2: The mission scenarios are divided into indoor and outdoor scenarios. Combining the hot spot scenarios of UAV search and reconnaissance missions, the indoor scenarios are selected as factories and warehouses as typical representatives to test the obstacle avoidance performance of UAV obstacle avoidance algorithms in narrow and structured spaces; the outdoor scenarios are selected as forests and city streets as typical representatives to test the robustness of UAV obstacle avoidance algorithms under different external environmental interference environments. The meteorological elements mainly set different lighting conditions during the day and night, as well as various weather conditions such as sunny, cloudy, foggy, rainy, and snowy, to test the obstacle avoidance algorithm of the drone in overexposed, low-contrast, and dynamic noise scenarios. The types of obstacles are mainly considered to be two categories: regular and irregular obstacles. It is also convenient to change the layout type, visual characteristics, and dynamic and static states. The main obstacles include wooden boxes, oil drums, pillars, targets, and trees. The type of obstacle placement needs to be determined in conjunction with the mission requirements. Multiple similar obstacles are combined into different placement patterns. Based on the design schemes of different types of flight channels such as left-rounding flight, right-rounding flight, and middle crossing, obstacles are placed in the form of arrangement, stacking, or leaning. The proportion of each obstacle can be set according to the typical situation of the actual scene, or it can be set reasonably according to the difficulty of the task. The obstacle distribution density is divided into three categories: sparse, medium and dense, according to the scene type. The obstacle distribution density is determined by defining the range between any two obstacles by the nearest distance between them. The visual prominence of obstacles is divided into three categories: high prominence, medium prominence, and low prominence. The prominence of visual features is determined by defining the range of contrast values of the obstacle surface material. The dynamic and static states of obstacles are mainly considered in the setting of dynamic obstacles. Dynamic obstacles with different moving directions and moving speeds are set according to the needs of task assessment.
6. The method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms according to claim 1, characterized in that: In step 3, to enhance the diversity of the simulation test environment, while keeping the obstacle distribution density constant, the location of obstacle generation should be able to be randomly changed to enhance the generalization test capability of the simulation environment for obstacle avoidance algorithms. After giving the shortest distance between any two obstacles, the coordinate array of sampling points is randomly generated by the two-dimensional Poisson disk sampling algorithm to obtain the obstacle generation location coordinates. Based on the obstacle generation location coordinates, the types and layout types of obstacles are randomly generated proportionally.
7. The method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms according to claim 6, characterized in that: In step 3, a scene is pre-built and obstacle prefabs are created in the Unity simulation engine. A two-dimensional Poisson disk sampling and obstacle type and layout type random generation algorithm are preset. An interface is provided between the external algorithm program and the environmental elements configuration of task scene, weather, obstacle type, scale, and density in the simulation engine. The configuration file parameters are read in through the external algorithm program and the configuration file information is sent to the preset interface of the simulation engine. The simulation engine quickly generates the simulation test environment according to the configuration file requirements.
8. The method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms according to claim 7, characterized in that: The two-dimensional Poisson disk sampling algorithm process is as follows: Input: A two-dimensional space of M×N, the shortest distance r1 between two sampling points, the maximum sampling distance r2, and the number of samplings k; Output: A two-dimensional array of Poisson disk sampling point coordinates; Step 5: If no new usable point can be found in the annular region after k samplings, then abandon this sampling and repeat Step 2.
9. The method for rapidly generating a simulation test environment for evaluating UAV visual obstacle avoidance algorithms according to claim 7, characterized in that: The algorithm for randomly generating obstacle types and deployment methods proportionally is as follows: Input: Two-dimensional Poisson disk sampling point coordinate array Q, obstacle type [A,B,…], proportion of each obstacle [a:b:…], obstacle layout type [A1,A2,…,B1,B2,…], proportion of each obstacle layout type [a1,a2,…b1,b2,…]; Output: A two-dimensional array of coordinates of the sampling points; Step 1: Let the size of the two-dimensional Poisson disk sampling point coordinate array Q be sizeQ. Output a random array P of size sizeQ with elements [A,B,…], and the ratio of each element in the array is [a:b:…]. Step 2: Randomly generate [A1,A2,...] from the A elements in the random array P according to the ratio [a1,a2,...], and randomly generate [B1,B2,...] from the B elements according to the ratio [b1,b2,...], and so on; Step 3: Traverse the two-dimensional Poisson disk sampling point coordinate array Q, and take the coordinate of one sampling point, which can correspond to one element value in the random array P; Step 4: Based on the element values, generate the corresponding obstacle types and layout types to complete the random generation of obstacles in the simulation environment.