Path planning method based on sector model, electronic device and storage medium

CN123028602APending Publication Date: 2026-11-03STATE NUCLEAR ELECTRIC POWER PLANNING DESIGN & RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611238272.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing path planning methods have high computational overhead and insufficient real-time performance in complex obstacle environments. They also have limited adaptability to non-convex or irregular obstacles, and are prone to redundant detours and path discontinuities.

Method used

A path planning method based on a sector model is adopted. By acquiring the geometric information of the starting point, the ending point, and obstacles, a polar coordinate system is established with the starting point as the center. The shortest distance, the farthest distance, the minimum angle, and the maximum angle of the obstacles are calculated to generate detour candidate points. The starting point, the ending point, and the candidate points are used as nodes to construct an undirected graph to solve for the shortest path.

Benefits of technology

While reducing computational overhead, it improves the continuity and geometric optimization of the path, enhances the adaptability to irregular obstacles, and generates a continuous and geometrically optimal planned path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123028602A_ABST
    Figure CN123028602A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a path planning method based on a sector model, an electronic device and a storage medium. The method comprises: obtaining geometric information of a starting point, an ending point and obstacles; establishing a polar coordinate system with the starting point as the center, and calculating the closest distance, the farthest distance, the smallest angle and the largest angle of each obstacle relative to the starting point according to the polar coordinate system to obtain a sector angle distance model of each obstacle; when the line connecting the starting point and the ending point is blocked by an obstacle, generating a detour candidate point according to the geometric relationship between the blocking obstacle and the starting point and the ending point; constructing an undirected graph with the starting point, the ending point and the generated candidate point as nodes, solving the shortest path, and forming a path planning result. The method is used to improve the planning efficiency, and improve the continuity of the path, the degree of geometric optimization and the adaptability to irregular obstacles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of path planning technology, and in particular to a path planning method, electronic device and storage medium based on a sector model. Background Technology

[0002] In power engineering line layout and robot autonomous navigation, existing technologies typically employ visual chart methods, ray scanning methods, or grid map-based path planning methods for obstacle avoidance and path search.

[0003] However, the above methods often require a large amount of visibility judgment, boundary scanning or map discretization processing in complex obstacle environments, resulting in large computational overhead and insufficient real-time performance. At the same time, they have limited adaptability to non-convex or irregular obstacles and are prone to problems such as redundant detours, discontinuous paths or insufficient global optimality.

[0004] Therefore, how to improve path planning efficiency in complex obstacle scenarios, while taking into account path continuity, geometric optimality, and obstacle adaptability, has become a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a path planning method, electronic device, and storage medium based on a sector model to improve planning efficiency, enhance path continuity, improve geometric optimization, and improve adaptability to irregular obstacles.

[0006] In a first aspect, embodiments of this application provide a path planning method based on a sector model, comprising:

[0007] Obtain geometric information of the start point, end point, and obstacles;

[0008] Establish a polar coordinate system with the starting point as the center, and calculate the closest distance, farthest distance, minimum angle and maximum angle of each obstacle relative to the starting point based on the polar coordinate system to obtain the sector angle distance model of each obstacle;

[0009] When the line connecting the start and end points is blocked by an obstacle, detour candidate points are generated based on the geometric relationship between the blocking obstacle and the start and end points.

[0010] Construct an undirected graph using the starting point, ending point, and generated candidate points as nodes, solve for the shortest path, and generate the path planning result.

[0011] In one possible embodiment, calculating the nearest distance of each obstacle from the starting point includes:

[0012] By sequentially forming edges from all the vertices of the obstacle, several line segments are obtained;

[0013] Calculate the distance between each line segment and the starting point, and take the minimum value as the closest distance to the obstacle.

[0014] In one possible embodiment, calculating the minimum and maximum angles of each obstacle relative to the starting point includes:

[0015] By sequentially forming edges from all the vertices of the obstacle, several line segments are obtained;

[0016] Subtract the coordinates of the starting point from the coordinates of the endpoints of each line segment to obtain the vector relative to the starting point;

[0017] Calculate the angle of each vector and normalize it to a preset interval to obtain an angle array;

[0018] Perform continuity processing on the angle array to eliminate jumps that occur when the angle crosses the boundary;

[0019] Take the minimum value of the processed angle array as the minimum angle and the maximum value as the maximum angle.

[0020] In one possible embodiment, when the line connecting the start and end points is blocked by an obstacle, detour candidate points are generated based on the geometric relationship between the blocking obstacle and the start and end points, including:

[0021] Calculate the length and direction angle of the line connecting the starting and ending points;

[0022] Traverse each obstacle in ascending order of closest distance, and determine whether the current obstacle blocks the direct connection between the start and end points;

[0023] If the nearest distance to the current obstacle is greater than the length of the line connecting the start and end points, then terminate the traversal and determine that subsequent obstacles do not block the direct connection.

[0024] If the direction angle of the starting point is between the minimum and maximum angles of the current obstacle, and the line connecting the starting point and the ending point intersects the current obstacle, then the current obstacle is identified as a blocking obstacle, and detour candidate points are generated based on the geometric relationship between the blocking obstacle and the starting point and the ending point.

[0025] In one possible embodiment, generating detour candidate points based on the geometric relationship between the obstacle and the starting and ending points includes:

[0026] Calculate the nearest distance, farthest distance, minimum angle, and maximum angle of the obstacle relative to the endpoint;

[0027] Two rays are generated based on the starting point and its minimum and maximum angles, and two rays are generated based on the ending point and its minimum and maximum angles.

[0028] Calculate the intersection points between rays as candidate points for detours.

[0029] In one possible embodiment, the method further includes:

[0030] Connect the candidate detour points with the starting point to form a line segment, and determine whether the line segment intersects with all obstacles;

[0031] If an intersection exists, the intersection will be used as a new detour candidate point, and the original detour candidate point will be removed.

[0032] The verified detour candidate points are combined with the starting point and pushed into the verification stack, and the detour candidate points are combined with the ending point and pushed into the calculation stack.

[0033] In one possible embodiment, it also includes:

[0034] When the stack to be calculated is not empty, take the coordinate pair from the stack to be calculated as the new starting point and ending point, and repeat the obstacle judgment and detour candidate point generation.

[0035] When the stack to be verified is not empty, take the coordinate pair from the stack to be verified as the new starting point and ending point, and repeat the blocking judgment and detour candidate point generation.

[0036] The process continues until both the calculation stack and the verification stack are empty, completing the generation of all detour candidate points.

[0037] Secondly, embodiments of this application provide a path planning device based on a sector model, including: an acquisition module for acquiring geometric information of the starting point, the ending point, and obstacles;

[0038] The coordinate module is used to establish a polar coordinate system with the starting point as the center. It uses a sector angle distance model to represent the position of each obstacle relative to the starting point. The sector angle distance model includes the nearest distance, farthest distance, minimum angle and maximum angle of each obstacle.

