WO2023093378A1 - 路径规划方法及装置、设备、存储介质 - Google Patents

路径规划方法及装置、设备、存储介质 Download PDF

Info

Publication number
WO2023093378A1
WO2023093378A1 PCT/CN2022/125959 CN2022125959W WO2023093378A1 WO 2023093378 A1 WO2023093378 A1 WO 2023093378A1 CN 2022125959 W CN2022125959 W CN 2022125959W WO 2023093378 A1 WO2023093378 A1 WO 2023093378A1
Authority
WO
WIPO (PCT)
Prior art keywords
point
sampling point
sampling
path
module
Prior art date
Application number
PCT/CN2022/125959
Other languages
English (en)
French (fr)
Inventor
何孝游
邱裕鹤
李航宇
任一珂
Original Assignee
中移(成都)信息通信科技有限公司
中国移动通信集团有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中移(成都)信息通信科技有限公司, 中国移动通信集团有限公司 filed Critical 中移(成都)信息通信科技有限公司
Publication of WO2023093378A1 publication Critical patent/WO2023093378A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/20Instruments for performing navigational calculations
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/10Simultaneous control of position or course in three dimensions
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/10Simultaneous control of position or course in three dimensions
    • G05D1/101Simultaneous control of position or course in three dimensions specially adapted for aircraft

