Path Planning Method, Apparatus, Electronic Device, and Storage Medium

By performing segmented processing of drone paths and application of A* algorithms, the problems of long drone path planning time and insufficient path optimization in the prior art are solved, and the rapid acquisition of better flight paths in unknown environments is achieved.

CN115420287BActive Publication Date: 2025-06-13YUNNAN MINZU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210813392.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-11
Publication Date
2025-06-13
Estimated Expiration
2042-07-11

AI Technical Summary

Technical Problem

The planning search time of the drone path planning method in the prior art is relatively long, and the path planning method used has certain limitations, resulting in the obtained flight path not the better path between the starting position and the end position.

Method used

When the drone is in an unknown environment, the current path is processed in segments, and the A* algorithm is used to obtain the target path between the starting position and the end position. The method includes obtaining global environment information, segmenting the path, sampling the path points, updating the environment information, and planning the path using the A* algorithm based on the new information.

Benefits of technology

It realizes the rapid planning of better drone flight paths in unknown environments, reducing the time of path planning and improving the path optimization effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115420287B_ABST
    Figure CN115420287B_ABST
Patent Text Reader

Abstract

The present invention provides a path planning method, apparatus, electronic device, and storage medium. The method includes: obtaining global environmental information corresponding to an unknown environment, and determining a current path corresponding to a starting position and an ending position according to the global environmental information; segmenting the current path to obtain a plurality of segmented paths, and sampling the plurality of segmented paths to obtain a plurality of path points; in the case where it is determined that a collision occurs on a target segmented path corresponding to a target path point of the unmanned aerial vehicle (UAV), updating the global environmental information by using local environmental information corresponding to the target segmented path obtained by a vision sensor to obtain new global environmental information; and determining a target path corresponding to the starting position and the ending position by using the A* algorithm based on the new global environmental information. This method is used to enable the electronic device to obtain a target path between the starting position and the ending position of the UAV when the UAV is in an unknown environment. The planning time of the target path is short, and it is an optimal path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of path planning, and in particular, to a path planning method, apparatus, electronic device, and storage medium. Background Art

[0002] With the development of technology, the application of unmanned aerial vehicles (UAVs) is becoming more and more extensive.

[0003] The existing method for path planning of UAVs is as follows: An electronic device can use the traditional A* algorithm to plan a path for the UAV to fly from the starting position to the ending position. This traditional A* algorithm is a graph search algorithm, an effective direct search method for solving the shortest path in a static known environment, and also a heuristic search algorithm based on the Dijkstra algorithm and the breadth-first search algorithm. During path search, that is, during the path planning process, the electronic device can use the cost function in the traditional A* algorithm to evaluate the feasibility of path points between the starting position and the ending position, and select the node with the minimum cost value as the next node to be expanded. Then, continue from the next node until reaching the ending position, which results in a relatively long time for the entire path planning and traverses a relatively large number of grids. In addition, this traditional A* algorithm can only be applied to the autonomous navigation of UAVs when the global environment is known, which has certain limitations.

[0004] In this way, although the electronic device can find a flight path between the starting position and the ending position for the UAV, due to the relatively long planning search time of this flight path and the certain limitations of the used path planning method, the flight path obtained by the electronic device is not an optimal path between the starting position and the ending position. Summary of the Invention

[0005] The present invention provides a path planning method, apparatus, electronic device, and storage medium, which are used to solve the defect that although the electronic device can find a flight path between the starting position and the ending position for the UAV in the prior art, due to the relatively long planning search time of this flight path and the certain limitations of the used path planning method, the flight path obtained by the electronic device is not an optimal path between the starting position and the ending position. It is realized that the electronic device can segment the current path executed by the UAV when the UAV is in an unknown environment, and use the A* algorithm to obtain a target path between the starting position and the ending position of the UAV. The planning time of this target path is relatively short and it is an optimal path.

[0006] The present invention provides a path planning method, including:

[0007] Obtain global environment information corresponding to an unknown environment, and determine a current path corresponding to the starting position and the ending position according to the global environment information;

[0008] Segment the current path to obtain multiple segmented paths, and sample the multiple segmented paths to obtain multiple path points;

[0009] When it is determined that the UAV collides with the target segmented path corresponding to the target path point, update the global environment information with the local environment information corresponding to the target segmented path obtained by the vision sensor to obtain new global environment information, where the target path point is any path point among the multiple path points;

[0010] Based on the new global environment information, use the A* algorithm to determine the target path corresponding to the starting position and the ending position.