[0039] A detour module is used to generate detour candidate points based on the geometric relationship between the blocking obstacle and the starting point and the ending point when the line connecting the starting point and the ending point is blocked by an obstacle.

[0040] The planning module is used to construct an undirected graph using the starting point, the ending point, and the generated candidate points as nodes, solve for the shortest path, and generate path planning results.

[0041] Thirdly, embodiments of this application provide a path planning device based on a sector model, including: a memory and a processor;

[0042] The memory stores computer-executed instructions;

[0043] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0045] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0046] The path planning method, electronic device, and storage medium based on a sector model provided in this application obtain the geometric information of the starting point, ending point, and obstacles, and establish a polar coordinate system with the starting point as the center. It calculates the closest distance, farthest distance, minimum angle, and maximum angle of each obstacle relative to the starting point, obtaining a sector-shaped angular distance model for each obstacle. This model can represent the spatial distribution and occlusion range of obstacles in a unified geometric way, reducing repetitive judgments in complex environments. When the line connecting the starting point and ending point is blocked by an obstacle, it generates detour candidate points based on the geometric relationship between the blocking obstacle and the starting and ending points, enabling the rapid formation of effective detour paths for occlusion situations. Furthermore, by constructing an undirected graph using the starting point, ending point, and generated candidate points as nodes and solving for the shortest path, a path planning result is formed. This approach reduces computational overhead, improves real-time performance, and obtains a planned path with good continuity, less detour redundancy, and a superior geometric path length. Attached Figure Description

[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0048] Figure 1 A flowchart illustrating the path planning method based on the sector model provided in this application. Figure 1 ;

[0049] Figure 2 A schematic diagram illustrating the geometric relationship between the obstacle and the starting point provided in this application;

[0050] Figure 3 The diagram of the obstacles provided in this application;

[0051] Figure 4 Path planning diagram provided for this application;

[0052] Figure 5 Path planning diagram 2 provided for this application;

[0053] Figure 6 A schematic diagram of the path planning device based on the sector model provided in this application;

[0054] Figure 7 A schematic diagram of the path planning device based on the sector model provided in this application.

[0055] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0056] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.

[0057] Path planning technology is widely used in power engineering for power line layout and in robot autonomous navigation. In the former, the route needs to be determined based on the spatial geometry of the starting point, ending point, and obstacles such as wind turbines, buildings, mountains, and water bodies. In the latter, the mobile platform typically combines environmental perception units, positioning units, and path planning units to complete obstacle avoidance and passage in work areas with static or irregular obstacles.

[0058] Existing solutions typically employ methods such as visual maps, ray scanning, or path planning based on grid maps. These solutions generally first process obstacle boundaries, feature points, or discrete maps, then determine the connectivity between the start and end points and between candidate nodes, and finally perform path search to generate an obstacle avoidance path.

[0059] However, when there are many obstacles, their shapes are irregular, or their occlusion relationships are complex, the above methods often require a large amount of visibility judgment, boundary scanning, or map discretization calculations, resulting in a significant increase in computational overhead and making it difficult to meet real-time requirements. Especially for non-convex obstacles and situations where multiple obstacles continuously occlude, existing methods are also prone to problems such as redundant detour nodes, too many path turns, insufficient continuity, and geometrically excessive path lengths, which in turn affect route deployment efficiency or navigation stability.

[0060] In view of this, how to improve path planning efficiency in complex obstacle scenarios, while taking into account path continuity, geometric optimality, and adaptability to irregular obstacles, has become an urgent technical problem to be solved. To address this issue, a path planning method based on a sector model is proposed. By acquiring the geometric information of the starting point, ending point, and obstacles, a polar coordinate system is established with the starting point as the center. The shortest distance, farthest distance, minimum angle, and maximum angle of each obstacle relative to the starting point are calculated to obtain a sector-shaped angular distance model of the obstacles. When the line connecting the starting point and the ending point is blocked by an obstacle, detour candidate points are generated based on the geometric relationship between the blocking obstacle and the starting and ending points. An undirected graph is constructed using the starting point, ending point, and candidate points as nodes to solve for the shortest path, thus forming the path planning result.

[0061] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0062] Figure 1 A flowchart illustrating the path planning method based on the sector model provided in this application. Figure 1 ,like Figure 1 As shown, the method includes:

[0063] S101: Obtain geometric information of the start point, end point, and obstacles.

[0064] This step establishes the basic spatial data set required for subsequent path planning. The executing entity can be a path planning device, industrial control host, navigation controller, server, or a terminal device integrated with a processor and memory. Geometric information includes at least the starting point coordinates, ending point coordinates, and spatial location and boundary representation information of each obstacle, enabling subsequent processing to perform angle calculations, distance calculations, and occlusion detection based on a unified coordinate system. In one possible embodiment, the starting point and ending point are represented using two-dimensional Cartesian coordinates, denoted as starting point Ps = (xs, ys) and ending point Pe = (xe, ye); obstacles are represented using closed boundaries to ensure the integrity of subsequent geometric relationship calculations.

[0065] In practice, geometric information can be obtained through pre-stored map data, external input information, or measurement results. To ensure consistency in subsequent calculations, the received data can be converted to the same coordinate system and represented uniformly. In this embodiment, the result of obtaining geometric information is presented as a data structure that can be directly called by the processor, including at least a start point record, an end point record, and a set of obstacles. Based on the above analysis, this step does not limit the data source; as long as the obtained data can represent the spatial positional relationship between the start point, end point, and obstacles, it can meet the processing requirements for establishing a polar coordinate system and determining occlusion relationships. By acquiring and standardizing geometric information in advance, subsequent steps can directly express the angular and radial range of obstacle boundaries, providing a foundation for rapid judgment in complex obstacle scenarios. It should be understood that the above example is only for demonstration and not a limitation.

[0066] S102: Establish a polar coordinate system with the starting point as the center, and calculate the closest distance, farthest distance, minimum angle and maximum angle of each obstacle relative to the starting point based on the polar coordinate system to obtain the sector angle distance model of each obstacle.

[0067] This step is used to convert the obstacle from its original geometric boundary form into an angular distance range form expressed from the starting point's perspective. In this embodiment, the polar coordinate system serves as the unified coordinate basis for calculating obstacle angles and distances. The starting point is taken as the origin of the polar coordinate system, and a reference direction is determined as the zero-degree polar angle direction. The reference direction can be the positive x-axis of the Cartesian coordinate system or the direction from the starting point to the ending point, as long as it remains consistent throughout the processing of all obstacles. In one specific implementation, the positive x-axis of the Cartesian coordinate system is used as the polar angle reference direction, and the counterclockwise direction is the direction of increasing polar angle. For any point Pi = (xi, yi) on the obstacle boundary, its radial distance ri relative to the starting point Ps is calculated as √[(xi-xs)]. 2 +(yi-ys) 2 And the polar angle θi = atan2(yi-ys, xi-xs). When θi is negative, it is converted to the range of 0 to 2π. Analyze the boundary of the same obstacle to obtain the minimum and maximum radial distance rmin and rmax, as well as the minimum and maximum angles θmin and θmax covering the visual field of the obstacle, thus forming the fan-shaped angular distance model of the obstacle.

