Invalid inflection point detection method, apparatus, 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.

CN118999601BActive Publication Date: 2025-11-14GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310539433.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2025-11-14
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 this with the angle between the path lines, invalid turning points are determined.

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 CN118999601B_ABST
    Figure CN118999601B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and storage medium for detecting invalid turning points. The method includes: acquiring a target path point, a first path point, and a second path point on a target planned path, wherein the first path point is the previous path point of the target path point on the target planned path, and the second path point is the next path point of the target path point on the target planned 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, wherein 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; and determining the target path point as an invalid turning point on the target planned path if no obstacles are found within the detection range. This technical solution can detect invalid turning points on a planned path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of path planning, and in particular to methods, apparatus, equipment and storage media for detecting invalid turning points. Background Technology

[0002] With the rise of automation, map navigation has become a research hotspot. To achieve map navigation, the external environment is typically collected to form an environmental map. Then, path planning algorithms based on graph search and / or sampling-based path planning methods are used to obtain multiple waypoints and connect these waypoints to form a planned path.

[0003] Currently, path planning algorithms based on graph search and / or sampling-based path planning methods often contain invalid turning points among the multiple path points obtained, resulting in unnecessary turns and inefficient path planning. To improve the rationality of the planned path, it is necessary to detect invalid turning points. Summary of the Invention

[0004] This application provides a method, apparatus, equipment, and storage medium for detecting invalid turning points, in order to solve the technical problem of detecting invalid turning points in planned paths.

[0005] Firstly, a method for detecting invalid turning points is provided, including:

[0006] Obtain the target path point, the first path point, and the second path point on the target planning path, where the first path point is the previous path point of the target path point on the target planning path, and the second path point is the next path point of the target path point on the target planning path.

[0007] When the angle between the first path line and the second path line is not a straight angle, obstacles located within the detection range of the target path point are detected. 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 are no obstacles within the detection range, the target path point is determined to be an invalid turning point on the target planned path.

[0009] In this technical solution, the target path point, the previous path point, and the next path point of the target path point are first obtained. When the angle between the first path connecting the target path point and the previous path point and the second path connecting the target path point and the next path point is not a straight angle, it indicates that the target path point is a turning point on the target planned 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 planned path, thus realizing the detection of invalid turning points.

[0010] In conjunction with the first aspect, in one possible implementation, the method further includes: if an obstacle exists 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 the target path point as an invalid path point on the target planned path, where the first angle is an angle less than 180°. When an obstacle exists 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 indicates that a direct path from the previous path point to the next path point of the target path point will not encounter an obstacle, i.e., the target path point is unrelated to obstacles, thus determining the target path point as an invalid turning point on the target planned path, thereby achieving the detection of invalid turning points.

[0011] In conjunction with the first aspect, in one possible implementation, the method further includes: if an obstacle exists within the detection range, and the obstacle within the detection range exists within the first included angle, determining that the target path point is not an invalid path point on the target planned path. If there is an obstacle within an angle of less than 180° between the first path line and the second path line, it indicates that a direct path from the previous path point to the next path point of the target path point may encounter an obstacle, and the target path point is a reasonable and valid turning point. Therefore, the target path point is determined to be an invalid turning point on the target planned path, achieving an accurate judgment on whether the target path point is invalid.

[0012] In conjunction with the first aspect, in one possible implementation, detecting obstacles within the detection range of the target path point includes: if an obstacle exists within the detection range, determining a first vector, a second vector, and a third vector, wherein the starting point of the first vector, the second vector, and the third vector is the target path point, the ending point of the first vector is the first path point, the ending point of the second vector is the second path point, and the ending point of the third vector is the location of the target obstacle, wherein 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 included 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 included angle. Determining the relative positional relationship between the obstacle and the target path point by detecting the vector product of the included angle is simple and effective.

