UAV indoor navigation system based on visual SLAM
By integrating environment perception and image processing technology, a three-dimensional map is constructed in real time and the flight path is dynamically adjusted, which solves the problem of unstable navigation of the visual SLAM system in complex indoor environments and improves the navigation performance and safety of the drone.
Patent Information
- Application Number
- CN202411074771.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Existing visual SLAM systems are difficult to handle real-time environmental changes and dynamic obstacles in complex indoor environments, resulting in unstable UAV navigation. The path planning and navigation control modules have insufficient coordination and real-time response capabilities, and cannot meet the needs of high-precision navigation. .
A drone indoor navigation system based on visual SLAM is designed, which integrates the environment perception module, image processing module, feature matching module, map construction module, path planning module and navigation control module, and captures environmental data through RGB cameras and depth cameras. Perform image denoising, enhancement and feature point extraction, build a three-dimensional map in real time, and dynamically adjust the flight path to respond to environmental changes.
Significantly improves the navigation performance and safety of UAVs in complex indoor environments, ensures continuous awareness of the environment and obstacle detection, improves the adaptability to dynamic changes and the efficiency and smoothness of flight paths, and enhances navigation System reliability and efficiency.
Smart Images

Figure CN118603103B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle navigation technology, and in particular to an indoor navigation system for unmanned aerial vehicles based on visual SLAM. Background Art
[0002] In recent years, with the rapid development of drone technology, drones have been widely used in many fields such as industry, agriculture, logistics and rescue. However, it is still a huge challenge to realize autonomous navigation of drones in complex indoor environments. Indoor environments usually have complex obstacle layouts and dynamic changes. Traditional GPS-based navigation methods cannot be used in indoor environments, and navigation methods based on preset paths lack flexibility and cannot cope with real-time environmental changes. Visual SLAM (Simultaneous Localization and Mapping) technology captures environmental images through cameras and builds environmental maps in real time, providing drones with an autonomous navigation solution that does not require an external positioning system.
[0003] Although visual SLAM technology has shown broad prospects in indoor navigation of drones, the current technical implementation still faces several challenges. The existing visual SLAM system has deficiencies in dealing with real-time environmental changes and dynamic obstacles, and cannot ensure stable navigation of drones in complex indoor environments. In addition, the coordination and real-time response capabilities of path planning and navigation control modules need to be improved urgently to meet the high-precision navigation needs of drones in dynamic environments.
[0004] Therefore, there is an urgent need for an improved UAV indoor navigation system based on visual SLAM to solve the above problems in the existing technology by enhancing environmental perception, real-time obstacle detection and dynamic path adjustment capabilities. Summary of the invention
[0005] Based on the above objectives, the present invention provides a UAV indoor navigation system based on visual SLAM.
[0006] The indoor navigation system of UAV based on visual SLAM includes an environment perception module, an image processing module, a feature matching module, a map building module, a path planning module and a navigation control module; wherein:
[0007] Environmental perception module: Equipped with an RGB camera and a depth camera, it is used to capture color images and depth information of the indoor environment and transmit the captured visual data to the image processing module for subsequent processing;
[0008] Image processing module: receives the output data of the environment perception module, performs image denoising and enhancement to improve data quality, and extracts feature points from the processed images to provide a basis for subsequent positioning and map construction;
[0009] Feature matching module: Use the feature points provided by the image processing module to perform time series feature matching to estimate the displacement and attitude change data of the drone;
[0010] Map construction module: Based on the pose data provided by the feature matching module and the known environmental information, it constructs and updates the three-dimensional map of the indoor environment;
[0011] Path planning module: plans an optimal navigation path from the current position to the target position based on the three-dimensional map output by the map construction module and the current position of the drone;
[0012] Navigation control module: receives the optimal navigation path information provided by the path planning module, controls the UAV to fly according to the planned path, and dynamically adjusts the flight path during the flight using the real-time images provided by the environmental perception module to cope with changes in the environment.
[0013] Furthermore, the environment perception module includes an RGB camera unit and a depth camera unit; wherein:
[0014] RGB camera unit: used to capture color images of indoor environments. The RGB camera unit includes an image sensor, a lens, an image processing chip, and a data transmission interface. The image sensor is used to capture light signals in the environment and convert them into digital image signals. The lens is used to adjust the incident angle and focal length of the light to ensure the clarity of the image. The image processing chip is used to pre-process the captured image to improve the image quality. The data transmission interface is used to transmit the processed image data to the image processing module. The specific captured color image data includes information on the three color channels of red, green, and blue, as well as the brightness and chromaticity parameters of each pixel.
[0015] Depth camera unit: used to capture the depth information of the indoor environment, the depth camera unit includes an infrared transmitter, an infrared receiver, a depth calculation chip and a data transmission interface; the infrared transmitter is used to emit an infrared light beam; the infrared receiver receives the infrared light signal reflected from the surface of the object; the depth calculation chip is used to calculate the distance between the object and the camera based on the time difference and phase difference of the light signal; the data transmission interface transmits the calculated depth information to the image processing module; the specific captured depth information data includes the distance parameter and spatial position parameter of each pixel point.
[0016] Furthermore, the image processing module includes an image denoising unit, an image enhancement unit and a feature point extraction unit; wherein:
[0017] Image denoising unit: used to receive the output data of the environment perception module and perform image denoising processing, the image denoising unit includes a noise detector, a filter and a denoising processing chip; the noise detector is used to identify the noise signal in the image; the filter uses a Gaussian filtering algorithm to filter the noise signal; the denoising processing chip adjusts the denoising parameters according to the feedback of the noise detector and the filter to generate denoised image data;
[0018] Image enhancement unit: used for enhancing the denoised image, the image enhancement unit includes a contrast adjuster, a sharpener and an enhancement processing chip; the contrast adjuster is used to adjust the contrast according to the brightness histogram of the image; the sharpener is used to enhance the edge of the image using the Laplace operator; the enhancement processing chip is used to integrate the processing results of the contrast adjuster and the sharpener to generate enhanced image data;
[0019] Feature point extraction unit: used to extract feature points from the enhanced image, the feature point extraction unit includes a feature detector, a descriptor generator and a feature extraction processing chip; the feature detector uses the ORB algorithm to detect preset focus points in the image; the descriptor generator generates a feature descriptor for each preset focus point; the feature extraction processing chip is used to integrate the processing results of the feature detector and the descriptor generator, and finally generate feature point data.
[0020] Furthermore, the feature point extraction unit includes:
[0021] Step 1: The feature detector uses the ORB algorithm to detect the preset focus points in the image; first, the FAST algorithm is used to determine the corner points in the image; the FAST algorithm compares the pixel points The brightness of the pixels in the circular area around it, if there are at least The ratio of consecutive pixels The brightness is higher than a certain threshold or below When is considered to be a corner point, and the formula is: ,in, It's a pixel Brightness, is the brightness set of pixels in the circular area. is the brightness difference threshold used to determine the corner points, is the number of consecutive pixels used to determine the corner point; then, in order to maintain rotation invariance, the direction of the corner point is given by calculating the direction of the centroid around the corner point relative to the corner point. The direction is determined by the vector from the corner point to the centroid. The specific calculation formula is: ,in, is the direction angle of the corner point, Represents the inverse tangent function, which is used to calculate angles, and They are the first moments of the image around the preset focus point;
[0022] Step 2: The descriptor generator generates a feature descriptor for each preset focus point detected. Specifically, the BRIEF algorithm is used to generate a binary string as the descriptor of each preset focus point. In order to ensure rotation invariance, the BRIEF descriptor is rotated and adjusted based on the direction of the preset focus point. The generation of the descriptor is completed by comparing the intensity difference of the pixel pairs around the preset focus point. The comparison formula is expressed as:
[0023] ,in, is the descriptor of the preset focus point, and It is the default focus The indices of the surrounding pixels, Indicates the brightness of the pixel;
[0024] Step 3: The feature extraction processing chip integrates the outputs of the feature detector and the descriptor generator. The feature extraction processing chip will collect the position, direction and descriptor information of all preset focus points, and generate the final feature point data set after unified formatting.
[0025] Furthermore, the feature matching module includes a feature matching unit, a displacement estimation unit and a posture estimation unit; wherein:
[0026] Feature matching unit: used to receive the feature point data provided by the image processing module and perform time series feature matching. By calculating the descriptor similarity of the feature points in the two frames of images, a matching pair is found. Specifically, the Hamming distance is used as the metric for the descriptor similarity. The minimum Hamming distance between the matching pairs is the best match. The specific formula is:
[0027] ,in, is a feature descriptor and The Hamming distance between is the length of the descriptor, Represents a bitwise exclusive OR operation;
[0028] Displacement estimation unit: used to estimate the displacement of the drone using the matching pairs obtained by the feature matching unit, and calculate the translation vector of the drone between two time points based on the position information of the matching pairs. The specific calculation formula is: ,in, is the translation vector of the drone, and are the positions of the feature points at two time points respectively;
[0029] Attitude estimation unit: used to calculate the attitude change of the drone based on the translation vector of the displacement estimation unit and the angle difference of the matching pair. The least squares method is used to perform the rotation matrix. The solution is:
[0030] ,in, and Is a matching pair The feature point position, is the rotation matrix, Represents the rotation matrix that minimizes the objective function .
[0031] Furthermore, the map construction module includes a data fusion unit, a three-dimensional point cloud generation unit and a map update unit; wherein:
[0032] Data fusion unit: used to receive the posture data provided by the feature matching module, and fuse these data with known environmental information, specifically using the Kalman filter to smooth and optimize the posture data to reduce noise and errors;
[0033] A three-dimensional point cloud generation unit is used to generate a three-dimensional point cloud according to the posture data processed by the data fusion unit. The three-dimensional point cloud generation unit includes a point cloud generator and a coordinate converter. The point cloud generator calculates the coordinates of each feature point in the three-dimensional space based on the posture data, and the coordinate converter converts the calculated coordinates into a global coordinate system, thereby generating complete three-dimensional point cloud data.
[0034] Map update unit: used to update the existing indoor environment map according to the newly generated three-dimensional point cloud data. The map update unit includes a map memory and a fusion algorithm processor. The map memory is used to store the current three-dimensional map data; the fusion algorithm processor aligns and fuses the newly generated point cloud with the existing map through an iterative nearest point algorithm to ensure the continuity and accuracy of the map.
[0035] Furthermore, the specific steps of registering and fusing the newly generated point cloud with the existing map in the map updating unit include:
[0036] Initial alignment: receiving a newly generated point cloud and existing map point cloud , According to the pose data provided by the feature matching module, the two point clouds are initially aligned. The initial alignment uses the feature point position information to perform rough registration, and the two point clouds are roughly aligned. The rough registration formula is: ,in, is the rotation matrix, is the translation vector, is the new point cloud after preliminary alignment;
[0037] Closest point matching: by finding and The nearest neighbor of each point in the match point pair, for each point exist In, find The most recent , the closest point matching formula is:
[0038] ,in, represents the Euclidean distance, yes Zhongyu nearest point;
[0039] Registration error calculation: Calculate the sum of square errors between matching point pairs as the registration error; the registration error formula is: ,in, is the number of matching point pairs, and They are and The matching point pairs in ;
[0040] Optimization Iteration: Iteratively optimize the rotation matrix by minimizing the registration error and translation vectors , the optimization process is achieved by iteratively solving the following minimization problem: , through multiple iterations, continuously updated and To reduce the error until the error converges or reaches a preset minimum threshold;
[0041] Point cloud fusion: After the registration is completed, the aligned new point cloud Fusion to existing map point cloud In the example above, update the map; the fusion formula is: ,in, It is the updated map after fusion.
[0042] Furthermore, the path planning module includes an environment modeling unit, a path search unit and a path optimization unit; wherein:
[0043] Environmental modeling unit: used to receive the 3D map data output by the map building module and the current position of the UAV, and convert the 3D map into a grid map, in which each grid point is marked as passable or impassable according to the presence or absence of obstacles at the location; specifically, the surface normal method is used to determine whether each grid point in the grid map is passable;
[0044] Path search unit: Based on the peer information provided by the environment modeling unit, the A algorithm is used to search for a path from the current location to the target location. The A algorithm uses a heuristic function and the cost function Calculate the total cost of each node , give priority to expanding the node with the lowest cost until the optimal path is found. The A* algorithm formula is: ,in, Is a node The total cost, From the starting point to the node The actual cost of It is a slave node Heuristic estimate of cost to the target point;
[0045] Path optimization unit: optimizes the path found by the path search unit to improve the smoothness and safety of the path. Specifically, Bezier curve fitting or spline curve interpolation method is used to smooth the path nodes to ensure the stability of the UAV flight; the path optimization formula is: ,in, is a point on the path, is the Bessel basis function, is the control point, is the number of control points of the path.
[0046] Furthermore, the navigation control module includes a path tracking unit, a posture control unit and a dynamic adjustment unit; wherein:
[0047] Path tracking unit: used to receive the optimal navigation path information provided by the path planning module, and generate path tracking instructions for the UAV, and decompose the optimal path into multiple target points, and calculate the gap between each target point and the current position of the UAV to generate path tracking instructions to guide the UAV to fly along the planned path;
[0048] Attitude control unit: controls the attitude and speed of the drone according to the path tracking instructions generated by the path tracking unit, and ensures that the drone can fly according to the path tracking instructions by adjusting the pitch, roll and yaw angles of the drone and adjusting the flight speed of the drone;
[0049] Dynamic adjustment unit: used to dynamically adjust the flight path during flight using the real-time images provided by the environmental perception module, detect obstacles and environmental changes ahead by real-time analysis of image data captured by the environmental perception module, and calculate the drone's instant position and attitude changes based on new feature point information in the real-time image, and generate new path tracking instructions.
[0050] Furthermore, the dynamic adjustment unit includes:
[0051] Obstacle detection: Based on the feature point information preprocessed by the image processing module, obstacles in the image are detected. Specifically, the YOLO algorithm is used for real-time obstacle detection. The YOLO algorithm divides the image into multiple grids, and each grid predicts multiple bounding boxes and corresponding confidence scores. The obstacle detection formula is: ;in, represents the probability of the existence of an object, represents the intersection-over-union ratio between the predicted bounding box and the true bounding box;
[0052] Path replanning: Based on the obstacle information detected by the obstacle detection unit, the current flight path is replanned, and a new path that avoids obstacles is replanned in the current map using the dynamic D*Lite algorithm;
[0053] Control command generation: Based on the new path generated by the path replanning unit, the control commands of the UAV are calculated. The control commands include the new heading, speed and attitude adjustment parameters.
[0054] Beneficial effects of the present invention:
[0055] The present invention significantly improves the navigation performance and safety of drones in complex indoor environments by integrating advanced environmental perception technology, real-time obstacle detection and dynamic path adjustment functions. First, the environmental perception module uses a high-precision camera to capture detailed environmental images, combines image processing technology to extract key features, and updates the environmental map in real time to ensure that the drone has continuous cognitive updates of the environment. The obstacle detection module uses real-time image analysis to accurately identify and locate obstacles in the path, effectively prevent possible collisions, and increase the safety of drone flight.
[0056] The present invention uses a dynamic path adjustment module to quickly re-plan the flight path according to the real-time detected environmental changes and obstacle information, so as to ensure that the UAV can respond immediately when encountering emergencies, avoid obstacles, and adjust the flight direction and altitude. The integration of this function not only improves the adaptability of the UAV to dynamic changes in the environment, but also optimizes the efficiency and smoothness of the flight path, thereby significantly improving the reliability and efficiency of the entire navigation system, ensuring that the UAV can operate stably in various indoor environments and meet a wider range of application needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 A schematic diagram of an indoor navigation system for a drone according to an embodiment of the present invention;
[0059] Figure 2 Schematic diagram of a path planning module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0061] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. The words "include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0062] like Figure 1-Figure 2 As shown, the indoor navigation system of UAV based on visual SLAM includes an environment perception module, an image processing module, a feature matching module, a map construction module, a path planning module and a navigation control module; wherein:
[0063] Environmental perception module: Equipped with an RGB camera and a depth camera, it is used to capture color images and depth information of the indoor environment and transmit the captured visual data to the image processing module for subsequent processing;
[0064] Image processing module: receives the output data of the environment perception module, performs image denoising and enhancement to improve data quality, and extracts feature points from the processed images to provide a basis for subsequent positioning and map construction;
[0065] Feature matching module: Use the feature points provided by the image processing module to perform time series feature matching to estimate the displacement and attitude change data of the drone. The calculated pose estimation data is used to update and refine the three-dimensional map in the map construction module;
[0066] Map construction module: Based on the pose data provided by the feature matching module and the known environmental information, it constructs and updates the three-dimensional map of the indoor environment. This three-dimensional map data provides the necessary environmental model for the path planning module.
[0067] Path planning module: plans an optimal navigation path from the current position to the target position based on the 3D map output by the map building module and the current position of the drone, and passes this path information to the navigation control module;
[0068] Navigation control module: receives the optimal navigation path information provided by the path planning module, controls the UAV to fly according to the planned path, and dynamically adjusts the flight path during the flight using the real-time images provided by the environmental perception module to cope with changes in the environment.
[0069] The environment perception module includes an RGB camera unit and a depth camera unit; wherein:
[0070] RGB camera unit: used to capture color images of indoor environments. The RGB camera unit includes an image sensor, a lens, an image processing chip, and a data transmission interface. The image sensor is used to capture light signals in the environment and convert them into digital image signals. The lens is used to adjust the incident angle and focal length of the light to ensure the clarity of the image. The image processing chip is used to pre-process the captured image to improve the image quality. The data transmission interface is used to transmit the processed image data to the image processing module. The specific captured color image data includes information on the three color channels of red, green, and blue, as well as the brightness and chromaticity parameters of each pixel.
[0071] Depth camera unit: used to capture the depth information of the indoor environment, the depth camera unit includes an infrared transmitter, an infrared receiver, a depth calculation chip and a data transmission interface; the infrared transmitter is used to emit infrared light beams; the infrared receiver receives infrared light signals reflected from the surface of the object; the depth calculation chip is used to calculate the distance between the object and the camera based on the time difference and phase difference of the light signal; the data transmission interface transmits the calculated depth information to the image processing module; the specific captured depth information data includes the distance parameters and spatial position parameters of each pixel point; through the above configuration, the environmental perception module can effectively capture the color image and depth information of the indoor environment, and provide these data to the image processing module to support subsequent feature extraction and positioning and map construction processes. The RGB camera unit and the depth camera unit work together to ensure the efficient operation of the visual SLAM system in complex indoor environments.
[0072] The image processing module includes an image denoising unit, an image enhancement unit and a feature point extraction unit; wherein:
[0073] Image denoising unit: used to receive the output data of the environment perception module and perform image denoising. The image denoising unit includes a noise detector, a filter and a denoising processing chip. The noise detector is used to identify the noise signal in the image. The filter uses a Gaussian filtering algorithm to filter the noise signal. The denoising processing chip adjusts the denoising parameters according to the feedback of the noise detector and the filter to generate denoised image data.
[0074] Image enhancement unit: used for enhancing the denoised image, the image enhancement unit includes a contrast adjuster, a sharpener and an enhancement processing chip; the contrast adjuster is used to adjust the contrast according to the brightness histogram of the image; the sharpener is used to enhance the edge of the image using the Laplace operator; the enhancement processing chip is used to integrate the processing results of the contrast adjuster and the sharpener to generate enhanced image data;
[0075] Feature point extraction unit: used to extract feature points from the enhanced image, the feature point extraction unit includes a feature detector, a descriptor generator and a feature extraction processing chip; the feature detector uses the ORB (Oriented FAST and Rotated BRIEF) algorithm to detect preset focus points in the image; the descriptor generator generates a feature descriptor for each preset focus point; the feature extraction processing chip is used to integrate the processing results of the feature detector and the descriptor generator, and finally generate feature point data; through the above configuration, the image processing module can effectively receive and process the output data of the environmental perception module, perform image denoising and enhancement processing, improve the quality of image data, and extract feature point data therefrom, providing high-quality basic data support for subsequent positioning and map construction.
[0076] The feature point extraction unit includes:
[0077] Step 1: The feature detector uses the ORB (Oriented FAST and Rotated BRIEF) algorithm to detect the preset focus points in the image. First, the FAST algorithm is used to determine the corner points in the image. The FAST algorithm compares the pixel points. The brightness of the pixels in the circular area around it, if there are at least The ratio of consecutive pixels The brightness is higher than a certain threshold or below When is considered to be a corner point, and the formula is: ,in, It's a pixel Brightness, is the brightness set of pixels in the circular area. is the brightness difference threshold used to determine the corner points, is the number of consecutive pixels used to determine the corner point; then, in order to maintain rotation invariance, the direction of the corner point is given by calculating the direction of the centroid around the corner point relative to the corner point. The direction is determined by the vector from the corner point to the centroid. The specific calculation formula is: ,in, is the direction angle of the corner point, Represents the inverse tangent function, which is used to calculate angles, and They are the first moments of the image around the preset focus point, which are used to calculate the center of mass position. The specific calculation formula is: ; ,in, Representing coordinates The pixel brightness value at ;
[0078] Step 2: The descriptor generator generates a feature descriptor for each preset focus point detected. Specifically, the BRIEF algorithm is used to generate a binary string as the descriptor of each preset focus point. In order to ensure rotation invariance, the BRIEF descriptor is rotated and adjusted based on the direction of the preset focus point. The generation of the descriptor is completed by comparing the intensity difference of the pixel pairs around the preset focus point. The comparison formula is expressed as:
[0079] ,in, is the descriptor of the preset focus point, and It is the default focus The indices of the surrounding pixels, Indicates the brightness of the pixel;
[0080] Step 3: The feature extraction processing chip integrates the outputs of the feature detector and the descriptor generator. The feature extraction processing chip will collect the position, direction and descriptor information of all preset focus points, and generate the final feature point data set after unified formatting. These data will be used in the subsequent feature matching module. Through the above series of steps, the ORB algorithm is combined with FAST corner detection and BRIEF descriptor. The feature point extraction unit can not only quickly and accurately detect and describe the feature points in the image, but also ensure that the feature points have good matching and rotation invariance between different images, which improves the positioning accuracy of the visual SLAM system and the accuracy of map construction, thereby significantly enhancing the reliability and efficiency of indoor navigation of drones.
[0081] The feature matching module includes a feature matching unit, a displacement estimation unit and a posture estimation unit; wherein:
[0082] Feature matching unit: used to receive feature point data provided by the image processing module and perform time series feature matching. It finds matching pairs by calculating the descriptor similarity of feature points in two frames of images. Specifically, the Hamming distance is used as the metric for descriptor similarity. The minimum Hamming distance between matching pairs is the best match. The specific formula is:
[0083] ,in, is a feature descriptor and The Hamming distance between is the length of the descriptor, Represents a bitwise exclusive OR operation;
[0084] Displacement estimation unit: used to estimate the displacement of the drone using the matching pairs obtained by the feature matching unit, and calculate the translation vector of the drone between two time points based on the position information of the matching pairs. The specific calculation formula is: ,in, is the translation vector of the drone, and are the positions of the feature points at two time points respectively;
[0085] Attitude estimation unit: used to calculate the attitude change of the drone based on the translation vector of the displacement estimation unit and the angle difference of the matching pair. The least squares method is used to perform the rotation matrix. The solution is:
[0086] ,in, and Is a matching pair The feature point position, is the rotation matrix, Represents the rotation matrix that minimizes the objective function ; Through the above configuration, the feature matching module can effectively utilize the feature point data provided by the image processing module to perform time series feature matching and estimate the displacement and attitude change data of the drone. The feature matching unit finds the best matching pair through the Hamming distance, the displacement estimation unit calculates the translation vector, and the attitude estimation unit calculates the rotation matrix through the least squares method to generate the displacement and attitude change data of the drone.
[0087] The map construction module includes a data fusion unit, a 3D point cloud generation unit and a map update unit; wherein:
[0088] Data fusion unit: used to receive the posture data provided by the feature matching module, and fuse these data with known environmental information. Specifically, the Kalman filter is used to smooth and optimize the posture data to reduce noise and errors. The Kalman filter recursively updates and predicts the measurement data, thereby improving the accuracy of the posture data.
[0089] 3D point cloud generation unit: used to generate 3D point cloud according to the posture data processed by the data fusion unit. The 3D point cloud generation unit includes a point cloud generator and a coordinate converter. The point cloud generator calculates the coordinates of each feature point in the 3D space based on the posture data. The coordinate converter converts the calculated coordinates into the global coordinate system, thereby generating complete 3D point cloud data. The calculation formula for coordinate conversion is:
[0090] ,in, is the coordinate of the feature point in the global coordinate system, is the rotation matrix obtained by the attitude estimation unit, is the coordinate of the feature point in the local coordinate system, is the translation vector calculated by the displacement estimation unit;
[0091] Map update unit: used to update the existing indoor environment map according to the newly generated three-dimensional point cloud data. The map update unit includes a map memory and a fusion algorithm processor. The map memory is used to save the current three-dimensional map data; the fusion algorithm processor aligns and fuses the newly generated point cloud with the existing map through the iterative closest point algorithm (ICP) to ensure the continuity and accuracy of the map; through the above configuration, the map construction module can effectively use the posture data and known environmental information provided by the feature matching module to construct and update the three-dimensional map of the indoor environment. The data fusion unit optimizes the posture data through the Kalman filter, and the three-dimensional point cloud generation unit generates a high-precision three-dimensional point cloud. The map update unit fuses the new and old point cloud data through the ICP algorithm to ensure the high accuracy and real-time performance of the map.
[0092] The specific steps of registering and fusing the newly generated point cloud with the existing map in the map update unit include:
[0093] Initial alignment: receiving a newly generated point cloud and existing map point cloud , According to the pose data provided by the feature matching module, the two point clouds are initially aligned. The initial alignment uses the feature point position information to perform rough registration, and the two point clouds are roughly aligned. The rough registration formula is: ,in, is the rotation matrix, is the translation vector, is the new point cloud after preliminary alignment;
[0094] Closest point matching: by finding and The nearest neighbor of each point in the match point pair, for each point exist In, find The nearest point , the closest point matching formula is:
[0095] ,in, represents the Euclidean distance, yes Zhongyu nearest point;
[0096] Registration error calculation: Calculate the sum of square errors between matching point pairs as the registration error; the registration error formula is: ,in, is the number of matching point pairs, and They are and The matching point pairs in ;
[0097] Optimization Iteration: Iteratively optimize the rotation matrix by minimizing the registration error and translation vectors , the optimization process is achieved by iteratively solving the following minimization problem: , through multiple iterations, continuously updated and To reduce the error until the error converges or reaches a preset minimum threshold;
[0098] Point cloud fusion: After the registration is completed, the aligned new point cloud Fusion to existing map point cloud In the example above, update the map; the fusion formula is: ,in, It is the updated map after fusion; through the above steps, the fusion algorithm processor can efficiently and accurately align and fuse the newly generated point cloud with the existing map through the ICP algorithm to ensure the high accuracy and continuity of the three-dimensional map.
[0099] The path planning module includes an environment modeling unit, a path search unit and a path optimization unit; wherein:
[0100] Environment modeling unit: used to receive the 3D map data output by the map building module and the current position of the drone, and convert the 3D map into a grid map, where each grid point is marked as passable or impassable according to the presence or absence of obstacles at the location; specifically, the surface normal method is used to determine whether each grid point in the grid map is passable; this determination method is based on calculating the surface normal from the 3D point cloud data to identify obstacles; the surface normal is a unit vector perpendicular to the surface of an object, which is used to estimate the inclination and direction of the surface of an object; in an indoor environment, a flat ground area has a normal that is vertically upward, while the normal directions of walls and other obstacles will be significantly different; the specific steps are as follows:
[0101] Surface normal calculation: Each point The surface normal of By considering the point Its neighboring point set The covariance matrix of is calculated, and the surface normal is calculated as: ,in, is the mean of the set of neighboring points: , where the matrix The principal eigenvector of is the point The surface normal at ;
[0102] Grid state determination: Use calculated surface normals To determine the state of the shed, if the angle between the normal and the vertical direction (for example, the upward Z-axis direction) is less than the preset threshold , then the area is judged to be passable (free); otherwise, it is judged to be impassable (occupied): the formula is expressed as:
[0103] ,in, is a unit vector pointing vertically upward , is the normal angle threshold between passable and impassable.
[0104] Path search unit: Based on the peer information provided by the environment modeling unit, the A algorithm is used to search for a path from the current location to the target location. The A algorithm uses a heuristic function and the cost function Calculate the total cost of each node , give priority to expanding the node with the lowest cost until the optimal path is found. The A* algorithm formula is: ,in, Is a node The total cost, From the starting point to the node The actual cost of It is a slave node Heuristic estimate of cost to the target point;
[0105] Path optimization unit: optimizes the path found by the path search unit to improve the smoothness and safety of the path. Specifically, Bezier curve fitting or spline curve interpolation method is used to smooth the path nodes, eliminate unnecessary sharp turns and jagged paths, and ensure the stability of the UAV flight. The path optimization formula is: ,in, is a point on the path, is the Bessel basis function, is the control point, is the number of control points of the path; through the configuration of the above units, the path planning module can plan the optimal navigation path from the current position to the target position based on the three-dimensional map data and the current position of the UAV. The environmental modeling unit converts the three-dimensional map data into a raster map. The path search unit uses the A* algorithm to find a feasible path. The path optimization unit smoothes the path to ensure the optimality and stability of the UAV flight path.
[0106] The navigation control module includes a path tracking unit, a posture control unit and a dynamic adjustment unit; wherein:
[0107] Path tracking unit: used to receive the optimal navigation path information provided by the path planning module, and generate path tracking instructions for the UAV, and decompose the optimal path into multiple target points, and calculate the gap between each target point and the current position of the UAV to generate path tracking instructions to guide the UAV to fly along the planned path;
[0108] Attitude control unit: controls the attitude and speed of the drone according to the path tracking instructions generated by the path tracking unit. By adjusting the pitch, roll and yaw angles of the drone and adjusting the flight speed of the drone, the attitude control unit is closely integrated with the flight control system of the drone to achieve high-precision attitude control.
[0109] Dynamic adjustment unit: used to dynamically adjust the flight path during flight using the real-time image provided by the environmental perception module, detect obstacles and environmental changes ahead by real-time analysis of image data captured by the environmental perception module, and adjust the flight path according to the detection results to avoid obstacles or adapt to environmental changes, and calculate the UAV's instant position and attitude changes based on the new feature point information in the real-time image, and generate new path tracking instructions; through the above configuration, the navigation control module can effectively receive the optimal navigation path information provided by the path planning module, and control the UAV to fly according to the planned path through the path tracking unit and the attitude control unit. At the same time, the dynamic adjustment unit uses the real-time image data provided by the environmental perception module to detect and respond to environmental changes, so as to ensure the stable flight of the UAV in a complex dynamic environment.
[0110] The dynamic adjustment unit includes:
[0111] Obstacle detection: Based on the feature point information preprocessed by the image processing module, obstacles in the image are detected. Specifically, the YOLO (You Only Look Once) algorithm is used for real-time obstacle detection. The YOLO algorithm divides the image into multiple grids, and each grid predicts multiple bounding boxes and corresponding confidence scores. The obstacle detection formula is: ;in, represents the probability of the existence of an object, represents the intersection-over-union ratio between the predicted bounding box and the true bounding box;
[0112] Path replanning: Based on the obstacle information detected by the obstacle detection unit, the current flight path is replanned, and a new path that avoids obstacles is replanned in the current map using the dynamic D*Lite algorithm;
[0113] Control command generation: According to the new path generated by the path replanning unit, the control command of the UAV is calculated. The control command includes the new heading, speed and attitude adjustment parameters. The PID (proportional-integral-differential) control algorithm is used to generate flight commands. The formula is: ,in, is the control output, is the error between the target value and the current value, , and They are proportional, integral and differential gains respectively; through the use of the advanced YOLO algorithm and D* Lite algorithm, the dynamic adjustment unit can respond to environmental changes in real time to ensure the safe flight of the UAV in a complex dynamic environment. The application of the PID control algorithm further improves the accuracy and response speed of the flight path adjustment, and significantly enhances the navigation reliability and adaptability of the UAV.
[0114] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. The indoor navigation system of UAV based on visual SLAM is characterized by: It includes an environment perception module, an image processing module, a feature matching module, a map building module, a path planning module and a navigation control module; among which: Environmental perception module: Equipped with an RGB camera and a depth camera, it is used to capture color images and depth information of the indoor environment and transmit the captured visual data to the image processing module for subsequent processing; Image processing module: receives the output data of the environment perception module, performs image denoising and enhancement to improve data quality, and extracts feature points from the processed images to provide a basis for subsequent positioning and map construction; Feature matching module: Use the feature points provided by the image processing module to perform time series feature matching to estimate the displacement and attitude change data of the drone; Map construction module: Based on the pose data provided by the feature matching module and the known environmental information, it constructs and updates the three-dimensional map of the indoor environment; Path planning module: plans an optimal navigation path from the current position to the target position based on the three-dimensional map output by the map construction module and the current position of the drone; Navigation control module: receives the optimal navigation path information provided by the path planning module, controls the UAV to fly according to the planned path, and dynamically adjusts the flight path during the flight using the real-time images provided by the environmental perception module to cope with changes in the environment.
2. The UAV indoor navigation system based on visual SLAM according to claim 1, characterized in that: The environment perception module includes an RGB camera unit and a depth camera unit; wherein: RGB camera unit: used to capture color images of indoor environments. The RGB camera unit includes an image sensor, a lens, an image processing chip, and a data transmission interface. The image sensor is used to capture light signals in the environment and convert them into digital image signals. The lens is used to adjust the incident angle and focal length of the light to ensure the clarity of the image. The image processing chip is used to pre-process the captured image to improve the image quality. The data transmission interface is used to transmit the processed image data to the image processing module. The specific captured color image data includes information on the three color channels of red, green, and blue, as well as the brightness and chromaticity parameters of each pixel. Depth camera unit: used to capture the depth information of the indoor environment, the depth camera unit includes an infrared transmitter, an infrared receiver, a depth calculation chip and a data transmission interface; the infrared transmitter is used to emit an infrared light beam; the infrared receiver receives the infrared light signal reflected from the surface of the object; the depth calculation chip is used to calculate the distance between the object and the camera based on the time difference and phase difference of the light signal; the data transmission interface transmits the calculated depth information to the image processing module; the specific captured depth information data includes the distance parameter and spatial position parameter of each pixel point.
3. The UAV indoor navigation system based on visual SLAM according to claim 1, characterized in that: The image processing module includes an image denoising unit, an image enhancement unit and a feature point extraction unit; wherein: Image denoising unit: used to receive the output data of the environment perception module and perform image denoising processing, the image denoising unit includes a noise detector, a filter and a denoising processing chip; the noise detector is used to identify the noise signal in the image; the filter uses a Gaussian filtering algorithm to filter the noise signal; the denoising processing chip adjusts the denoising parameters according to the feedback of the noise detector and the filter to generate denoised image data; Image enhancement unit: used for enhancing the denoised image, the image enhancement unit includes a contrast adjuster, a sharpener and an enhancement processing chip; the contrast adjuster is used to adjust the contrast according to the brightness histogram of the image; the sharpener is used to enhance the edge of the image using the Laplace operator; the enhancement processing chip is used to integrate the processing results of the contrast adjuster and the sharpener to generate enhanced image data; Feature point extraction unit: used to extract feature points from the enhanced image, the feature point extraction unit includes a feature detector, a descriptor generator and a feature extraction processing chip; the feature detector uses the ORB algorithm to detect preset focus points in the image; the descriptor generator generates a feature descriptor for each preset focus point; the feature extraction processing chip is used to integrate the processing results of the feature detector and the descriptor generator, and finally generate feature point data.
4. The UAV indoor navigation system based on visual SLAM according to claim 3 is characterized in that: The feature point extraction unit comprises: Step 1: The feature detector uses the ORB algorithm to detect the preset focus points in the image; first, the FAST algorithm is used to determine the corner points in the image; the FAST algorithm compares the pixel points The brightness of the pixels in the circular area around it, if there are at least The ratio of consecutive pixels The brightness is higher than a certain threshold or below When is considered to be a corner point, and the formula is: ,in, It's a pixel Brightness, is the brightness set of pixels in the circular area. is the brightness difference threshold used to determine the corner points, is the number of consecutive pixels used to determine the corner point; then, in order to maintain rotation invariance, the direction of the corner point is given by calculating the direction of the centroid around the corner point relative to the corner point. The direction is determined by the vector from the corner point to the centroid. The specific calculation formula is: ,in, is the direction angle of the corner point, Represents the inverse tangent function, which is used to calculate angles, and They are the first moments of the image around the preset focus point; Step 2: The descriptor generator generates a feature descriptor for each preset focus point detected. Specifically, the BRIEF algorithm is used to generate a binary string as the descriptor of each preset focus point. In order to ensure rotation invariance, the BRIEF descriptor is rotated and adjusted based on the direction of the preset focus point. The generation of the descriptor is completed by comparing the intensity difference of the pixel pairs around the preset focus point. The comparison formula is expressed as: ,in, is the descriptor of the preset focus point, and It is the default focus The indices of the surrounding pixels, Indicates the brightness of the pixel; Step 3: The feature extraction processing chip integrates the outputs of the feature detector and the descriptor generator. The feature extraction processing chip will collect the position, direction and descriptor information of all preset focus points, and generate the final feature point data set after unified formatting.
5. The UAV indoor navigation system based on visual SLAM according to claim 1, characterized in that: The feature matching module includes a feature matching unit, a displacement estimation unit and a posture estimation unit; wherein: Feature matching unit: used to receive the feature point data provided by the image processing module and perform time series feature matching. By calculating the descriptor similarity of the feature points in the two frames of images, a matching pair is found. Specifically, the Hamming distance is used as the metric for the descriptor similarity. The minimum Hamming distance between the matching pairs is the best match. The specific formula is: ,in, is a feature descriptor and The Hamming distance between is the length of the descriptor, Represents a bitwise exclusive OR operation; Displacement estimation unit: used to estimate the displacement of the drone using the matching pairs obtained by the feature matching unit, and calculate the translation vector of the drone between two time points based on the position information of the matching pairs. The specific calculation formula is: ,in, is the translation vector of the drone, and are the positions of the feature points at two time points; Attitude estimation unit: used to calculate the attitude change of the drone based on the translation vector of the displacement estimation unit and the angle difference of the matching pair. The least squares method is used to perform the rotation matrix. The solution is: ,in, and Is a matching pair The feature point position, is the rotation matrix, Represents the rotation matrix that minimizes the objective function .
6. The UAV indoor navigation system based on visual SLAM according to claim 1, characterized in that: The map construction module includes a data fusion unit, a three-dimensional point cloud generation unit and a map update unit; wherein: Data fusion unit: used to receive the posture data provided by the feature matching module, and fuse these data with known environmental information, specifically using the Kalman filter to smooth and optimize the posture data; A three-dimensional point cloud generation unit is used to generate a three-dimensional point cloud according to the posture data processed by the data fusion unit. The three-dimensional point cloud generation unit includes a point cloud generator and a coordinate converter. The point cloud generator calculates the coordinates of each feature point in the three-dimensional space based on the posture data, and the coordinate converter converts the calculated coordinates into a global coordinate system, thereby generating complete three-dimensional point cloud data. Map update unit: used to update the existing indoor environment map according to the newly generated three-dimensional point cloud data. The map update unit includes a map memory and a fusion algorithm processor. The map memory is used to store the current three-dimensional map data; the fusion algorithm processor aligns and fuses the newly generated point cloud with the existing map through an iterative nearest point algorithm.
7. The indoor navigation system of a UAV based on visual SLAM according to claim 6, characterized in that: The specific steps of registering and fusing the newly generated point cloud with the existing map in the map updating unit include: Initial alignment: receiving a newly generated point cloud and existing map point cloud , According to the pose data provided by the feature matching module, the two point clouds are initially aligned. The initial alignment uses the feature point position information to perform rough registration, and the two point clouds are roughly aligned. The rough registration formula is: ,in, is the rotation matrix, is the translation vector, is the new point cloud after preliminary alignment; Closest point matching: by finding and The nearest neighbor of each point in the match point pair, for each point exist In, find The nearest point , the closest point matching formula is: ,in, represents the Euclidean distance, yes Zhongyu nearest point; Registration error calculation: Calculate the sum of square errors between matching point pairs as the registration error; the registration error formula is: ,in, is the number of matching point pairs, and They are and The matching point pairs in ; Optimization Iteration: Iteratively optimize the rotation matrix by minimizing the registration error and translation vectors , the optimization process is achieved by iteratively solving the following minimization problem: , through multiple iterations, continuously updated and To reduce the error until the error converges or reaches a preset minimum threshold; Point cloud fusion: After the registration is completed, the aligned new point cloud Fusion to existing map point cloud In the example above, update the map; the fusion formula is: ,in, It is the updated map after fusion.
8. The UAV indoor navigation system based on visual SLAM according to claim 1, characterized in that: The path planning module includes an environment modeling unit, a path search unit and a path optimization unit; wherein: Environmental modeling unit: used to receive the 3D map data output by the map building module and the current position of the UAV, and convert the 3D map into a grid map, in which each grid point is marked as passable or impassable according to the presence or absence of obstacles at the location; specifically, the surface normal method is used to determine whether each grid point in the grid map is passable; Path search unit: Based on the peer information provided by the environment modeling unit, the A algorithm is used to search for a path from the current location to the target location. The A algorithm uses a heuristic function and the cost function Calculate the total cost of each node , give priority to expanding the node with the lowest cost until the optimal path is found. The A* algorithm formula is: ,in, Is a node The total cost, From the starting point to the node The actual cost, It is a slave node Heuristic estimate of cost to the target point; Path optimization unit: optimizes the path found by the path search unit to improve the smoothness and safety of the path. Specifically, Bezier curve fitting or spline curve interpolation method is used to smooth the path nodes to ensure the stability of the UAV flight; the path optimization formula is: ,in, is a point on the path, is the Bessel basis function, is the control point, is the number of control points of the path.
9. The UAV indoor navigation system based on visual SLAM according to claim 1, characterized in that: The navigation control module includes a path tracking unit, a posture control unit and a dynamic adjustment unit; wherein: Path tracking unit: used to receive the optimal navigation path information provided by the path planning module, and generate path tracking instructions for the UAV, and decompose the optimal path into multiple target points, and calculate the gap between each target point and the current position of the UAV to generate path tracking instructions to guide the UAV to fly along the planned path; Attitude control unit: controls the attitude and speed of the drone according to the path tracking instructions generated by the path tracking unit, and ensures that the drone follows the path tracking instructions by adjusting the pitch, roll and yaw angles of the drone and adjusting the flight speed of the drone; Dynamic adjustment unit: used to dynamically adjust the flight path during flight using the real-time images provided by the environmental perception module, detect obstacles and environmental changes ahead by real-time analysis of image data captured by the environmental perception module, and calculate the drone's instant position and attitude changes based on new feature point information in the real-time image, and generate new path tracking instructions.
10. The UAV indoor navigation system based on visual SLAM according to claim 9, characterized in that: The dynamic adjustment unit comprises: Obstacle detection: Based on the feature point information preprocessed by the image processing module, obstacles in the image are detected. Specifically, the YOLO algorithm is used for real-time obstacle detection. The YOLO algorithm divides the image into multiple grids, and each grid predicts multiple bounding boxes and corresponding confidence scores. The obstacle detection formula is: ;in, represents the probability of the existence of an object, represents the intersection-over-union ratio between the predicted bounding box and the true bounding box; Path replanning: Based on the obstacle information detected by the obstacle detection unit, the current flight path is replanned, and a new path that avoids obstacles is replanned in the current map using the dynamic D*Lite algorithm; Control command generation: Based on the new path generated by the path replanning unit, the control commands of the UAV are calculated. The control commands include the new heading, speed and attitude adjustment parameters.