[0068] Figure 2 A schematic diagram illustrating the geometric relationship between the obstacle and the starting point provided in this application, such as... Figure 2 As shown, to bypass an obstacle from the starting point, draw a circle with the starting point as the center. Figure 2The cyan area represents the avoidance zone. The obstacle's distance from the starting point can be expressed by four variables: Lmin, Lmax, θmin, and θmax. Lmin represents the closest distance between the obstacle and the starting point, Lmax represents the farthest distance, and θmin and θmax represent the minimum and maximum angles of the obstacle relative to the starting point, respectively. To calculate these parameters, all vertices of the obstacle are sequentially arranged into edges. Each edge consists of two coordinates, forming a line segment. Subtracting the starting point coordinates from the line segment group yields the vector relative to the starting point. Geometric calculations are then used to determine the distance and angle between each line segment and the starting point, ultimately resulting in a sector-shaped angular distance model of the obstacle.

[0069] The sector angle distance model is used to characterize the angular range and radial distribution range covered by obstacles from the starting point's viewpoint. Its data structure can be denoted as Oi = {rmin, rmax, θmin, θmax}. When an obstacle crosses an angular boundary, the angle range can be adapted to ensure the accuracy of occlusion judgment. After obtaining the sector angle distance model for each obstacle, the connection between the starting and ending points and the spatial relationship of the obstacles can be further combined to determine whether the connection is blocked by an obstacle. Based on the above analysis, it can be seen that by using a polar coordinate system and the sector angle distance model, obstacles are compressed into a small number of key parameters, eliminating the need for grid discretization of the entire area or large-scale visibility scanning during each judgment. For scenarios with a large number of obstacles and irregular boundaries, this representation method can first filter by angle and distance ranges, including only obstacles that may form obstructions in subsequent processing, thus reducing invalid judgments in the path planning process. It should be understood that the above examples are merely illustrative and not limiting. Without departing from the technical concept of this application, the corresponding closest distance, farthest distance, minimum angle, and maximum angle can also be directly determined based on the outer contour of the obstacle.

[0070] S103: When the line connecting the starting point and the ending point is blocked by an obstacle, generate a detour candidate point based on the geometric relationship between the blocking obstacle and the starting point and the ending point.

[0071] This step is used to construct alternative detour nodes when the direct line connecting the start and end points is impassable. In this embodiment, detour candidate points serve as candidate intermediate nodes for subsequent graphing and shortest path solving. Their positions are not arbitrarily selected but determined based on the geometric relationship between the obstruction and the start and end points, ensuring that the candidate points are as close as possible to the effective detour boundary. The obstruction relationship can be determined based on the fan-shaped angle distance model of the obstacles and the spatial relationship between the line connecting the start and end points and the obstacles. If one or more obstacles exist, candidate points can be generated for the corresponding obstacles, and the process can proceed to the subsequent graphing stage.

[0072] In one specific implementation, detour candidate points can be determined based on the relative positional relationship between the obstruction and the starting and ending points, as well as the boundary positions of the obstruction. For polygonal obstacles, boundary points or boundary turning points related to the detour direction can also be selected as candidate points. To ensure that candidate points can be used for actual detours, validity checks and necessary external adjustments can be performed after generating candidate points. If a candidate point overlaps with other obstacles, or if the connecting line segment from the candidate point to the starting and ending points does not meet the passage conditions, the candidate point can be eliminated or corrected to a position that meets the conditions.

[0073] In another possible embodiment, if the obstacle has a complex shape and a single candidate point is insufficient to support detour, several boundary key points can be selected along the obstacle boundary as extended candidate points, and these points can be filtered according to their connectivity with the start and end points. By constraining candidate points to the vicinity of the obstacle, subsequent graph search does not need to blindly sample in a large area, thus keeping the number of nodes at a level directly related to the obstacle geometry. Based on the above analysis, this step extracts detour candidate points from the obstacle geometry boundary, giving the generated intermediate nodes clear obstacle avoidance semantics. The resulting path turning points are consistent with the obstacle contour, reducing redundant detour nodes unrelated to the obstacle, and providing conditions for forming continuous and shorter planned paths. It should be understood that the above examples are merely illustrative and not limiting.

[0074] S104: Construct an undirected graph using the starting point, ending point, and generated candidate points as nodes, solve for the shortest path, and generate the path planning result.

[0075] This step transforms the aforementioned spatial geometry problem into a pathfinding problem on a graph structure. In this embodiment, the undirected graph carries the traversable relationships between the starting point, the ending point, and candidate bypass points. The nodes in the graph consist of the starting point, the ending point, and verified candidate points. The edges in the graph are line segments that can directly connect any two nodes after obstacle collision detection. Specifically, during graph construction, a node set V = {Ps, Pe, C1, C2, ..., Cn} is first established, where Ci represents each candidate point. Then, a connecting line segment Lij is constructed for any two different nodes Vi and Vj, and it is checked whether this line segment intersects any obstacle boundary or whether its interior falls within an obstacle region. If the detection result shows that Lij does not cross any obstacle, an edge Eij is added to the undirected graph, and the cost of this edge is set to the Euclidean distance between nodes wij = √[(xj - xi)]. 2 +(yj-yi) 2 If it is necessary to take into account corner constraints or line construction constraints, turning costs, boundary proximity costs, or adjacent restricted areas costs can be superimposed on the edge weights. However, in this embodiment, length is used as the main cost to form the shortest path in a geometric sense.

[0076] After the graph is constructed, the shortest path is solved. The solution process can employ Dijkstra's algorithm, A* (A-star) search algorithm, or other path search algorithms suitable for undirected weighted graphs. In one specific implementation, Dijkstra's algorithm is executed with the starting node as the source: First, the distance from the starting node to itself is initialized to 0, and the distances to all other nodes are set to infinity. Then, the node with the smallest current distance among the unvisited nodes is selected as the expansion node, and the cumulative path length between this node and its neighboring nodes is updated. This update process is repeated until the destination node is visited or all reachable nodes have been processed. The resulting sequence of predecessor nodes is backtracked to form a node connection sequence from the starting point to the destination. The line segments between adjacent nodes are then sequentially concatenated, and the output is the path planning result. If there is no reachable path from the starting point to the destination in the undirected graph, a "no feasible path" flag is returned, triggering subsequent processing such as regenerating candidate points, expanding the boundary search range, or re-entering obstacle information.

