Invalid turning point detection method and device, equipment and storage medium

By detecting obstacles and angle relationships at path points, invalid turning points are identified and removed, solving the problem of unnecessary turns in path planning and improving the rationality of the path.

CN118999601AActive Publication Date: 2024-11-22GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310539433.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2024-11-22
Estimated Expiration
2043-05-12

AI Technical Summary

Technical Problem

Existing path planning algorithms contain invalid turning points, resulting in unreasonable planned paths and unnecessary turns.

Method used

By detecting whether there are obstacles within the detection range of the target path point, and combining the angle between the path lines to determine whether it is a straight angle, invalid turning points are identified.

Benefits of technology

It enables accurate detection of invalid turning points on the planned path, thereby improving the rationality of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118999601A_ABST
    Figure CN118999601A_ABST
Patent Text Reader

Abstract

The invention provides an invalid turning point detection method and device, equipment and a storage medium, and the method comprises the steps: obtaining a target path point, a first path point and a second path point on a target planning path, the first path point being a previous path point of the target path point on the target planning path, and the second path point being a previous path point of the target path point on the target planning path; the second path point is a next path point of the target path point on the target planning path; under the condition that the included angle between a first path connecting line and a second path connecting line is not a flat angle, an obstacle located in the detection range of the target path point is detected, the first path connecting line is a line segment connecting the target path point and the first path point, and the second path connecting line is a line segment connecting the target path point and the second path point; the second path connecting line is a line segment connecting the target path point and the second path point; and if no obstacle exists in the detection range, determining that the target path point is an invalid turning point on the target planned path. According to the technical scheme, the invalid turning points on the planned path can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of path planning, and in particular to an invalid turning point detection method, device, equipment and storage medium. Background Art

[0002] With the rise of automation, map navigation has become a hot topic of research. In order to achieve map navigation, the external environment is generally collected to form an environmental map, and then a path planning algorithm based on graph search and / or a path planning method based on sampling is used to obtain multiple path points and connect multiple path points to form a planned path.

[0003] At present, there are some invalid turning points in the multiple path points obtained by the path planning algorithm based on graph search and / or the path planning method based on sampling, which makes the planned path have some unnecessary corners and the planned path is not reasonable. In order to make the planned path more reasonable, it is necessary to detect the invalid turning points from the planned path. Summary of the invention

[0004] The present application provides an invalid turning point detection method, device, equipment and storage medium to solve the technical problem of detecting invalid turning points in a planned path.

[0005] In a first aspect, a method for detecting an invalid turning point is provided, comprising:

[0006] Acquire a target path point, a first path point, and a second path point on a target planning path, wherein the first path point is a previous path point of the target path point on the target planning path, and the second path point is a next path point of the target path point on the target planning path;

[0007] Detecting obstacles within the detection range of the target path point when the angle between the first path line and the second path line is not a straight angle, the first path line is a line segment connecting the target path point and the first path point, and the second path line is a line segment connecting the target path point and the second path point;

[0008] If there is no obstacle within the detection range, the target path point is determined to be an invalid turning point on the target planning path.

[0009] In this technical solution, the target path point, the previous path point of the target path point and the next path point of the target path point are first obtained. When the angle between the first path line connecting the target path point and the previous path point and the second path line connecting the target path point and the next path point is not a right angle, it means that the target path point is a turning point on the target planning path. Then, obstacles within the detection range of the target path point are detected. When there are no obstacles within the detection range, the target path point is determined to be an invalid turning point on the target planning path, thereby realizing the detection of invalid turning points.

[0010] In combination with the first aspect, in a possible implementation, the method further includes: if there is an obstacle within the detection range, and there is no obstacle within the detection range within the first angle between the first path line and the second path line, determining that the target path point is an invalid path point on the target planning path, the first angle being an angle less than 180°. When there is an obstacle within the detection range, if there is no obstacle within the angle less than 180° between the first path line and the second path line, it means that there will be no obstacle in the next path point from the previous path point of the target path point, that is, the target path point is not related to the obstacle, and the target path point is determined to be an invalid turning point on the target planning path, thereby realizing the detection of the invalid turning point.

[0011] In combination with the first aspect, in a possible implementation, the method further includes: if there is an obstacle within the detection range, and the obstacle within the detection range is within the first angle, determining that the target path point is not an invalid path point on the target planning path. If there is an obstacle at an angle less than 180° between the first path line and the second path line, it means that obstacles may be encountered when going directly from the previous path point of the target path point to the next path point of the target path point, and the target path point is a reasonable and effective turning point, and the target path point is determined to be an invalid turning point on the target planning path, so as to accurately judge whether the target path point is invalid.

