Unmanned aerial vehicle autonomous obstacle avoidance and re-planning technology based on general artificial intelligence technology
Through the autonomous obstacle avoidance and re-planning technology based on general artificial intelligence technology, the local grid map and collision detection are used to realize the autonomous obstacle avoidance of the drone, which solves the technical problems of the drone's local motion trajectory re-planning and autonomous obstacle avoidance. Improved the practicality and safety of drones.
Patent Information
- Application Number
- CN202410682505.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-10-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology cannot effectively realize the re-planning of the local motion trajectory of the UAV, resulting in the inability to realize the effective autonomous obstacle avoidance of the UAV, especially in inaccurate perception and complex environments, which may lead to collisions.
Using autonomous obstacle avoidance and re-planning technology based on general artificial intelligence technology, by obtaining the point clouds and poses of obstacles around the drone in real time, a local grid map is constructed, and collision detection and local motion trajectory re-planning are performed. If there is no If the distance between the human machine and the obstacle is less than the preset distance threshold, it will hover until the obstacle is cleared and the trajectory control command will be executed.
It realizes the effective autonomous obstacle avoidance of UAVs, improves the efficiency of path planning and obstacle avoidance, enhances the adaptability to inaccurate perception and complex environments, and avoids property losses and personal safety risks caused by operational errors.
Smart Images