[0077] In this embodiment, the shortest path is used to output the planning result with the minimum total cost. Essentially, it selects the node sequence with the minimum edge weight from the constructed undirected graph. Since edges in the undirected graph are only added after obstacle collision detection, the polyline path corresponding to the shortest path naturally satisfies obstacle avoidance requirements. Furthermore, because candidate points are derived from the geometric relationship between obstacles and the starting and ending points, rather than from large-scale dense sampling, the number of nodes and edges in the graph is relatively controllable, and the path search cost is limited to a small scale. Based on the above analysis, this step simplifies path planning in complex obstacle scenarios into a connectivity optimization problem on a finite number of candidate nodes. While ensuring path reachability, it allows the path length to be directly measured by geometric distance, thereby outputting a continuous obstacle-avoiding path. It should be understood that the above examples are merely illustrative and not limiting. Other equivalent methods can be used to implement the corresponding graph construction and shortest path solution process without departing from the technical features defined in the claims.

[0078] Based on the above analysis, this application provides a path planning method based on a sector model, including acquiring the geometric information of the starting point, the ending point, and obstacles; establishing a polar coordinate system with the starting point as the center, and calculating the closest distance, farthest distance, minimum angle, and maximum angle of each obstacle relative to the starting point based on the polar coordinate system to obtain a sector angle distance model for each obstacle; when the line connecting the starting point and the ending point is blocked by an obstacle, generating detour candidate points based on the geometric relationship between the blocking obstacle and the starting point and the ending point; constructing an undirected graph with the starting point, the ending point, and the generated candidate points as nodes, solving for the shortest path, and forming a path planning result. In this embodiment, by converting the geometric boundary of the obstacle into a sector angle distance model expressed from the perspective of the starting point, and generating detour candidate points around the blocking obstacle when the direct line connecting the starting point and the ending point is blocked, and then constructing an undirected graph based on the passable line to perform the shortest path solution, the path planning process is transformed from a high-frequency scan of the global space to the judgment and search of a limited number of candidate relationships. For scenarios with a large number of obstacles, irregular shapes, or complex occlusion relationships, this approach can generate obstacle avoidance paths under fully disclosed implementation conditions, ensuring clear relationships between the output path and obstacle boundaries, minimal node redundancy, and path length constraints based on the geometric cost in the graph. It should be understood that the above examples are for illustrative purposes only and are not intended to limit the scope of the problem.

[0079] In one possible implementation, calculating the nearest distance of each obstacle to the starting point includes: sequentially forming edges from all vertices of the obstacle to obtain several line segments; calculating the distance between each line segment and the starting point, and taking the minimum value as the nearest distance of that obstacle.

[0080] Among them, it serves as the geometric basis for subsequent obstacle sorting, obstruction judgment, and candidate detour selection.

[0081] In practical implementation, the coordinates of all vertices of the obstacle are first read based on its geometric data. Adjacent vertices are then connected into line segments according to a pre-stored order or a continuous traversal along the boundary, forming a boundary that reflects the obstacle's outer contour. For polygonal obstacles, the distance between the starting point and each line segment can be determined by the perpendicular distance from the point to the line segment. If the perpendicular falls within the line segment's range, the perpendicular distance is taken as the distance between the line segment and the starting point. If the perpendicular does not fall within the line segment's range, the smaller of the distances from the starting point to the two endpoints of the line segment is taken as the distance between the line segment and the starting point. After calculating the distances for all line segments on the obstacle boundary, the obtained distances are compared, and the minimum value is taken as the closest distance to the obstacle. This result is output to the obstacle's geometric feature table for use in constructing the sector angle distance model.

[0082] In practical applications, obstacles can be represented by a sequence of vertices discretized from polyline boundaries, polygonal boundaries, or closed curves; this application does not limit this. When the number of vertices is large, the calculation can also be completed by traversing line segments one by one and updating the current minimum distance in real time to reduce intermediate storage. Since the nearest distance is directly calculated based on the overall boundary of the obstacle, it can accurately reflect the spatial proximity of the obstacle to the starting point.

[0083] By adopting the above method, the calculation of the closest distance to an obstacle does not rely on additional grid discretization or complex visibility judgment. It only requires solving the distance of the boundary line segments and comparing the minimum values ​​to obtain the key geometric parameters for path planning. This makes the construction results of the obstacle sector model more accurate and improves the processing efficiency of subsequent blocking analysis and detour candidate point generation.

[0084] In one possible implementation, calculating the minimum and maximum angles of each obstacle relative to the starting point includes: sequentially forming edges from all the vertices of the obstacles to obtain several line segments; subtracting the coordinates of the starting point from the coordinates of the endpoints of each line segment to obtain a vector relative to the starting point; calculating the angle of each vector and normalizing it to a preset interval to obtain an angle array; performing continuity processing on the angle array to eliminate jumps caused when the angle crosses the boundary; taking the minimum value of the processed angle array as the minimum angle and the maximum value as the maximum angle.

[0085] In this scheme, the starting point can be a known starting position in the path planning. After establishing an angle reference point, the endpoints of each line segment are transformed into a relative coordinate system with the starting point as the origin. Then, the polar angle of each relative vector is calculated. The preset interval can be [0, 2π) or [-π, π), and the selection is based on the need to uniformly represent the angle relationship. When the angle array crosses the boundary of the preset interval, there may be a discontinuity in the values ​​from the upper limit to the lower limit of the interval. Therefore, by translating and remapping adjacent angles, they are kept in the same continuous branch, thus obtaining a continuous angle sequence.

[0086] In practical implementation, the coordinates of the endpoints of the line segments can be directly generated from the vertex coordinates of the obstacle, and the vector direction angles of the endpoints relative to the starting point can be calculated respectively. If there is a case where the difference between adjacent angles in the angle array exceeds a preset threshold, then the smaller or larger angles are processed by adding or subtracting integer angles to ensure that all angles fall within the same continuous range. The processed angle sequence can accurately reflect the sector boundary covered by the obstacle from the starting point's viewpoint, where the minimum value corresponds to the lower bound of the obstacle's angle, and the maximum value corresponds to the upper bound of the obstacle's angle. In practical applications, this angle calculation module can also use other equivalent coordinate transformation methods, which are not limited in this embodiment.

[0087] This processing method takes the boundary formed by the obstacle vertices as input, first establishing a vector set relative to the starting point, and then eliminating jumps caused by boundary crossings through angle normalization and continuity correction, thereby outputting stable minimum and maximum angles. This output, together with the nearest distance, constitutes a sector-shaped angular distance model of the obstacle, which can be directly used to determine whether the line connecting the starting and ending points falls within the obstacle's coverage area, and provides angular boundary criteria for subsequent detour candidate point generation. This ensures the continuous and consistent representation of the obstacle's angle range and improves the accuracy of geometric description during obstacle detection and path construction.