[0011] According to a path planning method provided by the present invention, determining the current path corresponding to the starting position and the ending position according to the global environment information includes: determining the starting position and the ending position from the global environment information; connecting the starting position and the ending position to obtain a straight path.

[0012] According to a path planning method provided by the present invention, segmenting the current path to obtain multiple segmented paths, and sampling the multiple segmented paths to obtain multiple path points includes: during the process of the UAV executing the straight path, segment the straight path by using the viewing cone length corresponding to the vision sensor to obtain multiple segmented paths, where the vision sensor is disposed on the UAV; discretely sample the multiple segmented paths to obtain multiple path points.

[0013] According to a path planning method provided by the present invention, discretely sampling the multiple segmented paths to obtain multiple path points includes: discretely sampling the multiple segmented paths according to a preset map resolution to obtain multiple path points.

[0014] According to a path planning method provided by the present invention, discretely sampling the multiple segmented paths to obtain multiple path points includes: discretely sampling the multiple segmented paths to obtain multiple sampling points; when it is determined that all the multiple sampling points are within the viewing range corresponding to the vision sensor, determine the multiple sampling points as multiple path points; when it is determined that there are sampling points among the multiple sampling points that are not within the viewing range, obtain the current yaw angle of the UAV and adjust the current yaw angle until all the multiple sampling points are within the viewing range.

[0015] A path planning method provided by the present invention for determining that a drone collides with a target segmented path corresponding to a target path point includes: when it is determined that there is an obstacle on the target segmented path corresponding to the target path point, if it is detected that the drone will collide with the obstacle, it is determined that the drone collides on the target segmented path.

[0016] A path planning method provided by the present invention for obtaining global environmental information corresponding to an unknown environment and determining a current path corresponding to a starting position and an ending position according to the global environmental information includes: obtaining global environmental information corresponding to the unknown environment; determining a global grid map according to the global environmental information, where each grid in the global grid map represents that the current position is an obstacle or a passable area for the drone; determining a first grid corresponding to the starting position and a second grid corresponding to the ending position according to the global grid map; determining the current path corresponding to the first grid and the second grid.

[0017] The present invention also provides a path planning device, including:

[0018] An acquisition module for acquiring global environmental information corresponding to an unknown environment;

[0019] A path determination module for determining a current path corresponding to a starting position and an ending position according to the global environmental information;

[0020] A processing module for segmenting the current path to obtain multiple segmented paths, sampling the multiple segmented paths to obtain multiple path points; when it is determined that the drone collides with a target segmented path corresponding to a target path point, updating the global environmental information with local environmental information corresponding to the target segmented path obtained by using a vision sensor to obtain a new global environmental information, where the target path point is any one of the multiple path points;

[0021] The path determination module is further configured to determine a target path corresponding to the starting position and the ending position by using the A* algorithm based on the new global environmental information.

[0022] Optionally, the path determination module is specifically configured to determine a starting position and an ending position from the global environmental information; connect the starting position and the ending position to obtain a straight-line path.

[0023] Optionally, the processing module is specifically configured to segment the straight-line path by using the viewing cone length corresponding to the vision sensor during the process of the drone executing the straight-line path to obtain multiple segmented paths, where the vision sensor is disposed on the drone; discretely sample the multiple segmented paths to obtain multiple path points.

[0024] Optionally, the processing module is specifically configured to discretize and sample the multiple segmented paths according to a preset map resolution to obtain multiple path points.

[0025] Optionally, the processing module is specifically configured to discretize and sample the multiple segmented paths to obtain multiple sampling points; in a case where it is determined that all of the multiple sampling points are within the field of view range corresponding to the vision sensor, determine the multiple sampling points as multiple path points; in a case where it is determined that there are sampling points among the multiple sampling points that are not within the field of view range, obtain a current yaw angle of the UAV, and adjust the current yaw angle until all of the multiple sampling points are within the field of view range.

[0026] Optionally, the processing module is specifically configured to, in a case where it is determined that there is an obstacle on a target segmented path corresponding to a target path point, determine that the UAV collides on the target segmented path if it is detected that the UAV will collide with the obstacle.

[0027] Optionally, the path determination module is specifically configured to obtain global environmental information corresponding to an unknown environment; determine a global grid map according to the global environmental information, where each grid in the global grid map represents that the current position is an obstacle or a passable area for the UAV; determine a first grid corresponding to the starting position and a second grid corresponding to the ending position according to the global grid map; and determine a current path corresponding to the first grid and the second grid.

[0028] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the path planning method as described in any one of the above when executing the program.

[0029] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and the computer program implements the path planning method as described in any one of the above when being executed by a processor.