[0013] In conjunction with the first aspect, in one possible implementation, the method further includes: if the angle between the first path line and the second path line is a straight angle, determining that the target path point is not an invalid turning point on the target planned 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 straight angle, it indicates that the target path point is not a turning point on the target planned path, thus determining that the target path point is not an invalid turning point on the target planned path, achieving an accurate judgment on whether the target path point is invalid.

[0014] In conjunction with the first aspect, in one possible implementation, after obtaining the target path point, the first path point, and the second path point on the target planned path, the method further includes: determining a first vector and a second vector, wherein the starting point of the first vector and the second vector is the target path point, the ending point of the first vector is the first path point, and the ending 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 the angle between the first path line and the second path line is determined to be a straight angle; if the vector angle between the first vector and the second vector is 180°, then the angle between the first path line and the second path line is determined to be a straight angle. Determining whether the angle between two path lines is a straight angle by judging the vector angle is a simple and effective implementation.

[0015] In conjunction with the first aspect, in one possible implementation, the method further includes: after determining that the target path point is an invalid turning point on the target planned path, incrementing the number of invalid turning points on the target planned path by 1.

[0016] In conjunction with the first aspect, in one possible implementation, the method further includes: 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, using the second path point as the target path point, and performing the step of obtaining the target path point, the first path point, and the second path point on the target planned path. After judging one path point, the method continues to judge whether the next path point is an invalid turning point, which can identify all invalid turning points on the target planned path, facilitating the evaluation of whether the target planned path is reasonable.

[0017] Secondly, an invalid turning point detection device is provided, comprising:

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

[0019] An obstacle detection module is used to detect obstacles located 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.

[0020] The invalid turning point determination module is used to determine the target path point as an invalid turning point on the target planned path if there are no obstacles within the detection range.

[0021] Thirdly, a computer device is provided, including a memory and one or more processors, the memory being connected to the one or more processors, the one or more processors being configured to execute one or more computer programs stored in the memory, and the one or more processors, when executing the one or more computer programs, causing the computer device to implement the invalid inflection point detection method of the first aspect described above.

[0022] Fourthly, a computer-readable storage medium is provided, which stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the invalid inflection point detection method of the first aspect.

[0023] This application can achieve the following technical effect: to detect invalid turning points on the planned path. Attached Figure Description

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

[0025] Figure 2 A flowchart illustrating an invalid inflection point detection method provided in an embodiment of this application;

[0026] Figure 3 A schematic diagram of vectors provided in the embodiments of this application;

[0027] Figure 4 A flowchart illustrating another invalid inflection point detection method provided in this application embodiment;

[0028] Figure 5 This is a schematic diagram of the structure of an invalid inflection point detection device provided in an embodiment of this application;

[0029] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0030] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0031] The technical solution of this application is applicable to path planning scenarios. Specifically, in path planning scenarios, this solution detects and determines whether path points on a planned path composed of multiple discrete path points are invalid turning points, and counts the number of invalid turning points on the planned path, thereby providing a reference for evaluating the rationality of the planned path. This technical solution can be applied to computer devices, including but not limited to mobile phones, laptops, desktop computers, etc.

[0032] To facilitate understanding, the definition of an invalid turning point will be introduced first. In this application, a turning point refers to a path point on the planned path where there is a turn, and a turn means that the equipment needs to make a certain degree of turning at that turning point. See [link to application]. Figure 1 , Figure 1 Several possible scenarios for the turning point 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 segments l1 and l2 form angles θ and α, respectively, which are not 180°. The path point p... i This is the turning point. Turning point p i The relationships with obstacles are respectively: Figure 1The four cases a to d are: a, with the turning point p i b) There are no obstacles within the detection range f centered on the point; i There are one or more obstacles within the detection range f centered on the object. Figure 1 (The black square in the image), all obstacles are located within the included angle θ; c, with the turning point p i Within the detection range f centered on the object, there are multiple obstacles, some located inside the included angle θ and others outside the included angle θ; d, with the turning point p i There are one or more obstacles within the detection range f centered on the object, and all obstacles are located outside the included angle θ.