[0088] In one possible implementation, when the line connecting the starting point and the ending point is blocked by an obstacle, candidate detour points are generated based on the geometric relationship between the blocking obstacle and the starting and ending points, including:

[0089] Calculate the length and direction angle of the line connecting the starting and ending points;

[0090] Traverse each obstacle in ascending order of closest distance, and determine whether the current obstacle blocks the direct connection between the start and end points;

[0091] If the nearest distance to the current obstacle is greater than the length of the line connecting the start and end points, then terminate the traversal and determine that subsequent obstacles do not block the direct connection.

[0092] If the direction angle of the line connecting the starting point and the ending point is between the minimum and maximum angles of the current obstacle, and the line connecting the starting point and the ending point intersects with the current obstacle, then the current obstacle is identified as a blocking obstacle, and detour candidate points are generated based on the geometric relationship between the blocking obstacle and the starting point and the ending point.

[0093] Among them, the detour candidate points are used as nodes for subsequent construction of the undirected graph, and their positions are determined by the angular envelope relationship and intersection relationship between the blocking obstacle and the starting point and the ending point.

[0094] Figure 3 The obstacle diagram provided in this application is as follows: Figure 3As shown, a path is drawn between the two wind turbines, with the red area considered as an obstacle. For each obstacle, Lmin, Lmax, θmin, and θmax are calculated relative to the starting point. The obstacles are then sorted by Lmin from smallest to largest. The tower points of the two wind turbines are considered the starting and ending points. The difference between the coordinates of these two points yields a vector, which in turn provides the length of the vector and the angle normalized to the interval [0, 2π). The sorted obstacles are judged as follows: First, it is determined whether Lmin is greater than the length of the starting point and the ending point. If so, it means that this obstacle and subsequent obstacles do not affect the starting point and the ending point, and the judgment ends. If not, it is determined whether the angle of the starting point and the ending point is between θmin and θmax of the obstacle. If not, the next obstacle judgment is performed. Then, it is determined whether the length of the starting point and the ending point is between Lmin and Lmax. If so, it is necessary to determine whether the line segment of the starting point and the ending point intersects with the obstacle. If they do not intersect, the obstacle exists outside the line segment of the starting point and the next obstacle judgment is performed. Otherwise, the next step of the detour candidate point generation process is performed.

[0095] In practical implementation, the connecting vector is first calculated from the coordinates of the starting point and the ending point, and the Euclidean length and direction angle of the line segment relative to the coordinate axis are obtained. Then, each obstacle is sorted in ascending order of its closest distance to the starting point, and the current obstacle is used for occlusion judgment in turn. When the closest distance of an obstacle is greater than the line segment length, it means that it is outside the range of the line connecting the starting point and the ending point, and the distance of subsequent obstacles is even greater, so the traversal can be terminated. For the current obstacle that has not been terminated in advance, it is first determined whether the direction angle of the line connecting the starting point and the ending point falls between its minimum and maximum angles, and then it is determined whether the line connecting the starting point and the ending point intersects the boundary of the obstacle. When both conditions are met, the obstacle is determined as a blocking obstacle, and further, based on the angle coverage range of the obstacle relative to the starting point and the ending point, bypass candidate points are selected outside the obstacle boundary. The candidate points can be the corner points, boundary tangent points, or geometric points obtained by extrapolating the angle offset of the obstacle. In practical applications, other equivalent geometric constructions can also be used to generate candidate points, and this application embodiment does not limit this.

[0096] This implementation uses line segment length, direction angle, and obstacle angle envelope as criteria to systematically filter obstacles and generate detour candidate points after confirming an obstruction. This ensures that the candidate point determination directly corresponds to the actual occlusion relationship. By introducing a nearest distance threshold during traversal, the number of subsequent irrelevant obstacle detections is reduced. Furthermore, the candidate points generated based on intersection relationships correspond to the geometric boundaries of obstacles, thus providing more accurate node input for subsequent path search.

[0097] By adopting this specific implementation, the occlusion judgment range can be narrowed when there are many obstacles, and the generation of detour candidate points can be kept consistent with the spatial position of the blocking obstacles, thereby reducing the amount of invalid computation and improving the continuity and geometric consistency of path planning results.

[0098] Based on the aforementioned embodiments, further, generating detour candidate points according to the geometric relationship between the obstacle and the starting point and the ending point includes: calculating the closest distance, farthest distance, minimum angle and maximum angle of the obstacle relative to the ending point; generating two rays based on the starting point and its minimum and maximum angles, and generating two rays based on the ending point and its minimum and maximum angles; calculating the intersection points between the rays as detour candidate points.

[0099] Intersection points are used as candidate detour locations in subsequent path construction. The intersection points between rays can be a single intersection point or multiple intersection points obtained under the condition of satisfying geometric constraints. Finally, the points that meet the detour requirements are determined from these points.

[0100] In practical implementation, a polar coordinate relationship is first established with the endpoint as the observation center. The angles of the boundary vertices of the obstruction relative to the endpoint are calculated, and the shortest distance, farthest distance, minimum angle, and maximum angle are obtained by statistically analyzing the distances from each vertex to the endpoint. Subsequently, two boundary rays are constructed with the starting point and the endpoint as endpoints, according to their respective minimum and maximum angles. The two sets of rays are then combined to find their intersections, resulting in several geometric intersection points. For cases with multiple intersection points, further filtering can be performed based on the relative positions of the intersection points to the starting point, the endpoint, and the obstacle boundary, ensuring that the selected intersection points are within the detourable area, thus forming detour candidate points. This process can be implemented by the path planning module through coordinate calculations. The rays can be expressed using two-dimensional linear parametric equations, and the intersection point solution can be completed by solving simultaneous equations. In practical applications, this module can also choose other calculation models, which are not limited in this embodiment.

[0101] This candidate point generation method constrains the ray direction by limiting the angle and distance range of the obstacle on the endpoint side, and then determines the detour position by the intersection position of the rays on the starting point side and the endpoint side, so that the candidate point maintains a corresponding relationship with the spatial boundary of the blocking obstacle and forms a clear geometric relationship with the starting point and the endpoint.

[0102] By adopting this method, detour candidate points can be determined directly based on the geometric relationship between the obstruction and the starting and ending points, reducing the computational workload of large-scale scanning and visibility judgment of the obstacle boundary. At the same time, it makes the candidate points closer to the effective detour area of ​​the obstacle, which facilitates the subsequent construction of a coherent path and reduces the number of invalid candidate points.

[0103] In one possible implementation, the method also includes:

[0104] Connect the candidate detour points with the starting point to form a line segment, and determine whether the line segment intersects with all obstacles;

[0105] If an intersection exists, the intersection will be used as a new detour candidate point, and the original detour candidate point will be removed.