[0030] The present invention also provides a computer program product, including a computer program, and the computer program implements the path planning method as described in any one of the above when being executed by a processor.

[0031] The path planning method, device, electronic device, and storage medium provided by the present invention obtain the global environmental information corresponding to an unknown environment, and determine the current path corresponding to the starting position and the ending position according to the global environmental information; segment the current path to obtain a plurality of segmented paths, and sample the plurality of segmented paths to obtain a plurality of path points; in the case where it is determined that a collision occurs on the target segmented path corresponding to the target path point of the unmanned aerial vehicle (UAV), update the global environmental information with the local environmental information corresponding to the target segmented path obtained by using a vision sensor to obtain new global environmental information, where the target path point is any path point among the plurality of path points; based on the new global environmental information, use the A* algorithm to determine the target path corresponding to the starting position and the ending position. This method is used to solve the defect that although the electronic device in the prior art can find a flight path between the starting position and the ending position for the UAV, due to the large planning search time of the flight path and the certain limitations of the used path planning method, the obtained flight path is not an optimal path between the starting position and the ending position. It realizes that the electronic device can segment the current path executed by the UAV when the UAV is in an unknown environment, and use the A* algorithm to obtain the target path of the UAV between the starting position and the ending position. The planning time of this target path is short and it is an optimal path. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0033] Figure 1 is a schematic flowchart of the path planning method provided by the present invention;

[0034] Figure 2a is one of the schematic diagrams of the global environmental information provided by the present invention;

[0035] Figure 2b is another schematic diagram of the global environmental information provided by the present invention;

[0036] Figure 2c is one of the schematic diagrams of the target path provided by the present invention;

[0037] Figure 2d is another schematic diagram of the target path provided by the present invention;

[0038] Figure 2e is a third schematic diagram of the global environmental information provided by the present invention;

[0039] Figure 2f It is the third schematic diagram of the target path provided by the present invention;

[0040] Figure 2g It is the fourth schematic diagram of the target path provided by the present invention;

[0041] Figure 3 It is the structural schematic diagram of the path planning device provided by the present invention;

[0042] Figure 4 It is the structural schematic diagram of the electronic device provided by the present invention. Detailed implementation manners

[0043] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.

[0044] As Figure 1 shown, it is the flow schematic diagram of the path planning method provided by the present invention, which may include:

[0045] 101. Obtain the global environment information corresponding to the unknown environment, and determine the current path corresponding to the starting position and the ending position according to the global environment information.

[0046] Among them, the global environment information is the information corresponding to an unknown environment.

[0047] For the unmanned aerial vehicle, the above global environment information is assumed to be a known environment information.

[0048] Among them, the global environment information may include multiple positions, and the multiple positions may include but are not limited to: the starting position from which the unmanned aerial vehicle is about to depart, the ending position that the unmanned aerial vehicle desires to reach, and the positions of obstacle points, etc.

[0049] After the electronic device obtains the global environment information corresponding to the unknown environment, it can randomly obtain two positions from the multiple positions included in the global environment information, which are the starting position and the ending position respectively; then, the electronic device connects the starting position and the ending position randomly to obtain the current path corresponding to the starting position and the ending position.

[0050] Optionally, the number of the current paths corresponding to these two positions may be at least one.

[0051] Exemplarily, as Figure 2aAs shown, it is a schematic diagram of the global environmental information provided by the present invention. In Figure 2a it, the global environmental information includes multiple positions, represented by black solid circles. The electronic device obtains the starting position A and the ending position B from these multiple positions, and connects the starting position A and the ending position B in 4 different ways, respectively obtaining the first path, the second path, the third path, and the fourth path. The first path, the second path, the third path, and the fourth path are all different from each other.

[0052] Optionally, the electronic device determines the current path corresponding to the starting position and the ending position according to the global environmental information, which may include: the electronic device determines the starting position and the ending position from the global environmental information; the electronic device connects the starting position and the ending position to obtain a straight-line path.

[0053] After the electronic device determines the starting position and the ending position from the global environmental information, it can directly connect these two positions in a straight line without considering whether there are obstacles between these two positions, and directly obtain the straight-line path corresponding to the starting position and the ending position. That is, the electronic device can effectively obtain the straight-line path corresponding to the starting position and the ending position without searching and traversing the global environmental information, thereby not only reducing the planning time of the straight-line path, but also improving the acquisition efficiency of the straight-line path.

