| With the rapid development of modern UAV technology,UAV application range is more and more extensive,and its safety issues are becoming more and more prominent.UAV obstacle avoidance technology has gradually become the research focus in the field of UAV research.This paper studies the obstacle avoidance technology of UAV,mainly for two types of obstacles,one is the large obstacle that can be modeled,through the UAV to collect the environment in advance,according to the collected video material for environmental modeling,in the actual flight process of UAV,the path planning algorithm is used to avoid obstacles.The other is small obstacles which cannot be modeled.UAV uses binocular distance measurement to determine real-time obstacles,and avoids small obstacles encountered in flight through collision avoidance strategy.Firstly,for large obstacles,path planning algorithm is used to avoid obstacles.The traditional path planning algorithm usually only considers the shortest path,which makes the UAV and the obstacles can not always keep a safe distance,so it is easy to collide with the obstacles.In addition,the traditional path planning algorithm takes more time.Aiming at the above problems,this paper proposes a fast A * algorithm based on the safe distance,which gives the surrogate value to the neighborhood grid of the obstacle in the environmental modeling When calculating the path,in addition to calculating the distance between the current node and the starting node,we also need to calculate the surrogate value of the neighborhood node of the obstacle,so as to ensure that the UAV can keep a safe distance from the obstacle in the flight process.At the same time,the fast A * algorithm based on safe distance uses heap data structure to store the nodes to be expanded,which can effectively improve the speed of searching nodes,thus ensuring the path security and improving the speed of path planning algorithm.The simulation results show that the algorithm can not only ensure the security of the planning path,but also improve the speed of searching path,which can achieve the expected effect.Secondly,aiming at small obstacles that cannot be modeled,binocular ranging is used for real-time avoidance.Stereo matching is a key step in binocular ranging.The traditional stereo matching algorithm has the problems of low accuracy and long time-consuming in disparity calculation.This paper proposes a four path adaptive window census semi global stereo matching algorithm.Firstly,by comparing the center pixel gradient in 3 * 3 window with the median value of window pixel gradient,the algorithm selects the appropriate window size to calculate the matching cost.Finally,the initial disparity map is optimized to improve the accuracy of disparity calculation and reduce the algorithm time.The simulation results show that the optimized stereo matching algorithm can effectively improve the calculation accuracy and speed of disparity value,and achieve the desired effect.To sum up,the two kinds of obstacles in the flight process of UAV can be effectively avoided to ensure flight safety. |