[0012] In combination with the first aspect, in a possible implementation, the detecting an obstacle within the detection range of the target path point includes: if there is an obstacle within the detection range, determining a first vector, a second vector, and a third vector, wherein the starting points of the first vector, the second vector, and the third vector are the target path point, the end point of the first vector is the first path point, the end point of the second vector is the second path point, the end point of the third vector is the position point where the target obstacle is located, and the target obstacle is any obstacle within the detection range; if the vector product of the first vector and the third vector is greater than 0, and the vector product of the second vector and the third vector is less than 0, then determining that the target obstacle exists within the first angle; if the vector product of the first vector and the third vector is less than 0, or the vector product of the second vector and the third vector is greater than 0, then determining that the target obstacle does not exist within the first angle. Determining the relative position relationship between the obstacle and the target path point by detecting the vector product of the vector angle is simple and effective.

[0013] In combination with the first aspect, in a possible implementation, the method further includes: when the angle between the first path line and the second path line is a flat angle, determining that the target path point is not an invalid turning point on the target planning path. When the angle between the first path line connecting the target path point and the previous path point and the second path line connecting the target path point and the next path point is not a flat angle, it means that the target path point is not a turning point on the target planning path, and determining that the target path point is not an invalid turning point on the target planning path achieves accurate judgment on whether the target path point is invalid.

[0014] In combination with the first aspect, in a possible implementation, after obtaining the target path point, the first path point and the second path point on the target planning path, it also includes: determining a first vector and a second vector, the starting point of the first vector and the second vector is the target path point, the end point of the first vector is the first path point, and the end point of the second vector is the second path point; if the vector angle between the first vector and the second vector is not 180°, then determining that the angle between the first path line and the second path line is not a straight angle; if the vector angle between the first vector and the second vector is 180°, then determining that the angle between the first path line and the second path line is a straight angle. By judging the vector angle to determine whether the angle between the two path lines is a straight angle, the implementation method is simple and effective.

[0015] In combination with the first aspect, in a possible implementation manner, the method further includes: after determining that the target path point is an invalid turning point on the target planned path, adding 1 to the number of invalid turning points on the target planned path.

[0016] In combination with the first aspect, in a possible implementation, the method further includes: after determining that the target path point is an invalid turning point on the target planning path or is not an invalid turning point on the target planning path, taking the second path point as the target path point, and executing the step of obtaining the target path point, the first path point, and the second path point on the target planning path. After determining one path point, continue to determine whether the next path point is an invalid turning point, so that all invalid turning points on the target planning path can be identified, which is convenient for evaluating whether the target planning path is reasonable.

[0017] In a second aspect, an invalid turning point detection device is provided, comprising:

[0018] A path point acquisition module, used to acquire a target path point, a first path point, and a second path point on a target planning path, wherein the first path point is a previous path point of the target path point on the target planning path, and the second path point is a next path point of the target path point on the target planning path;

[0019] an obstacle detection module, configured to detect obstacles within a detection range of the target path point when the angle between a first path line and a second path line is not a straight angle, the first path line being a line segment connecting the target path point and the first path point, and the second path line being a line segment connecting the target path point and the second path point;

[0020] The invalid turning point determination module is used to determine that the target path point is an invalid turning point on the target planning path if there is no obstacle within the detection range.

[0021] In a third aspect, a computer device is provided, comprising a memory and one or more processors, wherein the memory is connected to the one or more processors, and the one or more processors are used to execute one or more computer programs stored in the memory, and when the one or more processors execute the one or more computer programs, the computer device implements the invalid turning point detection method of the first aspect.

[0022] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the invalid turning point detection method of the first aspect.

[0023] The present application can achieve the following technical effects: detection of invalid turning points on a planned path. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1Several schematic diagrams of turning points provided for embodiments of the present application;

[0025] Figure 2 A flowchart of an invalid turning point detection method provided in an embodiment of the present application;

[0026] Figure 3 A schematic diagram of a vector provided in an embodiment of the present application;

[0027] Figure 4 A schematic diagram of a flow chart of another invalid turning point detection method provided in an embodiment of the present application;

[0028] Figure 5 is a structural schematic diagram of an invalid turning point detection device provided in an embodiment of the present application;

[0029] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0031] The technical solution of the present application is applicable to the path planning scenario, wherein the technical solution of the present application is used to detect and judge whether a path point on the planned path is an invalid turning point for a planned path composed of multiple discrete path points in the path planning scenario, and to count the number of invalid turning points on the planned path, thereby providing a reference for evaluating whether the planned path is reasonable. The technical solution of the present application can be applied to computer devices, including but not limited to mobile phones, laptop computers, desktop computers, and the like.