[0054] Optionally, the electronic device obtains the global environmental information corresponding to the unknown environment, and determines the current path corresponding to the starting position and the ending position according to the global environmental information, which may include: the electronic device obtains the global environmental information corresponding to the unknown environment in the current area; the electronic device determines the global grid map according to the global environmental information; the electronic device determines the first grid corresponding to the starting position and the second grid corresponding to the ending position according to the global grid map; the electronic device determines the current path corresponding to the first grid and the second grid.

[0055] Among them, each grid in the global grid map represents an obstacle at the current position or a passable area for the drone.

[0056] Among them, the current area refers to the area where the drone is currently located.

[0057] The electronic device can simulate the environment where the drone is currently located to obtain a grid discrete environment, that is, obtain the global grid map, and then determine the current path corresponding to the starting position and the ending position for the global grid map.

[0058] 102. Segment the current path to obtain multiple segmented paths, and sample the multiple segmented paths to obtain multiple path points.

[0059] After obtaining the current path, the electronic device can perform segmentation processing and sampling processing on the current path to obtain multiple discrete path points, so that the electronic device can accurately update the global environment information subsequently.

[0060] Optionally, the electronic device segments the current path to obtain multiple segmented paths, and samples the multiple segmented paths to obtain multiple path points, which may include: during the process of the drone executing a straight-line path, the electronic device uses the cone length corresponding to the vision sensor to segment the straight-line path to obtain multiple segmented paths; the electronic device performs discretized sampling on the multiple segmented paths to obtain multiple path points.

[0061] Among them, the vision sensor is arranged on the drone.

[0062] The vision sensor is a sensor with Time Of Flight (TOF) function, that is, a sensor that can measure the environmental depth.

[0063] The cone length refers to the range length that the shooting field of view of the vision sensor can reach, that is, the field of view range length of the vision sensor.

[0064] Optionally, the cone lengths corresponding to different vision sensors can be the same or different, and no specific limitation is made here.

[0065] Optionally, the vision sensor can be a Red Green Blue–Depth (RGB-D) camera or a depth camera, etc.

[0066] After the electronic device obtains the straight-line path, it can control the drone to fly along the straight-line path; then, the electronic device can use the cone length corresponding to the vision sensor to evenly divide the straight-line path to obtain multiple segmented paths. Among these multiple segmented paths, the first endpoint of the first segmented path can be the starting position of the drone, the second endpoint of the first segmented path is the first endpoint of the second segmented path, the second endpoint of the second segmented path is the first endpoint of the third segmented path, the first segmented path is adjacent to the second segmented path, the second segmented path is adjacent to the third segmented path, and so on. The second endpoint of the last segmented path can be the end position of the drone.

[0067] Then, the electronic device uses the vision sensor to perform discretized sampling on these multiple consecutive segmented paths to obtain multiple discrete path points, so that the electronic device can traverse these multiple discrete path points subsequently, and thus can accurately update the global environment information.

[0068] Optionally, the electronic device may use the first segmented path as the first path point, the second segmented path as the second path point, and so on. The Nth segmented path may be used as the Nth path point, where the Nth segmented path is the last one among the multiple segmented paths, and N is an integer greater than or equal to 2.

[0069] Optionally, the electronic device discretely samples the multiple segmented paths to obtain multiple path points, which may include but are not limited to at least one of the following implementation manners:

[0070] Implementation manner 1: The electronic device discretely samples the multiple segmented paths according to a preset map resolution to obtain multiple path points.

[0071] Optionally, the preset map resolution may be set before the electronic device leaves the factory or may be user-defined, and no specific limitation is made here.

[0072] Implementation manner 2: The electronic device discretely samples the multiple segmented paths to obtain multiple sampling points; when the electronic device determines that all the multiple sampling points are within the visual field range corresponding to the visual sensor, it determines the multiple sampling points as multiple path points; when the electronic device determines that there are sampling points among the multiple sampling points that are not within the visual field range, it obtains the current yaw angle of the unmanned aerial vehicle and adjusts the current yaw angle until all the multiple sampling points are within the visual field range.

[0073] Among them, the current yaw angle refers to the angle between the current heading of the unmanned aerial vehicle and the heading corresponding to the previously obtained straight path.

[0074] After the electronic device obtains multiple discrete sampling points, it may determine whether all these multiple sampling points are within the visual field range corresponding to the visual sensor; if all these multiple sampling points are within this visual field range, then it means that the deviation between the current flight path of the unmanned aerial vehicle and the previously obtained straight path is small. Therefore, these multiple sampling points obtained by the electronic device are also relatively accurate, and these multiple sampling points can be directly determined as path points; if there are sampling points among these multiple sampling points that are not within the visual field range, this sampling point may be called a target point. Then, it means that the deviation between the flight path of the unmanned aerial vehicle at the target point and this straight path is large. Therefore, the target point obtained by this electronic device is inaccurate. At this time, this electronic device needs to obtain the angle between the current heading corresponding to the flight path of the unmanned aerial vehicle at this target point and the heading corresponding to this straight path, and adjust this angle so that this target point can be within this visual field range. Then, this electronic device can determine the currently obtained multiple sampling points as multiple path points.

