| Unmanned aerial vehicles(UAVs)are of great interest in both military and civilian fields due to their long endurance,high stealthiness,low cost,resilience to damage,small size,and ease of operation.With the continuous accumulation of UAV technology advantages,their application areas have gradually expanded to many complex scenarios,such as search and rescue,urban inspections,agricultural planting and protection,and intelligent logistics.The autonomous flight ability of UAVs has been increasingly demanded,especially when GPS is not working properly or when the flight environment is complex.They need to achieve autonomous and precise positioning,plan routes,avoid obstacles,and complete target detection tasks.This paper focuses on the autonomous flight of drones in complex environments and presents the design and implementation of a object detection,navigation,and obstacle avoidance system for multi-rotor drones.The system includes the following components:Firstly,we proposed a YOLOv5s-Ghost network that is more suitable for UAV platforms.We introduced the Ghost module to improve the CBL and CSP_X units in YOLOv5s,and lightweighted the network to improve the real-time performance of object detection.We used the7)as the regression loss function and modified the non-maximum suppression98))to98))to optimize the loss function and improve the accuracy of object detection.Finally,we tested the proposed network on TX2 and validated its advanced performance in providing real-time and accurate object detection results.Furthermore,a stereo matching method combining edge detection and semi-global matching was proposed to significantly reduce the time required for stereo matching.A point cloud was obtained based on the disparity map and converted into an octree map for UAV navigation and obstacle avoidance.To improve the accuracy of state estimation,an IMU and binocular vision fusion-based method for UAV pose estimation was used.The Jacobian matrix of residuals with respect to state increments was derived,and IMU initialization was performed.Finally,the proposed state estimation algorithm was tested on the Eu Ro C dataset,demonstrating high accuracy.Building on this,a path generation algorithm for autonomous navigation and obstacle avoidance of drones was designed,with an explanation of the improved RRT*search algorithm and an analysis of its superiority.Based on the usage scenario and sampling strategy of quadrotor drones,a more efficient path search strategy was designed,and a cubic spline was used to optimize the trajectory in the post-processing stage.Combining the optimization algorithm in the controller,the trajectory was constrained based on the smoothness of the trajectory,the minimum safe distance between the drone and obstacles,the maximum flight speed and acceleration of the Binocular Vision drone,thus obtaining an optimized trajectory that satisfies the drone’s dynamic constraints.Finally,the software architecture for autonomous navigation and obstacle avoidance system for multi-rotor drones was designed.The corresponding hardware platform was built,and simulation experiments were conducted using ROS system and Gazebo software to validate the system’s feasibility.Real-world tests were performed in outdoor environments to navigate and avoid obstacles using the system.The test results demonstrate that the system has excellent navigation and obstacle avoidance capabilities and can be applied in actual drone flight scenarios. |