[0033] Depend on Figure 1 It can be seen that, Figure 1 In cases b and c, the path point p i The corner at point b is designed to bypass obstacles; therefore, the turning point p shown in points b and c is... i The turning point at point p is a reasonable turning point; while in cases a and d, the path point p... i The setting of the turning point at point a is independent of bypassing obstacles; therefore, the turning point p shown in points a and d is... i The angle at point a is an unreasonable angle, and the turning point corresponding to an unreasonable angle is an invalid turning point, that is, the turning point p shown in points a and d. i This is an invalid turning point.

[0034] This application aims to detect Figure 1 The invalid turning points are indicated by 'a' and 'd' in the diagram. The technical solution of this application is described in detail below.

[0035] See Figure 2 , Figure 2 This is a flowchart illustrating an invalid inflection point detection method provided in an embodiment of this application, as shown below. Figure 2 As shown, the method includes the following steps:

[0036] S101, obtain the target path point, the first path point, and the second path point on the target planning path.

[0037] 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, including but not limited to graph search-based path planning algorithms, sampling-based path planning methods, etc. This application does not limit the algorithm for obtaining the target planning path.

[0038] The goal-oriented path consists of multiple path points and can be represented as P{p0, p1, p2, ..., p...} n}, where (n+1) represents the total number of path points on the target planning path. A target path point can be any path point on the target planning path excluding the first and last path points; that is, the target path points are {p1, p2, ..., p...}. n-1 For any path point in}, the target path point can be represented as p. i 1≤i≤n-1. The first path point is the path point preceding the target path point on the target planning path, and the first path point can be represented as p. i-1 The second path point is the next path point after the target path point on the target planning path. The second path point can be represented as p. i+1 .

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

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

[0041] Wherein, the first path connection is a line segment connecting the target path point and the first path point, and the second path connection is a line segment connecting the target path point and the second path point. For example, refer to... Figure 1 , Figure 1 Line segment l1 is the first path connection, and line segment l2 is the second path connection.

[0042] The angle between the first path line and the second path line can have the following three cases: (1) less than 180°. An angle less than 180° is called the first angle. The first angle can be as follows: Figure 1 The included angle θ is shown in the figure; (2) Angles greater than 180° are called the second included angle, and the second included angle can be shown as follows: Figure 1 The included angle α is shown in the figure; (3) equals 180°, and the included angle equal to 180° is a straight angle.

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

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

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

[0046] Specifically, the first vector and the second vector can be determined based on 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 (x) represents the position coordinates of the target path point. i-1 y i-1 , z i-1 (x) represents the position coordinates of the first path point. i+1 y i+1 , z i+1 ) represents the position coordinates of the second path point.

[0047] A2. If the angle between the first vector and the second vector is not 180°, then the angle between the line connecting the first path and the line connecting the second path is not a straight angle.

[0048] A3. If the angle between the first vector and the second vector is 180°, then the angle between the line connecting the first path and the line connecting the second path is determined to be a straight angle.

[0049] Where the included angle between the vectors is less than or equal to 180°.

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

[0051] Where 'a' is the angle between the first vector and the second vector.

[0052] Determining whether the angle between two paths is a straight angle by judging the angle between vectors is a simple and effective method.

[0053] Alternatively, other methods can be used to determine whether the angle between the first path line and the second path line is a straight angle. 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. It can then be determined whether the first slope k1 and the second slope k2 are equal. If the first slope k1 and the second slope k2 are equal, then the angle between the first path line and the second path line is determined to be a straight angle; if the first slope k1 and the second slope k2 are not equal, then the angle between the first path line and the second path line is determined to be a non-straight angle. This 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 straight angle.