[0106] The verified detour candidate points are combined with the starting point and pushed into the verification stack, and the detour candidate points are combined with the ending point and pushed into the calculation stack.

[0107] The verification stack stores path combinations that need further verification and recursively verifies the path segments formed by combining the detour candidate point with the starting point. The calculation stack stores path combinations that need further calculation and performs subsequent processing on the path segments formed by combining the detour candidate point with the ending point.

[0108] In implementation, after generating detour candidate points, the system first constructs a line segment to be checked using the aforementioned candidate points and the starting point. This line segment is then intersected with the boundaries of all obstacles in the scene one by one. The boundaries of obstacles can be represented by polyline segments formed by connecting vertices. When any obstacle is detected to intersect with this line segment, the intersection point closest to the current detour direction is taken as a new detour candidate point, and the original detour candidate point is removed from the candidate set, allowing subsequent checks to continue based on the new geometric intersection. After validity verification, the verified detour candidate point is combined with the starting point to form a path pair and pushed onto the verification stack for continued connectivity verification at the starting point. Simultaneously, the detour candidate point is combined with the ending point to form another path pair and pushed onto the calculation stack for continued path solving at the ending point. The stack can be implemented using a sequential stack structure, capable of saving and retrieving coordinate pairs in a last-in-first-out manner, thus supporting recursive path decomposition and backtracking calculation.

[0109] Through the above processing, the detour candidate points are first checked and replaced by line segment intersections before entering the subsequent graph construction. This ensures that the nodes entering the stack maintain validity and connectivity, thereby reducing the participation of invalid nodes in the calculation and making the subsequent path combinations more in line with the geometric passage relationship under obstacle constraints, thus improving the stability and continuity of path solving results.

[0110] One possible implementation also includes:

[0111] When the stack to be calculated is not empty, take the coordinate pair from the stack to be calculated as the new starting point and ending point, and repeat the obstacle judgment and detour candidate point generation.

[0112] When the stack to be verified is not empty, take the coordinate pair from the stack to be verified as the new starting point and ending point, and repeat the blocking judgment and detour candidate point generation.

[0113] The process continues until both the calculation stack and the verification stack are empty, completing the generation of all detour candidate points.

[0114] In this embodiment, the calculation stack is used to temporarily store coordinate pairs that need to be expanded towards the endpoint, and the verification stack is used to temporarily store coordinate pairs whose connectivity needs to be verified again. Both can be implemented using a linear storage structure, and data flow is completed through push and pop operations. A coordinate pair can consist of two two-dimensional or three-dimensional coordinates, corresponding to the new starting point and the endpoint, respectively, and the storage order of the coordinate pairs can be consistent with the generation order, so as to expand each candidate branch sequentially.

[0115] After completing the obstacle detection and generating detour candidate points for the current coordinate pair, if the obtained new candidate points need to be further expanded, the coordinate pairs related to the endpoint are pushed onto the calculation stack, and the coordinate pairs that need to be verified by connection are pushed onto the verification stack. Subsequently, coordinate pairs removed from any stack are regarded as new local planning endpoints, and the same obstacle detection and detour candidate point generation process as the previous layer is executed again, so that the candidate path branches expand layer by layer along the obstacle boundary. The popping order can adopt a last-in-first-out method or be removed according to a preset priority order to adapt to different path expansion strategies.

[0116] When both the calculation stack and the verification stack are empty, it indicates that all branches derived from the current starting point, ending point, and candidate points at each level have been expanded and verified, and the system obtains a complete set of detour candidate points. This stack-driven recursive expansion method allows candidate point generation to continue without missing branches, and incorporates newly generated coordinate pairs from each layer into the subsequent judgment process, thus forming a complete candidate point network. Its effect is that it can progressively expand and uniformly converge detour relationships in multi-obstacle and continuously occluded scenes, ensuring that the candidate point generation results are complete and can be directly used for subsequent graph search.

[0117] This application's embodiments can be applied to power line path planning scenarios in power engineering. For example, in a wind farm, a power line is laid between two wind turbines, starting at the upper tower point A(0,0) of wind turbine A and ending at the upper tower point B(300,300) of wind turbine B. Mountains, building complexes, water bodies, or other static obstacles exist in between, including non-convex obstacles. After obtaining the geometric information of the starting point, ending point, and each obstacle, when the obstacles are described using vertex coordinates, all vertices of each obstacle are connected sequentially to form several line segments. For example, an irregular mountain can be described by vertex coordinates [(100,50),(120,80),(110,100),(90,90)], and a rectangular building complex can be described by another set of vertex coordinates. Subsequently, a polar coordinate system is established with the starting point A as the center. For each obstacle, its closest distance, farthest distance, minimum angle, and maximum angle relative to the starting point are calculated, forming a sector-shaped angular distance model of the obstacle.

[0118] For the calculation of the starting point parameters, the closest distance is obtained by calculating the distance from each line segment of the obstacle to the starting point A and taking the minimum value. For the mountain obstacle, Lmin = 111.8 meters, and for the building group, Lmin = 150 meters. The minimum and maximum angles are obtained by subtracting the starting point coordinates from the coordinates of the endpoints of each line segment to obtain the vectors relative to the starting point. The angles of each vector are calculated and normalized to a preset interval to form an angle array. The angle array is then processed to eliminate jumps caused by the angle crossing the boundary. Finally, the minimum and maximum values ​​in the processed angle array are taken. Taking the mountain as an example, its angle range relative to the starting point A can be 26.6° to 45°, and the angle range of the building group can be 135° to 150°. Corresponding to the starting point, the closest distance, farthest distance, minimum angle, and maximum angle of each obstacle relative to the ending point B are also calculated for use in the subsequent generation of detour candidate points. When the building group is shifted 50 meters westward during construction, its distance and angle parameters relative to the starting and ending points can be recalculated based on the updated vertex coordinates.

[0119] To determine if a direct path exists between starting point A and ending point B, the length and azimuth angle of the line connecting them are first calculated. In this wind farm example, the length of the line connecting A and B is approximately 424 meters, and the azimuth angle is 45°. Obstacles are traversed sequentially in ascending order of their closest distance relative to the current starting point. Since the Lmin value of the mountain (111.8 meters) is less than the 150 meters of the building complex, the mountain is processed first. During the traversal, each obstacle is checked to determine if it blocks the direct line between the starting and ending points. If the closest distance of the current obstacle is greater than the length of the line connecting the starting and ending points, the traversal is terminated, and subsequent obstacles are determined not to block the direct line. When the azimuth angle of the line connecting the starting and ending points is between the minimum and maximum angles of the current obstacle, and the line intersects with the current obstacle, the obstacle is identified as a blocking obstacle. In the above example, 45° is located within the angle range of 26.6° to 45° of the mountain, and the line AB intersects with the boundary line of the mountain. Therefore, the mountain is identified as an obstacle.

