Visual obstacle avoidance method of unmanned aerial vehicle
Through the combination of panoramic camera and ultrasonic sensor, combined with multi-core processor and artificial potential field method, the problem of insufficient image data processing when the drone flies in complex environments is solved, and the drone is safe and efficient obstacle avoidance is achieved and path planning ensures the safety and efficiency of flight missions.
Patent Information
- Application Number
- CN202411596589.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-01-10
AI Technical Summary
When the drone is flying in a complex environment, the image data captured by the camera is not processed, which affects the quality of the discrimination and makes it difficult to re-plan the movement trajectory, making it difficult to ensure the safety and efficiency of the flight mission.
Using a combination of panoramic camera and ultrasonic sensors, image preprocessing and obstacle detection are performed through multi-core processors, edge detection algorithms and convolutional neural networks are used to identify obstacles, combined with artificial potential field methods, and safety paths are planned, and gravity and repulsion generation are generated by simulating gravity and repulsion forces. The synthetic potential field determines the path.
It realizes the safe and efficient automatic obstacle avoidance of drones, ensuring the safety and efficiency of flight missions.
Smart Images

Figure BDA0005127079130000102 
Figure FDA0005127079120000011 
Figure FDA0005127079120000021
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of unmanned aerial vehicles, and in particular to a visual obstacle avoidance method for unmanned aerial vehicles. Background Art
[0002] Drones are a type of technology-intensive mechatronics product that plays an increasingly important role in both civil and military fields. With the emergence of various application requirements, drones will also perform specific tasks in complex environments. In order to ensure the smooth execution of the mission, drones will be equipped with visual obstacle avoidance to prevent damage caused by collisions with obstacles.
[0003] When the UAV flies in a complex environment, it uses a camera to capture the surrounding environment in real time, and analyzes the environmental images captured by the camera to analyze whether there are obstacles around, so as to avoid collision with obstacles. However, in the prior art, when the UAV uses a camera for visual obstacle avoidance, the captured image data is not processed accordingly, which can easily affect the judgment quality in the later analysis, and it is difficult to re-plan and determine the action trajectory according to the obstacles during the flight, making it difficult to ensure the safety and efficiency of the UAV flight mission. Summary of the invention
[0004] The purpose of the present invention is to provide a visual obstacle avoidance method for an unmanned aerial vehicle, which has the advantages of safety, high efficiency and automatic planning of obstacle avoidance routes, and solves the problem in the prior art that when the unmanned aerial vehicle uses a camera for visual obstacle avoidance, the image data taken is not processed accordingly, which easily affects the judgment quality in the later analysis, and it is difficult to re-plan and determine the action trajectory according to obstacles during the flight, thereby making it difficult to ensure the safety and efficiency of the unmanned aerial vehicle flight mission.
[0005] To achieve the above object, the present invention provides the following technical solution: a visual obstacle avoidance method for a drone, the visual obstacle avoidance method comprising the following steps:
[0006] A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around.
[0007] B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image;
[0008] B1. Convert color images to grayscale images to simplify calculation and processing;
[0009] B2, use filters to remove noise from the image at the same time;
[0010] B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles;
[0011] B4. Identify the location and type of obstacles through convolutional neural networks;
[0012] B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor.
[0013] C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field;
[0014] C1. First, set the initial position q and target position q of the drone. goal ;
[0015] C2. Calculate the gravitational potential field U of the target point goa1 (q) and all obstacles repel potential field , and calculate the total potential field U(q).
[0016] C3. Calculate the negative gradient of the total potential field;
[0017] C4, adjust the drone position according to the gradient direction;
[0018] C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
[0019] Preferably, the grayscale conversion of the image in step B can be achieved by the following formula: Gray(x,y)=0.299×Red(x,y)+0.587×Green(x,y)+0.114×Blue(x,y).
[0020] Preferably, the filter used for image denoising in step B is a Gaussian filter, and the formula of the Gaussian filter is:
[0021] Here, σ is the standard deviation, which is used to control the degree of blur.
[0022] Preferably, the edge detection algorithm in step B uses the Sobel operator to calculate the horizontal (Gx) and vertical (Gy) gradients, where the formulas are respectively
[0023] And the formula for calculating the gradient amplitude is
[0024] Preferably, the convolutional neural network algorithm in step B is: Where X is the input image, K is the convolution kernel, and * is the convolution operation.
[0025] Preferably, the target gravitational potential field formula in step C is: Where q is the current position of the robot, q goal is the target position, k goal is the gravitational coefficient, which controls the strength of gravity.
[0026] Preferably, the repulsive potential field formula in step C is:
[0027]
[0028] Among them U obstacle (q) is the value of the obstacle repulsion potential field, q is the current position of the robot, and q obs is the position of the obstacle, d 0 is the influence range, i.e. the influence distance of the obstacle; k obstacle is the repulsion coefficient, which controls the strength of the repulsion force.
[0029] Preferably, the total potential field formula in step C is:
[0030] in is the repulsive potential field of the ith obstacle.
[0031] Preferably, the ultrasonic sensor in step B is of model HC-SR04, and the panoramic camera is of model Kandao QooCam
[0032] 8K, the model of the multi-core processor is Qualcomm Snapdragon series.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] The present invention adopts a panoramic camera to shoot the surrounding environment of the UAV, cooperates with an ultrasonic sensor to detect surrounding obstacles, and pre-processes the image through the image processing module of a multi-core processor, which can reduce the interference information in the image. By adopting an edge detection method and a convolutional neural network, it is convenient to better identify the position contour and type of obstacles. By combining the position, distance and type data of the obstacle, an artificial potential field method is used to calculate and plan a safe path. The safe path is mainly generated by simulating gravity and repulsion, the target is regarded as a gravity source, and the obstacle is regarded as a repulsion source. The path is determined by synthesizing the potential field, thereby achieving obstacle avoidance and ensuring the safety and efficiency of the UAV flight mission. DETAILED DESCRIPTION
[0035] A visual obstacle avoidance method for an unmanned aerial vehicle, the visual obstacle avoidance method comprising the following steps:
[0036] A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around.
[0037] B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image;
[0038] B1. Convert color images to grayscale images to simplify calculation and processing;
[0039] B2, use filters to remove noise from the image at the same time;
[0040] B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles;
[0041] B4. Identify the location and type of obstacles through convolutional neural networks;
[0042] B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor.
[0043] C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field;
[0044] C1. First, set the initial position q and target position q of the drone. goal ;
[0045] C2. Calculate the gravitational potential field U of the target point goal (q) and all obstacles repel potential field , and calculate the total potential field U(q).
[0046] C3. Calculate the negative gradient of the total potential field;
[0047] C4, adjust the drone position according to the gradient direction;
[0048] C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
[0049] Embodiment 2:
[0050] In the first embodiment, the following steps are added:
[0051] The grayscale conversion of the image in step B can be achieved by the following formula: Gray(x,y)=0.299×Red(x,y)+0.587×Green(x,y)+0.114×Blue(x,y).
[0052] The visual obstacle avoidance method includes the following steps:
[0053] A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around.
[0054] B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image;
[0055] B1. Convert color images to grayscale images to simplify calculation and processing;
[0056] B2, use filters to remove noise from the image at the same time;
[0057] B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles;
[0058] B4. Identify the location and type of obstacles through convolutional neural networks;
[0059] B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor.
[0060] C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field;
[0061] C1. First, set the initial position q and target position q of the drone. goal ;
[0062] C2. Calculate the gravitational potential field U of the target point goal (q) and all obstacles repel potential field , and calculate the total potential field U(q).
[0063] C3. Calculate the negative gradient of the total potential field;
[0064] C4, adjust the drone position according to the gradient direction;
[0065] C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
[0066] Embodiment three:
[0067] In the second embodiment, the following steps are added:
[0068] The filter used for image denoising in step B is a Gaussian filter, and the formula of the Gaussian filter is: Here, σ is the standard deviation, which is used to control the degree of blur.
[0069] The visual obstacle avoidance method includes the following steps:
[0071] Embodiment 4:
[0072] In the third embodiment, the following steps are added:
[0073] In step B, the edge detection algorithm uses the Sobel operator to calculate the horizontal (Gx) and vertical (Gy) gradients, where the formulas are
[0074] And the formula for calculating the gradient amplitude is
[0075] The visual obstacle avoidance method includes the following steps:
[0076] A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around.
[0077] B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image;
[0078] B1. Convert color images to grayscale images to simplify calculation and processing;
[0079] B2, use filters to remove noise from the image at the same time;
[0080] B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles;
[0081] B4. Identify the location and type of obstacles through convolutional neural networks;
[0082] B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor.
[0083] C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field;
[0084] C1. First, set the initial position q and target position q of the drone. goal ;
[0085] C2. Calculate the gravitational potential field U of the target point goal (q) and all obstacles repel potential field , and calculate the total potential field U(q).
[0086] C3. Calculate the negative gradient of the total potential field;
[0087] C4, adjust the drone position according to the gradient direction;
[0088] C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
[0089] Embodiment five:
[0090] In the fourth embodiment, the following steps are added:
[0091] The convolutional neural network algorithm in step B is: Where X is the input image, K is the convolution kernel, and * is the convolution operation.
[0092] The visual obstacle avoidance method includes the following steps:
[0093] A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around.
[0094] B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image;
[0095] B1. Convert color images to grayscale images to simplify calculation and processing;
[0096] B2, use filters to remove noise from the image at the same time;
[0097] B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles;
[0098] B4. Identify the location and type of obstacles through convolutional neural networks;
[0099] B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor.
[0100] C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field;
[0101] C1. First, set the initial position q and target position q of the drone. goal ;
[0102] C2. Calculate the gravitational potential field U of the target point goal (q) and all obstacles repel potential field , and calculate the total potential field U(q).
[0103] C3. Calculate the negative gradient of the total potential field;
[0104] C4, adjust the drone position according to the gradient direction;
[0105] C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
[0106] Embodiment six:
[0107] In the fifth embodiment, the following steps are added:
[0108] The target gravitational potential field formula in step C is
[0109] Where q is the current position of the robot, q goal is the target position, k goal is the gravitational coefficient, which controls the strength of gravity.
[0110] The visual obstacle avoidance method includes the following steps:
[0111] A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around.
[0112] B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image;
[0113] B1. Convert color images to grayscale images to simplify calculation and processing;
[0114] B2, use filters to remove noise from the image at the same time;
[0115] B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles;
[0116] B4. Identify the location and type of obstacles through convolutional neural networks;
[0117] B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor.
[0118] C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field;
[0119] C1. First, set the initial position q and target position q of the drone. goal ;
[0120] C2. Calculate the gravitational potential field U of the target point goal (q) and all obstacles repel potential field , and calculate the total potential field U(q).
[0121] C3. Calculate the negative gradient of the total potential field;
[0122] C4, adjust the drone position according to the gradient direction;
[0123] C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
[0124] Embodiment seven:
[0125] In embodiment 6, the following steps are added:
[0126] The repulsive potential field formula in step C is:
[0127]
[0128] Among them U obstacle (q) is the value of the obstacle repulsion potential field, q is the current position of the robot, and q obs is the position of the obstacle, d 0 is the influence range, i.e. the influence distance of the obstacle; k obstacle is the repulsion coefficient, which controls the strength of the repulsion force.
[0129] The visual obstacle avoidance method includes the following steps:
[0130] A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around.
[0131] B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image;
[0132] B1. Convert color images to grayscale images to simplify calculation and processing;
[0133] B2, use filters to remove noise from the image at the same time;
[0134] B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles;
[0135] B4. Identify the location and type of obstacles through convolutional neural networks;
[0136] B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor.
[0137] C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field;
[0138] C1. First, set the initial position q and target position q of the drone. goal ;
[0139] C2. Calculate the gravitational potential field U of the target point goal (q) and all obstacles repel potential field , and calculate the total potential field U(q).
[0140] C3. Calculate the negative gradient of the total potential field;
[0141] C4, adjust the drone position according to the gradient direction;
[0142] C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
[0143] Embodiment eight:
[0144] In the seventh embodiment, the following steps are added:
[0145] The total potential field formula in step C is:
[0146] in is the repulsive potential field of the ith obstacle.
[0147] The visual obstacle avoidance method includes the following steps:
[0148] A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around.
[0149] B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image;
[0150] B1. Convert color images to grayscale images to simplify calculation and processing;
[0151] B2, use filters to remove noise from the image at the same time;
[0152] B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles;
[0153] B4. Identify the location and type of obstacles through convolutional neural networks;
[0154] B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor.
[0155] C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field;
[0156] C1. First, set the initial position q and target position q of the drone. goal ;
[0157] C2. Calculate the gravitational potential field U of the target point goal (q) and all obstacles repel potential field , and calculate the total potential field U(q).
[0158] C3. Calculate the negative gradient of the total potential field;
[0159] C4, adjust the drone position according to the gradient direction;
[0160] C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
[0161] Embodiment nine:
[0162] In the eighth embodiment, the following steps are added:
[0163] The ultrasonic sensor used in step B is HC-SR04, and the panoramic camera is KandaoQooCam.
[0164] 8K, the model of the multi-core processor is Qualcomm Snapdragon series.
[0165] The visual obstacle avoidance method includes the following steps:
[0166] A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around.
[0167] B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image;
[0168] B1. Convert color images to grayscale images to simplify calculation and processing;
[0169] B2, use filters to remove noise from the image at the same time;
[0170] B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles;
[0171] B4. Identify the location and type of obstacles through convolutional neural networks;
[0172] B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor.
[0173] C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field;
[0174] C1. First, set the initial position q and target position q of the drone. goal ;
[0175] C2. Calculate the gravitational potential field U of the target point goal (q) and all obstacles repel potential field , and calculate the total potential field U(q).
[0176] C3. Calculate the negative gradient of the total potential field;
[0177] C4, adjust the drone position according to the gradient direction;
[0178] C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
[0179] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0180] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A visual obstacle avoidance method for an unmanned aerial vehicle, characterized in that: The visual obstacle avoidance method includes the following steps: A. First, use the panoramic camera to take real-time photos of the front and surrounding views of the drone, and use the ultrasonic sensor to transmit and receive ultrasonic signals to measure and detect whether there are obstacles around. B. The image video captured by the panoramic camera will be transmitted to the multi-core processor, and the image processing module in the multi-core processor will pre-process the image; B1. Convert color images to grayscale images to simplify calculation and processing; B2, use filters to remove noise from the image at the same time; B3. The processed image data will be used to identify the edges in the image through edge detection algorithms, thereby helping to identify the outline of obstacles; B4. Identify the location and type of obstacles through convolutional neural networks; B5. The ultrasonic sensor emits a high-frequency sound wave, which is reflected back after hitting an obstacle. The ultrasonic sensor receives the reflected wave and calculates its propagation time to determine the distance and transmits the data to the multi-core processor. C. Then, the safe path is calculated and planned by combining the location, distance and type data of the obstacle with the artificial potential field method. The safe path is generated mainly by simulating gravity and repulsion, treating the target as the source of gravity and the obstacle as the source of repulsion, and finally determining the path through the synthetic potential field; C1. First, set the initial position q and target position q of the drone. goal ; C2. Calculate the gravitational potential field U of the target point goal (q) and all obstacles repel potential field , and calculate the total potential field U(q). C3. Calculate the negative gradient of the total potential field; C4, adjust the drone position according to the gradient direction; C5. Finally, update the drone position q and repeat the calculation until the drone reaches the target position or meets other termination conditions, thereby achieving the obstacle avoidance operation of the drone.
2. The visual obstacle avoidance method for a drone according to claim 1, characterized in that: The grayscale conversion of the image in step B can be achieved by the following formula: Gray(x,y)=0.299×Red(x,y)+0.587×Green(x,y)+0.114×Blue(x,y).
3. The visual obstacle avoidance method for a drone according to claim 1, characterized in that: The filter used for image denoising in step B is a Gaussian filter, and the formula of the Gaussian filter is: Here, σ is the standard deviation, which is used to control the degree of blur.
4. The visual obstacle avoidance method for an unmanned aerial vehicle according to claim 1, characterized in that: The edge detection algorithm in step B uses the Sobel operator to calculate the horizontal (Gx) and vertical (Gy) gradients, where the formulas are and And the formula for calculating the gradient amplitude is 5. The visual obstacle avoidance method for an unmanned aerial vehicle according to claim 1, characterized in that: The convolutional neural network algorithm in step B is: Where X is the input image, K is the convolution kernel, and * is the convolution operation.
6. The visual obstacle avoidance method for an unmanned aerial vehicle according to claim 1, characterized in that: The target gravitational potential field formula in step C is: Where q is the current position of the robot, q goal is the target position, k goal is the gravitational coefficient, which controls the strength of gravity.
7. The visual obstacle avoidance method for an unmanned aerial vehicle according to claim 1, characterized in that: The repulsive potential field formula in step C is: Among them U obstacle (q) is the value of the obstacle repulsion potential field, q is the current position of the robot, and q obs is the position of the obstacle, d0 is the impact range, that is, the impact distance of the obstacle; k obstacle is the repulsion coefficient, which controls the strength of the repulsion force.
8. The visual obstacle avoidance method for an unmanned aerial vehicle according to claim 1, characterized in that: The total potential field formula in step C is: in is the repulsive potential field of the ith obstacle.
9. The visual obstacle avoidance method for a drone according to claim 1, characterized in that: The ultrasonic sensor used in step B is HC- SR04, and the panoramic camera model is Kandao QooCam 8K, the model of the multi-core processor is Qualcomm Snapdragon series.