[0054] If the angle between the first path line and the second path line is not a straight angle, it means that the three path points—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, and there is a corner at the target path point. It is necessary to further determine the relative positional relationship between the obstacle at the target path point and the target path point, and proceed to step S103. If the angle between the first path line and the second path line is a straight angle, it means that the three path points—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, and there is no corner at the target path point, and proceed to step S106.

[0055] S103, detect obstacles located within the 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. For example, the detection range of the target path point can be represented as a rectangular detection box, such as... Figure 1 As shown in f in the figure.

[0057] Detecting obstacles within the detection range of a target path point can include detecting whether an obstacle exists within the detection range of the target path point, and, if an obstacle exists within the detection range of the target path point, detecting the relative positional relationship between the obstacle within the detection range and the target path point.

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

[0059] S1031, Determine whether there are obstacles within the detection range of the target path point.

[0060] In one feasible implementation, the presence of obstacles within the detection range of a target path point can be detected by traversing the positions within that range.

[0061] Specifically, starting from the first position within the detection range of the target path point, it can be determined whether the current position is the location of an obstacle. If the current position is the location of an obstacle, then an obstacle exists within the detection range of the target path point. If the current position is not the location of an obstacle, the next position within the detection range of the target path point is obtained as the current position, and the determination of whether the current position is the location of an obstacle continues until an obstacle is detected within the detection range of the target path point, or until all positions within the detection range of the target path point have been traversed. If all positions within the detection range of the target path point have been traversed and none of them are the location of an obstacle, then it is determined that no obstacle exists within the detection range of the target path point. Specifically, the position coordinates of the obstacle can be obtained, and the determination of whether the current position is the location of an obstacle can be made by comparing the position coordinates of the current position with those of the obstacle. If the position coordinates of the current position are the position coordinates of the obstacle, then the current position is the location of an obstacle; if the position coordinates of the current position are not the position coordinates of the obstacle, then the current position is not the location of an obstacle. By traversing the detection range of the target path point, detection can be stopped as soon as an obstacle is detected, which can save computation.

[0062] Optionally, multiple or all locations within the detection range of the target path point can be acquired simultaneously, and it can be determined whether these multiple or all locations are the locations of obstacles to determine whether obstacles exist within the detection range of the target path point. This application does not impose any limitations.

[0063] If an obstacle exists within the detection range of the target path point, it indicates that the corner at the target path point may be designed to bypass the obstacle, requiring further judgment; proceed to step S1032. If no obstacle exists within the detection range of the target path point, it indicates that the corner at the target path point is not designed to bypass the obstacle, and the target path point... Figure 1 As shown in a, step S105 is executed.

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

[0065] Here, the first included angle can be referenced. Figure 1 The included angle θ.

[0066] If there are no obstacles within the detection range of the target path point within the first included angle between the first path line and the second path line, it indicates that all obstacles within the detection range of the target path point are within the second included angle between the first path line and the second path line, and the relative positional relationship between the target path point and the obstacles conforms to... Figure 1 If the positional relationship shown by d in the diagram is true, proceed to step S105; if an obstacle exists within the detection range of the target path point in the first angle between the first path line and the second path line, it indicates that the relative positional relationship between the target path point and the obstacle conforms to the given condition. Figure 1 If b or c is selected, proceed to step S106.

[0067] Specifically, for obstacles within the detection range of the target path point, the following steps B1-B3 can be used to determine whether the obstacle is within the first angle between the first path line and the second path line:

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

[0069] Wherein, the first vector and the second vector can be as follows: Figure 3 As shown, the starting point of the third vector is the target path point p. i The endpoint 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 represented 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 based on the position coordinates of the target waypoint and the target obstacle. (x wj y wj , z wj ) represents the position coordinates of the target obstacle.

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

[0072] B3. If the product of the first vector and the third vector is less than 0, or the 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 second angle between the first path line and the second path line, that is, within the first angle between the first path line and the second path line.

[0073] Specifically, the cross product of the first and third vectors, as well as the cross product of the second and third vectors, can be calculated based on the cross product formula, which is as follows:

[0074] c1 = P1 × P3 j

[0075] c2 = P2 × P3 j

[0076] Here, c1 is the vector product of the first and third vectors, and c2 is the vector product of the second and third vectors. The relative positional relationship between obstacles and path points is determined by detecting the vector product of the angles between the vectors, a simple and effective method.

[0077] Referring to steps B1 to B3 above, determine whether each obstacle within the detection range of the target path point is within the first angle between the first path line and the second path line. This will determine the relative positional relationship between all obstacles within the detection range of the target path point and the target path point, and thus determine whether there are obstacles within the detection range within the angle between the first path line and the second path line.

[0078] In one feasible approach, it can be determined whether an obstacle exists within the first angle between the first path line and the second path line by traversing obstacles within the detection range of the target path point. Specifically, starting from the first obstacle within the detection range of the target path point, it can be determined whether the currently traversed obstacle exists within the first angle between the first path line and the second path line based on steps B1 to B3. If the current obstacle is within the first angle between the first path line and the second path line, then the first path line and the second path line are considered to be within the first angle. If an obstacle exists within the detection range of the target path point in the first angle between the connecting lines, the traversal process ends, and step S106 is executed. If the current obstacle is within the second angle between the first and second path connecting lines, the next obstacle is obtained as the current obstacle, and the process continues to determine whether the current obstacle exists within the first angle between the first and second path connecting lines until it is determined that an obstacle exists within the detection range of the target path point in the first angle between the first and second path connecting lines, or until all obstacles within the detection range of the target path point have been traversed. When all obstacles within the detection range of the target path point have been traversed, and all traversed obstacles are located within the second angle between the first and second path connecting lines, it is determined that no obstacle exists within the detection range of the target path point in the first angle between the first and second path connecting lines, and step S105 is executed.

[0079] Optionally, obstacles within the detection range of the target path point can also be acquired simultaneously. Following the methods described in B1 to B3 above, it can be determined whether each obstacle within the detection range of the target path point lies within the first angle between the first path line and the second path line, thereby determining whether an obstacle within the detection range of the target path point exists within the first angle between the first path line and the second path line. This application does not impose any limitations.

[0080] Optionally, for steps S1031 to S1032 above, two obstacle sets can be predefined to store obstacles located in the first angle between the first path line and the second path line, and obstacles located in the 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 is the location of an obstacle. If the current position is the location of an obstacle, it is determined that an obstacle exists at the current position. Then, using the method described in steps B1 to B3 above, 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, add the current indicator of the obstacle at the current position (including but not limited to the current position, the current position coordinates, or the obstacle at the current position) to the obstacle set corresponding to the first angle. Otherwise, add the current indicator to the obstacle set corresponding to the second angle. Next, take the next position as the current position and continue to determine whether the current position is the location of an obstacle, and complete the subsequent determination. If the current position is not the location of an obstacle, take the next position as the current position and continue to determine whether the current position is the location of an obstacle. Continue in this manner until all positions within the detection range of the target path point have been traversed. If both the obstacle set corresponding to the first included angle and the obstacle set corresponding to the second included angle are empty, it is determined that there are no obstacles within the detection range of the target path point, and step S105 is executed; if the obstacle set corresponding to the first included angle is not empty, it is determined that there are obstacles within the detection range of the target path point within the first included angle between the first path line and the second path line, and step S106 is executed; if the obstacle set corresponding to the first included angle is empty and the obstacle set corresponding to the second included angle is not empty, it is determined that there are no obstacles within the detection range of the target path point within the first included angle between the first path line and the second path line, and step S105 is executed.

[0081] S105, the target path point is determined to be an invalid turning point on the target planned path.