Definitions

  • This application relates to information processing technology, and involves but is not limited to path planning methods, devices, equipment, and storage media.
  • UAVs In recent years, there have been more and more researches and applications of UAVs in civilian use, such as target tracking, image stitching, power line inspection, island monitoring, coastline inspection, post-disaster monitoring, and river flood season monitoring.
  • the UAV In order to complete the above tasks, the UAV must have the ability to fly autonomously, that is to say, in the face of any complex environment, the UAV can complete the task independently without external assistance.
  • the navigation function is a key link in the autonomous flight of UAVs. It needs to avoid obstacles perfectly in complex flight environments, plan a flight path with low cost and meet the constraints of UAVs, and Complete the preset tasks of the drone.
  • Path planning algorithms in related technologies include artificial potential field method, fuzzy rule method, genetic algorithm, neural network, simulated annealing algorithm, and ant colony optimization algorithm.
  • these methods all need to model obstacles in a certain space, which is not suitable for solving the planning of UAVs in complex environments.
  • RRT rapid-exploring random tree
  • the path planning method, device, device, and storage medium provided by the present application can more quickly determine the path leading to the end point of the path to be planned, thereby completing path planning more quickly.
  • a path planning method including: taking the starting point of the path to be planned as the first sampling point, and according to the volume of the open area where the first sampling point is located in the map, determining a random probability corresponding to the first sampling point; generating a second sampling point based on the random probability corresponding to the first sampling point; selecting a path corresponding to the path to be planned from the first sampling point and the second sampling point A sampling point whose distance between the end points satisfies the first condition is used as a reference point; a third sampling point is generated according to the volume of the open area where the reference point is located, and a third sampling point is selected from existing sampling points that are close to the end point The sampling point whose distance between satisfies the first condition is used as a new reference point until the distance between the new reference point and the end point finally obtained satisfies the second condition. For the existing sampling points and the end point The composed path is clipped to obtain the target path.
  • a path planning device including: a generation module configured to use the starting point of the path to be planned as the first sampling point, and according to the position of the first sampling point in the map The volume of the open area, determine the random probability corresponding to the first sampling point; generate the second sampling point based on the random probability corresponding to the first sampling point; wherein, the random probability is used to characterize the extension direction of the first sampling point toward The possibility of the end point of the path to be planned; a selection module configured to select from the first sampling point and the second sampling point that the distance to the end point of the path to be planned satisfies the first condition The sampling point is used as a reference point; the generation module is also configured to generate a third sampling point according to the volume of the open area where the reference point is located, and the selection module is also configured to select from existing sampling points Select a sampling point whose distance from the end point satisfies the first condition as a new reference point until the distance between the new reference point and the
  • an electronic device including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the embodiment of the present application when executing the program the method described.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method provided in the embodiments of the present application is implemented.
  • the random probability P corresponding to the previous sampling point is determined based on the volume of the open area where the previous sampling point is located; based on the random probability P, to generate the next sampling point.
  • the larger the open area where the sampling point is located the smaller the probability of the current sampling point colliding with an obstacle in the direction extending toward the end point.
  • the corresponding random probability P is also larger, so that the next Sampling points can be generated with a higher probability in the direction where the last sampling point extends toward the end point, so that the path to the end point of the path to be planned can be determined more quickly; on the other hand, the more open the area where the sampling point is located is small, indicating that the probability of the current sampling point colliding with an obstacle in the direction of the terminal is greater, and correspondingly, its corresponding random probability P is also smaller, so that the generated next sampling point can follow the random Direction extension avoids the problem of not being able to determine the path to the end point due to too few new path branches.
  • FIG. 1 is a schematic diagram of an implementation flow of a path planning method provided in an embodiment of the present application
  • FIG. 2 is a schematic diagram of the division of an octree provided in an embodiment of the present application
  • FIG. 3 is a schematic diagram of an implementation flow of a path planning method provided in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an implementation flow of a path planning method provided in an embodiment of the present application.
  • Fig. 5 is the schematic diagram of the UAV navigation method based on the RRT algorithm provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of the implementation flow of the improved RRT algorithm provided by the embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a path planning device provided in an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • an embodiment of the present application provides a path planning method, which is applied to an electronic device.
  • the electronic device may be various types of devices with information processing capabilities.
  • the electronic device may include a mobile device, Such as drones, robots, or vehicles; it can also include devices capable of path planning for mobile devices, such as personal computers, laptops, mobile phones, or vehicle-mounted computers.
  • the functions realized by the method can be realized by calling the program code by the processor in the electronic device.
  • the program code can be stored in the computer storage medium. It can be seen that the electronic device at least includes a processor and a storage medium.
  • Figure 1 is a schematic diagram of the implementation process of the path planning method provided by the embodiment of the present application. As shown in Figure 1, the method may include the following steps 101 to 104:
  • Step 101 taking the starting point of the path to be planned as the first sampling point, and determining the random probability corresponding to the first sampling point according to the volume of the open area where the first sampling point is located in the map; wherein, the random probability is used to represent The probability that the extension direction of the first sampling point is towards the end point of the path to be planned.
  • the path planning method provided by the embodiment of the present application can be applied to various scenarios, for example, it can be applied to scenarios such as trajectory planning of drones, path planning of indoor robots, or route planning of unmanned vehicles.
  • the sensor device on the electronic device may be used to obtain point cloud data of the driving area corresponding to the route to be planned, and construct a three-dimensional offline map according to the point cloud data.
  • the type of the sensor device is not limited, for example, a camera, a high-resolution laser device, or an infrared camera and other devices that can sense the surrounding environment.
  • the electronic device can use the sensor device to perceive and acquire environmental information within the range of the map, such as which direction and what kind of obstacle exists and so on.
  • the three-dimensional offline map after the three-dimensional offline map is constructed, it may be converted into an octree format for storage.
  • the octree map is a form of representation of the three-dimensional grid map.
  • the octree when the child nodes of a certain node are occupied or free, there is no need to further decompose it, that is, no further Decomposed into finer sub-nodes, only the node (parent node) needs to be stored, thereby saving storage space.
  • the resolution and algorithm efficiency can be solved by improving the efficiency of the three-dimensional grid map contradiction.
  • the 3D offline map can be regarded as the largest cube, corresponding to the root node of the 0th layer of the octree in Figure 2(a); then the cube is divided into eight first-level cubes, each one
  • the first-level cube corresponds to the first-level child nodes of the root node, that is, the first-level child nodes of the first layer in Figure 2(a), where each node represents the space in the cube, which is called a voxel (Voxel); further Specifically, divide each first-level cube into eight second-level cubes, and each second-level cube corresponds to the child node of the first-level child node corresponding to the first-level cube, that is, the second level of the second layer in Figure 2 (a).
  • each node represents the space in the cube, and the space is divided layer by layer by the above method, and each node of the corresponding octree stores the environment information of the corresponding space division area.
  • Each cube usually has a number to describe whether it is occupied or free. If it is occupied, it is expressed as an obstacle, and electronic equipment cannot pass through it. When it is free, it is expressed as a free area, and electronic equipment can pass through.
  • a three-dimensional grid map can be established according to the environmental information stored in each cube of the octree structure.
  • the RRT algorithm is used to perform path planning in the three-dimensional grid map.
  • the RRT algorithm can quickly and effectively search high-dimensional space, and guide the search to blank areas through random sampling points in the state space, so as to determine at least one path from the starting point to the ending point.
  • the random probability P introduced is a fixed value.
  • the random probability P is set to 0.1, that is, when the next sampling point is generated, there is a 10% possibility that the next sampling point will be generated in the extension direction of the previous sampling point towards the end point; There is a 90% possibility that a direction is randomly selected in the 3D grid map to generate the next sampling point based on the previous sampling point.
  • this path planning method cannot quickly determine the path leading to the end point of the path to be planned. This is because: if there is no obstacle between the sampling point and the end point, when performing path planning, it is still possible to Randomly select a direction to generate the next sampling point. Obviously, this will cause a large waste of resources and slow down the determination speed.
  • the size of the random probability P is related to the volume of the open area where the last sampling point is located in the map. That is, the larger the volume of the open area where the first sampling point is located in the map, the smaller the probability of the first sampling point colliding with an obstacle in the direction extending toward the end point.
  • the corresponding random probability P is also smaller. Larger; the smaller the open area where the first sampling point is located, the greater the probability that the current sampling point will collide with an obstacle in the direction extending toward the end point, and correspondingly, the corresponding random probability P is also smaller.
  • the value of the random probability P is dynamically adjusted, not fixed.
  • the volume of the open area where the sampling point is located in the map may be determined according to the number of occupied cubes in the octree structure. For example, as shown in Figure 2(a), assuming that the octree structure is divided into two layers to meet the resolution requirements, as shown in Figure 2(b), the first sampling point is located in the first layer of the octree structure After the center of the divided cube 201 is further divided, a large cube 202 composed of 8 small cubes in the second layer is obtained.
  • the volume of the small white cube is the open area where the first sampling point is located in the map volume of.
  • Step 102 Generate a second sampling point based on the random probability corresponding to the first sampling point.
  • the starting point and the end point of the path to be planned are known, and the sampling point set V is established accordingly, and the starting point is stored in the sampling point set V as the first sampling point (that is, the initial moment The sampling point set V contains only the starting point), and then a second sampling point is generated based on the first sampling point, and then the second sampling point is stored in the sampling point set V.
  • the random probability P corresponding to the previous sampling point is determined based on the volume of the open area where the previous sampling point is located; based on the random probability P, to generate the next sampling point.
  • the larger the open area where the sampling point is located the smaller the probability of the current sampling point colliding with an obstacle in the direction extending toward the end point.
  • the corresponding random probability P is also larger, so that the next Sampling points can be generated with a higher probability in the direction where the last sampling point extends toward the end point, so that the path to the end point of the path to be planned can be determined more quickly; on the other hand, the more open the area where the sampling point is located is small, indicating that the probability of the current sampling point colliding with an obstacle in the direction of the terminal is greater, and correspondingly, its corresponding random probability P is also smaller, so that the generated next sampling point can follow the random Direction extension avoids the problem of not being able to determine the path to the end point due to too few new path branches.
  • Step 103 selecting a sampling point whose distance from the end point of the path to be planned satisfies the first condition from the first sampling point and the second sampling point as a reference point.
  • the distance between the end point of the path to be planned and the end point of the path to be planned is selected from all the sampling points contained in the sampling point set V to meet the first condition
  • the sampling point is used as a reference point, and the next sampling point is generated based on the reference point.
  • the starting point when only the starting point (first sampling point) is included in the sampling point set V, the starting point is the sampling point whose distance from the end point satisfies the first condition. Therefore, when generating the second sampling point , is generated based on the starting point (the first sampling point); when the sampling point set V contains the first sampling point and the second sampling point, when generating the next sampling point (that is, the third sampling point), it is necessary to first From the first sampling point and the second sampling point, select the sampling point satisfying the first condition with the distance between the end point of the path to be planned as a reference point (this reference point may be the first sampling point or the second sampling point ), and then generate the third sampling point based on the reference point.
  • this reference point may be the first sampling point or the second sampling point
  • satisfying the first condition includes a minimum distance to an end point of the path to be planned.
  • Step 104 according to the volume of the open area where the reference point is located, a third sampling point is generated, and a sampling point whose distance from the end point satisfies the first condition is selected from the existing sampling points as a new reference point point, until the distance between the finally obtained new reference point and the end point satisfies the second condition, the path composed of the existing sampling points and the end point is clipped to obtain the target path.
  • the third sampling point is generated, it is stored in the sampling point set V, and then the step of selecting a new reference point from the sampling point set V is repeated until the selected new reference point The distance between the point and the end point satisfies the second condition.
  • the second condition is satisfied, that is, the distance between the latest reference point selected from the sampling point set V and the end point is less than a specific value, and the specific value can be determined according to actual application requirements. In this way, when searching for the end point of the path to be planned, it is not strictly required to find the end point, but to search for sampling points within a certain distance near the end point. In this way, the path planning can be completed more quickly. After obtaining the sampling point satisfying the second condition, it is stored together with the end point in the sampling point set V for subsequent use in path cutting.
  • the path is clipped by using a heuristic search algorithm.
  • Fig. 3 is a schematic diagram of the implementation flow of the path planning method provided by the embodiment of the present application. As shown in Fig. 3, the method may include the following steps 301 to 307:
  • Step 301 taking the starting point of the path to be planned as the first sampling point, and determining the random probability corresponding to the first sampling point according to the volume of the open area where the first sampling point is located.
  • step 301 may be implemented by performing the following steps 3011 to 3013:
  • Step 3011 determine the distance between the center position of the child node to which the first sampling point belongs and the position of the first sampling point.
  • the central position of the child node to which the first sampling point belongs is the central position of the leaf nodes divided in the octree structure.
  • the method of determining the distance dist between the center position of the child node to which the first sampling point belongs and the position of the first sampling point is no limitation. For example, the distance between the center position of the child node to which the first sampling point belongs and the The distance from where a sampling point is located.
  • Step 3012 according to the volume of the open area where the first sampling point is located and the distance, determine the adjustment factor corresponding to the first sampling point.
  • the adjustment factor ⁇ may be the ratio of the volume of the open area where the first sampling point is located to dist; when dist is less than the fourth threshold ⁇ , the adjustment factor ⁇ may be the first The ratio of the volume of the open area where a sampling point is located to the fourth threshold ⁇ .
  • the fourth threshold may be preset according to actual needs.
  • Step 3013 according to the adjustment factor, determine the random probability corresponding to the first sampling point.
  • the random probability P is proportional to the adjustment factor ⁇ , and the value of the random probability P is within the range of [0, 1].
  • Step 302 In a case where the random probability is greater than a first threshold, a first candidate point is generated in an extension direction of the first sampling point toward an end point of the path to be planned.
  • the random probability is less than the first threshold, in the three-dimensional grid map, based on the first sampling point, a direction is randomly selected to generate the first candidate point.
  • the first threshold may be preset according to actual requirements, for example, the first threshold is set to 0.7.
  • Step 303 determine whether the margin of the first side formed by the first sampling point and the first candidate point is less than or equal to the second threshold; if yes, execute step 304; otherwise, execute step 305.
  • the margin between the previous sampling point and the next sampling point can be limited, that is, the previous sampling point is limited
  • the margin between the next sampling point and the next sampling point is less than or equal to the second threshold.
  • the second threshold may be preset according to actual requirements, for example, the second threshold is set to 0.7.
  • Step 304 using the first candidate point as the second sampling point
  • Step 305 selecting a second candidate point on the first side whose margin distance from the second side formed by the first sampling point is equal to a second threshold, and using the second candidate point as a second sampling point.
  • the candidate points cannot be directly stored in the sampling set V as the second sampling points. This is because, when generating candidate points, it cannot be guaranteed that there are no obstacles between the first sampling point and the candidate points. If there is a high probability that there is no obstacle between the first sampling point and the candidate points, it means that the electronic device If the path can be passed, the candidate point can be stored as the second sampling point; if there is a high probability that there is an obstacle between the first sampling point and the candidate point, it means that the electronic device cannot pass the path and should be discarded. The candidate point is discarded, and a new candidate point is regenerated until there is a high probability that there is no obstacle between the generated candidate point and the first sampling point, and the candidate point is used as the second sampling point.
  • Step 3051 perform interpolation processing on the edge formed by the first sampling point and the candidate point to obtain at least one interpolation point.
  • the edge formed by the first sampling point and the candidate point may be interpolated according to the minimum resolution to obtain at least one interpolation point Pi.
  • Step 3052 acquiring the first occupancy probability of the interpolation point measured by the sensor
  • Step 3053 according to the height value of the location of the interpolation point, determine the second occupancy probability of the interpolation point.
  • the greater the height value of the position where the interpolation point is located that is, the higher the interpolation point, the less likely it is to collide with an obstacle.
  • Step 3054 performing fusion processing on the first occupancy probability and the second occupancy probability to obtain the target occupancy probability; wherein, the target occupancy probability is used to represent the possibility of an obstacle at the location of the interpolation point.
  • the second occupancy probability obtained based on the height information of the interpolation point is also introduced, and the The fusion of height information and sensor measurement data can effectively reduce the risk of collision caused by sensor measurement errors.
  • Step 3055 when the target occupancy probability of each different interpolation point satisfies the third condition, use the candidate point as the second sampling point.
  • satisfying the third condition means that the target occupancy probability is less than a characteristic value, and the characteristic value can be preset according to actual needs; for example, in some embodiments, satisfying the third condition means that the target occupancy probability is less than 0.5.
  • satisfying the third condition means that the target occupancy probability is less than 0.5.
  • Step 306 selecting a sampling point whose distance from the end point of the path to be planned meets the first condition from the first sampling point and the second sampling point as a reference point;
  • Step 307 Generate a third sampling point according to the volume of the open area where the reference point is located, and select a sampling point whose distance from the end point satisfies the first condition from existing sampling points as a new reference point point, until the distance between the finally obtained new reference point and the end point satisfies the second condition, the path composed of the existing sampling points and the end point is clipped to obtain the target path.
  • FIG. 4 is a schematic diagram of the implementation flow of the path planning method provided in the embodiment of the present application. As shown in FIG. 4, the method may include the following steps 401 to 406:
  • Step 401 taking the starting point of the path to be planned as the first sampling point, and generating a second sampling point according to the volume of the open area where the first sampling point is located;
  • Step 402 Determine the cost function value of the second sampling point according to the positions of the first sampling point and the second sampling point.
  • the cost function value is used to characterize the probability that the second sampling point can be used as a sampling point in the target path.
  • the probability of the sampling point being a sampling point in the target path can be determined by calculating the cost function value of the sampling point. The smaller the cost function value of the sampling point is, the sampling point can be used as the sampling point in the target path. The probability of the sampling point is greater.
  • step 402 may be implemented by performing the following steps 4021 to 4023:
  • Step 4021 determine the height difference between the second sampling point and the first sampling point
  • Step 4022 if the height difference is less than or equal to the third threshold, determine the weight corresponding to the height difference as the first weight; if the height difference is greater than the third threshold, determine the weight corresponding to the height difference as the second weight; where , the second weight is smaller than the first weight.
  • the third threshold may be preset according to actual needs, for example, the third threshold is 0. That is, when the height of the second sampling point is less than or equal to the height of the first sampling point (appearing as path translation or decline on the geographic location), it is determined that the corresponding weight is the first weight; when the height of the second sampling point is greater than the first weight When the height of a sampling point (appears as a path climbs geographically), the corresponding weight is determined to be the second weight.
  • the second weight is smaller than the first weight, for example, the first weight is set to a value greater than 1, such as 2; the second weight is set to a value less than 1, such as 0.5.
  • Step 4023 Determine the cost function value of the second sampling point according to the first weight and/or the second weight.
  • Step 403 selecting a sampling point whose distance from the end point of the path to be planned meets the first condition from the first sampling point and the second sampling point as a reference point;
  • Step 404 Generate a third sampling point according to the volume of the open area where the reference point is located; and determine a cost function value of the third sampling point according to the reference point and the location of the third sampling point.
  • the determination method is the same as the method of determining the cost function value of the second sampling point in step 402 , which will not be repeated here.
  • Step 405 selecting a sampling point whose distance from the end point satisfies the first condition as a new reference point from the existing sampling points until the distance between the new reference point and the end point meets the second condition;
  • Step 406 According to the cost function value of each sampling point, at least one path composed of existing sampling points and destinations is traversed, and a target path is selected therefrom.
  • the target path is composed of at least one sampling point and an end point whose total cost function value satisfies the fourth condition, and the at least one sampling point includes the first sampling point.
  • satisfying the fourth condition includes minimizing the total value of the cost function values.
  • At least one path that can connect the start point and the end point will be obtained in the end.
  • a cost function value can be selected based on the cost function value of each sampling point.
  • the path that is likely to be small ie, there are fewer climbing sections in the path) is used as the target path. In this way, unnecessary climbing movements can be avoided as far as possible when the equipment is flying, so as to save power consumption and fuel consumption.
  • the random probability P introduced is a fixed value, which cannot save computer resources to the greatest extent; and the constructed cost function is the Euclidean distance, without considering the height of the drone.
  • the difference between climbing and descending is inconsistent with the actual UAV power consumption/fuel consumption; in addition, it has not explored the solution to the occupation probability in three-dimensional space.
  • a set of UAV navigation method based on the improved RRT algorithm includes: first, obtain the three-dimensional map information of the area by oblique photography and save it in octree format; Then use the improved RRT algorithm to obtain the optimal path from the starting point to the end point of the UAV, and finally optimize the path.
  • the embodiment of the present application proposes a UAV navigation method based on the improved RRT algorithm, as shown in Figure 5, the method includes the following three implementation modules:
  • UAV is used to take oblique photography of the area, and the point cloud is extracted from the photographic model, and then the point cloud database (Point Cloud Library, PCL) is used to generate a 3D model map of the working environment, and then converted using the existing Octomap library in octree format.
  • PCL Point Cloud Library
  • the RRT algorithm is a sampling planning algorithm widely used in path planning. It establishes an undirected graph on a known map by sampling, and then searches for a relatively optimal path through a search method. It is a probabilistic complete algorithm: that is, as long as the path exists and the planning time is long enough, it can be guaranteed to find a path solution.
  • the sensor detects the probability information directly, but when the sensor data is wrong, it will cause wrong risk value calculation.
  • height prior information is innovatively introduced, and it is believed that the higher the height, the lower the probability of the node being occupied, that is, the lower the risk of colliding with obstacles.
  • the occupancy probability after fusion of prior information and sensor measurement data can be obtained by using the Bayesian probability information formula, so as to reduce the risk of sensor errors. Its risk (an example of target occupation probability) calculation formula is shown in the following formula 1:
  • z n is the height of the point to be detected (an example of a sampling point)
  • h 0 and h 1 are parameters.
  • value is the weight factor parameter corresponding to the risk value
  • p(n) is the occupancy probability of the point to be detected in the octree (an example of the first occupancy probability), calculated by the octomap serve library
  • ph (z n ) is highly prior information (an example of the second occupancy probability).
  • (x s , y s , z s ) are the coordinates of the nearest point to the sampling point in the RRT tree
  • (x n , y n , z n ) are the coordinates of the sampling point.
  • Set v 1 to be greater than or equal to 1 (an example of the first weight), and v 2 to be less than 1 (an example of the second weight), and the specific value is adjusted by the energy consumption of the corresponding drone.
  • the RRT algorithm adopts a random sampling method: each time the growth direction is selected, there is a certain probability that it will extend towards the end point, and there is also a certain probability that it will randomly select a direction in the map to extend a certain distance , the maximum distance of which is a fixed value.
  • setting the random probability of pointing to the target is small, which will cause waste of resources in many scenarios. For example, an extreme scenario: there are no obstacles between the starting point and the end point of the UAV, and they are on the same plane. If the probability of extending to the end point is 1, the optimal path can be obtained quickly. Based on this, this application introduces adaptive adjustment of the extension probability towards the end point in the RRT algorithm, which can dynamically adjust the extension probability according to the size of the current free area, thereby improving the calculation speed of the RRT algorithm.
  • size is the size of the leaf node of the octree to which the sampling point closest to the target belongs, that is, expresses the size of the current free volume (an example of the volume of an open area), dist is the center position of the leaf node of the octree and the sampling point
  • an example of the fourth threshold
  • k its weight coefficient
  • the extension probability is a function of the dynamic adjustment factor ⁇ , which needs to be proportional to ⁇ , and the maximum value is not More than 1, take the sigma function here.
  • Formula 4 shows that when the free area where the sampling point belongs is relatively large, that is, when the sampling point closest to the target is located near the center of the large free area, At this time, ⁇ is larger, and the RRT algorithm points to the target with a higher probability.
  • FIG. 6 it is a schematic diagram of the implementation flow of the improved RRT algorithm adopted in the embodiment of the present application, including the following steps 601 to 613:
  • Step 601 obtain the map M, the starting point Ps, and the ending point Pe;
  • Step 603 seek the point Vn closest to the end point Pe (an example of the first condition) in the sampling point set V, construct a dynamic adjustment factor ⁇ , and obtain the extension probability p (an example of random probability);
  • Step 604 generate a random sampling point Pc (an example of a candidate point) in the map M according to the extension probability p;
  • Step 605 find the point Vm closest to the end point Pe in the sampling point set V, connect point Vm and point Pc, record it as edge E0, and obtain its length d;
  • Step 606 determine whether the length d of side E0 is greater than the set maximum side length dmax; if yes, execute step 607; otherwise, execute step 608;
  • Step 607 obtain a point whose side length is dmax in E0, replace the previous sampling point Pc, and obtain a new side E0 (for example: Vm points to a new Pc);
  • Step 608 calculating the cost function C of edge E0;
  • Step 609 perform interpolation in the edge E0 according to the minimum resolution, the interpolation point is recorded as Pi, and obtain the improved occupancy probability corresponding to each interpolation point Pi (an example of the target occupancy probability);
  • Step 610 determine whether the occupancy probabilities of all interpolation points are less than the threshold (an example of satisfying the third condition), if yes, execute step 611, otherwise, return to execute step 604;
  • Step 611 add Pc to V, E0 to E, and update the tree graph G;
  • Step 612 determine whether the distance between the sampling point Pc and the end point Pe is less than a threshold (an example of satisfying the second condition); if yes, execute step 613; otherwise, return to execute step 603;
  • a threshold an example of satisfying the second condition
  • step 613 the RRT tree graph G is obtained.
  • the path searched according to the RRT tree diagram is often tortuous (after all, the nodes are randomly generated), so after finding a feasible path from the start point to the end point, it is necessary to consider optimizing the path and turn the curve into a straight line.
  • this process starting from the leaf nodes, it is constantly looking for whether it can be directly connected to the predecessor nodes without obstacles, and finally obtains a route that is more suitable for drones to fly.
  • the height prior information is not introduced when calculating the occupancy probability.
  • This application adopts the introduction of height prior information. It is believed that after the height exceeds a certain threshold, as the height increases, the UAV encounters obstacles. The scheme with the smaller probability can effectively avoid the impact of sensor errors.
  • the RRT algorithm does not introduce an adjustment factor ⁇ to adaptively adjust the random sampling probability of the RRT algorithm to speed up the search path.
  • a scheme is adopted to adaptively calculate the adjustment factor ⁇ by using the idle size of the closest sampling point of the target to dynamically adjust the sampling probability so that the RRT algorithm can search for the target more quickly.
  • the probability formula can obtain the occupancy probability after fusion of highly prior information and sensor measurement data, and increase the risk of avoiding sensor data errors.
  • the constructed cost function considers the difference between the altitude during the climbing and descending process of the UAV, which is consistent with the actual power consumption/fuel consumption of the UAV, so that the UAV should try not to do unnecessary climbing movements, Thereby, power consumption/fuel consumption can be saved.
  • this embodiment of the present application provides a path planning device, which includes each module included and each unit included in each module, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit Implementation; in the process of implementation, the processor may be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA).
  • the processor may be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA).
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA field programmable gate array
  • FIG. 7 is a schematic structural diagram of a path planning device according to an embodiment of the present application.
  • the device 700 includes a generation module 701, a selection module 702, and a clipping module 703, wherein: the generation module 701 is configured to The starting point is used as the first sampling point, and according to the volume of the open area where the first sampling point is located in the map, the random probability corresponding to the first sampling point is determined; based on the random probability corresponding to the first sampling point, the second sampling point is generated.
  • a sampling point; a selection module 702 configured to select a sampling point whose distance from the end point of the path to be planned satisfies a first condition from the first sampling point and the second sampling point as a reference point;
  • the generation module 701 is further configured to generate a third sampling point according to the volume of the open area where the reference point is located, and the selection module 702 is also configured to select from existing sampling points that are consistent with the The distance between the end points satisfies the sampling point of the first condition as a new reference point until the distance between the new reference point and the end point finally obtained satisfies the second condition;
  • the clipping module 703 is configured to The path composed of the sampling points and the end point is clipped to obtain the target path.
  • the apparatus 700 further includes a determination module configured to determine the distance between the center position of the child node to which the first sampling point belongs and the position of the first sampling point; according to The volume of the open area where the first sampling point is located and the distance determine an adjustment factor corresponding to the first sampling point; according to the adjustment factor, determine a random probability corresponding to the first sampling point.
  • a determination module configured to determine the distance between the center position of the child node to which the first sampling point belongs and the position of the first sampling point; according to The volume of the open area where the first sampling point is located and the distance determine an adjustment factor corresponding to the first sampling point; according to the adjustment factor, determine a random probability corresponding to the first sampling point.
  • the determination module is configured to determine the random probability corresponding to the first sampling point according to the volume of the open area where the first sampling point is located; wherein the random probability is used to characterize The probability that the extending direction of the first sampling point is toward the end point of the path to be planned; the generating module 701 is configured to generate a second sampling point based on the random probability corresponding to the first sampling point.
  • the generation module 701 is configured to generate a first candidate point in an extension direction of the first sampling point toward the end point of the path to be planned when the random probability is greater than a first threshold;
  • the determination module is further configured to determine whether a margin of a first side formed by the first sampling point and the first candidate point is less than or equal to a second threshold; the determination module is further configured to, at the first When the margin of one side is less than or equal to the second threshold, the first candidate point is used as the second sampling point;
  • the selection module 702 is further configured to be greater than the margin of the first side In the case of the second threshold value, select a second candidate point on the first side whose margin of the second side composed of the first sampling point is equal to the second threshold value, and place the second candidate point as the second sampling point.
  • the apparatus 700 further includes an interpolation module configured to interpolate the edge formed by the first sampling point and the candidate point to obtain at least one interpolation point; the determining The module is also configured to determine the target occupancy probability of the interpolation point; wherein, the target occupancy probability is configured to characterize the possibility of an obstacle at the position of the interpolation point; the target at each different interpolation point When the occupancy probability satisfies the third condition, the candidate point is used as the second sampling point.
  • an interpolation module configured to interpolate the edge formed by the first sampling point and the candidate point to obtain at least one interpolation point; the determining The module is also configured to determine the target occupancy probability of the interpolation point; wherein, the target occupancy probability is configured to characterize the possibility of an obstacle at the position of the interpolation point; the target at each different interpolation point When the occupancy probability satisfies the third condition, the candidate point is used as the second sampling point.
  • the apparatus 700 further includes a first acquisition module and a fusion module, the first acquisition module is configured to acquire the first occupancy probability of the interpolation point measured by the sensor; the determination module is configured to Determine the second occupancy probability of the interpolation point according to the height value of the position where the interpolation point is located; the fusion module is configured to perform fusion processing on the first occupancy probability and the second occupancy probability to obtain the The target occupancy probability.
  • the apparatus 700 further includes a traversal module, a determination module further configured to determine the cost function of the second sampling point according to the positions of the first sampling point and the second sampling point value; wherein, the cost function value is configured to characterize the probability that the second sampling point is a sampling point in the target path; the traversal module is configured to, according to the cost function value of each sampling point, Traverse at least one path consisting of existing sampling points and the end point, and select the target path from it; wherein, the target path consists of at least one sampling point whose total value of the cost function value satisfies the fourth condition and the The end point, the at least one sampling point includes the first sampling point.
  • the determination module is configured to determine the height difference between the second sampling point and the first sampling point; when the height difference is less than or equal to a third threshold, determine that the height difference corresponds to The weight of the height difference is the first weight; in the case that the height difference is greater than the third threshold, it is determined that the weight corresponding to the height difference is the second weight; wherein, the second weight is smaller than the first weight; according to The weight corresponding to the height difference determines the cost function value of the second sampling point.
  • the path planning module further includes a second acquisition module, a construction module, and a conversion module; before performing path planning, the second acquisition module is configured to use a sensor device to acquire the information corresponding to the path to be planned.
  • the determination module is further configured to: if the distance is greater than a fourth threshold, determine the adjustment according to the volume of the open area where the first sampling point is located and the distance Factor; if the distance is less than the fourth threshold, the adjustment factor is determined according to the volume of the open area where the first sampling point is located and the fourth threshold.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or physically exist separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It can also be implemented in the form of a combination of software and hardware.
  • the above method is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
  • the computer software products are stored in a storage medium and include several instructions to make
  • the electronic device executes all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), magnetic disk or optical disk.
  • embodiments of the present application are not limited to any specific combination of hardware and software.
  • FIG. 8 is a schematic diagram of a hardware entity of the electronic device according to the embodiment of the present application.
  • the electronic device 800 includes a memory 801 and a processor 802, and the memory 801 stores A computer program that can run on the processor 802, and the processor 802 implements the steps in the methods provided in the above-mentioned embodiments when executing the program.
  • the memory 801 is configured to store instructions and applications executable by the processor 802, and may also cache data to be processed or processed by each module in the processor 802 and the electronic device 800 (for example, image data, audio data, etc. , voice communication data and video communication data), can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
  • FLASH FLASH
  • RAM Random Access Memory
  • An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the methods provided in the foregoing embodiments are implemented.
  • the embodiment of the present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the steps in the method provided by the above method embodiment.
  • the disclosed devices and methods may be implemented in other ways.
  • the above-described embodiments are only illustrative.
  • the division of the modules is only a logical function division.
  • the mutual coupling, or direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms of.
  • modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed to multiple network units; Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can be used as a single unit, or two or more modules can be integrated into one unit; the above-mentioned integration
  • the modules can be implemented in the form of hardware, or in the form of hardware plus software functional units.
  • the above-mentioned integrated units of the present application are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the computer software products are stored in a storage medium and include several instructions to make
  • the electronic device executes all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes various media capable of storing program codes such as removable storage devices, ROMs, magnetic disks or optical disks.