[0075] Among them, the number of target points is less than or equal to the number of sampling points, and the number of target points is at least one.

[0076] 103. When it is determined that the UAV collides with the target segmented path corresponding to the target path point, the global environment information is updated by using the local environment information corresponding to the target segmented path obtained by the vision sensor, and new global environment information is obtained.

[0077] Wherein, the target path point is any one of multiple path points.

[0078] Optionally, the number of the target path points is at least one.

[0079] Optionally, before step 103, the method may further include but is not limited to the following implementation manners:

[0080] Implementation manner 1: The electronic device uses the vision sensor to obtain the path environment information corresponding to the segmented path corresponding to each path point among multiple path points; when the electronic device determines that there are no obstacles in the path environment information corresponding to the target segmented path, the path environment information is determined as the local environment information corresponding to the target segmented path.

[0081] Implementation manner 2: The electronic device uses the vision sensor to obtain the path environment information corresponding to the segmented path corresponding to each path point among multiple path points; when the electronic device determines that there are obstacles in the path environment information corresponding to the target segmented path but there is no collision with the obstacles, the path environment information is determined as the local environment information corresponding to the target segmented path.

[0082] That is to say, whether it is implementation manner 1 or implementation manner 2, there will be no collision between the local environment information corresponding to each segmented path obtained by the electronic device and the UAV.

[0083] Under the global environment information, the electronic device controls the UAV to start from the starting position and fly along the current path. When it is determined that the UAV collides with the target segmented path corresponding to the target path point, the local environment information corresponding to the target segmented path previously obtained by the vision sensor can be obtained, and there are obstacles in the local environment information; then, the electronic device replaces the global environment information with the local environment information to obtain new global environment information. In the new global environment information, so that the electronic device can use the A* algorithm to re-plan the flight path of the UAV in the future, so that the UAV can avoid obstacles on the target segmented path, so that the UAV will not collide with the obstacles.

[0084] Optionally, the electronic device determines that the UAV collides with the target segmented path corresponding to the target path point, which may include: when the electronic device determines that there are obstacles on the target segmented path corresponding to the target path point, if it detects that the UAV will collide with the obstacles, it determines that the UAV collides with the target segmented path.

[0085] If there is an obstacle on the target segmented path corresponding to the target waypoint, then, when the drone passes through the target segmented path, it will collide with the obstacle. At this time, the electronic device can determine that the drone has collided on the target segmented path.

[0086] Optionally, when the electronic device determines that the drone has not collided at all waypoints, it can control the drone to fly along the current route to reach the end position.

[0087] Optionally, when the electronic device determines that the drone has not collided at all waypoints, it can control the drone to fly along the current route to reach the end position, which may include: when the electronic device determines that the drone has not collided at all waypoints, it can control the drone to fly along a straight-line route to reach the end position.

[0088] This can save the steps and duration of path planning between the starting position and the end position of the drone, thereby improving the flight efficiency of the drone.

[0089] 104. Based on the new global environmental information, use the A* algorithm to determine the target path corresponding to the starting position and the end position.

[0090] Among them, the A* algorithm involved in the present invention refers to a graph search algorithm, an effective direct search method for solving the shortest path in a static unknown environment. During the process of searching for the target path, the A* algorithm can evaluate the feasibility of multiple waypoints, select the waypoint with the smallest cost value as the next expanded node, and then continue from the next node until reaching the end position.

[0091] The target path refers to a better path for the drone to fly from the starting position to the end position. The target path may include the current path between the starting position and the position point where the target segmented path collides, and the path between the collided position point and the end position obtained by using the A* algorithm; it may also include the first current path between the actual position and the position point where the first target segmented path collides, the second current path between the position point where the first current path collides with the second target segmented path, and the path between the collided position point corresponding to the second current path and the end position obtained by using the A* algorithm. That is, the target path is composed of paths obtained by two methods respectively.

[0092] Optionally, the better path may be the optimal path.

[0093] Optionally, after step 104, the method may further include but is not limited to at least one of the following implementation manners:

[0094] Implementation method 1: The electronic device controls the drone to execute the target path and reach the end position.