[0032] For ease of understanding, the definition of invalid turning points is first introduced. In this application, a turning point refers to a path point where there is a corner on the planned path, and a corner means that the device needs to turn to a certain degree at the turning point. Figure 1 , Figure 1 Several possible situations of turning points are shown, such as Figure 1 As shown, line segment l1 connects path point p i With path point p i The previous path point p i-1 , line segment l2 connects path point p i With path point p i The next path point p i+1 , line segment l1 and line segment l2 form angles θ and α, angles θ and α are not 180°, path point p i The turning point p i The relationships between the obstacles are Figure 1There are four cases from a to d: a. With turning point p i There is no obstacle in the detection range f centered at the turning point p. i There are one or more obstacles within the detection range f centered at Figure 1 The black square in the figure), all obstacles are located within the angle θ; c, with the turning point p i There are multiple obstacles in the detection range f centered on , some of which are located within the angle θ, and some are located outside the angle θ; d. i There are one or more obstacles within the detection range f centered on , and all obstacles are located outside the angle θ.

[0033] Depend on Figure 1 It can be seen that Figure 1 In cases b and c, the path point p i The turning point p is set to bypass obstacles, so the turning point p shown in b and c is i The corner at is a reasonable corner; in cases a and d, the path point p i The setting of the turning angle at a and d has nothing to do with bypassing obstacles, so the turning point p i The corner at is an unreasonable corner, and the turning point corresponding to the unreasonable corner is an invalid turning point, that is, the turning point p shown in a and d. i Invalid turning point.

[0034] This application aims to detect Figure 1 The invalid turning points a and d in FIG.

[0035] See also Figure 2 , Figure 2 A flowchart of an invalid turning point detection method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method comprises the following steps:

[0036] S101, obtaining a target path point, a first path point and a second path point on a target planning path.

[0037] Among them, the target planning path refers to the path obtained through path planning. The target planning path can be obtained based on any path planning algorithm. The path planning algorithm includes but is not limited to a graph search-based path planning algorithm, a sampling-based path planning method, etc. This application does not limit the algorithm for obtaining the target planning path.

[0038] The target planning path consists of multiple path points, and the target planning path can be expressed as P{p0, p1, p2, ..., p n}, (n+1) is the total number of path points on the target planning path. The target path point can be any path point on the target planning path except the first and last two path points, that is, the target path point is {p1, p2, ..., p n-1}, the target path point can be expressed as p i , 1≤i≤n-1. The first path point is the previous path point of the target path point on the target planning path. The first path point can be expressed as p i-1 The second path point is the next path point of the target path point on the target planning path. The second path point can be expressed as p i+1 .

[0039] In the specific implementation, the path currently planned based on the path planning algorithm can be obtained as the target planning path, and then any path point on the target planning path except the first and last two path points can be obtained as the target path point, and the previous path point of the target path point on the target planning path can be obtained as the first path point, and the next path point of the target path point on the target planning path can be obtained as the second path point.

[0040] S102, determining whether the angle between the first path line and the second path line is a right angle.

[0041] The first path line is a line segment connecting the target path point and the first path point, and the second path line is a line segment connecting the target path point and the second path point. Figure 1 , Figure 1 The line segment l1 in is the first path line, and the line segment l2 is the second path line.

[0042] The angle between the first path line and the second path line can be one of the following three situations: (1) less than 180°. An angle less than 180° is called the first angle. The first angle can be Figure 1 (2) is greater than 180°. The angle greater than 180° is called the second angle. The second angle can be Figure 1 The angle α is shown in (3); it is equal to 180°, and the angle equal to 180° is a straight angle.

[0043] In a feasible implementation manner, it can be determined whether the angle between the first path line and the second path line is a right angle through the following steps A1-A3:

[0044] A1. Determine the first vector and the second vector.

[0045] Among them, Figure 3 As shown, the starting point of the first vector is the target path point p i , the end point of the first vector is the first path point, and the first vector is expressed as The starting point of the second vector is the target path point p i , the end point of the second vector is the second path point, and the second vector is expressed as

[0046] Specifically, the first vector and the second vector can be determined according to the position coordinates of the target path point, the first path point, and the second path point, wherein the first vector Second vector (x i ,y i , z i ) is the position coordinate of the target path point, (x i-1 ,y i-1 , z i-1 ) is the position coordinate of the first path point, (x i+1 ,y i+1 , z i+1 ) is the position coordinate of the second path point.