Abstract

一种路径规划方法,包括:将待规划路径的起始点作为第一采样点,根据第一采样点所处位置的空旷区域的体积,确定第一采样点对应的随机概率(101);基于第一采样点对应的随机概率,生成第二采样点(102);从第一采样点和第二采样点中选出与待规划路径的终点之间的距离满足第一条件的采样点作为参考点(103);根据参考点所处位置的空旷区域的体积,生成第三采样点,从已有的采样点中选出与终点之间的距离满足第一条件的采样点作为新的参考点,直至最终得到的新的参考点与终点的距离满足第二条件为止,对由已有的采样点和终点组成的路径进行裁剪,得到目标路径(104)。还提供一种路径规划装置、电子设备、计算机可读存储介质。

Description

路径规划方法及装置、设备、存储介质
相关申请的交叉引用
本申请基于申请号为202111436431.9,申请日为2021年11月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引入的方式引入本申请。
技术领域
本申请涉及信息处理技术,涉及但不限于路径规划方法及装置、设备、存储介质。
背景技术
近年来,无人机的研究和应用在民用方面越来越多,如目标跟踪、图像拼接、电力巡线、海岛监测、海岸线巡查、灾后监测以及河流汛期监测等。然而无人机要完成上述的任务,必须具备自主飞行的能力,也就是说在面对任何复杂的环境下,无人机不需要外部协助就能够独立完成任务。而导航功能是无人机自主飞行中的关键环节,其需要实现在复杂的飞行环境中也能完美的避开障碍物,规划出一条航程代价小并且满足无人机约束条件的飞行路径,以完成无人机的预设任务。
相关技术中的路径规划算法有人工势场法、模糊规则法、遗传算法、神经网络、模拟退火算法和蚁群优化算法等。但这些方法都需要在一个确定的空间内对障碍物进行建模,不适合解决无人机在复杂环境中的规划。
基于改进型快速扩展随机树(Rapidly-exploring random tree,RRT)的路径规划算法,通过对状态空间中的采样点进行碰撞检测,避免了对空间的建模,能够有效地解决高维空间和复杂约束的路径规划问题。该方法的特点是能够快速有效地搜索高维空间,通过状态空间的随机采样点,把搜索导向空白区域,从而寻找到一条从起始点到终点的规划路径,以解决无人机在复杂环境下和动态环境中的路径规划问题。其中,如何在复杂环境下快速确定出电子设备的目标路径,是一个至关重要的问题。
发明内容
有鉴于此,本申请提供的路径规划方法及装置、设备、存储介质,能够更加快速地确定出通往待规划路径的终点的路径,从而更加快速地完成路径规划。
根据本申请实施例的一个方面,提供一种路径规划方法,包括:将待规划路径的起始点作为第一采样点,根据所述第一采样点在地图中所处位置的空旷区域的体积,确定第一采样点对应的随机概率;基于第一采样点对应的随机概率,生成第二采样点;从所述第一采样点和所述第二采样点中选出与所述待规划路径的终点之间的距离满足第一条件的采样点作为 参考点;根据所述参考点所处位置的空旷区域的体积,生成第三采样点,以及从已有的采样点中选出与所述终点之间的距离满足所述第一条件的采样点作为新的参考点,直至最终得到的新的参考点与所述终点的距离满足第二条件为止,对由已有的采样点和所述终点组成的路径进行裁剪,得到目标路径。
根据本申请实施例的一个方面,提供一种路径规划装置,包括:生成模块,配置为将待规划路径的起始点作为第一采样点,根据所述第一采样点在地图中所处位置的空旷区域的体积,确定第一采样点对应的随机概率;基于第一采样点对应的随机概率,生成第二采样点;其中,所述随机概率用于表征所述第一采样点的延伸方向朝向所述待规划路径的终点的可能性大小;选择模块,配置为从所述第一采样点和所述第二采样点中选出与所述待规划路径的终点之间的距离满足第一条件的采样点作为参考点;所述生成模块,还配置为根据所述参考点所处位置的空旷区域的体积,生成第三采样点,以及所述选择模块,还配置为从已有的采样点中选出与所述终点之间的距离满足所述第一条件的采样点作为新的参考点,直至最终得到的新的参考点与所述终点的距离满足第二条件为止;裁剪模块,配置为对由已有的采样点和所述终点组成的路径进行裁剪,得到目标路径。
根据本申请实施例的一个方面,提供一种电子设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现本申请实施例所述的方法。
根据本申请实施例的一个方面,提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现本申请实施例提供的所述的方法。
在本申请实施例中,在基于上一采样点生成下一采样点时,是基于上一采样点所处位置的空旷区域的体积,确定出上一采样点对应的随机概率P;基于随机概率P,来生成下一采样点的。一方面,采样点所处位置的空旷区域越大,说明当前采样点朝着终点延伸的方向碰撞到障碍物的概率越小,相应地,其对应的随机概率P也较大,从而使得下一采样点能够以较大概率在上一采样点朝向终点延伸的方向上生成,从而能够更快速地确定出通往待规划路径的终点的路径;另一方面,采样点所处位置的空旷区域越小,说明当前采样点朝着终点前进的方向碰撞到障碍物的概率越大,相应地,其对应的随机概率P也较小,从而使得生成的下一采样点能够以较大概率沿着随机方向延伸,避免因为新的路径分支产生过少而出现不能够确定出通往终点的路径的问题。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本申请的实施例,并与说明书一起用于说明本申请的技术方案。显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
图1为本申请实施例提供的一种路径规划方法的实现流程示意图;
图2为本申请实施例提供的一种八叉树的划分示意图;
图3为本申请实施例提供的一种路径规划方法的实现流程示意图;
图4为本申请实施例提供的一种路径规划方法的实现流程示意图;
图5为本申请实施例提供的基于RRT算法的无人机导航方法示意图;
图6为本申请实施例提供的改进型RRT算法的实现流程示意图;
图7为本申请实施例提供的路径规划装置的结构示意图;
图8为本申请实施例提供的电子设备的结构示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请的具体技术方案做进一步详细描述。以下实施例用于说明本申请,但不用来限制本申请的范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。
本申请实施例提供一种路径规划方法,该方法应用于电子设备,该电子设备在实施的过程中可以为各种类型的具有信息处理能力的设备,例如所述电子设备可以包括可移动设备,如无人机、机器人或车辆等;还可以包括能够为可移动设备进行路径规划的设备,如个人计算机、笔记本电脑、手机或车载电脑等。该方法所实现的功能可以通过电子设备中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该电子设备至少 包括处理器和存储介质。
图1为本申请实施例提供的路径规划方法的实现流程示意图,如图1所示,该方法可以包括以下步骤101至步骤104:
步骤101,将待规划路径的起始点作为第一采样点,根据第一采样点在地图中所处位置的空旷区域的体积,确定第一采样点对应的随机概率;其中,随机概率用于表征第一采样点的延伸方向朝向待规划路径的终点的可能性大小。
本申请实施例提供的路径规划方法可以应用于多种场景,例如,应用于无人机的航迹规划,室内机器人的路径规划或无人驾驶汽车的路线规划等场景。
可以理解地,在对路径进行规划之前,需要先获取电子设备待活动区域的地图。在一些实施例中,可以利用电子设备上的传感器设备获取所述待规划路径对应的行驶区域的点云数据,根据点云数据构建三维离线地图。其中,对于传感器设备的类型不做限定,例如为摄像头、高分辨率激光设备或红外摄像仪等可感知周围环境的设备。电子设备可借助传感器设备来感知获取地图范围内的环境信息,例如哪个方位存在障碍物以及存在何种障碍物等等。
在一些实施例中,在构建出三维离线地图之后,可以将其转换为八叉树结构的格式进行存储。
其中,八叉树地图是三维栅格地图的一种表现形式,在八叉树中,当某个节点的子节点均被占据或者空闲时,则不用对其进行进一步的分解,也即不用再分解为更精细的子节点,只需要存储该节点(父节点)即可,从而能够节省存储空间,在一些实施例中,可以通过提高三维栅格地图的效率来能够解决分辨率和算法效率的矛盾。
如图2所示,可以将三维离线地图看作一个最大的立方体,对应图2(a)中八叉树第0层的根节点;再将该立方体划分成八个一级立方体,每个一级立方体对应根节点的一级子节点,即图2(a)中第1层的一级子节点,其中的每个节点表示在立方体中的空间,被称为体素(Voxel);更进一步地,将每个一级立方体再划分成八个二级立方体,每个二级立方体对应该一级立方体所对应的一级子节点的子节点,即图2(a)中第2层的二级子节点……,直到得到符合分辨率大小的子节点,也就是每个最小子节点的大小为分辨率,如分辨率为0.05m,则说明每个最小子节点的大小就是边长为5cm的立方体。其中,每个节点表示立方体中的空间,通过上述方法将空间层层划分,对应的八叉树各节点存储对应的空间划分区域的环境信息。每个立方体通常会有一个数来描述它是否被占据或者空闲,如果占据则表示为障碍物,电子设备不能通过,当为空闲则表示为自由区域,电子设备可以通过。最后,可根据八叉树结构的各个立方体中所存储的环境信息建立三维栅格地图。
在本申请实施例中,在得到电子设备对应的待行驶区域的三维栅格地图后,利用RRT 算法进行三维栅格地图中的路径规划。其中,RRT算法能够快速有效地搜索高维空间,通过状态空间的随机采样点,把搜索导向空白区域,从而确定出至少一条从起始点到终点的路径。
需要说明的是,在一些实施例中,在利用RRT算法进行路径规划时,引入的随机概率P为固定值。例如,在一些场景中,将随机概率P设置为0.1,也即,在生成下一采样点时,有10%的可能性是在上一采样点朝向终点的延伸方向上生成下一采样点;有90%的可能性是基于上一采样点,在三维栅格地图中随机选择一个方向生成下一采样点。但这种路径规划方式并不能够快速确定出通往待规划路径的终点的路径,这是因为:假如采样点和终点之间并无障碍物,但在执行路径规划时,还是以较大概率随机选择一个方向生成下一采样点,显然这样会造成较大的资源浪费,导致确定速度变慢。
而在本申请实施例中,随机概率P的大小与上一采样点在地图中所处位置的空旷区域的体积有关。即,第一采样点在地图中所处位置的空旷区域的体积越大,说明第一采样点朝向终点延伸的方向碰撞到障碍物的概率越小,相应地,其对应的随机概率P也较大;第一采样点所处位置的空旷区域越小,说明当前采样点朝向终点延伸的方向碰撞到障碍物的概率越大,相应地,其对应的随机概率P也较小。随机概率P的数值是动态调整的,并非是固定不变的。
在一些实施例中,采样点在地图中所处位置的空旷区域的体积,可以根据八叉树结构中被占据的立方体个数来确定。举例来说,如图2(a)所示,假设八叉树结构划分为两层即满足分辨率要求,如图2(b)所示,第一采样点位于八叉树结构的第一层划分出的立方体201的中心,对201进一步划分后,得到第二层中由8个小立方体组成的大立方体202。立方体202中有部分空间被占据(呈现为黑色小立方体),部分空间未被占据(呈现为白色小立方体),则白色小立方体的体积和为第一采样点在地图中所处位置的空旷区域的体积。
步骤102,基于第一采样点对应的随机概率,生成第二采样点。
可以理解地,在进行路径规划时,待规划路径的起始点和终点是已知的,据此建立采样点集合V,将起始点作为第一采样点存入采样点集合V中(即初始时刻采样点集合V中仅包含起始点),然后基于第一采样点生成第二采样点,再将第二采样点存储在采样点集合V中。
在本申请实施例中,在基于上一采样点生成下一采样点时,是基于上一采样点所处位置的空旷区域的体积,确定出上一采样点对应的随机概率P;基于随机概率P,来生成下一采样点的。一方面,采样点所处位置的空旷区域越大,说明当前采样点朝着终点延伸的方向碰撞到障碍物的概率越小,相应地,其对应的随机概率P也较大,从而使得下一采样点能够以较大概率在上一采样点朝向终点延伸的方向上生成,从而能够更快速地确定出通往待规划路 径的终点的路径;另一方面,采样点所处位置的空旷区域越小,说明当前采样点朝着终点前进的方向碰撞到障碍物的概率越大,相应地,其对应的随机概率P也较小,从而使得生成的下一采样点能够以较大概率沿着随机方向延伸,避免因为新的路径分支产生过少而出现不能够确定出通往终点的路径的问题。
步骤103,从第一采样点和第二采样点中选出与待规划路径的终点之间的距离满足第一条件的采样点作为参考点。
在本申请实施例中,在基于上一采样点生成下一采样点时,是从采样点集合V中包含的所有采样点中选出与待规划路径的终点之间的距离满足第一条件的采样点作为参考点,基于该参考点来生成下一采样点的。
举例来说,当采样点集合V中仅包含起始点(第一采样点)时,该起始点即为与终点之间的距离满足第一条件的采样点,因此,在生成第二采样点时,是基于起始点(第一采样点)来生成的;当采样点集合V中包含第一采样点和第二采样点时,在生成下一采样点(即第三采样点)时,需要先从第一采样点和第二采样点中选出与待规划路径的终点之间的距离满足第一条件的采样点作为参考点(该参考点可能是第一采样点也可能是第二采样点),再基于该参考点生成第三采样点。
在一些实施例中,满足第一条件包括与待规划路径的终点之间的距离最小。
步骤104,根据参考点所处位置的空旷区域的体积,生成第三采样点,以及从已有的采样点中选出与所述终点之间的距离满足第一条件的采样点作为新的参考点,直至最终得到的新的参考点与所述终点的距离满足第二条件为止,对由已有的采样点和所述终点组成的路径进行裁剪,得到目标路径。
在本申请实施例中,在生成第三采样点后,将其存储在采样点集合V中,然后重复执行从采样点集合V中选出新的参考点的步骤,直至选出的新的参考点与终点之间的距离满足第二条件为止。
在一些实施例中,满足第二条件,即为从采样点集合V中选出的最新的参考点与终点的距离小于特定数值即可,该特定数值可以根据实际应用需求来确定。这样,在搜寻待规划路径的终点时,并不严格要求必须搜寻到终点,而是搜寻到终点附近一定距离范围内的采样点即可,如此,能够更为快速地完成路径规划。在得到满足第二条件的采样点之后,将其与终点一同存储在采样点集合V中,以供后续在路径裁剪中使用。
在本申请实施例中,对于由已有的采样点和终点组成的路径进行裁剪的方式并不做限定,例如,通过启发式搜索算法对路径进行裁剪。
本申请实施例提供一种路径规划方法,图3为本申请实施例提供的路径规划方法的实现 流程示意图,如图3所示,该方法可以包括以下步骤301至步骤307:
步骤301,将待规划路径的起始点作为第一采样点,根据第一采样点所处位置的空旷区域的体积,确定第一采样点对应的随机概率。
在一些实施例中,可以通过执行如下步骤3011至步骤3013来实现步骤301:
步骤3011,确定第一采样点所属的子节点的中心位置与第一采样点所处位置的距离。
在一些实施例中,第一采样点所属的子节点的中心位置,即为在八叉树结构中划分出的叶子节点的中心位置。对于确定第一采样点所属的子节点的中心位置与第一采样点所处位置的距离dist的方式不做限定,例如,可以根据欧式距离确定第一采样点所属的子节点的中心位置与第一采样点所处位置的距离。
步骤3012,根据第一采样点所处位置的空旷区域的体积和所述距离,确定第一采样点对应的调节因子。
在一些实施例中,在确定出第一采样点所属的子节点的中心位置与第一采样点所处位置的距离dist之后,可以通过判断距离dist与第四阈值δ之间的关系,确定出第一采样点对应的调节因子α。其中,在dist大于或等于第四阈值δ时,调节因子α可以是第一采样点所处位置的空旷区域的体积与dist的比值;在dist小于第四阈值δ时,调节因子α可以是第一采样点所处位置的空旷区域的体积与第四阈值δ的比值。
在一些实施例中,所述第四阈值可以根据实际需求预先设定。
步骤3013,根据调节因子,确定第一采样点对应的随机概率。
这里,在确定出第一采样点对应的调节因子α后,随机概率P与调节因子α成正比,随机概率P的值在[0,1]范围内。
步骤302,在随机概率大于第一阈值的情况下,在第一采样点朝向待规划路径的终点的延伸方向上生成第一候选点。
这里,在随机概率小于第一阈值的情况下,则在三维栅格地图中,基于第一采样点,随机选择一个方向生成第一候选点。
其中,第一阈值可以根据实际需求预先设定,例如,第一阈值设置为0.7。
步骤303,确定第一采样点和第一候选点组成的第一边的边距是否小于或等于第二阈值;如果是,执行步骤304;否则,执行步骤305。
为了防止随机生成的下一采样点位于之前已经探索过的位置,造成不必要的路径延伸,可以对上一采样点和下一采样点之间的边距进行限制,即,限制上一采样点和下一采样点之间的边距小于或等于第二阈值。
其中,第二阈值可以根据实际需求预先设定,例如,第二阈值设置为0.7。
步骤304,将第一候选点作为第二采样点;
步骤305,在第一边上选取和第一采样点组成的第二边的边距等于第二阈值的第二候选点,将第二候选点作为第二采样点。
需要说明的是,在确定出候选点之后,并不能直接将候选点作为第二采样点存储在采样集合V中。这是因为,在生成候选点时,并不能够保证第一采样点和候选点之间不存在障碍物,如果第一采样点和候选点之间有较大概率不存在障碍物,说明电子设备能够通过该段路径,则可以将该候选点作为第二采样点进行存储;如果第一采样点和候选点之间有较大概率存在障碍物,则说明电子设备不能通过该段路径,应当摒弃掉该候选点,重新生成新的候选点,直至生成的候选点与第一采样点之间有较大概率不存在障碍物为止,将该候选点作为第二采样点。
因此,在一些实施例中,可以通过执行如下步骤3051至步骤3055来确定候选点是否为第二采样点:
步骤3051,对第一采样点和候选点组成的边进行插值处理,得到至少一个插值点。
在一些实施例中,可以按照最小分辨率对第一采样点和候选点组成的边进行插值处理,得到至少一个插值点Pi。
步骤3052,获取传感器测量的插值点的第一占据概率;
步骤3053,根据插值点所处位置的高度值,确定插值点的第二占据概率。
可以理解地,在无人机航迹规划场景中,插值点所处位置的高度值越大(即插值点越高),碰撞到障碍物的可能性就越小。
步骤3054,对第一占据概率和第二占据概率进行融合处理,得到目标占据概率;其中,目标占据概率用于表征插值点所处位置存在障碍物的可能性大小。
在本申请实施例中,在确定插值点所处位置是否存在障碍物时,在传感器测量得到的第一占据概率的基础上,还引入了基于插值点的高度信息得到的第二占据概率,将高度信息与传感器测量数据进行融合,能够有效降低传感器测量错误引发的碰撞风险。
步骤3055,在各个不同的插值点的目标占据概率满足第三条件的情况下,将候选点作为第二采样点。
其中,满足第三条件为目标占据概率小于特征数值,所述特征数值可以根据实际需求预先设定;例如,在一些实施例中,满足第三条件为目标占据概率小于0.5。在得到的每个插值点的目标占据概率均小于0.5时,确定该候选点为第二采样点,将其存储在采样集合V中。
步骤306,从第一采样点和第二采样点中选出与待规划路径的终点之间的距离满足第一条件的采样点作为参考点;
步骤307,根据参考点所处位置的空旷区域的体积,生成第三采样点,以及从已有的采样点中选出与所述终点之间的距离满足第一条件的采样点作为新的参考点,直至最终得到的新的参考点与所述终点的距离满足第二条件为止,对由已有的采样点和所述终点组成的路径进行裁剪,得到目标路径。
本申请实施例提供一种路径规划方法,图4为本申请实施例提供的路径规划方法的实现流程示意图,如图4所示,该方法可以包括以下步骤401至步骤406:
步骤401,将待规划路径的起始点作为第一采样点,根据第一采样点所处位置的空旷区域的体积,生成第二采样点;
步骤402,根据第一采样点和第二采样点所处的位置,确定第二采样点的代价函数值。
其中,代价函数值用于表征第二采样点能够作为组成目标路径中的采样点的概率。
可以理解地,在无人机航迹规划场景中,无人机在爬升时,需要克服重力做功,其耗电量/耗油量相较于平飞和下降会更多,因此,为节省无人机飞行功耗,可以在获取目标路径时,尽可能使无人机在目标路径中的路线为平飞或下降,以节省功耗。
在一些实施例中,可以通过计算采样点的代价函数值,来确定该采样点为组成目标路径中的采样点的概率,采样点的代价函数值越小,则该采样点能够作为目标路径中的采样点的概率就越大。
在一些实施例中,可以通过执行如下步骤4021至步骤4023来实现步骤402:
步骤4021,确定第二采样点和第一采样点的高度差;
步骤4022,在高度差小于或等于第三阈值的情况下,确定高度差对应的权重为第一权重;在高度差大于第三阈值的情况下,确定高度差对应的权重为第二权重;其中,第二权重小于第一权重。
在一些实施例中,所述第三阈值可以根据实际需求预先设定,例如第三阈值为0。也即,当第二采样点的高度小于或等于第一采样点的高度(地理位置上呈现为路径平移或下降)时,确定对应的权重为第一权重;当第二采样点的高度大于第一采样点的高度(地理位置上呈现为路径爬升)时,确定对应的权重为第二权重。第二权重小于第一权重,例如,取第一权重为大于1的数值,如2;取第二权重为小于1的数值,如0.5。
步骤4023,根据第一权重和/或第二权重,确定第二采样点的代价函数值。
步骤403,从第一采样点和第二采样点中选出与待规划路径的终点之间的距离满足第一条件的采样点作为参考点;
步骤404,根据参考点所处位置的空旷区域的体积,生成第三采样点;以及根据参考点和第三采样点所处的位置,确定第三采样点的代价函数值。
在确定第三采样点的代价函数值时,确定方式与步骤402中确定第二采样点的代价函数值的方式相同,在此不再赘述。
步骤405,从已有的采样点中选出与终点之间的距离满足第一条件的采样点作为新的参考点,直至最终得到的新的参考点与终点的距离满足第二条件为止;
步骤406,根据每一采样点的代价函数值,对由已有的采样点和终点组成的至少一条路径进行遍历,从中选取出目标路径。
其中,目标路径由代价函数值总值满足第四条件的至少一个采样点和终点组成,至少一个采样点中包括第一采样点。
在一些实施例中,满足第四条件包括代价函数值的总值最小。
在利用RRT算法进行路径规划时,最终会得到至少一条能够将起始点和终点连接起来的路径,在从中选取目标路径时,可以基于每一个采样点的代价函数值,选择出一条代价函数值尽可能小(即路径中爬升的路段较少)的路径作为目标路径。如此,能够使得设备在飞行时尽量避免不必要的爬升运动,以节省耗电量和耗油量。
在一些实施例中,采用RRT算法进行的三维路径规划时,引入的随机概率P为固定值,其并不能最大限度节省计算机资源;且构造的代价函数为欧式距离,未考虑高度在无人机爬升和下降过程中区别,此与实际无人机耗电量/耗油量情形不符;另外其对三维空间中的占据概率求解未进行探索。
基于此,在本申请实施例中,设计了一套基于改进型RRT算法的无人机导航方法,该方法包括:首先利用倾斜摄影获取该区域的三维地图信息并以八叉树格式进行保存;然后利用改进RRT算法获取无人机起点至终点的最优路径,最后对该路径进优化。
在本申请实施例中,通过自适应选取RRT算法中的随机采样概率,能够充分解放计算资源;且令爬升和下降权重不一致,使无人机尽量不做不必要的爬升运动,从而能够节省耗电量/耗油量;另外,由二值贝叶斯滤波求解改为引入高度先验信息,利用贝叶斯概率信息公式可以获取先验信息与传感器测量数据融合后的占据概率,从而避免过度依赖传感器的精度。
本申请实施例提出了一种基于改进型RRT算法的无人机导航方法,如图5所示,该方法包括以下三个实施模块:
模块1,构建离线地图。
利用无人机对该区域进行倾斜摄影,并从摄影模型中提取出点云,再利用点云数据库(Point Cloud Library,PCL)生成作业环境的三维模型地图,然后利用现有Octomap库将其转换为八叉树格式。
模块2,改进型RRT算法。
RRT算法是广泛应用在路径规划中的一种抽样规划算法。它通过抽样在已知的地图上建立无向图,进而通过搜索方法寻找相对最优的路径,它是一种概率完备算法:即只要路径存在,且规划的时间足够长,就一定能够确保找到一条路径解。
为解决无人机碰撞风险,在插入新生成的随机点时,需要判断其连接边E是否存在碰撞风险。在一些实施例中,是直接利用传感器探测概率信息,但当传感器数据有误时,此时则会造成错误的风险值计算。在本申请实施例中,创新性地引入高度先验信息,认为高度越高,该节点占据的概率越小,即碰撞到障碍物的风险越低。在本申请实施例中,利用贝叶斯概率信息公式可以获取先验信息与传感器测量数据融合后的占据概率,以降低传感器错误引发的风险。其风险(目标占据概率的一种示例)计算公式如下公式1所示:
r(n)=value*p(n)*p h(z n)  (公式1);
其中,高度先验计算公式有很多变种,在本申请中以指数函数进行构造,如下公式2所示:
Figure PCTCN2022125959-appb-000001
在上述公式2中,需要满足平滑条件
Figure PCTCN2022125959-appb-000002
式中z n为待检测点(采样点的一种示例)的高度,h 0、h 1为参数。value为风险值所对应的权重因子参数,p(n)为待检测点在八叉树中的占据概率(第一占据概率的一种示例),由octomap serve库计算得到,p h(z n)为高度先验信息(第二占据概率的一种示例)。
由上述公式2可知,如果待检测点的高度小于h0,说明该待检测点所处位置较低,则高度先验信息较大,相应地,碰撞风险也较高;如果待检测点的高度大于h1,说明该待检测点所处位置较高,则高度先验信息较小,碰撞风险也较低。
可以理解地,无人机在实际飞行中,其进行爬升时,由于需要克服重力做功,其耗电量/耗油量相较于平飞、下降更多,为使无人机所耗能量更少,在进行RRT边的代价计算时,将向上运行距离、水平距离、向下距离权重设置不同,其向上运行距离权重>水平距离权重>向下距离权重,尽量不让无人机向上飞行,从而尽可能降低无人机耗电/耗油。其代价函数计算如下公式3所示:
Figure PCTCN2022125959-appb-000003
其中,(x s,y s,z s)为RRT树中离采样点最近的点位置坐标,(x n,y n,z n)为采样点坐标。取v 1大于等于1(第一权重的一种示例),v 2小于1(第二权重的一种示例),具体值由对应无人机耗能量进行调参。
可以理解地,起始点需要不断地向着终点进行生长,但由于存在障碍物,如果让树型一味朝着终点延伸,则可能会因为“撞墙”而失败。因此,在一些实施例中,RRT算法采取了一种随机采样方法:在每次选择生长方向时,有一定的概率会向着终点延伸,也有一定的概率会随机在地图内选择一个方向延伸一段距离,其距离的最大值为固定值。
可以理解地,该延伸概率显然会影响搜索效果。表现形式为,随机采样指向目标的概率越小,RRT树的分支也就越多,其计算量也就越大,反之则难以发生新的分支,导致不能找到路径。
在一些实施例中,设定指向目标的随机概率较小,会使很多场景下造成资源浪费。比如一种极端情景:无人机起点至终点之间并无障碍物,且处于同一平面,此时若向终点延伸的概率为1,则能够很快获取其最优路径。基于此,本申请在RRT算法中引入自适应调节向终点方向的延伸概率,能够根据当前空闲区域大小动态地调节延伸概率,从而提高RRT算法计算速度。
其中,构造的动态调节因子α的计算公式如下公式4所示,延伸概率p的计算公式如下公式5所示:
Figure PCTCN2022125959-appb-000004
p=f(α)  (公式5);
上述公式中size为距离目标最近的采样点所属八叉树叶子节点的尺寸,即表达当前空闲体积大小(空旷区域的体积的一种示例),dist为八叉树叶子节点的中心位置与该采样点位置之间的三维欧式距离,δ(第四阈值的一种示例)为阈值参数,k为其权重系数,延伸概率为动态调节因子α的函数,需要满足和α成正比,且最大值不超过1,在此取sigma函数。公式4表明当该采样点所属位置空闲区域较大,即当距离目标最近的采样点位置居于较大空闲区域中心附近时,
Figure PCTCN2022125959-appb-000005
此时α较大,则RRT算法以较大概率指向目标。
如图6所示,为本申请实施例通过的改进型RRT算法的实现流程示意图,包括以下步骤601至步骤613:
步骤601,获取地图M,起点Ps,终点Pe;
步骤602,建立采样点集V、边集E,并把起点Ps加入V,以构建RRT树图G=(V,E);
步骤603,在采样点集V中寻求与终点Pe最近(第一条件的一种示例)的点Vn,构建动态调节因子α,获取延伸概率p(随机概率的一种示例);
步骤604,在地图M中按延伸概率p生成随机采样点Pc(候选点的一种示例);
步骤605,在采样点集V中寻求与终点Pe最近的点Vm,连接点Vm和点Pc,记作边E0,获取其长度d;
步骤606,确定边E0的长度d是否大于所设定的最大边长dmax;如果是,执行步骤607;否则,执行步骤608;
步骤607,在E0中获取边长为dmax的点,替代之前的采样点Pc,并获取新的边E0(例如:Vm指向新的Pc);
步骤608,计算边E0的代价函数C;
步骤609,在边E0中按最小分辨率进行插值,其插值点记作Pi,获取每一个插值点Pi对应的改进型占据概率(目标占据概率的一种示例);
步骤610,确定是否所有插值点占据概率均小于阈值(满足第三条件的一种示例),如果是,执行步骤611,否则,返回执行步骤604;
步骤611,将Pc加入V,E0加入E,更新树图G;
步骤612,确定采样点Pc与终点Pe之间的距离是否小于阈值(满足第二条件的一种示例);如果是,执行步骤613;否则,返回执行步骤603;
步骤613,得到RRT树图G。
模块3,路径裁剪。
根据RRT树图搜索出的路径往往是曲折的(毕竟节点是随机生成的),故找到一条可行的从起点到终点的路径之后需要考虑优化路径,化曲为直。这个过程中从叶子节点开始,不断寻找能否无障碍地直接连接到先辈节点,最终得到一条更适合无人机飞行的航线。
在一些实施例中,在计算占据概率时并未引入高度先验信息,本申请采用引入高度先验信息,认为高度超过某个阈值后,随着高度升高,无人机碰到障碍物的概率越小的方案,达到有效规避传感器错误时带来的影响。
在一些实施例中,RRT算法并未引入调节因子α来自适应调节RRT算法的随机采样概率,以加速搜寻路径速度。本申请中采用利用与目标最近采样点位置所处空闲大小来自适应计算调节因子α的方案,达到动态调节采样概率,使其RRT算法能够更快速的搜寻目标。
在本申请实施例中,(1)引入高度先验信息,认为高度超过某个阈值后,随着高度升高,无人机碰到障碍物的概率越小;然后占据概率求解利用贝叶斯概率公式可以获取高度先验信 息与传感器测量数据融合后的占据概率,提高规避传感器数据错误的风险。(2)利用与目标最近采样点位置所处空闲大小来自适应计算调节因子,从而动态调节采样概率,使得在RRT算法中,能够更快速的搜寻目标。(3)构造的代价函数中考虑高度在无人机爬升和下降过程中区别,此与实际无人机耗电量/耗油量情形相符,使无人机尽量不做不必要的爬升运动,从而能够节省耗电量/耗油量。
应当注意,尽管在附图中以特定顺序描述了本申请中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等;或者,将不同实施例中步骤组合为新的技术方案。
基于前述的实施例,本申请实施例提供一种路径规划装置,该装置包括所包括的各模块、以及各模块所包括的各单元,可以通过处理器来实现;当然也可通过具体的逻辑电路实现;在实施的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。
图7为本申请实施例路径规划装置的结构示意图,如图7所示,所述装置700包括生成模块701、选择模块702和裁剪模块703,其中:生成模块701,配置为将待规划路径的起始点作为第一采样点,根据所述第一采样点在地图中所处位置的空旷区域的体积,确定第一采样点对应的随机概率;基于第一采样点对应的随机概率,生成第二采样点;选择模块702,配置为从所述第一采样点和所述第二采样点中选出与所述待规划路径的终点之间的距离满足第一条件的采样点作为参考点;所述生成模块701,还配置为根据所述参考点所处位置的空旷区域的体积,生成第三采样点,以及所述选择模块702,还配置为从已有的采样点中选出与所述终点之间的距离满足所述第一条件的采样点作为新的参考点,直至最终得到的新的参考点与所述终点的距离满足第二条件为止;裁剪模块703,配置为对由已有的采样点和所述终点组成的路径进行裁剪,得到目标路径。
在一些实施例中,所述装置700还包括确定模块,所述确定模块,配置为确定所述第一采样点所属的子节点的中心位置与所述第一采样点所处位置的距离;根据所述第一采样点所处位置的空旷区域的体积和所述距离,确定所述第一采样点对应的调节因子;根据所述调节因子,确定所述第一采样点对应的随机概率。
在一些实施例中,所述确定模块,配置为根据所述第一采样点所处位置的空旷区域的体积,确定所述第一采样点对应的随机概率;其中,所述随机概率用于表征所述第一采样点的延伸方向朝向所述待规划路径的终点的可能性大小;生成模块701,配置为基于所述第一采样点对应的随机概率,生成第二采样点。
在一些实施例中,生成模块701,配置为在所述随机概率大于第一阈值的情况下,在所述第一采样点朝向所述待规划路径的终点的延伸方向上生成第一候选点;所述确定模块,还配置为确定所述第一采样点和所述第一候选点组成的第一边的边距是否小于或等于第二阈值;所述确定模块,还配置为在所述第一边的边距小于或等于所述第二阈值的情况下,将所述第一候选点作为所述第二采样点;选择模块702,还配置为在所述第一边的边距大于所述第二阈值的情况下,在所述第一边上选取和所述第一采样点组成的第二边的边距等于所述第二阈值的第二候选点,将所述第二候选点作为所述第二采样点。
在一些实施例中,所述装置700还包括插值模块,所述插值模块,配置为对所述第一采样点和所述候选点组成的边进行插值处理,得到至少一个插值点;所述确定模块,还配置为确定所述插值点的目标占据概率;其中,所述目标占据概率配置为表征所述插值点所处位置存在障碍物的可能性大小;在各个不同的所述插值点的目标占据概率满足第三条件的情况下,将所述候选点作为所述第二采样点。
在一些实施例中,所述装置700还包括第一获取模块和融合模块,所述第一获取模块,配置为获取传感器测量的所述插值点的第一占据概率;所述确定模块,配置为根据所述插值点所处位置的高度值,确定所述插值点的第二占据概率;所述融合模块,配置为对所述第一占据概率和所述第二占据概率进行融合处理,得到所述目标占据概率。
在一些实施例中,所述装置700还包括遍历模块,确定模块,还配置为根据所述第一采样点和所述第二采样点所处的位置,确定所述第二采样点的代价函数值;其中,所述代价函数值配置为表征所述第二采样点为组成所述目标路径中的采样点的概率;所述遍历模块,配置为根据每一所述采样点的代价函数值,对由已有的采样点和所述终点组成的至少一条路径进行遍历,从中选取出所述目标路径;其中,所述目标路径由代价函数值总值满足第四条件的至少一个采样点和所述终点组成,所述至少一个采样点包括所述第一采样点。
在一些实施例中,确定模块,配置为确定所述第二采样点和所述第一采样点的高度差;在所述高度差小于或等于第三阈值的情况下,确定所述高度差对应的权重为第一权重;在所述高度差大于所述第三阈值的情况下,确定所述高度差对应的权重为第二权重;其中,所述第二权重小于所述第一权重;根据所述高度差对应的权重,确定所述第二采样点的代价函数值。
在一些实施例中,所述路径规划模块还包括第二获取模块、构建模块和转换模块;在进行路径规划之前,所述第二获取模块,配置为利用传感器设备获取所述待规划路径对应的行驶区域的点云数据;所述构建模块,配置为根据所述点云数据构建所述地图;所述转换模块,配置为将所述地图转换为八叉树结构的格式进行存储。
在一些实施例中,所述确定模块,还配置为:在所述距离大于第四阈值的情况下,根据所述第一采样点所处位置的空旷区域的体积与所述距离确定所述调节因子;在所述距离小于所述第四阈值的情况下,根据所述第一采样点所处位置的空旷区域的体积与所述第四阈值确定所述调节因子。
以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请装置实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。
需要说明的是,本申请实施例中图7所示的路径规划装置对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。也可以采用软件和硬件结合的形式实现。
需要说明的是,本申请实施例中,如果以软件功能模块的形式实现上述的方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得电子设备执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本申请实施例不限制于任何特定的硬件和软件结合。
本申请实施例提供一种电子设备,图8为本申请实施例的电子设备的硬件实体示意图,如图8所示,所述电子设备800包括存储器801和处理器802,所述存储器801存储有可在处理器802上运行的计算机程序,所述处理器802执行所述程序时实现上述实施例中提供的方法中的步骤。
需要说明的是,存储器801配置为存储由处理器802可执行的指令和应用,还可以缓存在处理器802以及电子设备800中各模块待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random Access Memory,RAM)实现。
本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例中提供的方法中的步骤。
本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述方法实施例提供的方法中的步骤。
这里需要指出的是:以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请存储介质、存储介质和设备实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”或“一些实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”或“在一些实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考,为了简洁,本文不再赘述。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如对象A和/或对象B,可以表示:单独存在对象A,同时存在对象A和对象B,单独存在对象B这三种情况。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者设备中还存在另外的相同要素。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个模块或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或模块的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的模块可以是、或也可以不是物理上分开的,作为模块显示的部件可以是、或也可以不是物理模块;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部模块来实现本实施例方案的目的。
另外,在本申请各实施例中的各功能模块可以全部集成在一个处理单元中,也可以是各模块分别单独作为一个单元,也可以两个或两个以上模块集成在一个单元中;上述集成的模 块既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得电子设备执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种路径规划方法,所述方法包括:
    将待规划路径的起始点作为第一采样点,根据所述第一采样点在地图中所处位置的空旷区域的体积,确定所述第一采样点对应的随机概率;其中,所述随机概率用于表征所述第一采样点的延伸方向朝向所述待规划路径的终点的可能性大小;
    基于所述第一采样点对应的随机概率,生成第二采样点;
    从所述第一采样点和所述第二采样点中选出与所述待规划路径的终点之间的距离满足第一条件的采样点作为参考点;
    根据所述参考点所处位置的空旷区域的体积,生成第三采样点,以及从已有的采样点中选出与所述终点之间的距离满足所述第一条件的采样点作为新的参考点,直至最终得到的新的参考点与所述终点的距离满足第二条件为止,对由已有的采样点和所述终点组成的路径进行裁剪,得到目标路径。
  2. 根据权利要求1所述的方法,其中,所述根据所述第一采样点所处位置的空旷区域的体积,确定所述第一采样点对应的随机概率,包括:
    确定所述第一采样点所属的子节点的中心位置与所述第一采样点所处位置之间的距离;
    根据所述第一采样点所处位置的空旷区域的体积和所述距离,确定所述第一采样点对应的调节因子;
    根据所述调节因子,确定所述第一采样点对应的随机概率。
  3. 根据权利要求1所述的方法,其中,所述基于所述第一采样点对应的随机概率,生成第二采样点,包括:
    在所述随机概率大于第一阈值的情况下,在所述第一采样点朝向所述待规划路径的终点的延伸方向上生成第一候选点;
    确定所述第一采样点和所述第一候选点组成的第一边的边距是否小于或等于第二阈值;
    在所述第一边的边距小于或等于所述第二阈值的情况下,将所述第一候选点作为所述第二采样点;
    在所述第一边的边距大于所述第二阈值的情况下,在所述第一边上选取和所述第一采样点组成的第二边的边距等于所述第二阈值的第二候选点,将所述第二候选点作为所述第二采样点。
  4. 根据权利要求3所述的方法,其中,候选点包括所述第一候选点或所述第二候选点;将所述候选点作为所述第二采样点,包括:
    对所述第一采样点和所述候选点组成的边进行插值处理,得到至少一个插值点;
    确定所述插值点的目标占据概率;其中,所述目标占据概率用于表征所述插值点所处位置存在障碍物的可能性大小;
    在各个不同的所述插值点的目标占据概率满足第三条件的情况下,将所述候选点作为所述第二采样点。
  5. 根据权利要求4所述的方法,其中,所述确定所述插值点的目标占据概率,包括:
    获取传感器测量的所述插值点的第一占据概率;
    根据所述插值点所处位置的高度值,确定所述插值点的第二占据概率;
    对所述第一占据概率和所述第二占据概率进行融合处理,得到所述目标占据概率。
  6. 根据权利要求1所述的方法,其中,所述方法还包括:
    根据所述第一采样点和所述第二采样点所处的位置,确定所述第二采样点的代价函数值;其中,所述代价函数值用于表征所述第二采样点能够作为组成所述目标路径中的采样点的概率;
    相应地,所述对由已有的采样点和所述终点组成的路径进行裁剪,得到目标路径,包括:
    根据每一所述采样点的代价函数值,对由已有的采样点和所述终点组成的至少一条路径进行遍历,从中选取出所述目标路径;其中,所述目标路径由代价函数值总值满足第四条件的至少一个采样点和所述终点组成,所述至少一个采样点包括所述第一采样点。
  7. 根据权利要求6所述的方法,其中,所述根据所述第一采样点和所述第二采样点所处的位置,确定所述第二采样点的代价函数值,包括:
    确定所述第二采样点和所述第一采样点的高度差;
    在所述高度差小于或等于第三阈值的情况下,确定所述高度差对应的权重为第一权重;
    在所述高度差大于所述第三阈值的情况下,确定所述高度差对应的权重为第二权重;其中,所述第二权重小于所述第一权重;
    根据所述第一权重和/或所述第二权重,确定所述第二采样点的代价函数值。
  8. 根据权利要求1所述的方法,其中,在进行所述路径规划之前,所述方法还包括:
    利用传感器设备获取所述待规划路径对应的行驶区域的点云数据;
    根据所述点云数据构建所述地图;
    将所述地图转换为八叉树结构的格式进行存储。
  9. 根据权利要求2所述的方法,所述方法包括:
    在所述距离大于第四阈值的情况下,根据所述第一采样点所处位置的空旷区域的体积与所述距离确定所述调节因子;
    在所述距离小于所述第四阈值的情况下,根据所述第一采样点所处位置的空旷区域的体 积与所述第四阈值确定所述调节因子。
  10. 一种路径规划装置,包括:
    生成模块,配置为将待规划路径的起始点作为第一采样点,根据所述第一采样点在地图中所处位置的空旷区域的体积,确定第一采样点对应的随机概率;基于第一采样点对应的随机概率,生成第二采样点;
    选择模块,配置为从所述第一采样点和所述第二采样点中选出与所述待规划路径的终点之间的距离满足第一条件的采样点作为参考点;
    所述生成模块,还配置为根据所述参考点所处位置的空旷区域的体积,生成第三采样点,以及所述选择模块,还配置为从已有的采样点中选出与所述终点之间的距离满足所述第一条件的采样点作为新的参考点,直至最终得到的新的参考点与所述终点的距离满足第二条件为止;
    裁剪模块,配置为对由已有的采样点和所述终点组成的路径进行裁剪,得到目标路径。
  11. 根据权利要求10所述的装置,其中,还包括确定模块,配置为:
    确定所述第一采样点所属的子节点的中心位置与所述第一采样点所处位置的距离;
    根据所述第一采样点所处位置的空旷区域的体积和所述距离,确定所述第一采样点对应的调节因子;
    根据所述调节因子,确定所述第一采样点对应的随机概率。
  12. 根据权利要求10所述的装置,其中,还包括选择模块;
    所述生成模块,配置为在所述随机概率大于第一阈值的情况下,在所述第一采样点朝向所述待规划路径的终点的延伸方向上生成第一候选点;
    所述确定模块,还配置为确定所述第一采样点和所述第一候选点组成的第一边的边距是否小于或等于第二阈值;在所述第一边的边距小于或等于所述第二阈值的情况下,将所述第一候选点作为所述第二采样点;
    所述选择模块,配置为在所述第一边的边距大于所述第二阈值的情况下,在所述第一边上选取和所述第一采样点组成的第二边的边距等于所述第二阈值的第二候选点,将所述第二候选点作为所述第二采样点。
  13. 根据权利要求12所述的装置,其中,候选点包括所述第一候选点或所述第二候选点;所述装置还包括插值模块;
    所述插值模块,配置为对所述第一采样点和所述候选点组成的边进行插值处理,得到至少一个插值点;
    所述确定模块,配置为确定所述插值点的目标占据概率;其中,所述目标占据概率用于 表征所述插值点所处位置存在障碍物的可能性大小;
    所述选择模块,还配置为在各个不同的所述插值点的目标占据概率满足第三条件的情况下,将所述候选点作为所述第二采样点。
  14. 根据权利13所述的装置,其中,还包括第一获取模块和融合模块;
    所述第一获取模块,配置为获取传感器测量的所述插值点的第一占据概率;
    所述确定模块,配置为根据所述插值点所处位置的高度值,确定所述插值点的第二占据概率;
    所述融合模块,配置为对所述第一占据概率和所述第二占据概率进行融合处理,得到所述目标占据概率。
  15. 根据权利要求10所述的装置,其中,还包括遍历模块;
    所述确定模块,还配置为根据所述第一采样点和所述第二采样点所处的位置,确定所述第二采样点的代价函数值;其中,所述代价函数值用于表征所述第二采样点能够作为组成所述目标路径中的采样点的概率;
    所述遍历模块,配置为根据每一所述采样点的代价函数值,对由已有的采样点和所述终点组成的至少一条路径进行遍历,从中选取出所述目标路径;其中,所述目标路径由代价函数值总值满足第四条件的至少一个采样点和所述终点组成,所述至少一个采样点包括所述第一采样点。
  16. 根据权利要求15所述的装置,其中,所述确定模块,配置为:
    确定所述第二采样点和所述第一采样点的高度差;
    在所述高度差小于或等于第三阈值的情况下,确定所述高度差对应的权重为第一权重;
    在所述高度差大于所述第三阈值的情况下,确定所述高度差对应的权重为第二权重;其中,所述第二权重小于所述第一权重;
    根据所述第一权重和/或所述第二权重,确定所述第二采样点的代价函数值。
  17. 根据权利要求10所述的装置,其中,还包括第二获取模块、构建模块和转换模块;在进行路径规划之前,
    所述第二获取模块,配置为利用传感器设备获取所述待规划路径对应的行驶区域的点云数据;
    所述构建模块,配置为根据所述点云数据构建所述地图;
    所述转换模块,配置为将所述地图转换为八叉树结构的格式进行存储。
  18. 根据权利要求11所述的方法,其中,所述确定模块,还配置为:
    在所述距离大于第四阈值的情况下,根据所述第一采样点所处位置的空旷区域的体积与 所述距离确定所述调节因子;
    在所述距离小于所述第四阈值的情况下,根据所述第一采样点所处位置的空旷区域的体积与所述第四阈值确定所述调节因子。
  19. 一种电子设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至9任一项所述的方法。
  20. 一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如权利要求1至9任一项所述的方法。
