Obstacle avoidance path determination method, obstacle avoidance method, device and storage medium
By building a spatial model and optimizing the path, the existing obstacle avoidance methods are solved in terms of cost, computational complexity and professionalism, and efficient and feasible obstacle avoidance path determination is achieved.
Patent Information
- Application Number
- CN202110940911.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-17
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-08-17
AI Technical Summary
The existing obstacle avoidance methods have shortcomings in terms of cost, computational complexity and expertise, especially the cost of lidar-based methods is high, the raster method increases the difficulty of solving paths when there are many obstacles, artificial neural networks and fast-scaling random tree algorithms Higher professionalism is required, and the sound wave obstacle avoidance method has poor detection effect when obstacles are approached.
By constructing a spatial model, including obstacle point cloud, path point, starting point and target end point, determine the preselected path between the starting point and path point, and calculate the distance between the obstacle point and the preselected path, and the filter distance is greater than or equal to the distance threshold value The path of the target path is used as the target path, and the target path is optimized to determine the obstacle avoidance path.
Reduces the professionalism requirement, reduces the possibility of undetectable paths, and ensures the feasibility of finalized obstacle avoidance paths.
Smart Images

Figure CN113741431B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of obstacle avoidance, and in particular to an obstacle avoidance path determination method, an obstacle avoidance method, a device and a storage medium. Background Art
[0002] With the continuous development of various mobile devices (such as robots), more and more robots with various applications have emerged. Mobile robots are one direction of robot development. Mobile robots have mobile functions and can replace people to do many jobs. They can adapt to work in harsh environments where it is difficult for human beings to survive. In the process of mobile robots moving, there are usually obstacles that hinder the movement of mobile robots. In order to ensure that the work of mobile robots is completed smoothly, it is necessary to configure obstacle avoidance functions for mobile robots.
[0003] Existing obstacle avoidance methods include: artificial neural network obstacle avoidance control method, grid obstacle avoidance control method, sound wave obstacle avoidance control method, lidar obstacle avoidance control method, rapidly expanding random tree algorithm, etc., and the cost of lidar-based obstacle avoidance method is particularly high; based on the grid method obstacle avoidance control method, when the number of obstacles increases, the difficulty of the grid method to solve the path will increase exponentially; based on the artificial neural network obstacle avoidance control method and the rapidly expanding random tree algorithm requires higher professionalism and is difficult; based on the sound wave obstacle avoidance control method, when the ultrasonic sensor is very close to the obstacle, it will not be detected and the detection effect is poor, so a solution needs to be sought. Summary of the invention
[0004] In view of this, in order to solve at least one of the above technical problems, an object of the present invention is to provide an obstacle avoidance path determination method, an obstacle avoidance method, an apparatus and a storage medium.
[0005] The technical solution adopted by the present invention is:
[0006] A method for determining an obstacle avoidance path, comprising:
[0007] Constructing a spatial model; the spatial model includes an obstacle point cloud, a number of path points, a starting point, and a target end point;
[0008] Taking the starting point as the first point, determining a second point from the path points and the target end point, and determining a first obstacle point within the range between the first point and the second point from the obstacle point cloud;
[0009] Form a preselected path according to the first point and the second point, and calculate the distance between the first obstacle point and the preselected path;
[0010] Determine the preselected path whose distance is greater than or equal to the distance threshold as the target path, and determine the second point of the target path as the new first point, and return to the step of determining the second point from the path points and the target destination until the new first point is the target destination;
[0011] An optimization process is performed according to the target path to determine an obstacle avoidance path; the obstacle avoidance path represents a path from the starting point to the target end point.
[0012] Furthermore, the construction of the spatial model includes:
[0013] Generate a three-dimensional model through three-dimensional reconstruction;
[0014] In the three-dimensional model: the surface of the obstacle is uniformly sampled according to a preset sampling value to generate the obstacle point cloud, and the starting point and the target end point are determined and a random point cloud is generated to obtain the spatial model; the random point cloud includes a number of the path points; the distance threshold is determined according to the preset sampling value.
[0015] Further, the obstacle point cloud includes a plurality of second obstacle points, and determining the first obstacle point within the range between the first point and the second point from the obstacle point cloud includes:
[0016] Acquire first coordinate information of the first point, second coordinate information of the second point, and third coordinate information of the second obstacle point; the first coordinate information includes a first horizontal coordinate, a first vertical coordinate, and a first vertical coordinate, the second coordinate information includes a second horizontal coordinate, a second vertical coordinate, and a second vertical coordinate, and the third coordinate information includes a third horizontal coordinate, a third vertical coordinate, and a third vertical coordinate;
[0017] When the third horizontal coordinate is greater than or equal to the first horizontal coordinate and less than or equal to the second horizontal coordinate, the third vertical coordinate is greater than or equal to the first vertical coordinate and less than or equal to the second vertical coordinate, and the third vertical coordinate is greater than or equal to the first vertical coordinate and less than or equal to the second vertical coordinate, the second obstacle point is taken as the first obstacle point.
[0018] Further, the forming a preselected path according to the first point and the second point, and calculating the distance between the first obstacle point and the preselected path, includes:
[0019] Construct a virtual straight line between the two points according to the first point and the second point; the virtual straight line is a preselected path;
[0020] The distance between the first obstacle point and the virtual straight line is calculated.
[0021] Furthermore, the obstacle avoidance path determination method further includes:
[0022] When the second point is the target end point and there is no first obstacle point within the range between the first point and the second point, a line between the first point and the second point is determined as the target path.
[0023] Further, performing optimization processing according to the target path to determine an obstacle avoidance path includes:
[0024] Determine candidate paths and calculate the sum of the path lengths of each candidate path; the candidate path is a path consisting of the target path and from the starting point to the target end point;
[0025] The candidate path with the smallest total path length is used as the obstacle avoidance path, or a first angle difference between the mobile device and the second point of the target path and a second angle difference between the second point of the target path and the target end point are obtained, and a weighted sum is performed based on the first angle difference, the second angle difference, the total path length and a weight coefficient, and the candidate path corresponding to the smallest weighted sum result is used as the obstacle avoidance path.
[0026] The present invention also provides an obstacle avoidance method, comprising:
[0027] Determine an obstacle avoidance path according to the obstacle avoidance path determination method;
[0028] The mobile device is controlled to avoid obstacles according to the obstacle avoidance path.
[0029] The present invention also provides an obstacle avoidance path determination device, comprising:
[0030] A construction module, used to construct a spatial model; the spatial model includes an obstacle point cloud, a number of path points, a starting point and a target end point;
[0031] A first determination module is used to take the starting point as a first point, determine a second point from the path points and the target end point, and determine a first obstacle point within a range between the first point and the second point from the obstacle point cloud;
[0032] a calculation module, configured to form a preselected path according to the first point and the second point, and calculate a distance between the first obstacle point and the preselected path;
[0033] a second determination module, configured to determine the preselected path whose distance is greater than or equal to the distance threshold as the target path, and determine the second point of the target path as the new first point, and return to the step of determining the second point from the path points and the target destination until the new first point is the target destination;
[0034] The optimization module is used to perform optimization processing according to the target path to determine an obstacle avoidance path; the obstacle avoidance path represents a path from the starting point to the target end point.
[0035] The present invention also provides a processing device, comprising a processor and a memory;
[0036] The memory stores a program;
[0037] The processor executes the program to implement the method.
[0038] The present invention also provides a computer-readable storage medium, wherein the storage medium stores a program, and the method is implemented when the program is executed by a processor.
[0039] The beneficial effects of the present invention are: by constructing a spatial model; the spatial model includes an obstacle point cloud, a number of path points, a starting point and a target end point; taking the starting point as the first point, determining the second point from the path points and the target end point, and determining the first obstacle point within the range of the first point and the second point from the obstacle point cloud; forming a preselected path based on the first point and the second point, and calculating the distance between the first obstacle point and the preselected path; determining the preselected path with a distance greater than or equal to a distance threshold as the target path, and determining the second point of the target path as the new first point, returning to the step of determining the second point from the path points and the target end point until the new first point is the target end point, optimizing the target path, and determining the obstacle avoidance path; determining the obstacle avoidance path based on the distance between the path points, the first obstacle point and the preselected path, reducing the requirements for professionalism and the possibility of failing to detect the path, and making the final determined obstacle avoidance path feasible. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the steps of the obstacle avoidance path determination method of the present invention;
[0041] Figure 2 It is a schematic diagram of a space model of a specific embodiment of the present invention;
[0042] Figure 3 is a schematic diagram of a direction vector of a specific embodiment of the present invention;
[0043] Figure 4 Schematic diagram of the process flow of the obstacle avoidance method of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0045] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0046] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0047] like Figure 1 As shown, an embodiment of the present invention provides a method for determining an obstacle avoidance path, which can be applied to determining an obstacle avoidance path of a mobile device, specifically, comprising steps S100-S500:
[0048] S100: construct a spatial model.
[0049] like Figure 2 As shown, in an embodiment of the present invention, the spatial model includes an obstacle point cloud, a number of path points, a starting point, and a target end point. It should be noted that the mobile device includes but is not limited to a robot, a drone, an automatic guided vehicle, an autonomous vehicle (or an autonomous vehicle), etc. Optionally, the starting point can be the position of the mobile device, or a point selected based on the position of the mobile device, including but not limited to the nearest point selected within a certain range from the position of the mobile device; the target end point is the position that the mobile device needs to reach. Among them, the obstacle point cloud includes a number of second obstacle points, Figure 2 The obstacle point shown in refers to the second obstacle point, the planning starting point is the starting point, the generated random point is the path point, and the arrow line segment refers to the path.
[0050] Specifically, step S100 includes steps S110-S120:
[0051] S110 , generating a three-dimensional model through three-dimensional reconstruction.
[0052] Optionally, the space model is generated based on the three-dimensional reconstruction of the binocular camera. It should be noted that the size of the generated space model can be determined according to the size of the obstacle and the three-dimensional reconstruction of the surrounding space by the binocular camera, and can be adjusted according to actual needs.
[0053] S120, in the three-dimensional model: uniformly sampling the surface of the obstacle according to the preset sampling value to generate an obstacle point cloud, and determining the starting point and the target end point and generating a random point cloud to obtain a spatial model; the random point cloud includes a number of path points.
[0054] Optionally, after generating the three-dimensional model, the surface of the obstacle is uniformly sampled according to a preset sampling value σ to obtain a sparse three-dimensional point cloud of the obstacle surface, i.e., an obstacle point cloud. In an embodiment of the present invention, uniformly sampling the surface of the obstacle to obtain a sparse three-dimensional point cloud of the obstacle surface can reduce the number of obstacle point clouds and the amount of processing, so that when determining the subsequent obstacle avoidance path, computing resources can be concentrated to avoid waste of computing resources and improve processing efficiency. In addition, the random point cloud includes a number of random points, and the rules for generating the random point cloud can be set as needed, for example, evenly distributed random points can be generated, and each random point is equivalent to a path point.
[0055] S200, taking the starting point as the first point, determining the second point from the path points and the target end point, and determining the first obstacle point within the range of the first point and the second point from the obstacle point cloud.
[0056] Specifically, determining the first obstacle point within the range of the first point and the second point from the obstacle point cloud includes steps S210-S220:
[0057] S210: Acquire first coordinate information of the first point, second coordinate information of the second point, and third coordinate information of the second obstacle point.
[0058] Optionally, the first coordinate information includes a first horizontal coordinate, a first vertical coordinate and a first vertical coordinate, the second coordinate information includes a second horizontal coordinate, a second vertical coordinate and a second vertical coordinate, and the third coordinate information includes a third horizontal coordinate, a third vertical coordinate and a third vertical coordinate. The horizontal coordinate refers to the coordinate of the x-axis, the vertical coordinate refers to the coordinate of the y-axis, and the vertical coordinate refers to the coordinate of the z-axis.
[0059] S220: When the third horizontal coordinate is greater than or equal to the first horizontal coordinate and less than or equal to the second horizontal coordinate, the third vertical coordinate is greater than or equal to the first vertical coordinate and less than or equal to the second vertical coordinate, and the third vertical coordinate is greater than or equal to the first vertical coordinate and less than or equal to the second vertical coordinate, take the second obstacle point as the first obstacle point.
[0060] Specifically, when the second obstacle point meets the above conditions, it is considered that the second obstacle point is within the range between the first point and the second point, and the second obstacle point is used as the first obstacle point, thereby determining a number of first obstacle points. Optionally, the formula for determining the first obstacle point is:
[0061]
[0062] Among them, represents the i-th P i To P i+1 Obstacle points within the range, P i For the first point, P i+1 is the second point (the next point after the first point), and the change of i represents different first and second points. are the i-th P i To P i+1 The horizontal coordinate, vertical coordinate and vertical coordinate (third horizontal coordinate, third vertical coordinate and third vertical coordinate) of the obstacle point within the range, x i+1 ,t i+1 , z i+1 are the horizontal coordinate, vertical coordinate and vertical coordinate of the second point respectively (second horizontal coordinate, second vertical coordinate and second vertical coordinate), x i ,y i ,、z i are the abscissa, ordinate and ordinate of the first point respectively (the first abscissa, the first ordinate and the first ordinate); k is the i-th P i To P i+1 The number of obstacle points within the range, ^ represents "and"; find means to search.
[0063] S300: Form a preselected path according to the first point and the second point, and calculate the distance between the first obstacle point and the preselected path.
[0064] Specifically, step S300 includes steps S310-S320:
[0065] S310, constructing a virtual straight line between the two points according to the first point and the second point; the virtual straight line is a preselected path.
[0066] S320: Calculate the distance between the first obstacle point and the virtual straight line.
[0067] Specifically, the virtual straight line is solved according to the two-point formula P iWith P i+1 The formula for a straight line between two points is L i express:
[0068] L i :(xx i ) / (x i+1 -x i )=(yy i ) / (y i+1 -y i )=(zz i ) / (z i+1 -z i )
[0069] Solve P according to the distance formula from the midpoint to the straight line in space i With P i+1 The first obstacle point within the range to P i With P i+1 Two-point straight line L i Distance
[0070]
[0071] S400, determining a preselected path whose distance is greater than or equal to a distance threshold as a target path, and determining a second point of the target path as a new first point, and returning to the step of determining the second point from the path points and the target end point until the new first point is the target end point.
[0072] In the embodiment of the present invention, the distance threshold is determined according to a preset sampling value and a size adjustment parameter. Specifically:
[0073] δ=σ+λ
[0074] δ is the distance threshold, σ is the preset sampling value, and λ is the size adjustment parameter. It should be noted that the size adjustment parameter λ is set based on the size of the mobile device. For example, when the size of the mobile device is 50 cm, the starting point can be the center of the mobile device, and λ is 25 cm.
[0075] In the embodiment of the present invention, the formula for determining the feasibility of the pre-selected path is:
[0076]
[0077] Among them, f() is the path function, f(P i P i+1 ) is the path feasibility result, result 1 indicates that the pre-selected path is feasible and the pre-selected path is determined as the target path, and result 0 indicates that the pre-selected path is not feasible.
[0078] Optionally, in the obstacle avoidance path determination method of the embodiment of the present invention, when the second point is the target end point and there is no first obstacle point within the range between the first point and the second point, that is, there is no first obstacle point between the target end point and the first point (no ), at this time, the line between the first point and the second point is determined as the target path.
[0079] In an embodiment of the present invention, the starting point is taken as the first point, and the second point is determined from the path points and the target end point. At this time, the number of the second points is multiple, so there are multiple pre-selected paths between the first point and the second point. According to the above-mentioned method for determining the first obstacle point, the pre-selected path with a distance greater than or equal to the distance threshold is calculated and determined as the target path. At this time, the target path can be one or more. At this time, the second points of all currently determined target paths are updated as new first points, and the step of re-determining the second point (new second point) from the path points and the target end point is performed. The pre-selected path (new pre-selected path) and the target path (new target path) are determined again until the new first point is the target end point. At this time, multiple target paths will be obtained, and the target path is a path that the mobile device can pass through without colliding with obstacles.
[0080] S500: Optimize the target path to determine an obstacle avoidance path.
[0081] It should be noted that the obstacle avoidance path represents a path from the starting point to the target end point, that is, the path that the mobile device finally determines can avoid obstacles and move from the starting point to the target end point by moving along the obstacle avoidance path.
[0082] Specifically, step S500 includes steps S510-S520:
[0083] S510: Determine candidate paths and calculate the sum of the path lengths of each candidate path.
[0084] It should be noted that the candidate path is a path composed of target paths and from the starting point to the target end point. For example, it may include one target path, or a candidate path may be composed of multiple target paths, that is, a preliminarily determined path in which the mobile device can avoid obstacles and move from the starting point to the target end point by moving along the candidate path.
[0085] For example, when a candidate path A is the starting point and passes through two target paths to reach the target end point, the total path length of the candidate path is the sum of the lengths of the two target paths; when a candidate path B is the starting point and passes through three target paths to reach the target end point, the total path length of the candidate path is the sum of the lengths of the three target paths.
[0086] like Figure 2As shown, there are three paths, namely D1, D2 and D3, where D1 is a candidate path consisting of 6 target paths, D2 has obstacles and is therefore an invalid path, and D3 is a candidate path consisting of 3 target paths.
[0087] S520, taking the candidate path with the smallest total path length as the obstacle avoidance path, or obtaining a first angle difference between the mobile device and the second point of the target path and a second angle difference between the second point of the target path and the target end point, performing weighted summation based on the first angle difference, the second angle difference, the total path length and the weight coefficient, and taking the candidate path corresponding to the smallest weighted summation result as the obstacle avoidance path.
[0088] In the embodiment of the present invention, the obstacle avoidance path can be determined in two ways:
[0089] 1) Directly use the candidate path with the smallest total path length as the obstacle avoidance path;
[0090] 2) If Figure 3 As shown, a first angle difference between the mobile device and the second point of the target path and a second angle difference between the second point of the target path and the target end point are obtained. The specific calculation formula is:
[0091]
[0092]
[0093] Among them, α is the first angle difference, β is the second angle difference, is the moving direction vector of the mobile device, is the direction vector of the second point, It should be noted that the second point refers to the end point in the target path. For example, if a target path is from the starting point to one of the path points, then the path point is the end point of the target path.
[0094] Specifically, the weighted summation result choice calculation formula is as follows:
[0095]
[0096] In the embodiment of the present invention, the weight coefficient includes a first weight a, a second weight b and a third weight c. Refers to the total length of the path, n-1 is the number of path points from the starting point to the target end point, P0 is the starting point, d i (p i p i+1 ) is p i With p i+1 The path length between s ,p t) is the total path length, p s is the starting point, p t The target end point.
[0097]
[0098]
[0099] Specifically, the weight parameter can be adjusted according to the actual situation, and the candidate path with the smallest weighted sum result choice is used as the obstacle avoidance path. It should be noted that the first angle difference and the second angle difference can both be the sum of angle differences. For example, when the candidate path has three target paths, target path A1, target path A2, and target path A3, wherein target path A1 is from the starting point to the second point (specifically path point C), target path A2 is from path point C to the second point (specifically path point D), and target path A3 is from path point D to the second point (specifically the target end point), then the first angle difference can be: similar to the α calculation formula, the first sub-angle difference is determined according to the moving direction vector of the mobile device and the direction vector of path point C, the second sub-angle difference is determined according to the direction vector of path point C and the direction vector of path point D, the sum of the first sub-angle difference and the second sub-angle difference is used as the first angle difference, and the direction vector of path point D and the direction vector of the target end point are calculated as the second angle difference. Among them, when the number of target paths and second points is different, the principle is similar and will not be repeated.
[0100] like Figure 4 As shown, the embodiment of the present invention further provides an obstacle avoidance method, comprising steps S600-S700:
[0101] S600: Determine an obstacle avoidance path according to an obstacle avoidance path determination method.
[0102] Specifically, the obstacle avoidance path is determined according to the above obstacle avoidance path determination method.
[0103] S700: Control the mobile device to avoid obstacles according to the obstacle avoidance path.
[0104] Likewise, it includes but is not limited to robots, drones, automatic guided vehicles, self-driving cars (or self-driving vehicles), and the like.
[0105] The embodiment of the present invention further provides an obstacle avoidance path determination device, comprising:
[0106] A construction module is used to construct a spatial model; the spatial model includes an obstacle point cloud, a number of path points, a starting point, and a target end point;
[0107] A first determination module is used to take the starting point as the first point, determine the second point from the path points and the target end point, and determine the first obstacle point within the range of the first point and the second point from the obstacle point cloud;
[0108] A calculation module, configured to form a preselected path according to the first point and the second point, and calculate a distance between the first obstacle point and the preselected path;
[0109] A second determination module is used to determine a pre-selected path with a distance greater than or equal to a distance threshold as a target path, and determine a second point of the target path as a new first point, and return to the step of determining the second point from the path points and the target end point until the new first point is the target end point;
[0110] The optimization module is used to perform optimization processing according to the target path and determine the obstacle avoidance path; the obstacle avoidance path represents the path from the starting point to the target end point.
[0111] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0112] An embodiment of the present invention further provides a processing device, the device comprising a processor and a memory;
[0113] The memory is used to store programs;
[0114] The processor is used to execute the program to implement the obstacle avoidance path determination method and obstacle avoidance method of the embodiment of the present invention. The device of the embodiment of the present invention can realize the functions of obstacle avoidance path determination and obstacle avoidance. The device can be any intelligent terminal including a mobile phone, a tablet computer, a computer, a personal digital assistant (PDA for short), a car computer, etc.
[0115] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0116] An embodiment of the present invention further provides a computer-readable storage medium storing a program, which is executed by a processor to complete the obstacle avoidance path determination method and obstacle avoidance method of the aforementioned embodiment of the invention.
[0117] An embodiment of the present invention also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the obstacle avoidance path determination method and obstacle avoidance method of the aforementioned embodiments of the invention.
[0118] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0119] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0120] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in each embodiment of the present application can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0121] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0122] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for determining an obstacle avoidance path, characterized in that: include: Build a spatial model; The spatial model includes an obstacle point cloud, a number of path points, a starting point, and a target end point; Taking the starting point as the first point, determining a second point from the path points and the target end point, and determining a first obstacle point within the range between the first point and the second point from the obstacle point cloud; Forming a preselected path according to the first point and the second point, calculating a distance between the first obstacle point and the preselected path; Determine the preselected path whose distance is greater than or equal to the distance threshold as the target path, and determine the second point of the target path as the new first point, and return to the step of determining the second point from the path points and the target destination until the new first point is the target destination; Optimizing the target path to determine an obstacle avoidance path includes: Determine candidate paths and calculate the sum of the path lengths of each candidate path; the candidate path is a path consisting of the target path and from the starting point to the target end point; Obtaining a first angle difference between the mobile device and the second point of the target path and a second angle difference between the second point of the target path and the target end point, performing weighted summation according to the first angle difference, the second angle difference, the total path length, and a weight coefficient, and taking a candidate path corresponding to a minimum weighted summation result as the obstacle avoidance path; the obstacle avoidance path represents a path from the starting point to the target end point; Wherein, constructing the space model includes: Generate a three-dimensional model through three-dimensional reconstruction; In the three-dimensional model: the surface of the obstacle is uniformly sampled according to a preset sampling value to generate the obstacle point cloud, and the starting point and the target end point are determined and a random point cloud is generated to obtain the spatial model; the random point cloud includes a number of the path points; the distance threshold is determined according to the preset sampling value.
2. The obstacle avoidance path determination method according to claim 1, characterized in that: The obstacle point cloud includes a plurality of second obstacle points, and determining the first obstacle point within the range between the first point and the second point from the obstacle point cloud includes: Acquire first coordinate information of the first point, second coordinate information of the second point, and third coordinate information of the second obstacle point; the first coordinate information includes a first horizontal coordinate, a first vertical coordinate, and a first vertical coordinate, the second coordinate information includes a second horizontal coordinate, a second vertical coordinate, and a second vertical coordinate, and the third coordinate information includes a third horizontal coordinate, a third vertical coordinate, and a third vertical coordinate; When the third horizontal coordinate is greater than or equal to the first horizontal coordinate and less than or equal to the second horizontal coordinate, the third vertical coordinate is greater than or equal to the first vertical coordinate and less than or equal to the second vertical coordinate, and the third vertical coordinate is greater than or equal to the first vertical coordinate and less than or equal to the second vertical coordinate, the second obstacle point is taken as the first obstacle point.
3. The obstacle avoidance path determination method according to claim 1, characterized in that: The forming a preselected path according to the first point and the second point and calculating the distance between the first obstacle point and the preselected path includes: Construct a virtual straight line between the two points according to the first point and the second point; the virtual straight line is a preselected path; The distance between the first obstacle point and the virtual straight line is calculated.
4. The obstacle avoidance path determination method according to claim 1, characterized in that: The obstacle avoidance path determination method further includes: When the second point is the target end point and there is no first obstacle point within the range between the first point and the second point, a line between the first point and the second point is determined as the target path.
5. An obstacle avoidance method, characterized in that: include: Determine an obstacle avoidance path according to the obstacle avoidance path determination method according to any one of claims 1 to 4; The mobile device is controlled to avoid obstacles according to the obstacle avoidance path.
6. An obstacle avoidance path determination device, characterized in that: include: Building modules, used to construct spatial models; The spatial model includes an obstacle point cloud, a number of path points, a starting point, and a target end point; The construction of the spatial model includes: generating a three-dimensional model by three-dimensional reconstruction; in the three-dimensional model: uniformly sampling the surface of the obstacle according to a preset sampling value to generate the obstacle point cloud, and determining the starting point and the target end point and generating a random point cloud to obtain the spatial model; the random point cloud includes a number of the path points; and the distance threshold is determined according to the preset sampling value; A first determination module is used to take the starting point as a first point, determine a second point from the path points and the target end point, and determine a first obstacle point within a range between the first point and the second point from the obstacle point cloud; a calculation module, configured to form a preselected path according to the first point and the second point, and calculate a distance between the first obstacle point and the preselected path; a second determination module, configured to determine the preselected path whose distance is greater than or equal to the distance threshold as the target path, and determine the second point of the target path as the new first point, and return to the step of determining the second point from the path points and the target destination until the new first point is the target destination; The optimization module is used to perform optimization processing according to the target path to determine the obstacle avoidance path, including: determining candidate paths and calculating the sum of the path lengths of each candidate path; the candidate path is a path composed of the target path and from the starting point to the target end point; obtaining a first angle difference between a mobile device and the second point of the target path and a second angle difference between the second point of the target path and the target end point, performing weighted summation according to the first angle difference, the second angle difference, the sum of the path lengths and a weight coefficient, and taking the candidate path corresponding to the minimum weighted summation result as the obstacle avoidance path; the obstacle avoidance path represents the path from the starting point to the target end point.
7. A processing device, characterized in that: including a processor and a memory; The memory stores a program; The processor executes the program to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The storage medium stores a program, and when the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Path planning method, robot and computer readable storage medium
CN110940341A
Omnidirectional mobile robot autonomous navigation system based on VFH* local path planning method
CN111142542A
Unmanned aerial vehicle path planning method based on improved A-star algorithm
CN111679692A
Three-dimensional obstacle avoidance flight path planning method based on pre-planned path optimization RRT algorithm
CN112179351A
Robot path planning method and device and storage medium
CN113190006A