[0047] A2. If the vector angle between the first vector and the second vector is not 180°, it is determined that the angle between the first path line and the second path line is not a right angle.

[0048] A3. If the vector angle between the first vector and the second vector is 180°, determine that the angle between the first path line and the second path line is a straight angle.

[0049] Among them, the vector angle is less than or equal to 180°.

[0050] Specifically, the vector angle between the first vector and the second vector can be calculated based on the inverse cosine transform formula, and the inverse cosine transform formula is as follows:

[0051] Wherein, a is the vector angle between the first vector and the second vector.

[0052] By judging the vector angle, it is determined whether the angle between two path lines is a right angle. The implementation method is simple and effective.

[0053] Optionally, it is also possible to determine whether the angle between the first path line and the second path line is a flat angle by other means. For example, the first slope k1 of the first path line can be calculated based on the position coordinates of the target path point and the first path point, and the second slope k2 of the second path line can be calculated based on the position coordinates of the target path point and the second path point, to determine whether the first slope k1 is equal to the second slope k2. If the first slope k1 is equal to the second slope k2, it is determined that the angle between the first path line and the second path line is a flat angle; if the first slope k1 is not equal to the second slope k2, it is determined that the angle between the first path line and the second path line is not a flat angle. The present application does not limit the specific implementation method of determining whether the angle between the first path line and the second path line is a flat angle.

[0054] When the angle between the first path line and the second path line is not a right angle, it means that the first path point, the target path point and the second path point are not on a straight line, the target path point is a turning point, there is a corner at the target path point, and it is necessary to further determine the relative position relationship between the obstacle at the target path point and the target path point, and execute step S103; when the angle between the first path line and the second path line is a right angle, it means that the first path point, the target path point and the second path point are on a straight line, the target path point is not a turning point, there is no corner at the target path point, and execute step S106.

[0055] S103, detecting obstacles within a detection range of the target path point.

[0056] Here, the detection range of the target path point can be set based on the external dimensions of the mobile device (such as a mobile robot). The detection range of the target path point is positively correlated with the external dimensions of the mobile device, that is, the larger the external dimensions of the mobile device, the larger the detection range of the target path point; the smaller the external dimensions of the target mobile device, the smaller the detection range of the target path point. The detection range of the target path point is used to detect obstacles that are close to the mobile device. The detection range of the target path point is centered on the target path point. Exemplarily, the detection range of the target path point can be represented as a rectangular detection box, such as Figure 1 As shown in f.

[0057] Detecting an obstacle within a detection range of a target path point may include detecting whether there is an obstacle within the detection range of the target path point, and detecting a relative positional relationship between the obstacle within the detection range and the target path point when there is an obstacle within the detection range of the target path point.

[0058] Step S103 may include the following steps S1031 and S1032:

[0059] S1031, determine whether there is an obstacle within the detection range of the target path point.

[0060] In a feasible implementation, it is possible to detect whether there is an obstacle within the detection range of the target path point by traversing the positions within the detection range of the target path point.

[0061] Specifically, it is possible to start from the first position within the detection range of the target path point and determine whether the current position traversed is the position where the obstacle is located. If the current position traversed is the position where the obstacle is located, it is determined that there is an obstacle within the detection range of the target path point; if the current position traversed is not the position where the obstacle is located, the next position of the current position within the detection range of the target path point is traversed and obtained as the current position, and continue to determine whether the current position is the position where the obstacle is located until it is detected that there is an obstacle within the detection range of the target path point, or all positions within the detection range of the target path point are traversed. When all positions within the detection range of the target path point are traversed and all positions are not the positions where the obstacle is located, it is determined that there is no obstacle within the detection range of the target path point. Among them, the position coordinates of the obstacle can be obtained, and the position coordinates of the current position traversed can be determined to determine whether the current position is the position where the obstacle is located. If the position coordinates of the current position are the position coordinates of the obstacle, it is determined that the current position is the position where the obstacle is located; if the position coordinates of the current position are not the position coordinates of the obstacle, it is determined that the current position is not the position where the obstacle is located. By traversing the detection range position at the target path point, detection can be stopped when an obstacle is detected, which can save the amount of calculation.

[0062] Optionally, multiple positions or all positions within the detection range of the target path point may also be obtained simultaneously, and it is determined whether the multiple positions or all positions are positions where obstacles are located to determine whether there are obstacles within the detection range of the target path point. This application does not impose any restrictions.