Figure CN118732694A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicles, and in particular to an autonomous obstacle avoidance and re-planning technology for unmanned aerial vehicles based on general artificial intelligence technology. Background Art
[0002] Drones are widely used in power inspection, resource exploration, urban security, and aerial photography due to their advantages such as light weight, small size, flexible flight, and low price. In industrial-grade applications of drones, existing technologies often require three-dimensional reconstruction and route planning before operation, which is time-consuming and laborious; if random map tasks are performed, professional operators are required to control the drone to reach the designated location throughout the entire process, which is greatly affected by the operator's visual range and professional quality. These greatly limit the practicality and flexibility of drones. At the same time, with the popularization of drones, some safety issues have also arisen. For example, when drones are operating, they often encounter sudden threats or obstacles; for example, when the distance between the drone and the operator is too far, it is not ideal to only control the drone to avoid obstacles through the operator; even within the controllable range of the operator, the drone may collide due to mistakes. Therefore, drones need to have strong autonomous obstacle avoidance capabilities. A perfect and practical autonomous obstacle avoidance system can avoid property losses and personal safety hazards caused by operating errors, and is one of the important research directions of drone technology.
[0003] At present, the local trajectory replanning method of UAV comprehensively considers the impact of obstacles, flight dynamics, and smoothness on the flight trajectory of UAV. The above local trajectory replanning method obtains the collision term in the penalty function by comparing the collision trajectory with the collision-free guidance path. It does not need to build a map in advance, effectively saves the time and space resources of the onboard computer, and improves the efficiency of path planning and obstacle avoidance.
[0004] The local trajectory replanning method of UAV has good performance in local path planning, but its adaptability to inaccurate perception and complex environments needs to be enhanced. When depth perception is inaccurate, it will plan the path based on inaccurate perception information, and the planned path will lead to collision; or, the UAV will perceive obstacles before it reaches the obstacle, and the local trajectory replanning will think that the UAV is in the obstacle, and the UAV will hover and cannot reach the designated waypoint.
[0005] In summary, how to effectively realize the local motion trajectory re-planning of the UAV and then realize the effective autonomous obstacle avoidance of the UAV has become a technical problem that needs to be solved urgently. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide a UAV autonomous obstacle avoidance and replanning technology based on general artificial intelligence technology to alleviate the technical problem that the prior art cannot effectively realize the local motion trajectory replanning of the UAV, and thus cannot realize the effective autonomous obstacle avoidance of the UAV.
[0007] In the first aspect, an embodiment of the present invention provides an autonomous obstacle avoidance and replanning technology for a UAV based on general artificial intelligence technology, including: obtaining an obstacle point cloud around the UAV and the position and posture of the UAV in real time; constructing a local map according to the obstacle point cloud and the position and posture to obtain a local grid map; after receiving remote control channel information or waypoint information, performing collision detection and local motion trajectory replanning according to the local grid map and the position and posture to obtain a collision detection result and a motion trajectory; if it is determined according to the collision detection result that the distance between the UAV and the obstacle is less than a preset distance threshold, controlling the UAV to hover and not executing the trajectory control instruction corresponding to the motion trajectory until the collision detection obtains that the obstacle is cleared, and then executing the trajectory control instruction corresponding to the motion trajectory until the corresponding waypoint is reached.
[0008] Furthermore, a local map is constructed according to the obstacle point cloud and the posture, including: removing the ground point cloud in the obstacle point cloud to obtain the obstacle point cloud after removing the ground point cloud; downsampling the obstacle point cloud after removing the ground point cloud to obtain the downsampled obstacle point cloud; mapping the downsampled obstacle point cloud to a blank grid map according to the posture, and performing obstacle expansion in a vertical direction on the obstacle point cloud mapped to the blank grid map to obtain the local grid map.
[0009] Furthermore, removing the ground point cloud in the obstacle point cloud includes: using a preset ground point cloud removal algorithm to remove the ground point cloud in the obstacle point cloud, to obtain the obstacle point cloud after removing the ground point cloud.
[0010] Furthermore, a preset ground point cloud removal algorithm is used to remove the ground point cloud in the obstacle point cloud, including: fitting a plane model according to a preset number of point clouds randomly selected from the obstacle point cloud; calculating the distance from each obstacle point cloud to the plane model, and determining the inner points of the plane model in the obstacle point cloud based on the distance; if the number of the inner points exceeds a preset threshold, recording the parameters of the plane model; repeating the above steps for a preset number of times to obtain parameters of multiple plane models; determining a target plane model in the multiple plane models according to the number of inner points corresponding to each plane model; calculating the distance from each obstacle point cloud to the target plane model, and determining a non-ground point cloud in the obstacle point based on the distance, thereby obtaining the obstacle point cloud after removing the ground point cloud.
[0011] Furthermore, collision detection is performed according to the local grid map and the posture, including: performing collision detection on the local grid map based on the posture using a preset collision detection algorithm to obtain the collision detection result, wherein the collision detection result includes: obstacle distance and orientation.
[0012] Furthermore, based on the posture, a preset collision detection algorithm is used to perform collision detection on the local grid map, including: taking the voxel in the local grid map to which the posture belongs as the current voxel, and determining the coordinates of the current voxel; initializing a step variable, wherein the step variable represents the direction of traversing adjacent voxels; starting from the coordinates of the current voxel, calculating the t value of the ray passing through the current voxel in each direction and the t value that needs to be increased in each direction when the ray moves one voxel unit along the direction of the step variable; cyclically comparing the t value of the ray passing through the current voxel in each direction, and determining the minimum t value therefrom; moving a voxel in the direction corresponding to the minimum t value to obtain a new current voxel; increasing the t value in the corresponding direction by the t value that needs to be increased in the corresponding direction; performing intersection detection on the new current voxel and the local grid map; and determining the collision detection result based on the intersection detection result.
[0013] In the second aspect, an embodiment of the present invention also provides a local motion trajectory replanning device, including: an acquisition unit, used to acquire in real time the obstacle point cloud around the drone and the position and posture of the drone; a local map construction unit, used to construct a local map according to the obstacle point cloud and the position and posture to obtain a local grid map; a collision detection and trajectory replanning unit, used to perform collision detection and local motion trajectory replanning according to the local grid map and the position and posture after receiving the remote control channel information or waypoint information, to obtain a collision detection result and a motion trajectory; a control unit, used to control the drone to hover if it is determined according to the collision detection result that the distance between the drone and the obstacle is less than a preset distance threshold, and not execute the trajectory control instruction corresponding to the motion trajectory until the collision detection obtains that the obstacle is cleared, and then execute the trajectory control instruction corresponding to the motion trajectory until the corresponding waypoint is reached.
[0014] Furthermore, the local map construction unit is also used to: remove the ground point cloud in the obstacle point cloud to obtain the obstacle point cloud after removing the ground point cloud; downsample the obstacle point cloud after removing the ground point cloud to obtain the downsampled obstacle point cloud; map the downsampled obstacle point cloud to a blank grid map according to the posture, and perform obstacle expansion in the vertical direction on the obstacle point cloud mapped to the blank grid map to obtain the local grid map.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to execute any method described in the first aspect above.
[0017] In an embodiment of the present invention, a drone autonomous obstacle avoidance and replanning technology based on general artificial intelligence technology is provided, including: obtaining obstacle point clouds around the drone and the drone's posture in real time; constructing a local map according to the obstacle point cloud and posture to obtain a local grid map; after receiving the remote control channel information or waypoint information, performing collision detection and local motion trajectory replanning according to the local grid map and posture to obtain collision detection results and motion trajectory; if it is determined according to the collision detection result that the distance between the drone and the obstacle is less than the preset distance threshold, the drone is controlled to hover, and the trajectory control instruction corresponding to the motion trajectory is not executed until the collision detection obtains that the obstacle is cleared, and then the trajectory control instruction corresponding to the motion trajectory is executed until the corresponding waypoint is reached. It can be seen from the above description that in the drone autonomous obstacle avoidance and replanning technology based on general artificial intelligence technology of the present invention, collision detection is added while replanning the local motion trajectory. In this way, the execution of the pre-planned motion trajectory can be guided according to the real-time collision detection result, and the local motion trajectory replanning of the drone can be effectively realized, thereby realizing the effective autonomous obstacle avoidance of the drone, alleviating the technical problem that the existing technology cannot effectively realize the local motion trajectory replanning of the drone, thereby realizing the effective autonomous obstacle avoidance of the drone. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flowchart of a drone autonomous obstacle avoidance and re-planning technology based on general artificial intelligence technology provided by an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of the system structure provided by an embodiment of the present invention;
[0021] Figure 3 A schematic diagram of a flight status control flow provided by an embodiment of the present invention;
[0022] Figure 4 A schematic diagram of a local motion trajectory re-planning device provided by an embodiment of the present invention;
[0023] Figure 5 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] The existing technology cannot effectively realize the local motion trajectory replanning of the UAV, and thus cannot realize the effective autonomous obstacle avoidance of the UAV.
[0026] Based on this, in the drone autonomous obstacle avoidance and re-planning technology based on general artificial intelligence technology of the present invention, collision detection is added while re-planning the local motion trajectory. In this way, the execution of the pre-planned motion trajectory can be guided according to the real-time collision detection results, and the local motion trajectory re-planning of the drone can be effectively realized, thereby realizing the effective autonomous obstacle avoidance of the drone.
[0027] To facilitate understanding of this embodiment, first, a drone autonomous obstacle avoidance and re-planning technology based on general artificial intelligence technology disclosed in an embodiment of the present invention is introduced in detail.
[0028] Embodiment 1:
[0029] According to an embodiment of the present invention, an embodiment of an autonomous obstacle avoidance and re-planning technology for a UAV based on general artificial intelligence technology is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0030] Figure 1 is a flow chart of a drone autonomous obstacle avoidance and re-planning technology based on general artificial intelligence technology according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0031] Step S102, obtaining the obstacle point cloud around the drone and the position and posture of the drone in real time;
[0032] In the embodiment of the present invention, an onboard sensor and an onboard computer are provided on the drone, and the corresponding system structure diagram is shown in FIG. Figure 2 The onboard sensors mainly include: four fisheyes (including omnidirectional perception algorithm) and IMU, and the onboard computer includes: local mapping module, positioning module, motion planning module and control module. The communication between the modules is based on ROS architecture.
[0033] When the above system is running, the system (specifically the local mapping module) obtains the obstacle point cloud and the position and posture of the drone around the drone in real time. The above obstacle point cloud is obtained by sensing the obstacles around the drone based on the omnidirectional perception algorithm of the four-eye fisheye. The above posture is specifically the current posture of the drone calculated by the positioning module by fusing multi-source data.
[0034] Step S104, constructing a local map based on the obstacle point cloud and position and posture to obtain a local grid map;
[0035] Specifically, the local mapping module in the system constructs a local map based on the obstacle point cloud and position, and then obtains a local grid map in voxels. This process will be described in detail below and will not be repeated here.
[0036] Step S106, after receiving the remote control channel information or waypoint information, collision detection and local motion trajectory replanning are performed according to the local grid map and posture to obtain the collision detection result and motion trajectory;
[0037] Specifically, the motion planning module in the system performs collision detection and local motion trajectory replanning based on the local grid map and posture. It should be noted that collision detection is actually real-time, while local motion trajectory replanning can be timed, that is, the obtained motion trajectory is actually pre-planned, while the collision detection result is obtained in real time, which can detect sudden obstacles in time.
[0038] Step S108, if it is determined according to the collision detection result that the distance between the UAV and the obstacle is less than the preset distance threshold, the UAV is controlled to hover and the trajectory control instruction corresponding to the motion trajectory is not executed until the collision detection shows that the obstacle is cleared, and then the trajectory control instruction corresponding to the motion trajectory is executed until the corresponding waypoint is reached.
[0039] Specifically, after the drone is controlled to hover, the process from step S102 to step S106 is continued until the corresponding waypoint is reached.
[0040] If the distance between the UAV and the obstacle is determined to be not less than the preset distance threshold according to the collision detection result, the motion planning module generates a trajectory control instruction according to the motion trajectory, and then the control module receives the trajectory control instruction generated by the motion planning module and sends it to the flight control for execution.
[0041] It should be noted that as long as the distance between the UAV and the obstacle is less than the preset distance threshold, the motion planning module will generate a command to control the UAV to hover, and then the control module will receive the UAV hover command and send it to the flight control for execution. That is to say, even if the obstacle is not on the UAV's motion trajectory, the UAV must be controlled to hover in order to deal with sudden obstacles and achieve reliable autonomous obstacle avoidance.
[0042] In an embodiment of the present invention, a drone autonomous obstacle avoidance and replanning technology based on general artificial intelligence technology is provided, including: obtaining obstacle point clouds around the drone and the drone's posture in real time; constructing a local map according to the obstacle point cloud and posture to obtain a local grid map; after receiving the remote control channel information or waypoint information, performing collision detection and local motion trajectory replanning according to the local grid map and posture to obtain collision detection results and motion trajectory; if it is determined according to the collision detection result that the distance between the drone and the obstacle is less than the preset distance threshold, the drone is controlled to hover, and the trajectory control instruction corresponding to the motion trajectory is not executed until the collision detection obtains that the obstacle is cleared, and then the trajectory control instruction corresponding to the motion trajectory is executed until the corresponding waypoint is reached. It can be seen from the above description that in the drone autonomous obstacle avoidance and replanning technology based on general artificial intelligence technology of the present invention, collision detection is added while replanning the local motion trajectory, so that the execution of the pre-planned motion trajectory can be guided according to the real-time collision detection result, and the local motion trajectory replanning of the drone can be effectively realized, thereby realizing the effective autonomous obstacle avoidance of the drone, alleviating the technical problem that the existing technology cannot effectively realize the local motion trajectory replanning of the drone, and thus cannot realize the effective autonomous obstacle avoidance of the drone.
[0043] The above content briefly introduces the drone autonomous obstacle avoidance and re-planning technology based on general artificial intelligence technology of the present invention. The specific contents involved are described in detail below.
[0044] In an optional embodiment of the present invention, the above step S104, constructing a local map according to the obstacle point cloud and position, specifically includes the following steps:
[0045] (1) removing the ground point cloud from the obstacle point cloud to obtain the obstacle point cloud after removing the ground point cloud;
[0046] The inventors considered that when the perceived ground is not very accurate, the subsequent expansion strategy in the vertical direction will further strengthen the inaccurate result, resulting in obstacle avoidance failure. Therefore, it is necessary to remove the ground point cloud to improve the accuracy of mapping and reduce the mapping time.
[0047] Specifically, a preset ground point cloud removal algorithm is used to remove the ground point cloud from the obstacle point cloud to obtain the obstacle point cloud after the ground point cloud is removed, which specifically includes the following steps:
[0048] (11) fitting a plane model according to a preset number of point clouds randomly selected from the obstacle point cloud;
[0049] (12) Calculate the distance between each obstacle point cloud and the plane model, and determine the inner point of the plane model in the obstacle point cloud based on the distance;
[0050] (13) If the number of inliers exceeds a preset threshold, the parameters of the plane model are recorded;
[0051] (14) Repeat the above steps for a preset number of times to obtain parameters of multiple plane models;
[0052] (15) determining a target plane model from the plurality of plane models according to the number of interior points corresponding to each plane model;
[0053] (16) Calculate the distance between each obstacle point cloud and the target plane model, and determine the non-ground point cloud among the obstacle points based on the distance, and then obtain the obstacle point cloud after removing the ground point cloud.
[0054] The following is an introduction to the basic idea of the preset algorithm for removing ground point clouds:
[0055] 1. Randomly select several point clouds from all obstacle point clouds and fit a plane model;
[0056] 2. Calculate the distances from all other point clouds to the plane model, and the points less than the first distance threshold are considered as internal points;
[0057] 3. If the number of inliers exceeds a preset threshold, a good plane model is considered to have been found;
[0058] 4. Write down the plane model parameters at this time;
[0059] 5. Repeat steps 1-4 multiple times to find the plane model with the most internal points;
[0060] 6. Using the final plane model parameters, calculate the distance from all point clouds to the plane model;
[0061] 7. The point cloud whose distance is greater than the second distance threshold is a non-ground point cloud;
[0062] 8. Return the non-ground point cloud as the obstacle point cloud after removing the ground point cloud.
[0063] (2) downsampling the obstacle point cloud after removing the ground point cloud to obtain a downsampled obstacle point cloud;
[0064] The inventors took into account that the perception algorithm perceives too many obstacle point clouds, and the local map construction processing time is long, which will cause the information obtained by motion planning to lag. Based on this, a downsampling method was designed to reduce the obstacle point cloud.
[0065] Specifically, the local grid map resolution of the local mapping module is 10-20cm, but the resolution of the obstacle point cloud after removing the ground point cloud is much higher than this. Therefore, when the obstacle point cloud after removing the ground point cloud is received, the obstacle point cloud after removing the ground point cloud is downsampled according to the local grid map resolution to reduce the mapping time.
[0066] (3) Map the downsampled obstacle point cloud to a blank grid map according to the position and posture, and perform vertical obstacle expansion on the obstacle point cloud mapped to the blank grid map to obtain a local grid map.
[0067] The inventors have taken into account that in complex environments, such as forests, where obstacles are low and dense, inaccurate perception often occurs. In order to suppress obstacle avoidance failures caused by inaccurate perception, when mapping the downsampled obstacle point cloud to a blank grid map, the obstacle point cloud is expanded in the vertical direction. By expanding the obstacles in the vertical direction, all voxels at (x, y, zi), i = 1, 2, 3, etc. in the local grid map are obstacles, which can reduce the complexity of obstacle avoidance.
[0068] In addition, since inaccurate perception will lead to inaccurate mapping, it is necessary to periodically clear the local grid map and perform obstacle avoidance planning only based on relatively new perception information (i.e., obstacle point cloud acquired in real time).
[0069] In an optional embodiment of the present invention, the above step S106, performing collision detection according to the local grid map and the position and posture, specifically includes the following steps:
[0070] Based on the position and posture, a preset collision detection algorithm is used to perform collision detection on the local grid map to obtain a collision detection result, wherein the collision detection result includes: obstacle distance and orientation.
[0071] The preset collision detection algorithm can efficiently access all voxels that the ray passes through to determine whether there is a collision at the voxel position.
[0072] The specific process of collision detection by the preset collision detection algorithm includes:
[0073] (1) Taking the voxel in the local grid map to which the pose belongs as the current voxel and determining the coordinates of the current voxel;
[0074] (2) Initialize the step variable, where the step variable represents the direction of traversing adjacent voxels;
[0075] (3) Starting from the coordinates of the current voxel, along the direction of the step variable, calculate the t value in each direction when the ray passes through the current voxel and the t value that needs to be increased in each direction when the ray moves one voxel unit;
[0076] (4) Circularly compare the t values of the ray passing through the current voxel in each direction, and determine the minimum t value;
[0077] (5) Move a voxel in the direction corresponding to the minimum t value to obtain a new current voxel;
[0078] (6) Increase the t value in the corresponding direction by the t value that needs to be increased in the corresponding direction;
[0079] (7) Perform intersection detection on the new current voxel and the local grid map (specifically the obstacles therein);
[0080] (8) Determine the collision detection result based on the intersection detection result.
[0081] The following is a description of the above collision detection process:
[0082] 1. Initialization phase:
[0083] a) Determine the voxel where the ray starts (i.e. the current position of the drone) and set it as the current voxel;
[0084] b) Initialize variables X, Y, and Z to the coordinates of the current voxel;
[0085] c) Initialize the step variables stepX, stepY, and stepZ to indicate the direction of traversing adjacent voxels;
[0086] d) Calculate tMaxX, tMaxY, tMaxZ, which represent the t value of the ray crossing the current voxel boundary;
[0087] e) Calculate tDeltaX, tDeltaY, and tDeltaZ, which represent the t value that needs to be increased when the ray moves one voxel unit;
[0088] 2. Incremental traversal phase:
[0089] a) Loop comparison of tMaxX, tMaxY, tMaxZ, and select the smallest one;
[0090] b) Move a voxel in the direction corresponding to the minimum t value (update X / Y / Z);
[0091] c) Update the corresponding tMax variable and add a tDelta;
[0092] d) Check if the list ObjectList[X][Y][Z] (which stores the position of the next voxel that the ray enters) is empty;
[0093] e) If the list is not empty, perform intersection detection; if the intersection is within the current voxel, return the obstacle result;
[0094] f) If the list is empty, continue looping to the next voxel.
[0095] 3. Traversal end condition: find a non-empty list or traverse all voxels.
[0096] In order to better understand the entire flight state control of the drone, refer to the following Figure 3 The following is an explanation of the flight status control process:
[0097] The motion planning algorithm in the system has six states: initialization, waiting, generating new trajectories, executing planning, local trajectory replanning, and emergency stop. The motion planning algorithm is in the initialization state when it starts, and enters the waiting state after reading the drone status information. At this time, if there are no waypoints, the drone can be controlled by the remote control; if there are waypoints passed in, it will enter the new trajectory generation state (global trajectory planning). After the trajectory planning is successful, it will enter the execution trajectory state and issue the drone trajectory control command. In the execution trajectory state, the system will enter the local trajectory replanning state at a frequency of 100Hz, and replan the future motion trajectory according to the local map and the drone position. When the collision detection module finds a dangerous obstacle, the aircraft hovers and waits for the surrounding obstacles to be cleared, and it will also enter the trajectory replanning state. If the replanning is successful, it will enter the execution trajectory state again. If there are no dangerous obstacles or new waypoints during the execution of the trajectory, it will enter the waiting state after reaching the target waypoint.
[0098] The autonomous obstacle avoidance and re-planning technology for unmanned aerial vehicles based on general artificial intelligence technology of the present invention includes path planning in autonomous operation mode, autonomous obstacle avoidance in remote control mode and autonomous operation mode. The system improves the success rate of obstacle avoidance and circumvention by increasing the planning frequency, reducing the complexity of the map, and improving the efficiency of mapping. Compared with the prior art, the present invention realizes efficient local planning and autonomous obstacle avoidance, and improves the comprehensive operation capability of unmanned aerial vehicles.
[0099] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solution of the present application, rather than to limit it. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solution recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiment of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A drone autonomous obstacle avoidance and re-planning technology based on general artificial intelligence technology, characterized in that: include: Obtaining in real time the obstacle point cloud around the UAV and the position and posture of the UAV; constructing a local map according to the obstacle point cloud and the position and posture to obtain a local grid map; After receiving the remote control channel information or waypoint information, collision detection and local motion trajectory replanning are performed according to the local grid map and the posture to obtain a collision detection result and a motion trajectory; If it is determined according to the collision detection result that the distance between the UAV and the obstacle is less than a preset distance threshold, the UAV is controlled to hover and the trajectory control instruction corresponding to the motion trajectory is not executed until the collision detection shows that the obstacle is cleared, and then the trajectory control instruction corresponding to the motion trajectory is executed until the corresponding waypoint is reached.
2. The method according to claim 1, characterized in that A local map is constructed according to the obstacle point cloud and the posture, including: removing the ground point cloud from the obstacle point cloud to obtain the obstacle point cloud after the ground point cloud is removed; downsampling the obstacle point cloud after the ground point cloud is removed to obtain the downsampled obstacle point cloud; mapping the downsampled obstacle point cloud to a blank grid map according to the posture, and performing obstacle expansion in a vertical direction on the obstacle point cloud mapped to the blank grid map to obtain the local grid map.
3. The method according to claim 2, characterized in that Removing the ground point cloud from the obstacle point cloud includes: using a preset ground point cloud removal algorithm to remove the ground point cloud from the obstacle point cloud, to obtain the obstacle point cloud after the ground point cloud is removed.
4. The method according to claim 3, characterized in that A preset ground point cloud removal algorithm is used to remove the ground point cloud in the obstacle point cloud, including: fitting a plane model according to a preset number of point clouds randomly selected from the obstacle point cloud; calculating the distance from each obstacle point cloud to the plane model, and determining the inner points of the plane model in the obstacle point cloud based on the distance; if the number of the inner points exceeds a preset threshold, recording the parameters of the plane model; repeating the above steps for a preset number of times to obtain the parameters of multiple plane models; determining a target plane model in the multiple plane models according to the number of inner points corresponding to each plane model; calculating the distance from each obstacle point cloud to the target plane model, and determining a non-ground point cloud in the obstacle point based on the distance, thereby obtaining the obstacle point cloud after removing the ground point cloud.
5. The method according to claim 1, characterized in that Performing collision detection according to the local grid map and the posture includes: performing collision detection on the local grid map based on the posture using a preset collision detection algorithm to obtain the collision detection result, wherein the collision detection result includes: obstacle distance and orientation.
6. The method according to claim 5, characterized in that Based on the posture, a preset collision detection algorithm is used to perform collision detection on the local grid map, including: taking the voxel in the local grid map to which the posture belongs as the current voxel, and determining the coordinates of the current voxel; initializing a step variable, wherein the step variable represents the direction of traversing adjacent voxels; starting from the coordinates of the current voxel, calculating the t value of each direction of the ray passing through the current voxel and the t value that needs to be increased in each direction when the ray moves one voxel unit along the direction of the step variable; cyclically comparing the t value of each direction of the ray passing through the current voxel, and determining the minimum t value therefrom. The direction corresponding to the minimum t value moves one voxel to obtain a new current voxel; the t value of the corresponding direction is increased by the t value that needs to be increased in the corresponding direction; performing intersection detection on the new current voxel and the local grid map; and determining the collision detection result according to the intersection detection result.
7. A local motion trajectory replanning device, characterized in that: include: An acquisition unit, used for acquiring in real time the obstacle point cloud around the UAV and the position and posture of the UAV; a local map construction unit, used for constructing a local map according to the obstacle point cloud and the position and posture to obtain a local grid map; A collision detection and trajectory replanning unit is used to perform collision detection and local motion trajectory replanning according to the local grid map and the posture after receiving the remote control channel information or waypoint information, so as to obtain a collision detection result and a motion trajectory; a control unit is used to control the drone to hover if it is determined according to the collision detection result that the distance between the drone and the obstacle is less than a preset distance threshold, and not execute the trajectory control instruction corresponding to the motion trajectory until the collision detection obtains that the obstacle is cleared, and then execute the trajectory control instruction corresponding to the motion trajectory until the corresponding waypoint is reached.
8. The device according to claim 7, characterized in that The local map construction unit is also used to: remove the ground point cloud in the obstacle point cloud to obtain the obstacle point cloud after removing the ground point cloud; downsample the obstacle point cloud after removing the ground point cloud to obtain the downsampled obstacle point cloud; map the downsampled obstacle point cloud to a blank grid map according to the posture, and perform obstacle expansion in a vertical direction on the obstacle point cloud mapped to the blank grid map to obtain the local grid map.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to execute the method according to any one of claims 1 to 6.