[0095] The electronic device controls the drone to fly along an optimal path, and can reach the end position quickly and accurately.

[0096] Implementation method 2: The electronic device outputs the target path.

[0097] Optionally, the electronic device outputs the target path, which may include but is not limited to at least one of the following methods:

[0098] Method 1: The electronic device outputs the target path in the form of an image.

[0099] Method 2: The electronic device sends the target path to other associated devices, so that the electronic device and the other associated devices can simultaneously control the drone to fly according to the target path.

[0100] Regardless of which method, the user using the electronic device can obtain the target path corresponding to the starting position and the end position in a timely manner.

[0101] Implementation method 3: The electronic device stores the target path.

[0102] After the electronic device stores the target path, if the drone needs to move from the starting position to the end position again, then the electronic device only needs to obtain the stored target path corresponding to the starting position and the end position, so as to achieve the purpose of saving the acquisition time of the target path.

[0103] Exemplarily, as Figure 2b shown, is a schematic diagram of the global environment information provided by the present invention; as Figure 2c shown, is a schematic diagram of the target path provided by the present invention; as Figure 2d shown, is a schematic diagram of the target path provided by the present invention.

[0104] In Figure 2b the global environment information includes the positions of multiple obstacles, which are represented by cylinders.

[0105] Figure 2c Both Figure 2d the target paths are collision-free paths for the drone to fly from the starting position to the end position under the global environment information shown in Figure 2b . In Figure 2c the target path is obtained by the electronic device based on the path planning method provided by the present invention; in Figure 2d the target path is obtained by the electronic device based on the traditional A* algorithm, and this target path has obvious turning phenomena.

[0106] As shown in Table 1, it is what the present invention provides Figure 2cand Figure 2d The parameter comparison table corresponding respectively;

[0107] Table 1:

[0108]

[0109] It can be seen from Table 1 that the parameters corresponding to the target path provided by the present invention are superior to those of the target path of the traditional A* algorithm.

[0110] Exemplarily, as Figure 2e shown, it is a schematic diagram of the global environment information provided by the present invention; as Figure 2f shown, it is a schematic diagram of the target path provided by the present invention; as Figure 2g shown, it is a schematic diagram of the target path provided by the present invention.

[0111] In Figure 2e , the global environment information includes multiple obstacle positions, represented by black solid rectangles, and these obstacle positions are relatively disorderly.

[0112] Figure 2f and Figure 2g 's target paths are both collision-free paths for the drone to fly from the starting position to the ending position under the global environment information shown in Figure 2e . In Figure 2f , the target path is obtained by the electronic device based on the path planning method provided by the present invention; in Figure 2g , the target path is obtained by the electronic device based on the traditional A* algorithm, and this target path has obvious turning phenomena.

[0113] As shown in Table 2, it is the parameter comparison table corresponding respectively between what the present invention provides Figure 2f and Figure 2g ;

[0114] Table 2:

[0115]

[0116] It can be seen from Table 2 that the parameters corresponding to the target path provided by the present invention are superior to those of the target path of the traditional A* algorithm.

[0117] In an embodiment of the present invention, by obtaining global environmental information corresponding to an unknown environment, and based on the global environmental information, determining a current path corresponding to a starting position and an ending position; segmenting the current path to obtain a plurality of segmented paths, and sampling the plurality of segmented paths to obtain a plurality of path points; in the case of determining that the unmanned aerial vehicle collides with a target segmented path corresponding to a target path point, updating the global environmental information by using local environmental information corresponding to the target segmented path obtained by a vision sensor to obtain new global environmental information, where the target path point is any path point among the plurality of path points; based on the new global environmental information, using the A* algorithm to determine a target path corresponding to the starting position and the ending position. This method is used to solve the defect that although an electronic device can find a flight path between a starting position and an ending position for an unmanned aerial vehicle in the prior art, due to the large planning search time of the flight path and the certain limitations of the used path planning method, the obtained flight path of the electronic device is not an optimal path between the starting position and the ending position, and realizes that the electronic device can segment the current path executed by the unmanned aerial vehicle when the unmanned aerial vehicle is in an unknown environment, and use the A* algorithm to obtain a target path between the starting position and the ending position of the unmanned aerial vehicle. The planning time of the target path is short and it is an optimal path.

[0118] The path planning device provided by the present invention will be described below. The path planning device described below can be mutually referred to the path planning method described above.

[0119] As Figure 3 shown, it is a schematic structural diagram of the path planning device provided by the present invention, which may include:

[0120] An acquisition module 301, configured to acquire global environmental information corresponding to an unknown environment;

