Flight control method and device of unmanned aerial vehicle, unmanned aerial vehicle and storage medium
Patent Information
- Application Number
- CN202280093199.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2024-11-05
AI Technical Summary
The existing UAV flight control methods are inefficient and labor-intensive, making it difficult to ensure flight safety and target proximity.
By obtaining the description information of the target object in the space and the target flight direction of the UAV, the sensor is used to detect the description information of the detected object, and the UAV is automatically controlled to slow down and approach or detour to achieve precise operation of the target object.
It improves UAV control efficiency, reduces labor costs, ensures flight safety, and takes into account flight safety and scene requirements.
Smart Images

Figure CN118901051A_ABST
Abstract
Description
UAV flight control method, device, UAV, and storage medium Technical Field
[0001] The present application relates to the field of drone technology, and in particular to a drone flight control method and device, a drone, and a storage medium. Background Art
[0002] At present, with the continuous development of drone technology, drones are being used in more and more applications. In the process of using drones, how to control the drones to fly safely has become an issue of increasing concern.
[0003] In the prior art, when controlling the flight of a drone, the user often manually controls the drone based on their own judgment of the surrounding environment to ensure flight safety. This method is inefficient and has high labor costs.
[0004] Summary of the Invention
[0005] The present application provides a flight control method and device for an unmanned aerial vehicle (UAV), an UAV, and a storage medium, which can improve control efficiency and reduce labor costs to a certain extent.
[0006] In a first aspect, an embodiment of the present application provides a flight control method for a drone, the method comprising:
[0007] Obtain description information of the target object in the space;
[0008] Get the target flight direction of the UAV;
[0009] Detecting, based on sensors carried by the drone, description information of a detected object in the space indicated by the target flight direction;
[0010] If the description information of the detected object matches the description information of the target object, controlling the UAV to decelerate and move along the target flight direction until it approaches the detected object;
[0011] If the description information of the detected object does not match the description information of the target object, the drone is controlled to change its flight direction to fly around the detected object.
[0012] In a second aspect, an embodiment of the present application provides a flight control device for a drone, the device comprising a memory and a processor;
[0013] The memory is used to store program code;
[0014] The processor calls the program code, and when the program code is executed, is configured to perform the following operations:
[0015] Obtain description information of the target object in the space;
[0016] Get the target flight direction of the UAV;
[0017] Detecting, based on sensors carried by the drone, description information of a detected object in the space indicated by the target flight direction;
[0018] If the description information of the detected object matches the description information of the target object, controlling the UAV to decelerate and move along the target flight direction until it approaches the detected object;
[0019] If the description information of the detected object does not match the description information of the target object, the drone is controlled to change its flight direction to fly around the detected object.
[0020] In a third aspect, an embodiment of the present application provides a drone, which is used to implement the above method.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on a computer, enables the computer to execute the above method.
[0022] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the above method.
[0023] In an embodiment of the present application, descriptive information of a target object in space is obtained, and the target flight direction of the drone is obtained. Based on the sensor carried by the drone, the descriptive information of the detected object in the space indicated by the target flight direction is detected. If the descriptive information of the detected object matches the descriptive information of the target object, the drone is controlled to decelerate and move close to the detected object along the target flight direction. If the descriptive information of the detected object does not match the descriptive information of the target object, the drone is controlled to change its flight direction to bypass the detected object. In this way, by automatically detecting whether the descriptive information of the detected object matches the descriptive information of the target object, and automatically controlling the drone to avoid the detected object or approach the detected object based on the detection result, the control efficiency can be improved and the labor cost can be reduced to a certain extent. At the same time, it can avoid the collision between the drone and the detected object, ensure the flight safety of the drone, and ensure that the drone can approach the target object in space, thereby taking into account both flight safety and scene requirements.
[0024] Furthermore, manual drone flight control is sometimes limited by personal experience and cannot reasonably control the drone's movement. In the embodiment of the present application, the drone is automatically controlled to avoid or approach the detected object based on the detection results, which can, to a certain extent, more reasonably control the drone's movement with respect to the detected object in space. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] FIG1 is a flowchart of a flight control method for a drone provided in an embodiment of the present application;
[0026] FIG2 is a schematic diagram of a speed change provided by an embodiment of the present application;
[0027] FIG3 is a query diagram provided in an embodiment of the present application;
[0028] FIG4 is a schematic diagram of a function curve provided in an embodiment of the present application;
[0029] FIG5 is a schematic diagram of a collision query channel provided by an embodiment of the present application;
[0030] FIG6 is a schematic diagram of a preset range provided in an embodiment of the present application;
[0031] FIG7 is a system flow chart of a flight control method according to an embodiment of the present application;
[0032] FIG8 is a block diagram of a flight control device for a UAV provided in an embodiment of the present application;
[0033] FIG9 is a block diagram of a computing and processing device provided in an embodiment of the present application;
[0034] FIG10 is a block diagram of a portable or fixed storage unit provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0036] First, an exemplary application scenario involved in an embodiment of the present application is described. In this application scenario, a drone needs to inspect a specific object in space to perform a specified operation. Accordingly, during flight, the drone needs to approach a specific object in space to complete the specified operation. However, there are often many objects distributed in space, and sometimes the distribution of objects is more complex. In order to ensure the flight safety of the drone, the drone needs to avoid objects in space. This leads to the need to balance safety in flight control while ensuring that the drone can approach the specified object.
[0037] To this end, an embodiment of the present application provides a flight control method for a drone.
[0038] FIG1 is a flowchart of a flight control method for a drone provided in an embodiment of the present application. As shown in FIG1 , the method may include:
[0039] Step 101: Obtain description information of a target object in space.
[0040] Step 102: Obtain the target flight direction of the UAV.
[0041] In an embodiment of the present application, the space may refer to the space in which the drone is located, and the target object may be pre-specified, and the target object may be a specified object in the above-mentioned application scenario. The descriptive information of the target object may be information that can be used to indicate the target object, for example, image information, position distribution information, etc. of the target object. By obtaining the descriptive information of the target object, the drone can accurately know the object that needs to be approached during this flight. Furthermore, the target flight direction may refer to the current flight direction of the drone. For example, the current flight direction of the drone can be detected based on the direction sensor carried by the drone, thereby obtaining the target flight direction. Of course, other methods can also be used to obtain the target flight direction, and this application does not limit this.
[0042] Step 103: Detecting description information of the detected object in the space indicated by the target flight direction based on the sensor carried by the UAV.
[0043] In an embodiment of the present application, the space indicated by the target flight direction may be a space within a preset range in the target flight direction. The preset range may be set according to actual needs. The descriptive information of the detected object may be information that can be used to indicate the detected object, for example, image information, position information, and the like of the detected object. The detected object may be an object that falls into the space indicated by the target flight direction. For example, the space indicated by the target flight direction may be detected based on a sensor capable of detecting objects, such as an infrared sensor and an ultrasonic sensor, carried by a drone, to detect whether an object appears in the space indicated by the target flight direction. For an object that appears in the space indicated by the target flight direction, the object may be determined as a detected object. Furthermore, an image of the detected object may be collected based on a carried visual sensor as descriptive information of the detected object. Alternatively, the position information of the detected object may be collected as descriptive information of the detected object.
[0044] Step 104: If the description information of the detected object matches the description information of the target object, the UAV is controlled to decelerate and move along the target flight direction until it approaches the detected object.
[0045] Step 105: If the description information of the detected object does not match the description information of the target object, control the UAV to change its flight direction to fly around the detected object.
[0046] Wherein, if the description information of the detected object matches the description information of the target object, it can be understood that the currently detected detected object is the target object. If the description information of the detected object does not match the description information of the target object, it can be understood that the currently detected detected object is not the target object. Specifically, taking the description information as image information as an example, after obtaining the image information of the target object, the target detection and tracking module of the convolutional neural network (CNN) carried by the drone can be combined with the collected image information of the detected object to detect whether the detected object is the target object. During specific implementation, the position information of the detected object can be further determined, and the position information of the detected object can be associated with the object position distribution information in space, so that the drone can locate the detected object based on the associated object position distribution information, thereby approaching or circumventing the detected object. Wherein, the object position distribution information can be a map of the current space, and the position information of the detected object can be the position of the detected object in the three-dimensional navigation coordinate system.
[0047] If the currently detected object is a target object, it means that there is a target object in the current flight direction. Therefore, there is no need to change the flight direction. The drone can be controlled to decelerate along the target flight direction to approach the detected object to facilitate operations on the target object. At the same time, decelerating to approach the detected object can avoid excessive speed to a certain extent, thereby ensuring the stability of the drone during the approach process. If the currently detected object is not a target object, the drone can be directly controlled to change its flight direction to bypass the detected object, thereby avoiding unnecessary deceleration approach operations while ensuring flight safety. It should be noted that the flight control method provided in the embodiment of the present application can be applied to drones, that is, the drone automatically controls itself to approach or bypass the detected object. Alternatively, it can also be applied to the control device of the drone, that is, the control device automatically controls the controlled drone to approach or bypass the detected object. The embodiment of the present application is not limited to this.
[0048] In summary, the flight control method of the drone provided in the embodiment of the present application obtains the description information of the target object in space and obtains the target flight direction of the drone. Based on the sensor carried by the drone, the description information of the detected object in the space indicated by the target flight direction is detected. If the description information of the detected object matches the description information of the target object, the drone is controlled to decelerate and move close to the detected object along the target flight direction. If the description information of the detected object does not match the description information of the target object, the drone is controlled to change the flight direction to bypass the detected object. In this way, by automatically detecting whether the description information of the detected object matches the description information of the target object, and automatically controlling the drone to avoid the detected object or approach the detected object based on the detection result, the control efficiency can be improved and the labor cost can be reduced to a certain extent. At the same time, it can avoid the collision between the drone and the detected object, ensure the flight safety of the drone, and ensure that the drone can approach the target object in space, thereby taking into account both flight safety and scene requirements.
[0049] Furthermore, manual drone flight control is sometimes limited by personal experience and cannot reasonably control the drone's movement. In the embodiment of the present application, the drone is automatically controlled to avoid or approach the detected object based on the detection results, which can, to a certain extent, more reasonably control the drone's movement with respect to the detected object in space.
[0050] Optionally, in an embodiment of the present application, when controlling the drone to decelerate along the target flight direction until it approaches a detected object (i.e., when the currently detected object is a target), the following operation may be further performed: if the distance between the drone and the detected object is not greater than a specified stopping distance, the drone may be controlled to stop flying. In other words, while controlling the drone to decelerate along the target flight direction until it approaches the detected object, the current distance between the drone and the detected object may be continuously detected and compared with the specified stopping distance. If the current distance is equal to the specified stopping distance, the drone may be controlled to stop flying, thereby controlling the drone to decelerate along the target flight direction until it reaches the specified stopping distance from the detected object. This eliminates the need for manual adjustment of the distance between the drone and the target. By automatically detecting the distance and stopping the drone at the specified stopping distance, it is possible to achieve automatic and precise distance control to the target, further reducing labor costs. The specified stopping distance may be pre-specified based on actual needs, and controlling the drone to stop flying may include reducing the drone's flight speed to zero at the specified stopping distance from the detected object. In an embodiment of the present application, by controlling the drone to slow down and move to a specified stopping distance from the detected object, it is possible to ensure that the drone can operate on the target object to a certain extent while avoiding the drone from getting too close to the target object, thereby ensuring the safety of the drone during operation.
[0051] Furthermore, in an embodiment of the present application, after the drone stops flying, the drone can be controlled to perform a target operation on the detected object, thereby meeting the operational requirements for the target object. The target operation can be pre-specified according to actual needs. Exemplarily, performing a target operation can be observing the target object to determine whether the target object is in a preset state, and transmitting the observation results back to the user device of the monitoring personnel. For example, in a wind power generation scenario, it is possible to observe whether the wind power generation equipment is in a normal operating state, and transmit the observation results indicating whether it is in a normal operating state back to the monitoring personnel's equipment, thereby facilitating the monitoring personnel to perform timely maintenance on the equipment when the wind power generation equipment is not in a normal operating state. Alternatively, the target operation can also be collecting an image of the target object, spraying maintenance fluid on the target object, and so on.
[0052] In one implementation, the designated stopping distance can be set based on one or more of the following factors: the density of objects in the space; the descriptive information of the target object; the operation type of the drone. The designated stopping distance can be pre-set before the drone performs this mission, or it can be set according to these factors during the flight. In the embodiment of the present application, setting the designated stopping distance based on factors such as the density of objects in the space, the descriptive information of the target object, and the operation type of the drone can, to a certain extent, make the set designated stopping distance more adapted to the current flight scenario, thereby ensuring the rationality of the set designated stopping distance. During actual setting, a selectable range can be provided to the user, and the value selected by the user from the selectable range can be set as the designated stopping distance. The end value of the selectable range can be automatically adjusted based on one or more factors including the density of objects in the space, the descriptive information of the target object, and the operation type of the drone. Specifically, the greater the density of objects (i.e., the denser the objects in space), the more complex the object's morphology as represented by the object's description information, and the more difficult the drone's operation type, the larger the end value of the selectable range can be. This, in turn, allows the user to set a larger designated stopping distance, thereby ensuring the safety of the drone when performing targeted operations on detected objects in space. It should be noted that the minimum value of the selectable range can be no less than the preset safety distance, thus avoiding the problem of setting a designated stopping distance that is too small and causing the drone to get too close to the target object.
[0053] Optionally, the operation of controlling the drone to decelerate and move along the target flight direction until it approaches the detected object may specifically include the following steps:
[0054] Step S21: determining a target safety speed based on local map information and / or a single-frame depth image; the target safety speed is positively correlated with the current distance between the UAV and the detected object.
[0055] Among them, the local map information can be used to represent the local map of the drone's surrounding environment, and the depth image can be a depth image of the current surrounding environment collected by the drone. The depth image can be an image that uses the depth from the drone's image collector to each point in the surrounding environment as a pixel value.
[0056] Step S22: Control the UAV to fly along the target direction and decelerate at the target safety speed until it approaches the detected object.
[0057] In the embodiment of the present application, the target safety speed is positively correlated with the current distance between the drone and the detected object. That is, the smaller the current distance between the drone and the detected object, the smaller the determined target safety speed can be. As the drone continues to approach the detected object, the target safety speed can be continuously updated and become smaller and smaller. In this way, when controlling the drone to decelerate at the target safety speed to approach the detected object, the drone can gradually slow down to approach the detected object, ensuring that the speed changes smoothly during the process of approaching the detected object, thereby ensuring the flight safety of the drone.
[0058] Optionally, in one implementation, the operation of determining the target safe speed based on the local map information and / or the single-frame depth image may specifically include:
[0059] Step S31: Calculate a first safe speed of the UAV based on the local map information.
[0060] In one implementation, the local map information can be generated based on multiple frames of depth images of the drone's current surroundings. Generating the local map information based on multiple frames of depth images of the current surroundings allows the local map information to more accurately represent the drone's current surroundings, making the determined safe speed more suitable for the current surroundings, thereby improving speed planning effectiveness.
[0061] Step S32: Calculate a second safe speed of the UAV based on the single-frame depth image.
[0062] Step S33: Determine the target safe speed based on the first safe speed and the second safe speed.
[0063] In this step, the target safe speed can be positively correlated with the first safe speed and the second safe speed. For example, the average of the first and second safe speeds can be used as the target safe speed. Alternatively, the minimum of the first and second safe speeds can be used as the target safe speed. By selecting the minimum as the target safe speed, a reasonable safe speed can be set while minimizing the risk of the target safe speed being too high.
[0064] In an embodiment of the present application, speed planning is performed based on local map information and a single-frame depth image, that is, a first safe speed and a second safe speed are determined based on the local map information and the single-frame depth image, respectively, and a target safe speed is determined based on the first safe speed and the second safe speed. Since the local map has strong noise resistance and has a "memory" ability for the observed area, it has a certain degree of blind spot perception ability, and the single-frame depth image can represent the distance while making up for the defect of the smaller range of the local map. Therefore, combining the local map information and the single-frame depth image for speed planning can make the determined target safe speed more reasonable to a certain extent. It should be noted that speed planning can also be performed based only on the local map information, or based only on the single-frame depth image. In this way, the amount of calculation for speed planning can be reduced to a certain extent.
[0065] Compared with the direct braking method, in the embodiment of the present application, when automatically switching to the braking mode, that is, controlling the drone to stop at a specified stopping distance from the detected object, by combining local map information and a single-frame depth image for smooth speed planning, the drone can, to a certain extent, smoothly decelerate and move to a position close to the detected object, thereby accurately controlling the distance between the drone and the detected object after it stops.
[0066] Furthermore, the local map information can be generated based on the multiple depth image frames when the distance between the drone and the detected object reaches a preset mapping distance, where the preset mapping distance is positively correlated with the drone's designated stopping distance. Specifically, while controlling the drone to decelerate along the target flight direction until it approaches the detected object, the current distance between the drone and the detected object can be continuously detected and compared with the preset mapping distance. If the current distance is equal to the preset mapping distance, local map information can be generated based on the collected multiple depth image frames. Exemplarily, the collected multiple depth image frames can be fused to generate the local map information. The preset mapping distance can be greater than the designated stopping distance. The preset mapping distance can be positively correlated with the designated stopping distance, thereby ensuring that the drone's mapping location is sufficiently close to the designated stopping distance from the detected object. This avoids the problem of starting speed planning based on the established local map information when the drone is too close to the designated stopping distance, resulting in poor speed planning results.
[0067] It should be noted that in the embodiments of the present application, local map information can be used for fine-grained speed planning at close range, while a single-frame depth image can be used for coarse-grained speed planning at long range. If the preset mapping distance is not reached, a default value can be used as the first safe speed. Furthermore, after mapping and obtaining local map information, a first safe speed is determined based on the local map information. Since the first safe speed determined based on the local map information is often lower than the second safe speed, after reaching the preset mapping distance and establishing the local map information, the drone is controlled to fly at the lower first safe speed as the target safe speed. In other words, after reaching the preset mapping distance, the drone may experience a sudden drop in speed. Therefore, by controlling the preset mapping distance to be positively correlated with the designated stopping distance, the embodiments of the present application can also avoid sudden speed drops at locations close to the designated stopping distance from the target, thereby enabling more precise control of the drone's stopping position. For example, Figure 2 is a schematic diagram of speed variation provided by an embodiment of the present application. As shown in Figure 2, the horizontal axis represents the distance to the detected object, and the vertical axis represents the speed value. Line 1 represents the first safe speed, line 2 represents the second safe speed, and line 3 represents the flight direction. As can be seen, before the preset mapping distance is reached, the first safe speed is the default value and is greater than the second safe speed. When the preset mapping distance is reached, the first safe speed, determined based on local map information, is less than the second safe speed. It should be noted that after executing the target maneuver, the drone can continue to fly away from the currently detected object. At this point, as the distance increases, the speed can increase. Furthermore, since this further distance will cause the distance between the drone and the detected object to no longer meet the preset mapping distance, the first safe speed can be increased to the default value.
[0068] Optionally, the multiple depth images used to establish the local map information are acquired from different orientations by sensors onboard the drone. Thus, by using multiple depth images acquired from different orientations to establish the local map information, the established local map information can represent map information in each orientation, thereby enabling the drone to omnidirectionally perceive the distance to the detected object based on the local map information. For example, a visual sensor may be provided in a first orientation of the drone. When acquiring multiple depth images of the current surrounding environment, the visual sensor may be used to acquire depth images in the first orientation of the current surrounding environment. The drone may be controlled to flip in a second orientation to acquire depth images in a direction not equipped with a visual sensor. The second orientation is different from the first orientation. This allows a drone with non-omnidirectional perception to acquire multiple depth images in different orientations, thereby enabling omnidirectional perception of the detected object. For example, a drone may be equipped with a visual sensor only in the fore-aft direction. After takeoff, the drone may be controlled to rotate a certain yaw angle (Yaw) around the drone to acquire depth images in the second orientation. Of course, the drone's attitude may change during flight, and the visual sensor may be used to acquire depth images after the attitude changes. In this way, depth images in different orientations are continuously accumulated.
[0069] Optionally, the operation of calculating the first safe speed of the drone based on the local map information may specifically include:
[0070] Step S41: Determine the current distance between the UAV and the detected object based on the local map information.
[0071] In this step, the trajectory can be generated in combination with the current flight direction and local map information to generate a query trajectory. A collision query is performed based on the query trajectory to determine the current distance between the drone and the detected object. In this way, direct point cloud operations can be avoided, thereby saving computing resources. The current flight direction provides prior information, and the query is performed in the direction in which the drone is flying, and other irrelevant directions are involved in the calculation. In this way, the consumption of computing resources can be further reduced. Specifically, the method of generating the query trajectory can be selected according to actual needs, and this application does not impose any restrictions on this. For example, it can be generated based on a differential flat model or a convex optimization method.
[0072] When performing a collision query based on a query trajectory, the current location of the drone's center point can be used as the starting query point. The next trajectory sampling step size is calculated based on the distance between the query point and the nearest nearby object represented in the local map and the current collision query radius. The local map used for the collision query can be any queryable environment map, such as an occupy map, an esdf map, etc.
[0073] The next query point is determined based on the trajectory sampling step length. The next trajectory sampling step length is recalculated based on the distance between the query point and the nearest object and the current collision query radius, until the drone reaches the specified stopping distance from the detected object. Furthermore, the current distance between the drone and the detected object is determined based on the accumulated trajectory sampling step lengths. For example, the sum of the trajectory sampling step lengths is used to determine the current distance.
[0074] For example, esdf represents the distance between the current query point and the nearest object, r represents the current collision query radius, and step represents the next trajectory sampling step. In this way, the calculated step can be made more reasonable. For example, FIG3 is a query diagram provided by an embodiment of the present application. As shown in FIG3, if a uniform step size is adopted and esdf is directly used as the next trajectory sampling step size, the query point of the next step will be point 2. However, in fact, the query point of the next step should be point 1. Therefore, in the embodiment of the present application, an uneven step is adopted and the step is calculated in the above manner, which can make the calculated step more reasonable, thereby avoiding the problem that the distance found is longer than the actual distance. Furthermore, the target position is taken as the specified stopping distance from the detected object, and the target position is regarded as an obstacle. Due to the use of an uneven step, it may result in the situation where the target position is found in one step, causing the drone to exceed the target position. Among them, the portion covered by the oblique line in FIG3 can represent the portion where the drone exceeds the specified stopping distance. Therefore, corrections can be made based on the detected current distance. For example, real_dist represents the corrected current distance, checked_dist represents the detected current distance, and checked_dist represents the detected current distance. esdf Indicates the distance between the detected object and the nearest obstacle, which can be corrected using the following formula: real_dist = checked_dist - (r - checked esdf ). Among them, checked_dist can be the distance from point to point 4 in Figure 3, (r-checked esdf ) represents the distance from point 3 to point 4. In this way, the correction can make real_dist more reasonable and avoid the drone exceeding the target position.
[0075] Step S42: Calculate a first safe speed of the drone based on the current distance and the designated stopping distance of the drone; the first safe speed is positively correlated with the current distance difference, which is the difference between the current distance and the designated stopping distance.
[0076] Specifically, the difference between the current distance and the designated stopping distance may be used as the input of a preset function, and the output of the preset function may be used as the first safe speed. spd Indicates the first safe speed, safe_dist indicates the specified stopping distance, map_safe spd =f(real_dist-safe_dist).
[0077] In this embodiment of the present application, the current distance between the drone and the detected object is determined based on local map information. A first safe speed is calculated based on the current distance and the drone's designated stopping distance. This first safe speed is positively correlated with the current distance difference, which is the difference between the current distance and the designated stopping distance. This allows the planned first safe speed to decrease as the distance decreases, thereby achieving smooth speed planning. Furthermore, local map information is more resistant to noise, thus ensuring the rationality of the first safe speed to a certain extent.
[0078] Optionally, the operation of calculating the second safe speed of the drone based on the single-frame depth image may specifically include:
[0079] Step S51: determining a percentage of the number of pixels corresponding to each depth interval based on the number of pixels in the single-frame depth image that fall into each depth interval and the total number of pixels in the single-frame depth image.
[0080] Among them, the single-frame depth image can be continuously collected and updated in the flight direction when the drone approaches the target object. Specifically, based on the depth map speed planning module, the depth histogram of the single-frame depth image can be statistically analyzed to detect the depth interval to which the depth value represented by each pixel in the single-frame depth image belongs, and the depth interval in which each pixel falls is obtained. Of course, in actual applications, the single-frame depth map speed planning can also be performed by directly calculating the nearest point cloud, and the embodiments of the present application do not limit this. For any depth interval, the ratio of the number of pixels falling into the depth interval to the total number of pixels in the single-frame depth map can be calculated to obtain the proportion of the number of pixels corresponding to the depth interval.
[0081] Step S52: determining a weight value corresponding to each depth interval according to the proportion of the number of pixels corresponding to each depth interval; the weight value corresponding to the depth interval is positively correlated with the proportion of the number of pixels.
[0082] Step S53: determining the second safe speed based on the speed value and weight value corresponding to each depth interval; the speed value corresponding to the depth interval is positively correlated with the depth value represented by the depth interval.
[0083] The closer the drone gets to the target, the larger the proportion of pixels corresponding to the depth interval with smaller depth values. Therefore, by setting the speed value corresponding to the depth interval to be positively correlated with the depth value represented by the depth interval, and the weight value corresponding to the depth interval to be positively correlated with the proportion of pixels, the closer the drone gets to the target, the larger the weight corresponding to the lower speed value. This can, to a certain extent, gradually reduce the second safe speed as the drone approaches the target.
[0084] The speed value corresponding to each depth interval may be pre-set. For example, the speed value corresponding to the depth range represented by each depth interval may be as shown in the following table:
[0085]
[0086] Among them, p0, p1, p2, p3, p4, p5, p6, p7, p8, and p9 represent the percentage of pixels corresponding to each depth interval. Furthermore, the pixel percentage can be used to represent the original weight of the depth interval. The original weight can be adjusted to obtain the weight value corresponding to each depth interval.
[0087] depth_safe spd Indicates the second safe speed, depth_safe spd =Pnew*V. Wherein, V represents the vector corresponding to the second row in the above table, and Pnew represents the adjusted vector corresponding to the third row in the above table. That is, the sum of the products of the adjusted weight values and the speed values of each depth interval can be calculated to obtain the second safe speed. It should be noted that the sum of the adjusted weight values corresponding to each depth interval can be equal to 1, and the weight values corresponding to each depth interval can determine the proportion of the speed values corresponding to each depth interval in the second safe speed finally obtained. Therefore, the method of calculating the sum of the products of the adjusted weight values and the speed values of each depth interval can be equivalent to weighted averaging using the adjusted weight values.
[0088] The adjusted weight value of the depth interval is represented by pnew, which can include ph,new and pl,new. Among them, h can be 0 or 1, and ph can represent the weight corresponding to the high-speed interval. The value of l can be 2 to 9, and pl can represent the weight corresponding to the low-speed interval. The adjusted weight value can be calculated based on the following formula:
[0089] Ph,new = ph,new * Ph / ph, Pl,new = pl,new * Pl / pl; where P represents a vector and p represents a numerical value. That is, for all high-speed intervals, the ratio of the adjusted weight value to the original weight value can be calculated to obtain the change multiple, and the product of the change multiple and the original weight value of each high-speed interval is calculated to obtain the weight value corresponding to each high-speed interval. For all low-speed intervals, the ratio of the adjusted weight value to the original weight value can be calculated to obtain the change multiple, and the product of the change multiple and the original weight value of each low-speed interval is calculated to obtain the weight value corresponding to each low-speed interval.
[0090] Furthermore, ph,new and pl,new can be calculated based on the following formula:
[0091] ph,new = f(ph), pl,new = 1 - ph,new;
[0092] During specific adjustment, the weight of the interval with a relatively small original weight can be compressed, thereby increasing the weights of other intervals. Figure 4 is a schematic diagram of a function curve provided by an embodiment of the present application. As shown in Figure 4, the smaller the proportion of the pixel number, the larger the compression ratio, that is, the smaller the adjusted weight. Assuming ph < pl, ph can be compressed according to the function shown in Figure 4, so that the adjusted ph is smaller and the adjusted pl is larger. That is, the credibility of the interval with a relatively small original weight is lower, and the credibility of other intervals is greater, thereby realizing the bias of speed mapping.
[0093] Among them, the f(x) mapping function corresponding to f(ph) can be obtained by fourth-order curve fitting, and f(x) can be equal to AX. Among them, A can be [a1, a2, a3, a4], X = [x 4 , x 3 , x 2 , x 1 . That is, f(x) = a1 * x 4 + a2 * x 3 + a3 * x 4 + a4 * x 1 . The values of a1, a2, a3, and a4 can be set according to actual needs. For example, a1, a2, a3, and a4 can be -47.63, 44.2, -9.96, 0.9055, -0.01439 respectively.
[0094] In the embodiment of the present application, the pixel count ratio of each depth interval is calculated using a single-frame depth image. Based on this pixel count ratio, a weight value corresponding to each depth interval is determined. The second safe speed is then determined based on the weight value and speed value corresponding to each depth interval. This eliminates the need for coordinate transformation of the point cloud and allows speed planning to be performed solely with depth information. This can, to a certain extent, reduce computing resource consumption.
[0095] It should be noted that according to the speed planning results of the local map and the speed planning results of the single-frame depth map, the final target safe speed is obtained: safe spd =min(map_safe spd , depth_safe spd ), the target safe speed can be decomposed into speed. Specifically, when performing a collision query, the collision query can be performed in a manner of separating the vertical and horizontal channels. For example, Figure 5 is a channel diagram of a collision query provided in an embodiment of the present application. As shown in Figure 5, the collision query can be performed on the horizontal channel 01 and the vertical channel 02, respectively. Correspondingly, the second safe speed determined based on the single-frame depth map can also be decomposed into the second safe speed in the vertical direction and the second safe speed in the horizontal direction, and then the target safe speed in the vertical direction and the target safe speed in the horizontal direction can be obtained respectively. The target safe speed in the horizontal direction can be decomposed according to the direction of movement, and finally the target safe speed in the three dimensions of xyz is obtained.
[0096] Optionally, the detected object may include an object located in a space within a preset range indicated by the target flight direction, and the space within the preset range moves as the drone moves in space. The space within the preset range indicated by the target flight direction is the space within the preset range in the target flight direction. Exemplarily, the space within the preset range may be adjacent to the nose of the drone, and as the drone continues to fly forward along the target flight direction, the space within the preset range also changes continuously. Accordingly, when an object in the current surrounding environment falls into the space within the preset range indicated by the target flight direction, the object can be determined as a detected object. In this way, objects that interfere with the drone's flight can be accurately identified as detected objects, so that in subsequent operations, intelligent behavioral decisions can be made based on whether the detected object is a target object, that is, approaching the detected object or bypassing the detected object.
[0097] Optionally, the horizontal and vertical boundary dimensions of the preset range are set based on the shape of the drone. Thus, by setting the horizontal and vertical boundary dimensions of the preset range based on the drone's shape, the preset range can be more adapted to the drone's shape, ensuring to a certain extent that objects that interfere with the drone's flight can be detected, thereby ensuring the drone's flight safety and avoiding missing targets.
[0098] Specifically, the bounding dimensions of the preset range of space in the corresponding direction can be set according to the maximum dimension of the drone in each direction, so that the preset range of space can cover the drone. In one implementation, the bounding dimensions of the preset range of space in each direction can be set to be larger than the maximum dimension of the drone in each direction, thereby minimizing the risk of missing objects that could interfere with the drone's flight. The larger the maximum dimension of the drone in that direction, the larger the bounding dimensions of the preset range of space in the corresponding direction can be.
[0099] Optionally, the boundary size of the space in the preset range in the vertical direction is smaller than the boundary size in the horizontal direction. In one embodiment, the UAV may be a multi-rotor UAV. In order to improve the power performance, the size of the blade plane of such UAV is larger, that is, the size of the UAV in the horizontal direction is larger. At the same time, in order to facilitate the improvement of the maneuverability of the UAV moving in the horizontal plane, the size of the vertical direction of such UAV is often smaller than the size of the blade plane. In the embodiment of the present application, by setting the boundary size of the space in the preset range in the vertical direction to be smaller than the boundary size in the horizontal direction, the space in the above-mentioned preset range can be more efficiently utilized to search for detected objects, ensuring that objects that interfere with the flight of the UAV can be detected in the space of the preset range, and at the same time, it can also exclude objects in the space that have less impact on flight safety from falling into the space of the preset range to a certain extent, further reducing the computing power overhead of the UAV in perceiving objects in space.
[0100] Furthermore, compared with the method of setting the vertical boundary size to be equal to the horizontal boundary size, in the embodiment of the present application, by setting the vertical boundary size of the space in the preset range to be smaller than the horizontal boundary size, it is possible to avoid identifying the ground as a detected object when the drone is flying at a lower altitude and closer to the ground, thereby affecting the flight efficiency of the drone.
[0101] Assuming that the vertical and horizontal boundary dimensions are both a, and the target object in this operation task is not the ground, then if the distance between the drone and the ground is less than a, the ground will be identified as the detected object. Since the target object in this operation is not the ground, the detected object will be identified as an obstacle. Accordingly, if the drone is controlled to fly closer to the ground at this time, for example, if the user operates the control stick of the first control device, the drone will not respond normally to the user's operation. However, in this case, the ground does not actually pose a threat to the drone. In this embodiment of the present application, because the vertical boundary dimension of the preset range of space is smaller than the horizontal boundary dimension, as long as the distance between the drone and the ground is less than the vertical boundary dimension, the ground will not be identified as an obstacle. Even if the distance between the drone and the ground is less than a, it can still respond normally to the user's operation, thereby adapting to the scenario of operating the control stick close to the ground.
[0102] It should be noted that the boundary size in the vertical direction can also be set equal to the boundary size in the horizontal direction. Accordingly, in this case, if the object in the surrounding environment is a designated object, then when the object falls into a preset range of space and the proportion of the object in the preset range of space is greater than a preset ratio, the object will be determined as a detected object. Among them, the designated object may include the ground, and the preset ratio can be set according to actual needs. In this way, it is possible to avoid directly identifying the ground as an obstacle that will interfere with the flight of the drone, and set a higher tolerance for the ground. In the embodiment of the present application, by setting a more reasonable ground filtering strategy, the processing of the ground can be made more reasonable, thereby improving the response sensitivity of the drone in near-ground scenarios while ensuring safety.
[0103] In one embodiment, the drone's object configuration is closer to a pancake shape. Therefore, the preset range can be spherical, and the horizontal search range within the preset range can be closer to a pancake to avoid being overly conservative. Figure 6 is a schematic diagram of a preset range provided by an embodiment of the present application. As shown in Figure 6, a rectangular coordinate system can be constructed within the normal plane tangent to the collision point trajectory. The vertical axis of this coordinate system can be parallel to the z-axis of the navigation coordinate system, and the horizontal axis can be parallel to the horizontal plane of the navigation coordinate system. The area between lines X and Y can be obtained by translating the horizontal axis up and down based on the vertical tolerance. Because the vertical boundary size is smaller, the distance between line Y and the horizontal axis is smaller. The object search process can be performed sequentially from left to right, as shown by the interlaced circles in Figure 6. If an object is found within the corridor formed between lines X and Y, it is considered that the detected object is indeed present. If no object is found within the corridor formed between lines X and Y, it is considered that the detected object is not present. This can exclude the ground to a certain extent and also enhance overhead passability.
[0104] Optionally, the target flight direction can be determined by the following steps:
[0105] Step S61: receiving a flight control instruction sent by a first control device of the UAV; the flight control instruction is generated based on a user's control operation on a control stick of the first control device.
[0106] Step S62: Determine the flight direction determined in response to the flight control instruction as the target flight direction.
[0107] The first control device may be a remote control for the drone, and the control operation may be a lever movement on the first control device. Assuming a user moves the lever in direction A, the first control device may generate a flight control command indicating direction A. The drone may receive this flight control command and, in response to it, determine direction A indicated by the flight control command as the target flight direction. Accordingly, upon receiving a flight control command generated based on the user's control operation on the first control device's lever, if the detected object in the target flight direction is a target, the drone may continue to fly in the target flight direction indicated by the lever movement to approach the target. If the detected object in the target flight direction is not a target, the drone does not follow the target flight direction indicated by the lever movement, but instead changes its flight direction to circumvent the detected object. This ensures that the drone responds to flight control commands while ensuring flight safety.
[0108] Optionally, the operation of obtaining descriptive information of a target object in space may specifically include: receiving descriptive information of the target object transmitted by a second control device of the drone; wherein the descriptive information of the target object is determined by the second control device based on an object selected by a user. This allows the user to select the target object for the current mission as needed using the second control device, thereby enabling the drone's behavioral decisions regarding the detected object to better meet the user's actual needs. Specifically, the second control device may be the same device as the first control device. The second control device may also be a different device from the first control device, for example, the second control device may be an electronic device used by the user. In actual applications, the second control device may present a scene view to the user, wherein the scene view may include multiple candidate objects. Upon detecting a user touch operation on a candidate object, the candidate object selected by the touch operation is determined as the target object, and the descriptive information of the selected candidate object is determined as the target object's descriptive information. The scene view may be a 3D map, orthophoto image, or the like of an established operation area. When obtaining the descriptive information of the selected candidate object, the descriptive information may be extracted based on images of the selected candidate object captured during historical operations.
[0109] Alternatively, in another unmanned aerial vehicle (UAV) flight control method, description information of a target object in space can be obtained; a planned trajectory for the UAV can be obtained; and, based on sensors onboard the UAV, description information of a detected object in the space covered by the planned trajectory can be detected; if the description information of the detected object matches the description information of the target object, the UAV can be controlled to decelerate and move along the planned trajectory until it approaches the detected object; if the description information of the detected object does not match the description information of the target object, the planned trajectory can be adjusted so that the UAV circumvents the detected object along the adjusted planned trajectory. The implementation of each step in this flight control method can refer to the implementation of the same or similar steps described above. The planned trajectory in this flight control method can be the trajectory that the UAV is currently flying, and the planned trajectory can be a trajectory in the current flight direction. The planned trajectory can be automatically planned by the UAV based on its own perception of the surrounding environment, or it can be planned in response to external control instructions. The space covered by the planned trajectory can be a preset range of space covered by the planned trajectory.
[0110] For example, in one implementation, obtaining a planned trajectory for a drone may include obtaining a flight direction instruction and obtaining the planned trajectory for the drone based on the flight direction instruction. Obtaining the flight direction instruction may involve receiving a flight direction instruction sent by a control device. Alternatively, the flight direction instruction may be automatically generated based on the drone's perception of the surrounding environment. Accordingly, the flight trajectory indicated by the flight direction instruction may be determined as the planned trajectory for the drone.
[0111] In summary, the drone flight control method provided in the embodiments of the present application improves control efficiency and reduces labor costs to a certain extent by automatically detecting whether the description information of the detected object in the space touched by the planned trajectory matches the description information of the target object, and automatically controlling the drone to avoid the detected object or approach the detected object based on the detection result. At the same time, it can avoid collisions between the drone and the detected object, ensuring the safety of the drone's flight, while ensuring that the drone can approach the target object in the space, thus taking into account both flight safety and scene requirements.
[0112] FIG7 is a system flow chart of a flight control method provided in an embodiment of the present application. As shown in FIG7 , target detection and tracking can be performed for a two-dimensional target (i.e., a detected object) to determine whether the detected object is a target object. Next, the obstacle avoidance decision module confirms the position information of the two-dimensional target in the three-dimensional navigation coordinate system based on the target tracking results, the posture of the aircraft and the gimbal, and when the drone is flying towards the two-dimensional target and the two-dimensional target is a target object, the speed planning module performs the next operation. The speed planning module can determine the target safety speed and control the underlying flight control system of the drone based on the target safety speed to control the drone to fly in the target direction and decelerate at the target safety speed to approach the detected object. When performing speed planning, the environmental speed limit can be combined at the same time to avoid the determined target safety speed exceeding the environmental speed limit. Conversely, the obstacle bypass module can perform the next operation to control the drone to bypass the detected object based on the underlying flight control system.
[0113] During the flight, the drone will avoid obstacles for detected objects. However, in scenarios where drones are used to perform inspection tasks, the drone needs to be able to approach the inspection target for inspection rather than bypass it. In an embodiment of the present application, the user only needs to select the inspection target of this inspection task. During the flight of the drone, based on the detection results of the detected object, it will distinguish between inspection targets and non-inspection targets in space, automatically switch the response mode for the detected object, and implement intelligent obstacle avoidance behavior decision-making. In the case where the detected object is an inspection target, smooth speed planning is achieved using local maps and single-frame depth images to more safely dock near the target object. In the case where the detected object is not an inspection target, a detour is performed to avoid the detected object, thereby ensuring flight safety.
[0114] FIG8 is a block diagram of a flight control device for a UAV provided in an embodiment of the present application. The device may include: a memory 301 and a processor 302 .
[0115] The memory 301 is used to store program codes;
[0116] The processor 302 calls the program code, and when the program code is executed, is configured to perform the following operations:
[0117] Obtain description information of the target object in the space;
[0118] Get the target flight direction of the UAV;
[0119] Detecting, based on sensors carried by the drone, description information of a detected object in the space indicated by the target flight direction;
[0120] If the description information of the detected object matches the description information of the target object, controlling the UAV to decelerate and move along the target flight direction until it approaches the detected object;
[0121] If the description information of the detected object does not match the description information of the target object, the drone is controlled to change its flight direction to fly around the detected object.
[0122] In summary, the flight control device of the unmanned aerial vehicle provided in the embodiment of the present application obtains the description information of the target object in the space and obtains the target flight direction of the unmanned aerial vehicle. Based on the sensor carried by the unmanned aerial vehicle, the description information of the detected object in the space indicated by the target flight direction is detected. If the description information of the detected object matches the description information of the target object, the unmanned aerial vehicle is controlled to decelerate and move close to the detected object along the target flight direction. If the description information of the detected object does not match the description information of the target object, the unmanned aerial vehicle is controlled to change the flight direction to bypass the detected object. In this way, by automatically detecting whether the description information of the detected object matches the description information of the target object, and automatically controlling the unmanned aerial vehicle to avoid the detected object or approach the detected object based on the detection result, the control efficiency can be improved and the labor cost can be reduced to a certain extent. At the same time, it can avoid the collision between the unmanned aerial vehicle and the detected object, ensure the flight safety of the unmanned aerial vehicle, and ensure that the unmanned aerial vehicle can approach the target object in the space, thereby taking into account both flight safety and scene requirements.
[0123] Furthermore, manual drone flight control is sometimes limited by personal experience and cannot reasonably control the drone's movement. In the embodiment of the present application, the drone is automatically controlled to avoid or approach the detected object based on the detection results, which can, to a certain extent, more reasonably control the drone's movement with respect to the detected object in space.
[0124] Optionally, when controlling the drone to decelerate and move along the target flight direction until it approaches the detected object, the processor 302 is further configured to execute:
[0125] When the distance between the UAV and the detected object is not greater than a specified stopping distance, the UAV is controlled to stop flying.
[0126] Optionally, the processor 302 is further configured to execute:
[0127] After the UAV stops flying, the UAV is controlled to perform a target operation on the detected object.
[0128] Optionally, the designated stopping distance is set based on one or more of the following factors:
[0129] the density of objects in said space;
[0130] Description information of the target object;
[0131] The type of operation of the drone.
[0132] Optionally, the processor 302 is specifically configured to execute:
[0133] Determine a target safety speed based on local map information and / or a single-frame depth image; the target safety speed is positively correlated with the current distance between the UAV and the detected object;
[0134] The UAV is controlled to fly along the target direction and decelerate at the target safety speed until it approaches the detected object.
[0135] Optionally, the local map information is generated based on multiple frames of depth images of the current surrounding environment collected by the drone.
[0136] Optionally, the multiple frames of depth images are acquired by a sensor carried by the drone in different directions.
[0137] Optionally, the processor 302 is further configured to execute:
[0138] Calculating a first safe speed of the UAV based on the local map information;
[0139] Calculating a second safe speed of the drone based on the single-frame depth image;
[0140] The target safety speed is determined based on the first safety speed and the second safety speed.
[0141] Optionally, the processor 302 is further configured to execute:
[0142] determining a current distance between the drone and the detected object based on the local map information;
[0143] A first safe speed of the drone is calculated based on the current distance and a designated stopping distance of the drone; the first safe speed is positively correlated with a current distance difference, where the current distance difference is the difference between the current distance and the designated stopping distance.
[0144] Optionally, the processor 302 is further configured to execute:
[0145] Determining a percentage of the number of pixels corresponding to each depth interval based on the number of pixels in the single-frame depth image that fall into each depth interval and the total number of pixels in the single-frame depth image;
[0146] Determining a weight value corresponding to each depth interval according to the proportion of the number of pixels corresponding to each depth interval; the weight value corresponding to the depth interval is positively correlated with the proportion of the number of pixels;
[0147] The second safe speed is determined based on the speed value and weight value corresponding to each depth interval; the speed value corresponding to the depth interval is positively correlated with the depth value represented by the depth interval.
[0148] Optionally, the processor 302 is further configured to execute:
[0149] The minimum value of the first safety speed and the second safety speed is determined as the target safety speed.
[0150] Optionally, the local map information is generated based on the multiple-frame depth image when the distance between the drone and the detected object reaches a preset mapping distance, and the preset mapping distance is positively correlated with the specified stopping distance of the drone.
[0151] Optionally, the detected object includes an object located in a space within a preset range indicated by the target flight direction, and the space within the preset range moves as the drone moves in the space.
[0152] Optionally, the size of the space within the preset range is determined by setting boundary sizes in the horizontal and vertical directions based on the shape of the drone.
[0153] Optionally, the boundary size of the space within the preset range in the vertical direction is smaller than the boundary size in the horizontal direction.
[0154] Optionally, the processor 302 is further configured to execute:
[0155] receiving a flight control instruction sent by a first control device of the UAV, wherein the flight control instruction is generated based on a user's control operation on a joystick of the first control device;
[0156] The flight direction determined in response to the flight control instruction is determined as the target flight direction.
[0157] Optionally, the processor 302 is further configured to execute:
[0158] Receive description information of the target object sent by the second control device of the drone; wherein the description information of the target object is determined by the second control device based on the object selected by the user.
[0159] The operations performed by the above-mentioned device are similar to the corresponding steps in the above-mentioned method and can achieve the same technical effects. To avoid repetition, they will not be described here.
[0160] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, it enables the computer to execute the various steps in the above method and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0161] Furthermore, an embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the above method.
[0162] Furthermore, the embodiment of the present application also provides a drone, which is used to implement each step in the above method and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0163] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0164] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor can be used in practice to implement some or all of the functions of some or all of the components in the computing processing equipment according to an embodiment of the present application. The application can also be implemented as a device or apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0165] For example, FIG9 is a block diagram of a computing and processing device provided in an embodiment of the present application. As shown in the figure, a computing and processing device that can implement the method according to the present application is illustrated. The computing and processing device conventionally includes a processor 410 and a computer program product or computer-readable medium in the form of a memory 420. The memory 420 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. The memory 420 has a storage space 430 for program code for executing any method step in the above method. For example, the storage space 430 for program code can include individual program codes for implementing various steps in the above method. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are typically portable or fixed storage units as described with reference to FIG10. The storage unit can have storage segments, storage space, etc. arranged similarly to the memory 420 in the computing and processing device of FIG9. The program code can be compressed, for example, in a suitable form. Typically, the storage unit includes computer-readable codes, ie, codes that can be read by a processor such as 410 , which, when executed by a computing processing device, cause the computing processing device to perform the steps of the method described above.
[0166] Each embodiment in this specification is described in a progressive manner, with each embodiment focusing on the differences from other embodiments. References to the same or similar parts between the embodiments can be made to each other. References herein to "one embodiment," "embodiment," or "one or more embodiments" mean that the specific features, structures, or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present application. Please note that instances of the phrase "in one embodiment" do not necessarily all refer to the same embodiment.
[0167] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0168] In the claims, any reference signs placed between brackets shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not limiting. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A flight control method for an unmanned aerial vehicle, characterized in that: The method comprises: Obtain description information of the target object in the space; Get the target flight direction of the UAV; Detecting, based on sensors carried by the drone, description information of a detected object in the space indicated by the target flight direction; If the description information of the detected object matches the description information of the target object, controlling the drone to decelerate and move along the target flight direction until it approaches the detected object; If the description information of the detected object does not match the description information of the target object, the drone is controlled to change its flight direction to fly around the detected object.
2. The method according to claim 1, characterized in that In the case of controlling the UAV to decelerate and move along the target flight direction until it approaches the detected object, the method further includes: When the distance between the UAV and the detected object is not greater than a specified stopping distance, the UAV is controlled to stop flying.
3. The method according to claim 2, characterized in that The method further comprises: After the UAV stops flying, the UAV is controlled to perform a target operation on the detected object.
4. The method according to claim 2 or 3, characterized in that The specified stopping distance is set based on one or more of the following factors: the density of objects in said space; Description information of the target object; The type of operation of the drone.
5. The method according to any one of claims 1 to 3, characterized in that: The controlling the UAV to decelerate and move along the target flight direction until it approaches the detected object includes: Determine a target safety speed based on local map information and / or a single-frame depth image; the target safety speed is positively correlated with the current distance between the UAV and the detected object; The UAV is controlled to fly along the target direction and decelerate at the target safety speed until it approaches the detected object.
6. The method according to claim 5, characterized in that The local map information is generated based on multiple frames of depth images of the current surrounding environment collected by the drone.
7. The method according to claim 6, characterized in that The multiple frames of depth images are acquired by the sensor carried by the drone in different directions.
8. The method according to claim 5, characterized in that The determining of the target safe speed based on the local map information and / or the single-frame depth image includes: Calculating a first safe speed of the UAV based on the local map information; Calculating a second safe speed of the drone based on the single-frame depth image; The target safety speed is determined based on the first safety speed and the second safety speed.
9. The method according to claim 8, characterized in that Calculating a first safe speed of the drone based on the local map information includes: determining a current distance between the drone and the detected object based on the local map information; A first safe speed of the drone is calculated based on the current distance and a designated stopping distance of the drone; the first safe speed is positively correlated with a current distance difference, where the current distance difference is the difference between the current distance and the designated stopping distance.
10. The method according to claim 8, characterized in that Calculating a second safe speed of the drone based on the single-frame depth image includes: Determining a percentage of the number of pixels corresponding to each depth interval based on the number of pixels in the single-frame depth image that fall into each depth interval and the total number of pixels in the single-frame depth image; Determining a weight value corresponding to each depth interval according to the proportion of the number of pixels corresponding to each depth interval; the weight value corresponding to the depth interval is positively correlated with the proportion of the number of pixels; The second safe speed is determined based on the speed value and weight value corresponding to each depth interval; the speed value corresponding to the depth interval is positively correlated with the depth value represented by the depth interval.
11. The method according to claim 8, characterized in that The determining the target safe speed based on the first safe speed and the second safe speed includes: The minimum value of the first safety speed and the second safety speed is determined as the target safety speed.
12. The method according to claim 6, characterized in that The local map information is generated based on the multiple frames of depth images when the distance between the drone and the detected object reaches a preset mapping distance, and the preset mapping distance is positively correlated with the specified stopping distance of the drone.
13. The method according to any one of claims 1 to 3, characterized in that: The detected objects include objects located in a space within a preset range indicated by the target flight direction, and the space within the preset range moves as the UAV moves in the space.
14. The method according to any one of claim 13, characterized in that: The size of the space within the preset range is set based on the shape of the drone in the horizontal and vertical directions.
15. The method according to claim 13, characterized in that The boundary size of the space within the preset range in the vertical direction is smaller than the boundary size in the horizontal direction.
16. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: receiving a flight control instruction sent by a first control device of the UAV, wherein the flight control instruction is generated based on a user's control operation on a joystick of the first control device; The flight direction determined in response to the flight control instruction is determined as the target flight direction.
17. The method according to any one of claims 1 to 3, characterized in that: The acquiring of description information of the target object in the space includes: Receive description information of the target object sent by the second control device of the drone; wherein the description information of the target object is determined by the second control device based on the object selected by the user.
18. A flight control device for an unmanned aerial vehicle, characterized in that: The device includes a memory and a processor; The memory is used to store program code; The processor calls the program code, and when the program code is executed, is configured to perform the following operations: Obtain description information of the target object in the space; Get the target flight direction of the UAV; Detecting, based on sensors carried by the drone, description information of a detected object in the space indicated by the target flight direction; If the description information of the detected object matches the description information of the target object, controlling the UAV to decelerate and move along the target flight direction until it approaches the detected object; If the description information of the detected object does not match the description information of the target object, the drone is controlled to change its flight direction to fly around the detected object.
19. The device according to claim 1, characterized in that When controlling the UAV to decelerate and move along the target flight direction until it approaches the detected object, the processor is further configured to execute: When the distance between the UAV and the detected object is not greater than a specified stopping distance, the UAV is controlled to stop flying.
20. The device according to claim 19, characterized in that The processor is further configured to execute: After the UAV stops flying, the UAV is controlled to perform a target operation on the detected object.
21. The device according to claim 19 or 20, characterized in that The specified stopping distance is set based on one or more of the following factors: the density of objects in said space; Description information of the target object; The type of operation of the drone.
22. The device according to any one of claims 18 to 20, characterized in that: The processor is specifically configured to execute: Determine a target safety speed based on local map information and / or a single-frame depth image; the target safety speed is positively correlated with the current distance between the UAV and the detected object; The UAV is controlled to fly along the target direction and decelerate at the target safety speed until it approaches the detected object.
23. The device according to claim 22, characterized in that The local map information is generated based on multiple frames of depth images of the current surrounding environment collected by the drone.
24. The device according to claim 23, characterized in that The multiple frames of depth images are acquired by the sensor carried by the drone in different directions.
25. The device according to claim 22, characterized in that The processor is further specifically configured to execute: Calculating a first safe speed of the UAV based on the local map information; Calculating a second safe speed of the drone based on the single-frame depth image; The target safety speed is determined based on the first safety speed and the second safety speed.
26. The device according to claim 25, characterized in that The processor is further specifically configured to execute: determining a current distance between the drone and the detected object based on the local map information; Calculating a first safe speed for the drone based on the current distance and a designated stopping distance for the drone; The first safe speed is positively correlated with a current distance difference, where the current distance difference is a difference between the current distance and the designated stopping distance.
27. The device according to claim 25, characterized in that The processor is further specifically configured to execute: Determining a percentage of the number of pixels corresponding to each depth interval based on the number of pixels in the single-frame depth image that fall into each depth interval and the total number of pixels in the single-frame depth image; Determining a weight value corresponding to each depth interval according to the proportion of the number of pixels corresponding to each depth interval; the weight value corresponding to the depth interval is positively correlated with the proportion of the number of pixels; The second safe speed is determined based on the speed value and weight value corresponding to each depth interval; the speed value corresponding to the depth interval is positively correlated with the depth value represented by the depth interval.
28. The device according to claim 25, characterized in that The processor is further specifically configured to execute: The minimum value of the first safety speed and the second safety speed is determined as the target safety speed.
29. The device according to claim 23, characterized in that The local map information is generated based on the multiple frames of depth images when the distance between the drone and the detected object reaches a preset mapping distance, and the preset mapping distance is positively correlated with the specified stopping distance of the drone.
30. The device according to any one of claims 18 to 20, characterized in that: The detected objects include objects located in a space within a preset range indicated by the target flight direction, and the space within the preset range moves as the UAV moves in the space.
31. The device according to any one of claims 30, characterized in that The size of the space within the preset range is set based on the shape of the drone in the horizontal and vertical directions.
32. The device according to claim 30, characterized in that The boundary size of the space within the preset range in the vertical direction is smaller than the boundary size in the horizontal direction.
33. The device according to any one of claims 18 to 20, characterized in that The processor is further configured to execute: receiving a flight control instruction sent by a first control device of the UAV, wherein the flight control instruction is generated based on a user's control operation on a joystick of the first control device; The flight direction determined in response to the flight control instruction is determined as the target flight direction.
34. The device according to any one of claims 18 to 20, characterized in that The processor is further specifically configured to execute: Receive description information of the target object sent by the second control device of the drone; wherein the description information of the target object is determined by the second control device based on the object selected by the user.
35. A drone, characterized in that: The drone is used to implement the method according to any one of claims 1 to 17.
36. A computer-readable storage medium, characterized in that The method comprises instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 17.
37. A computer program product comprising instructions, characterized in that When the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 17.