[0063] If there is an obstacle within the detection range of the target path point, it means that the corner at the target path point may be set to bypass the obstacle, and further judgment is required to execute step S1032; if there is no obstacle within the detection range of the target path point, it means that the corner at the target path point is not set to bypass the obstacle. If the target path point Figure 1 As shown in a, execute step S105.

[0064] S1032, determining whether there is an obstacle within the detection range of the target path point within the first angle between the first path line and the second path line.

[0065] Here, the first angle can be referred to Figure 1 The angle θ in .

[0066] When there is no obstacle within the detection range of the target path point within the first angle between the first path line and the second path line, it means that the obstacles within the detection range of the target path point are all within the second angle between the first path line and the second path line, and the relative position relationship between the target path point and the obstacle meets the requirements. Figure 1 d in the figure, execute step S105; if there is an obstacle within the detection range of the target path point within the first angle between the first path line and the second path line, it means that the relative position relationship between the target path point and the obstacle meets the requirement. Figure 1 b or c in, execute step S106.

[0067] Among them, for an obstacle within the detection range of the target path point, it can be determined whether the obstacle is within the first angle between the first path line and the second path line through the following steps B1-B3:

[0068] B1. Determine the first vector, the second vector and the third vector.

[0069] The first vector and the second vector can be Figure 3 As shown, the starting point of the third vector is the target path point p i , the end point of the third vector is the location point p of the target obstacle wj , the target obstacle can be any obstacle within the detection range of the target path point, and the third vector is expressed as 1≤j≤m, where m is the number of obstacles within the detection range of the target path point.

[0070] Specifically, the third vector can be determined according to the position coordinates of the target path point and the target obstacle. (x wj ,y wj , z wj ) is the position coordinate of the target obstacle.

[0071] B2. If the vector product of the first vector and the third vector is greater than 0, and the vector product of the second vector and the third vector is less than 0, it is determined that the target obstacle is within the first angle between the first path line and the second path line, that is, the target obstacle is within the first angle between the first path line and the second path line.

[0072] B3. If the vector product of the first vector and the third vector is less than 0, or the vector product of the second vector and the third vector is greater than 0, it is determined that the target obstacle is within the second angle between the first path line and the second path line, that is, the target obstacle does not exist within the first angle between the first path line and the second path line.

[0073] Specifically, the vector product of the first vector and the third vector, and the vector product of the second vector and the third vector may be calculated based on the vector cross multiplication formula. The vector cross multiplication formula is as follows:

[0074] c1=P1×P3 j

[0075] c2=P2×P3 j

[0076] Wherein, c1 is the vector product of the first vector and the third vector, and c2 is the vector product of the second vector and the third vector. The relative position relationship between the obstacle and the path point is determined by detecting the vector product of the vector angle, which is simple and effective.

[0077] By referring to the above steps B1 to B3, it is determined whether each obstacle in the detection range of the target path point is within the first angle between the first path line and the second path line. The relative position relationship between all obstacles in the detection range of the target path point and the target path point can be determined, and then it can be determined whether there is an obstacle in the detection range within the angle between the first path line and the second path line.

[0078] In a feasible manner, it is possible to determine whether there is an obstacle within the detection range of the target path point within the first angle between the first path line and the second path line by traversing the obstacles within the detection range of the target path point, wherein it is possible to start from the first obstacle within the detection range of the target path point, and determine whether the current obstacle obtained by traversal exists within the first angle between the first path line and the second path line based on the above steps B1 to B3. If the current obstacle is within the first angle between the first path line and the second path line, it is determined that the first path line and the second path line are within the first angle. If there is an obstacle within the detection range of the target path point within the first angle between the lines, the traversal process ends and step S106 is executed; if the current obstacle is within the second angle between the first path line and the second path line, the next obstacle of the current obstacle is traversed and obtained as the current obstacle, and the current obstacle is continuously determined to be within the first angle between the first path line and the second path line, until it is determined that there is an obstacle within the detection range of the target path point within the first angle between the first path line and the second path line, or all obstacles within the detection range of the target path point are traversed. When all obstacles within the detection range of the target path point are traversed and all obstacles traversed are located within the second angle between the first path line and the second path line, it is determined that there is no obstacle within the detection range of the target path point within the first angle between the first path line and the second path line, and step S105 is executed.

[0079] Optionally, obstacles within the detection range of the target path point can also be obtained at the same time, and each obstacle within the detection range of the target path point can be simultaneously determined in the manner described in B1 to B3 above to determine whether it is within the first angle between the first path line and the second path line, thereby determining whether there is an obstacle within the detection range of the target path point within the first angle between the first path line and the second path line. This application is not limited.