[0082] S106, Determine 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, the previous path point, and the next path point of the target path point are first obtained. When the angle between the first path connecting the target path point and the previous path point and the second path connecting the target path point and the next path point is not a straight angle, it indicates that the target path point is a turning point on the target planned path. Then, the obstacle situation within the detection range of the target path point is obtained. When it is determined that there are no obstacles within the detection range based on the obstacle situation, the target path point is determined to be an invalid turning point on the target planned path, thus realizing the detection of invalid turning points.

[0084] For each path point on the target planning path, the above can be referred to. Figure 2 The technical solution determines whether a path point is an invalid turning point, thereby completing the statistics of invalid turning points on the target planned path.

[0085] See Figure 4 , Figure 4 A flowchart illustrating another invalid inflection point detection method provided in this application embodiment is shown below. Figure 4 As shown, the method includes the following steps:

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

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

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

[0089] The specific implementation of steps S202 to S203 can be found in the description of steps S101 to S106 above, and will not be repeated here.

[0090] If the target path point is an invalid turning point, proceed to step S204; if the target path point is not an invalid turning point, proceed to step S205.

[0091] S204, increment the number of invalid turning points in the target planning path by 1.

[0092] S205, the second path point is determined as the target path point, and the process returns to step S202.

[0093] In the above Figure 3 In the corresponding technical solution, by sequentially judging whether each path point on the planned path is an invalid turning point, it is possible to count the number of invalid turning points on the target planned path, providing a reference for subsequent evaluation of the path's rationality.

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

[0095] Optionally, in some possible cases, 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 thus 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, the target planning path is determined to be unreasonable and needs to be replanned. If the target ratio is less than or equal to the preset ratio, the target planning path is determined to be reasonable and does not need to be replanned. In this case, the target planning path after removing invalid turning points can be used as the new target planning path.

[0097] The rationality of a target planning path is determined by the number of invalid turning points on the path. This method is reasonable, effective, and easy to implement, enabling a rapid assessment of the rationality of the planned path.

[0098] The method of this application has been described above; the apparatus of this application will be described below.

[0099] See Figure 5 , Figure 5 This is a schematic diagram of an invalid inflection point detection device provided in an embodiment of this application. Figure 5 As shown, the invalid inflection point detection device 30 includes:

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

[0101] The obstacle detection module 302 is used to detect obstacles located 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 the target path point as an invalid turning point on the target planned path if there are no obstacles within the detection range.

[0103] In one possible design, the path point acquisition module 301 is further configured to determine the target path point as 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 the first included angle between the first path line and the second path line, wherein the first included angle is an angle less than 180°.

[0104] In one possible design, the invalid turning point determination module 303 is further configured 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 there is an obstacle within the detection range in the first included angle.

[0105] In one possible design, the obstacle detection module 302 is specifically used to determine a first vector, a second vector, and a third vector if an obstacle exists within the detection range. The starting points of the first vector, the second vector, and the third vector are the target path points, the ending points of the first vector and the second vector are the second path points, and the ending points of the third vector are the location points of the target obstacle. 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 included 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 included angle.

[0106] In one possible design, the invalid turning point determination module 303 is further configured 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 straight angle.

[0107] In one possible design, the path point acquisition module 301 is further configured to: determine a first vector and a second vector, wherein the starting point of the first vector and the second vector is the target path point, the ending point of the first vector is the first path point, and the ending 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 determine 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 determine that the angle between the first path line and the second path line is a straight angle.

[0108] In one possible design, the invalid turning point determination module 303 is further configured to increment 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 further configured 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 step 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 any content not mentioned in the corresponding embodiments, please refer to the description of the foregoing method embodiments, which will not be repeated here.

[0111] The aforementioned device first acquires the target path point, the previous path point, and the next path point of the target planned path. When the angle between the first path connecting the target path point and the previous path point and the second path connecting the target path point and the next path point is not a straight angle, it indicates that the target path point is a turning point on the target planned path. Then, it acquires the obstacle information within the detection range of the target path point. When it is determined based on the obstacle information that there are no obstacles within the detection range, the target path point is determined to be an invalid turning point on the target planned path, thus realizing the detection of invalid turning points.