PCT/CN2022/125959 2021-11-29 2022-10-18 路径规划方法及装置、设备、存储介质 WO2023093378A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111436431.9A CN116182859A (zh) 2021-11-29 2021-11-29 路径规划方法及装置、设备、存储介质
CN202111436431.9 2021-11-29

Publications (1)

Publication Number Publication Date
WO2023093378A1 true WO2023093378A1 (zh) 2023-06-01

Family

ID=86431252

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/125959 WO2023093378A1 (zh) 2021-11-29 2022-10-18 路径规划方法及装置、设备、存储介质

Country Status (2)

Country Link
CN (1) CN116182859A (zh)
WO (1) WO2023093378A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578121A (zh) * 2023-07-10 2023-08-11 广东电网有限责任公司云浮供电局 基于约束采样的扩展随机树的生成方法及轨迹规划方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116518960B (zh) * 2023-06-28 2023-09-26 腾讯科技(深圳)有限公司 路网更新方法、装置、电子设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050216181A1 (en) * 2004-03-26 2005-09-29 Estkowski Regina I System and method for adaptive path planning
CN110411454A (zh) * 2019-08-19 2019-11-05 西安工业大学 一种改进随机路径图法的移动机器人路径规划方法
CN112650306A (zh) * 2020-12-25 2021-04-13 北京理工大学 一种基于动力学rrt*的无人机运动规划方法
CN112747736A (zh) * 2020-12-22 2021-05-04 西北工业大学 一种基于视觉的室内无人机路径规划方法
CN113341984A (zh) * 2021-06-15 2021-09-03 桂林电子科技大学 基于改进rrt算法的机器人路径规划方法和装置
CN113359775A (zh) * 2021-07-08 2021-09-07 哈尔滨理工大学 一种动态变采样区域rrt无人车路径规划方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050216181A1 (en) * 2004-03-26 2005-09-29 Estkowski Regina I System and method for adaptive path planning
CN110411454A (zh) * 2019-08-19 2019-11-05 西安工业大学 一种改进随机路径图法的移动机器人路径规划方法
CN112747736A (zh) * 2020-12-22 2021-05-04 西北工业大学 一种基于视觉的室内无人机路径规划方法
CN112650306A (zh) * 2020-12-25 2021-04-13 北京理工大学 一种基于动力学rrt*的无人机运动规划方法
CN113341984A (zh) * 2021-06-15 2021-09-03 桂林电子科技大学 基于改进rrt算法的机器人路径规划方法和装置
CN113359775A (zh) * 2021-07-08 2021-09-07 哈尔滨理工大学 一种动态变采样区域rrt无人车路径规划方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578121A (zh) * 2023-07-10 2023-08-11 广东电网有限责任公司云浮供电局 基于约束采样的扩展随机树的生成方法及轨迹规划方法
CN116578121B (zh) * 2023-07-10 2023-11-03 广东电网有限责任公司云浮供电局 基于约束采样的扩展随机树的生成方法及轨迹规划方法