[0080] Optionally, for the above steps S1031 to S1032, two obstacle sets may be predefined to store obstacles within a first angle between the first path line and the second path line and obstacles within a second angle between the first path line and the second path line, respectively. Then, starting from the first position within the detection range of the target path point, first determine whether the current position traversed is the position where the obstacle is located; if the current position traversed is the position where the obstacle is located, determine that there is an obstacle at the current position, and use the method introduced in the above steps B1 to B3 to determine whether the obstacle at the current position is within the first angle between the first path line and the second path line. If it is within the first angle between the first path line and the second path line, then put the current indicator of the obstacle at the current position (including but not limited to the current position, the position coordinates of the current position or the obstacle at the current position) into the obstacle set corresponding to the first angle, otherwise, put the current indicator into the obstacle set corresponding to the second angle; then take the next position of the current position as the current position, continue to determine whether the current position traversed is the position where the obstacle is located, and complete the subsequent determination; if the current position traversed is not the position where the obstacle is located, then take the next position of the current position as the current position, and continue to determine whether the current position traversed is the position where the obstacle is located. And so on, until all positions within the detection range of the target path point are traversed. If the obstacle set corresponding to the first angle and the obstacle set corresponding to the second angle are both empty, it is determined that there is no obstacle within the detection range of the target path point, and step S105 is executed; if the obstacle set corresponding to the first angle is not empty, it is determined that there is an obstacle within the detection range of the target path point within the first angle between the first path line and the second path line, and step S106 is executed; if the obstacle set corresponding to the first angle is empty and the obstacle set corresponding to the second angle is not empty, it is determined that there is no obstacle within the detection range of the target path point within the first angle between the first path line and the second path line, and step S105 is executed.

[0081] S105, determining that the target path point is an invalid turning point on the target planning path.

[0082] S106, determining that the target path point is not an invalid turning point on the target planned path.

[0083] exist Figure 2 In the corresponding technical solution, the target path point of the target planning path, the previous path point of the target path point and the next path point of the target path point are first obtained. When the angle between the first path line connecting the target path point and the previous path point and the second path line connecting the target path point and the next path point is not a right angle, it means that the target path point is a turning point on the target planning path. Then, the obstacle situation within the detection range of the target path point is obtained. When it is determined that there is no obstacle within the detection range based on the obstacle situation, the target path point is determined to be an invalid turning point on the target planning path, thereby realizing the detection of invalid turning points.

[0084] For each path point on the target planning path, you can refer to the above Figure 2 The technical solution is used to judge whether a path point is an invalid turning point, and then complete the statistics of invalid turning points on the target planning path.

[0085] See also Figure 4 , Figure 4 A flow chart of another invalid turning point detection method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the method comprises the following steps:

[0086] S201, setting the number of invalid turning points of the target planning path to 0.

[0087] S202, obtaining a target path point, a first path point, and a second path point on the target planning path.

[0088] S203, determining whether the target path point is an invalid turning point.

[0089] Here, the specific implementation of steps S202 to S203 may refer to the description of the aforementioned steps S101 to S106, which will not be repeated here.

[0090] When the target path point is an invalid turning point, execute step S204; when the target path point is not an invalid turning point, execute step S205.

[0091] S204, adding 1 to the number of invalid turning points of the target planning path.

[0092] S205, determine the second path point as the target path point, and return to execute step S202.

[0093] In the above Figure 3 In the corresponding technical solution, by judging whether each path point on the planned path is an invalid turning point in turn, the number of invalid turning points on the target planned path can be counted, providing a reference for the subsequent evaluation of the rationality of the path.

[0094] Optionally, in some possible cases, after determining that the target path point is an invalid turning point on the target planning path point, the invalid turning point can also be removed from the target planning path to obtain a new target planning path. By removing the invalid turning point from the target planning path to obtain a new target planning path, the planning path can be made more reasonable and effective.

[0095] Optionally, in some possible situations, after determining the number of invalid turning points on the target planning path, it is also possible to determine whether the target planning path is reasonable based on the number of invalid turning points on the target planning path, and then determine whether the target planning path can be used or whether the path needs to be replanned.

[0096] For example, the target ratio between the number of invalid turning points on the target planning path and the total number of path points on the target planning path can be calculated; if the target ratio is greater than the preset ratio, it is determined that the target planning path is unreasonable and the path needs to be replanned; if the target ratio is less than or equal to the preset ratio, it is determined that the target planning path is reasonable and does not need to be replanned, and the target planning path after eliminating invalid turning points can be used as the new target planning path.