[0121] A path determination module 302, configured to determine a current path corresponding to a starting position and an ending position according to the global environmental information;

[0122] A processing module 303, configured to segment the current path to obtain a plurality of segmented paths, and sample the plurality of segmented paths to obtain a plurality of path points; in the case of determining that the unmanned aerial vehicle collides with a target segmented path corresponding to a target path point, updating the global environmental information by using local environmental information corresponding to the target segmented path obtained by a vision sensor to obtain new global environmental information, where the target path point is any path point among the plurality of path points;

[0123] The path determination module 302 is further configured to determine a target path corresponding to the starting position and the ending position based on the new global environmental information by using the A* algorithm.

[0124] Optionally, the path determination module 302 is specifically configured to determine a starting position and an ending position from the global environment information; connect the starting position and the ending position to obtain a straight-line path.

[0125] Optionally, the processing module 303 is specifically configured to, during the process of the UAV executing the straight-line path, segment the straight-line path by using the viewing cone length corresponding to the vision sensor, to obtain a plurality of segmented paths, where the vision sensor is disposed on the UAV; perform discretized sampling on the plurality of segmented paths to obtain a plurality of path points.

[0126] Optionally, the processing module 303 is specifically configured to perform discretized sampling on the plurality of segmented paths according to a preset map resolution to obtain a plurality of path points.

[0127] Optionally, the processing module 303 is specifically configured to perform discretized sampling on the plurality of segmented paths to obtain a plurality of sampling points; in the case where it is determined that all the plurality of sampling points are within the viewing range corresponding to the vision sensor, determine the plurality of sampling points as a plurality of path points; in the case where it is determined that there are sampling points among the plurality of sampling points that are not within the viewing range, obtain the current yaw angle of the UAV, and adjust the current yaw angle until all the plurality of sampling points are within the viewing range.

[0128] Optionally, the processing module 303 is specifically configured to, in the case where there is an obstacle on the target segmented path corresponding to the target path point, if it is detected that the UAV will collide with the obstacle, determine that the UAV collides on the target segmented path.

[0129] Optionally, the acquisition module 301 is specifically configured to acquire global environment information corresponding to an unknown environment;

[0130] The path determination module 302 is specifically configured to determine a global grid map according to the global environment information, where each grid in the global grid map represents that the current position is an obstacle or a passable area for the UAV; determine a first grid corresponding to the starting position and a second grid corresponding to the ending position according to the global grid map; determine the current path corresponding to the first grid and the second grid.

[0131] Figure 4 An example of a schematic physical structure diagram of an electronic device is shown in Figure 4As shown in the figure, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440. Among them, the processor 410, the communications interface 420, and the memory 430 complete communication with each other through the communication bus 440. The processor 410 may call logic instructions in the memory 430 to execute a path planning method, which includes: obtaining global environmental information corresponding to an unknown environment, and determining a current path corresponding to a starting position and an ending position according to the global environmental information; segmenting the current path to obtain a plurality of segmented paths, and sampling the plurality of segmented paths to obtain a plurality of path points; in the case where it is determined that a collision occurs on a target segmented path corresponding to a target path point of the unmanned aerial vehicle, updating the global environmental information with local environmental information corresponding to the target segmented path obtained by using a vision sensor to obtain new global environmental information, where the target path point is any one of the plurality of path points; based on the new global environmental information, using the A* algorithm to determine a target path corresponding to the starting position and the ending position.

[0132] In addition, when the logic instructions in the foregoing memory 430 can be implemented in the form of a software functional unit and sold or used as an independent product, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0133] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the path planning method provided by each of the above methods. The method includes: obtaining global environmental information corresponding to an unknown environment, and determining a current path corresponding to a starting position and an ending position according to the global environmental information; segmenting the current path to obtain a plurality of segmented paths, and sampling the plurality of segmented paths to obtain a plurality of path points; in the case where it is determined that a collision occurs on a target segmented path corresponding to a target path point of the unmanned aerial vehicle, updating the global environmental information with local environmental information corresponding to the target segmented path obtained by using a vision sensor to obtain new global environmental information, where the target path point is any one of the plurality of path points; and based on the new global environmental information, using the A* algorithm to determine a target path corresponding to the starting position and the ending position.

[0134] In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the path planning method provided by each of the above methods. The method includes: obtaining global environmental information corresponding to an unknown environment, and determining a current path corresponding to a starting position and an ending position according to the global environmental information; segmenting the current path to obtain a plurality of segmented paths, and sampling the plurality of segmented paths to obtain a plurality of path points; in the case where it is determined that a collision occurs on a target segmented path corresponding to a target path point of the unmanned aerial vehicle, updating the global environmental information with local environmental information corresponding to the target segmented path obtained by using a vision sensor to obtain new global environmental information, where the target path point is any one of the plurality of path points; and based on the new global environmental information, using the A* algorithm to determine a target path corresponding to the starting position and the ending position.