[0120] For a given obstacle, two rays are emitted from the starting point based on its minimum and maximum angles relative to the starting point, and two rays are emitted from the ending point based on its minimum and maximum angles relative to the ending point. The intersection points between these rays are calculated, and these intersection points are used as candidate detour points. In a wind farm scenario, two candidate tangent points P1 and P2 can be generated from the mountain. If a candidate point, after being connected to the starting point, still results in the corresponding line segment falling inside the obstacle or intersecting with the obstacle, it is corrected in the subsequent verification stage. For example, P1 located inside the mountain is replaced with P1' located at the boundary. When both mountains and building complexes simultaneously obstruct the line connecting the starting and ending points, candidate points are first generated from the closer mountains, and then the same obstruction judgment and candidate point generation are performed on the building complexes in the subsequent recursive process.

[0121] Figure 4 Path planning diagram 1 provided for this application Figure 5 The second path planning diagram provided for this application is as follows: Figure 4 , Figure 5As shown, the above candidate point generation and verification process can obtain continuous and effective detour paths in multi-obstacle scenarios. After generating detour candidate points, each candidate point is connected to the starting point to form a line segment. It is then determined whether this line segment intersects with all obstacles. If an intersection exists, the original detour candidate point is replaced by this intersection point, and the original candidate point is discarded. For example, if the line connecting the starting point A to P1 intersects the mountain boundary again, P1 is replaced by the actual intersection point P1'. After verification, the candidate point and the starting point are paired to form a coordinate pair and pushed into the verification stack. Simultaneously, the candidate point and the ending point are paired to form a coordinate pair and pushed into the calculation stack. Subsequently, when the stack to be calculated is not empty, a coordinate pair is taken from the stack to be calculated as a new starting point and ending point, and the polar coordinate modeling, obstruction judgment and detour candidate point generation are repeated; when the stack to be verified is not empty, a coordinate pair is taken from the stack to be verified as a new starting point and ending point, and the obstruction judgment and detour candidate point generation are repeated, until both the stack to be calculated and the stack to be verified are empty, and all available detour candidate points are obtained.

[0122] After generating detour candidate points, each candidate point is connected to the starting point to form a line segment. It is then determined whether this line segment intersects with all obstacles. If an intersection exists, the original candidate point is replaced by that intersection, and the original candidate point is discarded. For example, if the line connecting starting point A to P1 intersects the mountain boundary again, P1 is replaced by the actual intersection point P1'. Verified candidate points are paired with the starting point and pushed into the verification stack. Simultaneously, a candidate point is paired with the ending point and pushed into the calculation stack. Then, while the calculation stack is not empty, a coordinate pair is retrieved from the stack as a new starting and ending point, and the polar coordinate modeling, obstacle detection, and candidate point generation are repeated. Similarly, while the verification stack is not empty, a coordinate pair is retrieved from the stack as a new starting and ending point, and the obstacle detection and candidate point generation are repeated until both the calculation and verification stacks are empty, resulting in all usable candidate points.

[0123] In situations with multiple obstacles, such as when the line connecting P1' to the endpoint B is blocked by a group of buildings, a new candidate point P2' can be generated based on the minimum angle, maximum angle, closest distance, and farthest distance of the building group relative to the current starting point P1' and endpoint B. The path segments from P1' to P2' and from P2' to B are then recursively checked for intersections with other obstacles. If the building group is temporarily moved 50 meters due to construction, causing the original path segment to become invalid, the polar coordinate modeling, obstruction judgment, and candidate point generation are re-executed for the affected coordinate pairs without modifying the candidate point set in the unaffected areas. In wind farms with multiple wind turbines, such as 10 turbines requiring separate power collection lines, obstacles in different spatial areas can have their sector angle and distance models calculated separately by different threads. The candidate points and path segments generated by each thread are then merged, and stack verification and graph search are performed again.

[0124] After generating all candidate bypass points, an undirected graph is constructed using the starting point A, the ending point B, and all generated and retained candidate points as nodes. Edges are established based on the connectivity between nodes, ensuring that the connecting lines between corresponding nodes do not intersect any obstacles. The shortest path algorithm is then applied to this undirected graph to obtain the path planning results from the starting point to the ending point. In the example above, among the feasible paths obtained from the graph search, the path length from starting point A to ending point B via P1' is 400 meters, and the other path bypassing the building complex is 430 meters. The shortest path solution selects the 400-meter path as the planned path for the power line.

[0125] The path planning method based on a sector model provided in this application obtains the geometric information of the starting point, ending point, and obstacles, and establishes a polar coordinate system with the starting point as the center. It calculates the closest distance, farthest distance, minimum angle, and maximum angle of each obstacle relative to the starting point, thus obtaining a sector-shaped angular distance model for each obstacle. This method can represent the spatial distribution and occlusion range of obstacles in a unified geometric way, reducing repeated judgments in complex environments. When the line connecting the starting point and the ending point is blocked by an obstacle, it generates detour candidate points based on the geometric relationship between the blocking obstacle and the starting and ending points, enabling the rapid formation of effective detour paths for occlusion situations. Furthermore, by constructing an undirected graph using the starting point, ending point, and generated candidate points as nodes and solving for the shortest path, a path planning result is formed. This method can reduce computational overhead, improve real-time performance, and obtain a planned path with good continuity, less detour redundancy, and a better geometric path length.

[0126] Figure 6 A schematic diagram of the path planning device based on the sector model provided in this application is shown below. Figure 6 As shown, the path planning device 40 based on the sector model provided in this embodiment includes:

[0127] The acquisition module 401 is used to acquire geometric information of the starting point, the ending point, and obstacles.

[0128] The coordinate module 402 is used to establish a polar coordinate system with the starting point as the center, and to calculate the closest distance, farthest distance, minimum angle and maximum angle of each obstacle relative to the starting point based on the polar coordinate system, so as to obtain the sector angle distance model of each obstacle.

[0129] The detour module 403 is used to generate detour candidate points based on the geometric relationship between the blocking obstacle and the starting and ending points when the line connecting the starting point and the ending point is blocked by an obstacle.

[0130] Planning module 404 is used to construct an undirected graph using the starting point, ending point, and generated candidate points as nodes, solve for the shortest path, and generate path planning results.

[0131] In one possible implementation, coordinate module 402 is used to sequentially form edges from all vertices of the obstacle to obtain several line segments; calculate the distance between each line segment and the starting point, and take the minimum value as the closest distance to the obstacle.

[0132] In one possible implementation, coordinate module 402 is used to sequentially form edges from all the vertices of the obstacle to obtain several line segments;

[0133] Subtract the coordinates of the starting point from the coordinates of the endpoints of each line segment to obtain the vector relative to the starting point;

[0134] Calculate the angle of each vector and normalize it to a preset interval to obtain an angle array;

[0135] Perform continuity processing on the angle array to eliminate jumps that occur when the angle crosses the boundary;