[0097] Whether the target planning path is reasonable is judged according to the number of invalid turning points on the target planning path. The judging method is reasonable, effective and simple to implement, and can realize a quick judgment on whether the planned path is reasonable.

[0098] The method of the present application is introduced above, and the device of the present application is introduced below.

[0099] See also Figure 5 , Figure 5 Schematic diagram of the structure of an invalid turning point detection device provided in an embodiment of the present application. Figure 5 As shown, the invalid turning point detection device 30 includes:

[0100] A path point acquisition module 301 is used to acquire a target path point, a first path point, and a second path point on a target planning path, wherein the first path point is a previous path point of the target path point on the target planning path, and the second path point is a next path point of the target path point on the target planning path;

[0101] The obstacle detection module 302 is used to detect obstacles within the detection range of the target path point when the angle between the first path line and the second path line is not a straight angle, the first path line is a line segment connecting the target path point and the first path point, and the second path line is a line segment connecting the target path point and the second path point;

[0102] The invalid turning point determination module 303 is used to determine that the target path point is an invalid turning point on the target planned path if there is no obstacle within the detection range.

[0103] In a possible design, the above-mentioned path point acquisition module 301 is also used to determine that the target path point is an invalid path point on the target planned path if there is an obstacle within the detection range, and there is no obstacle within the detection range within a first angle between the first path line and the second path line, and the first angle is an angle less than 180°.

[0104] In a possible design, the invalid turning point determination module 303 is also used to determine that the target path point is not an invalid path point on the target planned path if there is an obstacle within the detection range and the obstacle within the detection range is within the first angle.

[0105] In a possible design, the obstacle detection module 302 is specifically used to determine a first vector, a second vector and a third vector if there is an obstacle within the detection range, wherein the starting points of the first vector, the second vector and the third vector are the target path point, the end point of the first vector is the first path point, the end point of the second vector is the second path point, the end point of the third vector is the location point where the target obstacle is located, and the target obstacle is any obstacle within the detection range; if the vector product of the first vector and the third vector is greater than 0, and the vector product of the second vector and the third vector is less than 0, then it is determined that the target obstacle exists within the first angle; if the vector product of the first vector and the third vector is less than 0, or the vector product of the second vector and the third vector is greater than 0, then it is determined that the target obstacle does not exist within the first angle.

[0106] In a possible design, the invalid turning point determination module 303 is also used to determine that the target path point is not an invalid turning point on the target planned path when the angle between the first path line and the second path line is a right angle.

[0107] In a possible design, the above-mentioned path point acquisition module 301 is also used to determine a first vector and a second vector, the starting points of the first vector and the second vector are the target path point, the end point of the first vector is the first path point, and the end point of the second vector is the second path point; if the vector angle between the first vector and the second vector is not 180°, then it is determined that the angle between the first path line and the second path line is not a right angle; if the vector angle between the first vector and the second vector is 180°, then it is determined that the angle between the first path line and the second path line is a right angle.

[0108] In a possible design, the invalid turning point determination module 303 is further used to increase the number of invalid turning points on the target planning path by 1 after determining that the target path point is an invalid turning point on the target planning path.

[0109] In one possible design, the invalid turning point determination module 303 is also used to, after determining that the target path point is an invalid turning point on the target planned path or is not an invalid turning point on the target planned path, use the second path point as the target path point and execute the steps of obtaining the target path point, the first path point and the second path point on the target planned path.

[0110] It should be noted that Figure 5 For the contents not mentioned in the corresponding embodiments, please refer to the description of the aforementioned method embodiments, which will not be repeated here.

[0111] The above-mentioned device first obtains the target path point, the previous path point of the target path point and the next path point of the target path point of the target planning path. When the angle between the first path line connecting the target path point and the previous path point and the second path line connecting the target path point and the next path point is not a right angle, it means that the target path point is a turning point on the target planning path. Then, the obstacle situation within the detection range of the target path point is obtained. When it is determined that there is no obstacle within the detection range based on the obstacle situation, the target path point is determined to be an invalid turning point on the target planning path, thereby realizing the detection of invalid turning points.

[0112] See also Figure 6 , Figure 6 4 is a schematic diagram of a computer device provided in an embodiment of the present application, wherein the computer device 40 includes a processor 401 and a memory 402. The memory 402 is connected to the processor 401, for example, via a bus.

[0113] The processor 401 is configured to support the computer device 40 to perform the corresponding functions in the method in the above method embodiment. The processor 401 can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0114] The memory 402 is used to store program codes, etc. The memory 402 may include a volatile memory (VM), such as a random access memory (RAM); the memory 402 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 402 may also include a combination of the above-mentioned types of memories.