[0135] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.

[0136] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A path planning method, characterized in that, it includes: Obtain the global environment information corresponding to the unknown environment, and determine the current path corresponding to the starting position and the ending position according to the global environment information; Segment the current path to obtain multiple segmented paths, and sample the multiple segmented paths to obtain multiple path points; When it is determined that the drone collides with the target segmented path corresponding to the target path point, update the global environment information with the local environment information corresponding to the target segmented path obtained by the vision sensor to obtain new global environment information, where the target path point is any path point among the multiple path points; Based on the new global environment information, use the A* algorithm to determine the target path corresponding to the starting position and the ending position; The segmenting the current path to obtain multiple segmented paths, and sampling the multiple segmented paths to obtain multiple path points includes: During the process of the drone executing a straight-line path, use the cone length corresponding to the vision sensor to evenly segment the straight-line path to obtain multiple segmented paths, where the vision sensor is arranged on the drone; the cone length refers to the field of view range length of the vision sensor, and the straight-line path includes the current path; Discretely sample the multiple segmented paths to obtain multiple path points.

2. The method according to claim 1, characterized in that, the determining the current path corresponding to the starting position and the ending position according to the global environment information includes: Determine the starting position and the ending position from the global environment information; Connect the starting position and the ending position to obtain a straight-line path.

3. The method according to claim 1, characterized in that, the discretely sampling the multiple segmented paths to obtain multiple path points includes: Discretely sample the multiple segmented paths according to a preset map resolution to obtain multiple path points.

4. The method according to claim 1 or 3, characterized in that, the discretely sampling the multiple segmented paths to obtain multiple path points includes: Discretely sample the multiple segmented paths to obtain multiple sampling points; When it is determined that all the multiple sampling points are within the field of view range corresponding to the vision sensor, determine the multiple sampling points as multiple path points; When it is determined that there are sampling points among the multiple sampling points that are not within the field of view range, obtain the current yaw angle of the drone and adjust the current yaw angle until all the multiple sampling points are within the field of view range.

5. The method according to any one of claims 1-3, characterized in that, the determining that the drone collides with the target segmented path corresponding to the target path point includes: When it is determined that there is an obstacle on the target segmented path corresponding to the target path point, if it is detected that the drone will collide with the obstacle, determine that the drone collides with the target segmented path.

6. The method according to any one of claims 1-3, characterized in that, Obtaining global environment information corresponding to an unknown environment, and determining a current path corresponding to a starting position and an ending position according to the global environment information, includes: Obtaining global environment information corresponding to an unknown environment; Determining a global grid map according to the global environment information, where each grid in the global grid map represents that the current position is an obstacle or a passable area for the drone; Determining a first grid corresponding to the starting position and a second grid corresponding to the ending position according to the global grid map; Determining a current path corresponding to the first grid and the second grid.

7. A path planning device Characterized in that It includes: An acquisition module, configured to acquire global environment information corresponding to an unknown environment; A path determination module, configured to determine a current path corresponding to a starting position and an ending position according to the global environment information; A processing module, configured to segment the current path to obtain a plurality of segmented paths, and sample the plurality of segmented paths to obtain a plurality of path points; In the case where it is determined that the drone collides with a target segmented path corresponding to a target path point, updating the global environment information with local environment information corresponding to the target segmented path acquired by a vision sensor to obtain new global environment information, where the target path point is any path point among the plurality of path points; The path determination module is further configured to, based on the new global environment information, use the A* algorithm to determine a target path corresponding to the starting position and the ending position; The processing module is specifically configured to, during the process of the drone executing a straight-line path, use the viewing cone length corresponding to the vision sensor to uniformly segment the straight-line path to obtain a plurality of segmented paths, where the vision sensor is disposed on the drone; the viewing cone length refers to the length of the viewing range of the vision sensor, and the straight-line path includes the current path; discretely sampling the plurality of segmented paths to obtain a plurality of path points.

8. An electronic device Including: A memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that when the processor executes the program, it implements the path planning method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, on which a computer program is stored Characterized in that When the computer program is executed by a processor, it implements the path planning method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Mobile robot path planning method based on improved A star strategy

    CN108549388A

  • Global path planning method and device, terminal and readable storage medium

    CN113917912A