[0136] Take the minimum value of the processed angle array as the minimum angle and the maximum value as the maximum angle.

[0137] In one possible implementation, the detour module 403 is used to calculate the length and direction angle of the line connecting the starting point and the ending point;

[0138] Traverse each obstacle in ascending order of closest distance, and determine whether the current obstacle blocks the direct connection between the start and end points;

[0139] If the nearest distance to the current obstacle is greater than the length of the line connecting the start and end points, then terminate the traversal and determine that subsequent obstacles do not block the direct connection.

[0140] If the direction angle of the starting point is between the minimum and maximum angles of the current obstacle, and the line connecting the starting point and the ending point intersects the current obstacle, then the current obstacle is identified as a blocking obstacle, and detour candidate points are generated based on the geometric relationship between the blocking obstacle and the starting point and the ending point.

[0141] In one possible implementation, the detour module 403 is used to calculate the closest distance, farthest distance, minimum angle, and maximum angle of the obstacle relative to the endpoint.

[0142] Two rays are generated based on the starting point and its minimum and maximum angles, and two rays are generated based on the ending point and its minimum and maximum angles.

[0143] Calculate the intersection points between rays as candidate points for detours.

[0144] In one possible implementation, the detour module 403 is used to connect the detour candidate points with the starting point to form a line segment, and determine whether the line segment intersects with all obstacles.

[0145] If an intersection exists, the intersection will be used as a new detour candidate point, and the original detour candidate point will be removed.

[0146] The verified detour candidate points are combined with the starting point and pushed into the verification stack, and the detour candidate points are combined with the ending point and pushed into the calculation stack.

[0147] In one possible implementation, the detour module 403 is used to retrieve coordinate pairs from the stack to be calculated as new starting points and ending points when the stack to be calculated is not empty, and repeat the blocking judgment and detour candidate point generation.

[0148] When the stack to be verified is not empty, take the coordinate pair from the stack to be verified as the new starting point and ending point, and repeat the blocking judgment and detour candidate point generation.

[0149] The process continues until both the calculation stack and the verification stack are empty, completing the generation of all detour candidate points.

[0150] The path planning device based on the sector model provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0151] Figure 7 A schematic diagram of the path planning device based on a sector model provided in this application. Figure 7 As shown, the device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus.

[0152] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0153] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0154] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0155] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0156] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0157] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0158] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0159] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0160] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0161] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0162] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0163] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0164] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0165] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0166] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A path planning method based on a sector model, characterized in that, include: Obtain geometric information of the start point, end point, and obstacles; A polar coordinate system is established with the starting point as the center, and the closest distance, farthest distance, minimum angle and maximum angle of each obstacle relative to the starting point are calculated based on the polar coordinate system to obtain the sector angle distance model of each obstacle; When the line connecting the starting point and the ending point is blocked by an obstacle, a detour candidate point is generated based on the geometric relationship between the blocking obstacle and the starting point and the ending point. The starting point, the ending point, and the generated candidate points are used as nodes to construct an undirected graph, and the shortest path is solved to form the path planning result.

2. The method according to claim 1, characterized in that, Calculate the nearest distance of each obstacle to the starting point, including: By sequentially forming edges from all the vertices of the obstacle, several line segments are obtained; Calculate the distance between each line segment and the starting point, and take the minimum value as the closest distance to the obstacle.

3. The method according to claim 1, characterized in that, Calculate the minimum and maximum angles of each obstacle relative to the starting point, including: By sequentially forming edges from all the vertices of the obstacle, several line segments are obtained; Subtract the coordinates of the starting point from the coordinates of the endpoints of each line segment to obtain a vector relative to the starting point; Calculate the angle of each vector and normalize it to a preset interval to obtain an angle array; The angle array is processed to ensure continuity, eliminating jumps that occur when angles cross boundaries; Take the minimum value of the processed angle array as the minimum angle and the maximum value as the maximum angle.

4. The method according to claim 1, characterized in that, When the line connecting the starting point and the ending point is blocked by an obstacle, detour candidate points are generated based on the geometric relationship between the blocking obstacle and the starting point and the ending point, including: Calculate the length and direction angle of the line connecting the starting point and the ending point; Traverse each obstacle in ascending order of closest distance, and determine whether the current obstacle blocks the direct connection between the starting point and the ending point; If the nearest distance to the current obstacle is greater than the length of the line connecting the starting point and the ending point, then the traversal is terminated and it is determined that subsequent obstacles do not block the direct connection. If the direction angle of the starting point is between the minimum and maximum angles of the current obstacle, and the line connecting the starting point and the ending point intersects the current obstacle, then the current obstacle is identified as a blocking obstacle, and detour candidate points are generated based on the geometric relationship between the blocking obstacle and the starting point and the ending point.

5. The method according to claim 4, characterized in that, Based on the geometric relationship between the obstacle and the starting point and the ending point, candidate detour points are generated, including: Calculate the nearest distance, farthest distance, minimum angle, and maximum angle of the obstacle relative to the endpoint; Two rays are generated based on the starting point and its minimum and maximum angles, and two rays are generated based on the ending point and its minimum and maximum angles; Calculate the intersection points between the rays and use them as candidate points for detour.

6. The method according to claim 5, characterized in that, The method further includes: Connect the candidate detour points with the starting point to form a line segment, and determine whether the line segment intersects with all obstacles; If an intersection exists, the intersection will be used as a new detour candidate point, and the original detour candidate point will be eliminated. The verified detour candidate points are combined with the starting point and pushed into the verification stack, and the detour candidate points are combined with the ending point and pushed into the calculation stack.

7. The method according to claim 6, characterized in that, Also includes: When the stack to be calculated is not empty, take out the coordinate pair from the stack to be calculated as the new starting point and ending point, and repeat the obstacle judgment and detour candidate point generation. When the stack to be verified is not empty, take out the coordinate pair from the stack to be verified as the new starting point and ending point, and repeat the blocking judgment and detour candidate point generation. The process continues until both the stack to be calculated and the stack to be verified are empty, at which point the generation of all detour candidate points is complete.

8. A path planning device based on a sector model, characterized in that, include: The acquisition module is used to acquire geometric information about the start point, end point, and obstacles. The coordinate module is used to establish a polar coordinate system with the starting point as the center, and to calculate the closest distance, farthest distance, minimum angle and maximum angle of each obstacle relative to the starting point based on the polar coordinate system, so as to obtain the sector angle distance model of each obstacle; A detour module is used to generate detour candidate points based on the geometric relationship between the blocking obstacle and the starting point and the ending point when the line connecting the starting point and the ending point is blocked by an obstacle. The planning module is used to construct an undirected graph using the starting point, the ending point, and the generated candidate points as nodes, solve for the shortest path, and generate path planning results.

9. A path planning device based on a sector model, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.