[0115] The processor 401 may call the program code to perform the following operations:

[0116] Acquire a target path point, a first path point, and a second path point on a target planning path, wherein the first path point is a previous path point of the target path point on the target planning path, and the second path point is a next path point of the target path point on the target planning path;

[0117] Detecting obstacles within the detection range of the target path point when the angle between the first path line and the second path line is not a straight angle, the first path line is a line segment connecting the target path point and the first path point, and the second path line is a line segment connecting the target path point and the second path point;

[0118] If there is no obstacle within the detection range, the target path point is determined to be an invalid turning point on the target planning path.

[0119] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the above embodiment.

[0120] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0121] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for detecting an invalid turning point, characterized in that: include: Acquire a target path point, a first path point, and a second path point on a target planning path, wherein the first path point is a previous path point of the target path point on the target planning path, and the second path point is a next path point of the target path point on the target planning path; Detecting obstacles within the detection range of the target path point when the angle between the first path line and the second path line is not a straight angle, the first path line is a line segment connecting the target path point and the first path point, and the second path line is a line segment connecting the target path point and the second path point; If there is no obstacle within the detection range, the target path point is determined to be an invalid turning point on the target planning path.

2. The method according to claim 1, characterized in that The method further comprises: If there is an obstacle within the detection range, and there is no obstacle within the detection range within the first angle between the first path line and the second path line, the target path point is determined to be an invalid path point on the target planned path, and the first angle is an angle less than 180°.

3. The method according to claim 2, characterized in that The method further comprises: If there is an obstacle within the detection range, and if there is an obstacle within the detection range within the first angle, it is determined that the target path point is not an invalid path point on the target planned path.

4. The method according to claim 2 or 3, characterized in that: The detecting an obstacle within a detection range of the target path point includes: If there is an obstacle within the detection range, determine a first vector, a second vector, and a third vector, wherein the starting points of the first vector, the second vector, and the third vector are the target path point, the end point of the first vector is the first path point, the end point of the second vector is the second path point, and the end point of the third vector is the location point of the target obstacle, and the target obstacle is any obstacle within the detection range; If the vector product of the first vector and the third vector is greater than 0, and the vector product of the second vector and the third vector is less than 0, it is determined that the target obstacle exists within the first angle; If the vector product of the first vector and the third vector is less than 0, or the vector product of the second vector and the third vector is greater than 0, it is determined that the target obstacle does not exist within the first angle.

5. The method according to claim 1, characterized in that The method further comprises: In the case where the angle between the first path line and the second path line is a flat angle, it is determined that the target path point is not an invalid turning point on the target planned path.

6. The method according to claim 1 or 5, characterized in that: After obtaining the target path point, the first path point and the second path point on the target planning path, the method further includes: Determine a first vector and a second vector, wherein the starting points of the first vector and the second vector are the target path point, the end point of the first vector is the first path point, and the end point of the second vector is the second path point; If the vector angle between the first vector and the second vector is not 180°, determining that the angle between the first path line and the second path line is not a straight angle; If the vector angle between the first vector and the second vector is 180°, it is determined that the angle between the first path line and the second path line is a straight angle.

7. The method according to claim 1, characterized in that The method further comprises: After determining that the target path point is an invalid turning point on the target planning path, the number of invalid turning points on the target planning path is increased by 1.

8. The method according to claim 1, characterized in that The method further comprises: After determining that the target path point is an invalid turning point on the target planned path or is not an invalid turning point on the target planned path, the second path point is used as the target path point, and the steps of obtaining the target path point, the first path point and the second path point on the target planned path are performed.

9. An invalid turning point detection device, characterized in that: include: A path point acquisition module, used to acquire a target path point, a first path point, and a second path point on a target planning path, wherein the first path point is a previous path point of the target path point on the target planning path, and the second path point is a next path point of the target path point on the target planning path; an obstacle detection module, configured to detect obstacles within a detection range of the target path point when the angle between a first path line and a second path line is not a straight angle, the first path line being a line segment connecting the target path point and the first path point, and the second path line being a line segment connecting the target path point and the second path point; The invalid turning point determination module is used to determine that the target path point is an invalid turning point on the target planning path if there is no obstacle within the detection range.

10. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory and a processor are connected to the processor, and the processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the computer device implements the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Path searching method and device

    CN106964156A

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

    CN113917912A

  • Mobile robot path planning optimization method

    CN115167474A

  • Low-energy-consumption mobile robot path planning method

    CN115903816A

  • Method and device for controlling way-finding of simulation object, and server

    WO2018130135A1