Also Published As

Publication number Publication date
CN116182859A (zh) 2023-05-30

Similar Documents

Publication Publication Date Title
WO2023093378A1 (zh) 路径规划方法及装置、设备、存储介质
CN110108284B (zh) 一种顾及复杂环境约束的无人机三维航迹快速规划方法
CN108256577B (zh) 一种基于多线激光雷达的障碍物聚类方法
CN110703766B (zh) 一种基于迁移学习策略深度q网络的无人机路径规划方法
CN108444482B (zh) 一种无人机自主寻路避障方法及系统
US10466058B2 (en) Navigation for vehicles
CN107289939B (zh) 基于svm算法的无人船路径规划方法
CN110132282B (zh) 无人机路径规划方法及装置
CN111880561A (zh) 城市环境下基于改进鲸鱼算法的无人机三维路径规划方法
CN110031007B (zh) 一种航迹规划方法、装置及计算机可读存储介质
CN113552899B (zh) 一种通信链路受限下的多无人机自主协同搜索方法
CN113985922B (zh) 一种多目标约束下的无人机分级式路径规划方法
CN115357031B (zh) 一种基于改进蚁群算法的船舶路径规划方法及系统
CN114967680B (zh) 基于蚁群算法和卷积神经网络的移动机器人路径规划方法
CN110531340B (zh) 一种激光雷达点云数据的基于深度学习的识别处理方法
CN116400737A (zh) 一种基于蚁群算法的安全路径规划系统
CN112099521B (zh) 一种无人机路径规划方法及装置
CN114973191A (zh) 基于点云密度和间距的动态阈值确定方法及欧式聚类方法
CN115220480A (zh) 带有约束条件的无人机航迹规划方法、装置及电子设备
CN114740858A (zh) 一种采用人工鱼群模型的机器人路径规划方法
CN115326070A (zh) 城市低空环境下基于三维切线图法的无人机航迹规划方法
Liu et al. Research on Cooperative Search Technology of Heterogeneous UAVs in Complex Environments
CN111913487B (zh) 一种基于移动机器人的工业现场数据采集路径规划方法
Hu et al. Real-time tracking algorithm for unmanned dynamic targets based on lightweight detection
CN115170747A (zh) 路径规划的方法、装置、电子设备及计算机存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22897461

Country of ref document: EP

Kind code of ref document: A1