[0112] See Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device 40 provided in an embodiment of this application. 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] Processor 401 is configured to support the computer device 40 in performing the corresponding functions in the methods described in the above method embodiments. Processor 401 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

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

[0115] Processor 401 can call the program code to perform the following operations:

[0116] Obtain the target path point, the first path point, and the second path point on the target planning path, where the first path point is the previous path point of the target path point on the target planning path, and the second path point is the next path point of the target path point on the target planning path.

[0117] When the angle between the first path line and the second path line is not a straight angle, obstacles located within the detection range of the target path point are detected. 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 are no obstacles within the detection range, the target path point is determined to be an invalid turning point on the target planned path.

[0119] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in the foregoing embodiments.

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

[0121] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A method for detecting invalid inflection points, characterized in that, include: Obtain the target path point, the first path point, and the second path point on the target planning path, where the first path point is the previous path point of the target path point on the target planning path, and the second path point is the next path point of the target path point on the target planning path. When the angle between the first path line and the second path line is not a straight angle, obstacles located within the detection range of the target path point are detected. 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 are no obstacles within the detection range, the target path point is determined to be an invalid turning 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 the first angle between the first path line and the second path line, the target path point is determined to be an invalid turning point on the target planned path, and the first angle is an angle less than 180°. If there is an obstacle within the detection range, and there is an obstacle within the detection range in the first included angle, then the target path point is determined not to be an invalid turning point on the target planned path.

2. The method according to claim 1, characterized in that, The detection of obstacles located within the detection range of the target path point includes: If there is an obstacle within the detection range, a first vector, a second vector, and a third vector are determined. The starting point of the first vector, the second vector, and the third vector is the target path point. The ending point of the first vector is the first path point. The ending point of the second vector is the second path point. The ending point of the third vector is the location of the target obstacle. 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 there is a target obstacle within the first included 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 there is no target obstacle within the first included angle.

3. The method according to claim 1, characterized in that, The method further includes: If the angle between the first path line and the second path line is a straight angle, then the target path point is determined not to be an invalid turning point on the target planned path.

4. The method according to claim 1 or 3, characterized in that, After obtaining the target path point, the first path point, and the second path point on the target planning path, the process further includes: Determine a first vector and a second vector, wherein the starting point of the first vector and the second vector is the target path point, the ending point of the first vector is the first path point, and the ending point of the second vector is the second path point; If the angle between the first vector and the second vector is not 180°, then the angle between the first path line and the second path line is determined to be a straight angle. If the angle between the first vector and the second vector is 180°, then the angle between the first path line and the second path line is determined to be a straight angle.

5. The method according to claim 1, characterized in that, The method further includes: After determining that the target path point is an invalid turning point on the target planned path, the number of invalid turning points on the target planned path is incremented by 1.

6. The method according to claim 1, characterized in that, The method further includes: 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 executed.

7. An invalid turning point detection device, characterized in that, include: The path point acquisition module is used to acquire the target path point, the first path point and the second path point on the target planning path, wherein the first path point is the previous path point of the target path point on the target planning path, and the second path point is the next path point of the target path point on the target planning path. An obstacle detection module is used to detect obstacles located 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. An invalid turning point determination module 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; if there is an obstacle within the detection range, and there is no obstacle within the detection range within the first included angle between the first path line and the second path line, the target path point is determined to be an invalid turning point on the target planned path, wherein the first included angle is less than 180°; if there is an obstacle within the detection range, and there is an obstacle within the detection range within the first included angle, the target path point is determined not to be an invalid turning point on the target planned path.

8. A computer device, characterized in that, The device includes a memory and a processor, the memory and the processor being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor causing the computer device to perform the method as described in any one of claims 1-6 when executing the one or more computer programs.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Path searching method and device

    CN106964156A

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

    CN113917912A