Path planning method and device, computer device and computer readable storage medium

By using the largest inscribed rectangle area to determine the planning start point and direction in path planning, a path that conforms to the area boundary is generated, which solves the problem of operating equipment exceeding the area and improves operational safety.

CN116734874BActive Publication Date: 2026-07-21WEICHAI POWER CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WEICHAI POWER CO LTD
Filing Date
2023-05-16
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional path planning methods can easily lead to equipment exceeding the planned area, reducing operational safety.

Method used

By obtaining the largest inscribed rectangle of the area to be planned as the actual planning area, the planning starting point and initial planning direction are determined. The planning path is generated according to the planning rules, ensuring the method of changing the intersection point of the path with the area boundary and the method of determining the endpoint, so as to avoid the path exceeding the area.

Benefits of technology

This effectively avoids the problem of the path going beyond the planned area, thus improving operational safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116734874B_ABST
    Figure CN116734874B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a path planning method and device, computer equipment and a computer readable storage medium, which can determine the maximum inscribed rectangular region corresponding to the region to be planned as the actual planning region, determine the planning starting point and the initial planning direction corresponding to the actual planning region. According to the planning starting point, the initial planning direction and the planning rule, the planning path corresponding to the actual planning region is determined. The initial path in the planning path can be determined by the planning starting point and the initial planning direction. The change mode of the planning path when the intersection point between the planning path and the boundary of the actual planning region is generated can be identified by the planning rule, and the terminal point determination mode of the planning path, so that a complete planning path can be obtained. The planning path is used for the work machine to work on the region to be planned. The planning mode of the maximum inscribed rectangle as the actual planning region can effectively avoid the problem that the planning path exceeds the region to be planned, and improves the work safety.
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 path planning methods, apparatus, computer equipment and computer-readable storage media. Background Technology

[0002] With the rapid development of agricultural modernization in my country and the continuous rise in labor costs, the use of high technology to replace manual labor in agricultural mechanization has become a trend, and unmanned farms are gradually appearing in people's field of vision. Agricultural vehicles are important mechanized tools in agricultural operations. Traditional mechanized operations rely on manual operation of these vehicles.

[0003] With the development and application of autonomous driving technology and the emergence of unmanned farms, agricultural machinery with automatic driving capabilities has replaced manual driving. In autonomous operations, the path planning module becomes particularly important. The path planning problem involves planning a safe driving path within the farmland where the autonomous vehicle can traverse the entire work area without collisions.

[0004] In related technologies, path planning is performed based on the largest bounding rectangle corresponding to the area to be planned. This path planning method can easily cause the operating equipment to exceed the planned area during operation, resulting in low operational safety. Summary of the Invention

[0005] To address the aforementioned technical issues, this application provides a path planning method that effectively avoids the problem of operating equipment exceeding the designated area and improves operational safety.

[0006] The embodiments of this application disclose the following technical solutions:

[0007] In a first aspect, embodiments of this application disclose a path planning method, the method comprising:

[0008] Obtain the area to be planned;

[0009] Determine the largest inscribed rectangle region corresponding to the area to be planned, and define the largest inscribed rectangle region as the actual planning area;

[0010] Determine the planning starting point and initial planning direction corresponding to the actual planning area;

[0011] Based on the planning starting point, the initial planning direction, and the planning rules, the planning path corresponding to the actual planning area is determined. The planning rules are used to identify the change method of the planning path when the planning path intersects with the boundary of the actual planning area, and the method for determining the end point of the planning path. The planning path is used to enable the working equipment to perform operations on the area to be planned.

[0012] In one possible implementation, determining the planning starting point and initial planning direction corresponding to the actual planning area includes:

[0013] Determine a target vertex among multiple vertices corresponding to the actual planning area, wherein the target vertex is any one of the multiple vertices;

[0014] The starting point of the planning is a point on the long side of the target vertex that is half the width of the machine tool, and the width of the machine tool is the width of the machine tool corresponding to the working machine.

[0015] The initial planning direction is the direction from the target vertex to another vertex on the diagonal opposite to the target vertex.

[0016] In one possible implementation, determining the planning path corresponding to the actual planning area based on the planning starting point, the initial planning direction, and the planning rules includes:

[0017] Determine the starting point of the line segment with the planning starting point as the starting point of the line segment and the intersection point of the line segment starting from the planning starting point and intersecting with the moving edge along the initial planning direction as the starting point of the line segment;

[0018] The starting line segment is taken as the first line segment, and multiple consecutive line segments corresponding to the actual planning area are determined according to the planning rules.

[0019] Based on multiple consecutive line segments corresponding to the actual planned area, determine the planned path corresponding to the actual planned area;

[0020] The planning rules include:

[0021] If the endpoint of the i-th line segment is on the moving edge in the actual planning area, the endpoint of the line segment is moved along the moving edge by a first target distance in the first preset direction. The moving edge is the short side excluding the target vertex. The first target distance satisfies that the line segment spacing between the (i+2)-th line segment and the i-th line segment is not less than the width of the machine. The first preset direction is the direction toward the first vertex that is on the same long side as the target vertex.

[0022] The endpoint of the moved line segment is taken as the starting point of the (i+1)th line segment. The target movement direction is the line segment direction. The (i+1)th line segment is determined. The endpoint of the (i+1)th line segment is the intersection point of the (i+1)th line segment and the boundary of the actual planning area. The target movement direction is the direction that forms a 90-degree angle with the initial planning direction and is towards another vertex on the short side where the target vertex is located.

[0023] If the endpoint of the i-th line segment is on a non-moving edge in the actual planning area, the endpoint of the i-th line segment is taken as the starting point of the (i+1)-th line segment, and the direction that forms a 90-degree angle with the direction of the i-th line segment and faces into the actual planning area is taken as the direction of the (i+1)-th line segment. The endpoint of the (i+1)-th line segment is the intersection point of the (i+1)-th line segment and the boundary of the actual planning area.

[0024] In response to the fact that the distance between the endpoint of the k-th line segment and the first vertex on the moving edge is less than the first target distance corresponding to the k-th line segment, the k-th line segment is determined as the last line segment of the planned path.

[0025] In one possible implementation, determining the planned path corresponding to the actual planned area based on a plurality of consecutive line segments corresponding to the actual planned area includes:

[0026] The planned path is obtained by fitting a curve path based on the continuous multiple line segments;

[0027] The method further includes:

[0028] The machine is instructed to operate in the planned area according to the planned path.

[0029] In one possible implementation, before performing curve path fitting based on the continuous plurality of line segments, the method further includes:

[0030] The endpoints of multiple line segments located on the boundary of the actual planned area, excluding the starting point of the first line segment and the ending point of the last line segment, are moved. Specifically, for a target line segment endpoint, the target line segment endpoint is moved a second target distance along the target direction corresponding to the line segment whose endpoint is the target line segment endpoint. The target direction is the opposite direction of the line segment direction of the line segment whose endpoint is the target line segment endpoint, and the line segment direction points from the starting point to the ending point of the line segment. The second target distance satisfies the requirement that the working equipment does not exceed the actual planned area when operating according to the actual running path. The target line segment endpoint is any one of the multiple line segment endpoints.

[0031] In one possible implementation, before performing curve path fitting based on the continuous plurality of line segments, the method further includes:

[0032] In response to the existence of two non-intersecting line segments among the continuous plurality of line segments, and the minimum distance between the line segments being less than the minimum turning diameter of the machine, the two line segments are reduced by a preset length from both ends. The preset length is used to ensure that when the machine turns between the two line segments, the turning path does not exceed the boundary of the actual planned area.

[0033] Secondly, embodiments of this application disclose a path planning device, the device comprising an acquisition unit, a first determination unit, a second determination unit, and a third determination unit:

[0034] The acquisition unit is used to acquire the area to be planned;

[0035] The first determining unit is used to determine the largest inscribed rectangle region corresponding to the region to be planned, and to determine the largest inscribed rectangle region as the actual planning region;

[0036] The second determining unit is used to determine the planning starting point and initial planning direction corresponding to the actual planning area;

[0037] The third determining unit is used to determine the planning path corresponding to the actual planning area based on the planning starting point, the initial planning direction and the planning rules. The planning rules are used to identify the change method of the planning path when the planning path intersects with the boundary of the actual planning area, and the method of determining the end point of the planning path. The planning path is used to enable the working equipment to perform operations on the area to be planned.

[0038] In one possible implementation, the second determining unit is specifically used for:

[0039] Determine a target vertex among multiple vertices corresponding to the actual planning area, wherein the target vertex is any one of the multiple vertices;

[0040] The starting point of the planning is a point on the long side of the target vertex that is half the width of the machine tool, and the width of the machine tool is the width of the machine tool corresponding to the working machine.

[0041] The initial planning direction is the direction from the target vertex to another vertex on the diagonal opposite to the target vertex.

[0042] In one possible implementation, the third determining unit is specifically used for:

[0043] Determine the starting point of the line segment with the planning starting point as the starting point of the line segment and the intersection point of the line segment starting from the planning starting point and intersecting with the moving edge along the initial planning direction as the starting point of the line segment;

[0044] The starting line segment is taken as the first line segment, and multiple consecutive line segments corresponding to the actual planning area are determined according to the planning rules.

[0045] Based on multiple consecutive line segments corresponding to the actual planned area, determine the planned path corresponding to the actual planned area;

[0046] The planning rules include:

[0047] If the endpoint of the i-th line segment is on the moving edge in the actual planning area, the endpoint of the line segment is moved along the moving edge by a first target distance in the first preset direction. The moving edge is the short side excluding the target vertex. The first target distance satisfies that the line segment spacing between the (i+2)-th line segment and the i-th line segment is not less than the width of the machine. The first preset direction is the direction toward the first vertex that is on the same long side as the target vertex.

[0048] The endpoint of the moved line segment is taken as the starting point of the (i+1)th line segment. The target movement direction is the line segment direction. The (i+1)th line segment is determined. The endpoint of the (i+1)th line segment is the intersection point of the (i+1)th line segment and the boundary of the actual planning area. The target movement direction is the direction that forms a 90-degree angle with the initial planning direction and is towards another vertex on the short side where the target vertex is located.

[0049] If the endpoint of the i-th line segment is on a non-moving edge in the actual planning area, the endpoint of the i-th line segment is taken as the starting point of the (i+1)-th line segment, and the direction that forms a 90-degree angle with the direction of the i-th line segment and faces into the actual planning area is taken as the direction of the (i+1)-th line segment. The endpoint of the (i+1)-th line segment is the intersection point of the (i+1)-th line segment and the boundary of the actual planning area.

[0050] In response to the fact that the distance between the endpoint of the k-th line segment and the first vertex on the moving edge is less than the first target distance corresponding to the k-th line segment, the k-th line segment is determined as the last line segment of the planned path.

[0051] In one possible implementation, the third determining unit is specifically used for:

[0052] The planned path is obtained by fitting a curve path based on the continuous multiple line segments;

[0053] The device also includes an indicator unit:

[0054] The instruction unit is used to instruct the operating equipment to perform operations in the area to be planned according to the planned path.

[0055] In one possible implementation, the device further includes a first moving unit:

[0056] The first moving unit is used to move the endpoints of multiple line segments located on the boundary of the actual planned area, excluding the starting point of the first line segment and the ending point of the last line segment. Specifically, for a target line segment endpoint, the target line segment endpoint is moved a second target distance along the target direction corresponding to the line segment whose endpoint is the target line segment endpoint. The target direction is the opposite direction of the line segment direction of the line segment whose endpoint is the target line segment endpoint, and the line segment direction points from the starting point to the ending point of the line segment. The second target distance satisfies the requirement that the working equipment does not exceed the actual planned area when operating according to the actual running path. The target line segment endpoint is any one of the multiple line segment endpoints.

[0057] In one possible implementation, the device further includes a second moving unit:

[0058] The second moving unit is configured to respond to the existence of two non-intersecting line segments among the continuous plurality of line segments, the minimum value of the line segment spacing being less than the minimum turning diameter of the machine, by reducing the two line segments by a preset length from both ends of the line segments. The preset length is used to ensure that when the working machine turns between the two line segments, the turning path does not exceed the boundary of the actual planned area.

[0059] Thirdly, embodiments of this application disclose a computer device, which includes a processor and a memory:

[0060] The memory is used to store program code and transmit the program code to the processor;

[0061] The processor is configured to execute the path planning method described in any one of the first aspects according to the instructions in the program code.

[0062] Fourthly, embodiments of this application disclose a computer-readable storage medium for storing a computer program for executing the path planning method described in any one of the first aspects.

[0063] Fifthly, embodiments of this application disclose a computer program product including instructions that, when run on a computer, cause the computer to execute the path planning method described in any one of the first aspects.

[0064] As can be seen from the above technical solution, when performing path planning, this application first obtains the area to be planned, which is the area where path planning is required. Then, it determines the largest inscribed rectangle area corresponding to the area to be planned and uses this largest inscribed rectangle area as the actual planning area, determining the planning start point and initial planning direction corresponding to the actual planning area. Finally, based on the planning start point, the initial planning direction, and planning rules, it determines the planning path corresponding to the actual planning area. The planning start point and initial planning direction determine the initial path's movement mode, while the planning rules indicate how the planning path changes when it intersects with the boundary of the actual planning area, and how the endpoint of the planning path is determined, thus obtaining a complete planning path. This planning path is used to enable the work equipment to operate on the area to be planned. Therefore, this application, by using the largest inscribed rectangle as the actual planning area, effectively avoids the problem of the planned path exceeding the area to be planned, improving operational safety. Attached Figure Description

[0065] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0066] Figure 1 A flowchart of a path planning method provided in an embodiment of this application;

[0067] Figure 2 A schematic diagram illustrating an initial planning direction provided for an embodiment of this application;

[0068] Figure 3 A schematic diagram of a planning rule provided for an embodiment of this application;

[0069] Figure 4 This is a schematic diagram of a meshing process provided in an embodiment of this application;

[0070] Figure 5 A schematic diagram of a meshing processing result provided in an embodiment of this application;

[0071] Figure 6 A schematic diagram illustrating a path planning result provided in an embodiment of this application;

[0072] Figure 7 This is a structural block diagram of a path planning device provided in an embodiment of this application. Detailed Implementation

[0073] The embodiments of this application will now be described with reference to the accompanying drawings.

[0074] Understandably, this method can be applied to processing devices capable of path planning, such as terminal devices or servers with path planning functionality. This method can be executed independently by a terminal device or server, or it can be applied to network scenarios where a terminal device and a server communicate, executing in cooperation. The terminal device can be a computer, mobile phone, or similar device. The server can be an application server or a web server; in actual deployment, this server can be a standalone server or a cluster server.

[0075] See Figure 1 , Figure 1 A flowchart of a path planning method provided in this application embodiment, the method including:

[0076] S101: Obtain the area to be planned.

[0077] The area to be planned is the area that needs to be planned in this path planning. Since this application uses the maximum infinity method for path planning, the area to be planned is preferably a rectangular area or an approximately rectangular area.

[0078] S102: Determine the largest inscribed rectangle area corresponding to the area to be planned, and determine the largest inscribed rectangle area as the actual planning area.

[0079] The actual planned area is the area used as the basis for route planning.

[0080] S103: Determine the planning starting point and initial planning direction corresponding to the actual planning area.

[0081] Understandably, in order for the planned path to traverse the actual planned area, the planned path is usually composed of multiple consecutive path segments, where the planning starting point and the initial planning direction are the starting point and path direction of the first segment.

[0082] S104: Determine the planning path corresponding to the actual planning area based on the planning starting point, initial planning direction, and planning rules.

[0083] The planning rules are used to identify how the planned path changes when it intersects with the boundary of the actual planned area, and how the endpoint of the planned path is determined. Thus, by combining the first segment of the path reflected by the planning starting point and the initial planning direction, a completed planned path can be obtained through the continuous intersection of the path based on the planning rules with the boundary of the actual planned area. The planned path is used to enable the working equipment to perform operations on the area to be planned.

[0084] As can be seen from the above technical solution, when performing path planning, this application first obtains the area to be planned, which is the area where path planning is required. Then, it determines the largest inscribed rectangle area corresponding to the area to be planned and uses this largest inscribed rectangle area as the actual planning area, determining the planning start point and initial planning direction corresponding to the actual planning area. Finally, based on the planning start point, the initial planning direction, and planning rules, it determines the planning path corresponding to the actual planning area. The planning start point and initial planning direction determine the initial path's movement mode, while the planning rules indicate how the planning path changes when it intersects with the boundary of the actual planning area, and how the endpoint of the planning path is determined, thus obtaining a complete planning path. This planning path is used to enable the work equipment to operate on the area to be planned. Therefore, this application, by using the largest inscribed rectangle as the actual planning area, effectively avoids the problem of the planned path exceeding the area to be planned, improving operational safety.

[0085] In one possible implementation, when determining the planning starting point based on the vertex of the actual planning area, in order to prevent the working equipment from exceeding the actual planning area, the computer device can set the starting point at a position half the width of the equipment from the vertex of the actual planning area, so that the working equipment can not exceed the actual planning area when starting from the starting point.

[0086] Specifically, the computer device can first determine a target vertex among multiple vertices corresponding to the actual planned area. The target vertex can be any one of the multiple vertices. Then, the computer device can use a point on the long side of the target vertex, located half a machine width away from the target vertex, as the planning starting point. The machine width is the width of the working machine, which is the width required for the working machine during operation. Therefore, when the working machine starts from this starting point, it can stay within the boundary of the actual planned area.

[0087] Similarly, the endpoint of the planned path can be treated in a similar way so that the working equipment does not exceed the boundary of the actual planned area when it finishes its work.

[0088] In one possible implementation, when determining the planning path corresponding to the actual planning area based on the planning starting point, the initial planning direction, and the planning rules, the computer device can first determine a starting line segment with the planning starting point as the line segment starting point and the intersection point of the line segment starting from the planning starting point and the moving edge along the initial planning direction as the line segment ending point. The initial planning direction is the direction from the target vertex to another vertex on the diagonal opposite to the target vertex. Figure 2 As shown, Figure 2 This is a schematic diagram of an initial planning direction provided in an embodiment of this application. Rectangle ABCD is the actual planning area, the initial planning direction is the diagonal direction of AC, and the target point is point A.

[0089] The computer device can use the starting line segment as the first line segment and determine a series of consecutive line segments corresponding to the actual planning area according to the planning rules.

[0090] Finally, the computer device can determine the planned path corresponding to the actual planned area based on multiple consecutive line segments. The computer device can either directly use multiple consecutive line segments as the planned path, or it can further process the multiple consecutive line segments to obtain a more realistic planned path.

[0091] The planning rules include:

[0092] If the endpoint of the i-th line segment lies on a moving edge within the actual planned area, the endpoint is moved a first target distance along the moving edge in a first preset direction. The moving edge is the shorter side excluding the target vertex. The first target distance satisfies the condition that the distance between the (i+2)-th and i-th line segments is not less than the machine width. The first preset direction is the direction towards the first vertex on the same long side as the target vertex. This movement aims to prevent line segments from looping within the same parallelogram and to ensure that the resulting broken line segments after intersecting the actual planned area do not affect the operation of the machine. In other words, by limiting the distance to not less than the machine width, the machine will not repeatedly operate within the same area.

[0093] The computer device can use the endpoint of the moved line segment as the starting point of the (i+1)th line segment, the target movement direction as the line segment direction, and determine the (i+1)th line segment. The endpoint of the (i+1)th line segment is the intersection point of the (i+1)th line segment and the boundary of the actual planned area. The target movement direction is a direction that forms a 90-degree angle with the initial planning direction and is towards another vertex on the short side where the target vertex is located. Figure 3 As shown, Figure 3This is a schematic diagram of a planning rule provided for an embodiment of this application.

[0094] If the endpoint of the i-th line segment is on a non-moving edge in the actual planning area, the computer device can take the endpoint of the i-th line segment as the starting point of the (i+1)-th line segment, take the direction that forms a 90-degree angle with the direction of the i-th line segment and faces into the actual planning area as the direction of the (i+1)-th line segment, and determine the (i+1)-th line segment. The endpoint of the (i+1)-th line segment is the intersection point of the (i+1)-th line segment and the boundary of the actual planning area.

[0095] When determining the endpoint, the computer device can determine the distance between the intersection point and the first vertex each time a line segment intersects with the moving edge. If the distance between the endpoint of the k-th line segment and the first vertex on the moving edge is less than the first target distance corresponding to the k-th line segment, it indicates that the endpoint of the k-th line segment cannot be adjusted towards the first preset direction. Therefore, path planning cannot continue, and the computer device can determine the k-th line segment as the last line segment of the planned path.

[0096] Specifically, in a practical application scenario, the computer device can denote the four vertices of the boundary as A, B, C, and D, where AB is the shorter side and CD is the same length, and BC is the longer side and DA is the same length. The normal vector of the first boundary segment pointing to the work area is the direction of work movement. There is a one-to-one correspondence between boundary points and boundary segments. The first boundary segment is the shortest side, and the first boundary point is the starting point of the first boundary segment. If the first boundary point is point A, then the first boundary segment is AB.

[0097] The first boundary segment is used as the operational reference line, and the first boundary point is used as the operational reference point. The first operational reference point is moved half the machine width in the operational movement direction (i.e., towards point C) as the planning starting point. Taking the planning starting point as the starting point of the first line segment, starting from this point, the direction of the first line segment is taken as the initial planning direction. Intersections are continuously generated with the operational boundary (i.e., the boundary of the actual planned area). At the intersection point, the line segment is rotated 90° in the direction of the actual planned area to determine the direction of the next line segment. The process continues to generate intersections with the operational boundary from the intersection point along the new line segment direction, and so on.

[0098] Specifically, one side of the work boundary is designated as the moving edge. The intersection point with this edge will move a fixed distance D (i.e., the first target distance) along the direction of the endpoint furthest from the intersection point (this direction is fixed only after the first intersection with the moving edge. Subsequent intersections with the moving edge will still follow this direction). The calculation of D is shown in the following formula:

[0099]

[0100] Where width is the width of the equipment, and α is the angle between the line segment and the moving edge. The loop ends when the intersection of a certain operation vector and the moving edge is less than the endpoint of the moving edge on the first preset direction side. At this point, the gridding of the work area (i.e., the actual planned area) is complete. The gridding process is as follows: Figure 4 As shown, Figure 4 This is a schematic diagram of a meshing process provided in an embodiment of this application.

[0101] In one possible implementation, when determining the planned path corresponding to the actual planned area based on a series of consecutive line segments, the processing device can perform curve path fitting based on the series of consecutive line segments to obtain the planned path.

[0102] The computer equipment can instruct the work equipment to perform operations in the planned area according to the planned path.

[0103] Understandably, when the planned path direction changes, the work equipment needs to turn to traverse all the line segments. However, the work equipment requires a certain amount of turning space. Therefore, to prevent the work equipment from exceeding the actual planned area when turning, before fitting the curve path based on the continuous multiple line segments, the processing device can move the endpoints of multiple line segments located on the boundary of the actual planned area, excluding the starting point of the first line segment and the ending point of the last line segment. Specifically, for a target line segment endpoint, the target line segment endpoint is moved a second target distance along the target direction corresponding to the line segment whose endpoint is the target line segment endpoint. The target direction is the opposite direction of the line segment direction of the line segment whose endpoint is the target line segment endpoint, and the line segment direction points from the starting point to the ending point. The second target distance ensures that the work equipment does not exceed the actual planned area when operating according to the actual running path. The target line segment endpoint can be any one of the multiple line segment endpoints. Since turning is usually not required at the starting and ending points, the original endpoint positions can be kept unchanged.

[0104] For example, in one possible implementation, the computer device can move (r + width / 2) along its corresponding target direction to the other gridded intersections (excluding the start and end points) generated after gridding. Here, r is the minimum turning radius of the working tool.

[0105] Furthermore, when the interval between two adjacent line segments is too small, the working equipment requires more turning space when turning. Therefore, to ensure that the working equipment has sufficient turning space for these line segments and does not exceed the actual planned area, before fitting the curve path based on the continuous multiple line segments, the processing device can first determine whether there are two non-intersecting line segments whose minimum line segment spacing is less than the minimum turning diameter of the equipment. As can be seen from the above, non-intersecting line segments are two line segments separated by one line segment in sequence. Therefore, if the line segment spacing of these two line segments is less than the turning diameter, it means that the working equipment needs to make more than one arc turn, but requires a combination of multiple arc turns to complete the turn, thus requiring more turning space. Based on this, in response to the existence of two non-intersecting line segments whose minimum line segment spacing is less than the minimum turning diameter of the equipment, the processing device can reduce the length of each of the two line segments by a preset length. The preset length is used to ensure that when the working equipment turns between the two line segments, the turning path does not exceed the boundary of the actual planned area.

[0106] For example, in a practical application scenario, when the distance between two adjacent line segments is less than 2*r, the endpoints on both sides of the line segment can move along the direction of the line segment in the direction of narrowing. Where w is the width of the aforementioned machine, dis safe For safety distance, which is the minimum distance between the turning path of the working equipment and the boundary of the actual planned area, it can be set based on actual needs. The gridded map after the above endpoint relocation processing can be shown as follows: Figure 5 As shown, Figure 5 This is a schematic diagram of a meshing processing result provided in an embodiment of this application.

[0107] When performing curve path fitting, the processing device can use Dubins curve path fitting, where the set of Dubins curve paths is {LSL, RSR, RSL, LSR, RLR, LRL}. L represents the circular motion of turning left, R represents the circular motion of turning right, and S represents the linear motion.

[0108] Let the starting point be s(x) i ,y i ,α i The endpoint is g(x). g ,y g ,α g First, transform the coordinates by translating the starting point to the origin and rotating it by an angle θ. Then the ending point will also fall on the x-axis, and the coordinates of the starting and ending points will be s(0,0,α). i The endpoint is g(d,0,β). i ),in:

[0109]

[0110]

[0111] d = D / R

[0112] α=(α i -θ)mod{2π}

[0113] β=(β i -θ)mod{2π}

[0114] In the formula: θ is the difference in heading angle between the starting point and the ending point, and it is within [0, 2π]; mod{} is the modulo operation.

[0115] The path is fitted using the six curve sets mentioned above, and the optimal path is selected and stored sequentially in a discrete point container. The final planned path is as follows: Figure 6 As shown, Figure 6 This is a schematic diagram of a path planning result provided in an embodiment of this application.

[0116] Based on the path planning method provided in the above embodiments, this application also provides a path planning device, see [link to relevant documentation]. Figure 7 , Figure 7 This is a structural block diagram of a path planning device provided in an embodiment of this application. The device includes an acquisition unit 701, a first determination unit 702, a second determination unit 703, and a third determination unit 704.

[0117] The acquisition unit 701 is used to acquire the area to be planned;

[0118] The first determining unit 702 is used to determine the largest inscribed rectangle region corresponding to the region to be planned, and to determine the largest inscribed rectangle region as the actual planning region;

[0119] The second determining unit 703 is used to determine the planning starting point and initial planning direction corresponding to the actual planning area;

[0120] The third determining unit 704 is used to determine the planning path corresponding to the actual planning area based on the planning starting point, the initial planning direction and the planning rules. The planning rules are used to identify the change method of the planning path when the planning path intersects with the boundary of the actual planning area, and the method of determining the end point of the planning path. The planning path is used to enable the working equipment to perform operations on the area to be planned.

[0121] In one possible implementation, the second determining unit 703 is specifically used for:

[0122] Determine a target vertex among multiple vertices corresponding to the actual planning area, wherein the target vertex is any one of the multiple vertices;

[0123] The starting point of the planning is a point on the long side of the target vertex that is half the width of the machine tool, and the width of the machine tool is the width of the machine tool corresponding to the working machine.

[0124] The initial planning direction is the direction from the target vertex to another vertex on the diagonal opposite to the target vertex.

[0125] In one possible implementation, the third determining unit 704 is specifically used for:

[0126] Determine the starting point of the line segment with the planning starting point as the starting point of the line segment and the intersection point of the line segment starting from the planning starting point and intersecting with the moving edge along the initial planning direction as the starting point of the line segment;

[0127] The starting line segment is taken as the first line segment, and multiple consecutive line segments corresponding to the actual planning area are determined according to the planning rules.

[0128] Based on multiple consecutive line segments corresponding to the actual planned area, determine the planned path corresponding to the actual planned area;

[0129] The planning rules include:

[0130] If the endpoint of the i-th line segment is on the moving edge in the actual planning area, the endpoint of the line segment is moved along the moving edge by a first target distance in the first preset direction. The moving edge is the short side excluding the target vertex. The first target distance satisfies that the line segment spacing between the (i+2)-th line segment and the i-th line segment is not less than the width of the machine. The first preset direction is the direction toward the first vertex that is on the same long side as the target vertex.

[0131] The endpoint of the moved line segment is taken as the starting point of the (i+1)th line segment. The target movement direction is the line segment direction. The (i+1)th line segment is determined. The endpoint of the (i+1)th line segment is the intersection point of the (i+1)th line segment and the boundary of the actual planning area. The target movement direction is the direction that forms a 90-degree angle with the initial planning direction and is towards another vertex on the short side where the target vertex is located.

[0132] If the endpoint of the i-th line segment is on a non-moving edge in the actual planning area, the endpoint of the i-th line segment is taken as the starting point of the (i+1)-th line segment, and the direction that forms a 90-degree angle with the direction of the i-th line segment and faces into the actual planning area is taken as the direction of the (i+1)-th line segment. The endpoint of the (i+1)-th line segment is the intersection point of the (i+1)-th line segment and the boundary of the actual planning area.

[0133] In response to the fact that the distance between the endpoint of the k-th line segment and the first vertex on the moving edge is less than the first target distance corresponding to the k-th line segment, the k-th line segment is determined as the last line segment of the planned path.

[0134] In one possible implementation, the third determining unit 704 is specifically used for:

[0135] The planned path is obtained by fitting a curve path based on the continuous multiple line segments;

[0136] The device also includes an indicator unit:

[0137] The instruction unit is used to instruct the operating equipment to perform operations in the area to be planned according to the planned path.

[0138] In one possible implementation, the device further includes a first moving unit:

[0139] The first moving unit is used to move the endpoints of multiple line segments located on the boundary of the actual planned area, excluding the starting point of the first line segment and the ending point of the last line segment. Specifically, for a target line segment endpoint, the target line segment endpoint is moved a second target distance along the target direction corresponding to the line segment whose endpoint is the target line segment endpoint. The target direction is the opposite direction of the line segment direction of the line segment whose endpoint is the target line segment endpoint, and the line segment direction points from the starting point to the ending point of the line segment. The second target distance satisfies the requirement that the working equipment does not exceed the actual planned area when operating according to the actual running path. The target line segment endpoint is any one of the multiple line segment endpoints.

[0140] In one possible implementation, the device further includes a second moving unit:

[0141] The second moving unit is configured to respond to the existence of two non-intersecting line segments among the continuous plurality of line segments, the minimum value of the line segment spacing being less than the minimum turning diameter of the machine, by reducing the two line segments by a preset length from both ends of the line segments. The preset length is used to ensure that when the working machine turns between the two line segments, the turning path does not exceed the boundary of the actual planned area.

[0142] This application also provides a computer device, wherein the processor included in the terminal device further has the following functions:

[0143] Obtain the area to be planned;

[0144] Determine the largest inscribed rectangle region corresponding to the area to be planned, and define the largest inscribed rectangle region as the actual planning area;

[0145] Determine the planning starting point and initial planning direction corresponding to the actual planning area;

[0146] Based on the planning starting point, the initial planning direction, and the planning rules, the planning path corresponding to the actual planning area is determined. The planning rules are used to identify the change method of the planning path when the planning path intersects with the boundary of the actual planning area, and the method for determining the end point of the planning path. The planning path is used to enable the working equipment to perform operations on the area to be planned.

[0147] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, an acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0148] In addition, this application embodiment also provides a storage medium for storing a computer program for executing the path planning method provided in the above embodiment.

[0149] This application also provides a computer program product including instructions that, when run on a computer, cause the computer to execute the path planning method provided in the above embodiments.

[0150] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk, or optical disk, etc., and other media capable of storing program code.

[0151] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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 modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0152] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A path planning method, characterized in that, The method includes: Obtain the area to be planned; Determine the largest inscribed rectangle region corresponding to the area to be planned, and define the largest inscribed rectangle region as the actual planning area; Determine the planning starting point and initial planning direction corresponding to the actual planning area; Based on the planning starting point, the initial planning direction, and the planning rules, the planning path corresponding to the actual planning area is determined. The planning rules are used to identify the change method of the planning path when the planning path intersects with the boundary of the actual planning area, and the method for determining the end point of the planning path. The planning path is used to enable the working equipment to perform operations on the area to be planned. The step of determining the planning path corresponding to the actual planning area based on the planning starting point, the initial planning direction, and the planning rules includes: Determine the starting point of the line segment with the planning starting point as the starting point of the line segment and the intersection point of the line segment starting from the planning starting point and intersecting with the moving edge along the initial planning direction as the starting point of the line segment; The starting line segment is taken as the first line segment, and multiple consecutive line segments corresponding to the actual planning area are determined according to the planning rules. Based on multiple consecutive line segments corresponding to the actual planned area, determine the planned path corresponding to the actual planned area; The planning rules include: If the endpoint of the i-th line segment is on the moving edge in the actual planning area, the endpoint of the line segment is moved along the moving edge by a first target distance in the first preset direction. The moving edge is the short side excluding the target vertex. The first target distance satisfies that the line segment spacing between the (i+2)-th line segment and the i-th line segment is not less than the width of the machine. The first preset direction is the direction toward the first vertex that is on the same long side as the target vertex. The endpoint of the moved line segment is taken as the starting point of the (i+1)th line segment. The target movement direction is the line segment direction. The (i+1)th line segment is determined. The endpoint of the (i+1)th line segment is the intersection point of the (i+1)th line segment and the boundary of the actual planning area. The target movement direction is the direction that forms a 90-degree angle with the initial planning direction and is towards another vertex on the short side where the target vertex is located. If the endpoint of the i-th line segment is on a non-moving edge in the actual planning area, the endpoint of the i-th line segment is taken as the starting point of the (i+1)-th line segment, and the direction that forms a 90-degree angle with the direction of the i-th line segment and faces into the actual planning area is taken as the direction of the (i+1)-th line segment. The endpoint of the (i+1)-th line segment is the intersection point of the (i+1)-th line segment and the boundary of the actual planning area. In response to the fact that the distance between the endpoint of the k-th line segment and the first vertex on the moving edge is less than the first target distance corresponding to the k-th line segment, the k-th line segment is determined as the last line segment of the planned path.

2. The method according to claim 1, characterized in that, Determining the planning starting point and initial planning direction corresponding to the actual planning area includes: Determine a target vertex among multiple vertices corresponding to the actual planning area, wherein the target vertex is any one of the multiple vertices; The starting point of the planning is a point on the long side of the target vertex that is half the width of the machine tool, and the width of the machine tool is the width of the machine tool corresponding to the working machine. The initial planning direction is the direction from the target vertex to another vertex on the diagonal opposite to the target vertex.

3. The method according to claim 1, characterized in that, Determining the planned path corresponding to the actual planned area based on multiple consecutive line segments corresponding to the actual planned area includes: The planned path is obtained by fitting a curve path based on the continuous multiple line segments; The method further includes: The machine is instructed to operate in the planned area according to the planned path.

4. The method according to claim 3, characterized in that, Before performing curve path fitting based on the continuous multiple line segments, the method further includes: The endpoints of multiple line segments located on the boundary of the actual planned area, excluding the starting point of the first line segment and the ending point of the last line segment, are moved. Specifically, for a target line segment endpoint, the target line segment endpoint is moved a second target distance along the target direction corresponding to the line segment whose endpoint is the target line segment endpoint. The target direction is the opposite direction of the line segment direction of the line segment whose endpoint is the target line segment endpoint, and the line segment direction points from the starting point to the ending point of the line segment. The second target distance satisfies the requirement that the working equipment does not exceed the actual planned area when operating according to the actual running path. The target line segment endpoint is any one of the multiple line segment endpoints.

5. The method according to claim 3, characterized in that, Before performing curve path fitting based on the continuous multiple line segments, the method further includes: In response to the existence of two non-intersecting line segments among the continuous plurality of line segments, and the minimum distance between the line segments being less than the minimum turning diameter of the machine, the two line segments are reduced by a preset length from both ends. The preset length is used to ensure that when the machine turns between the two line segments, the turning path does not exceed the boundary of the actual planned area.

6. A path planning device, characterized in that, The device includes an acquisition unit, a first determination unit, a second determination unit, and a third determination unit: The acquisition unit is used to acquire the area to be planned; The first determining unit is used to determine the largest inscribed rectangle region corresponding to the region to be planned, and to determine the largest inscribed rectangle region as the actual planning region; The second determining unit is used to determine the planning starting point and initial planning direction corresponding to the actual planning area; The third determining unit is used to determine the planning path corresponding to the actual planning area based on the planning starting point, the initial planning direction and the planning rules. The planning rules are used to identify the change method of the planning path when the planning path intersects with the boundary of the actual planning area, and the method of determining the end point of the planning path. The planning path is used to enable the working equipment to perform operations on the area to be planned. The third determining unit is specifically used for: Determine the starting point of the line segment with the planning starting point as the starting point of the line segment and the intersection point of the line segment starting from the planning starting point and intersecting with the moving edge along the initial planning direction as the starting point of the line segment; The starting line segment is taken as the first line segment, and multiple consecutive line segments corresponding to the actual planning area are determined according to the planning rules. Based on multiple consecutive line segments corresponding to the actual planned area, determine the planned path corresponding to the actual planned area; The planning rules include: If the endpoint of the i-th line segment is on the moving edge in the actual planning area, the endpoint of the line segment is moved along the moving edge by a first target distance in the first preset direction. The moving edge is the short side excluding the target vertex. The first target distance satisfies that the line segment spacing between the (i+2)-th line segment and the i-th line segment is not less than the width of the machine. The first preset direction is the direction toward the first vertex that is on the same long side as the target vertex. The endpoint of the moved line segment is taken as the starting point of the (i+1)th line segment. The target movement direction is the line segment direction. The (i+1)th line segment is determined. The endpoint of the (i+1)th line segment is the intersection point of the (i+1)th line segment and the boundary of the actual planning area. The target movement direction is the direction that forms a 90-degree angle with the initial planning direction and is towards another vertex on the short side where the target vertex is located. If the endpoint of the i-th line segment is on a non-moving edge in the actual planning area, the endpoint of the i-th line segment is taken as the starting point of the (i+1)-th line segment, and the direction that forms a 90-degree angle with the direction of the i-th line segment and faces into the actual planning area is taken as the direction of the (i+1)-th line segment. The endpoint of the (i+1)-th line segment is the intersection point of the (i+1)-th line segment and the boundary of the actual planning area. In response to the fact that the distance between the endpoint of the k-th line segment and the first vertex on the moving edge is less than the first target distance corresponding to the k-th line segment, the k-th line segment is determined as the last line segment of the planned path.

7. The apparatus according to claim 6, characterized in that, The second determining unit is specifically used for: Determine a target vertex among multiple vertices corresponding to the actual planning area, wherein the target vertex is any one of the multiple vertices; The starting point of the planning is a point on the long side of the target vertex that is half the width of the machine tool, and the width of the machine tool is the width of the machine tool corresponding to the working machine. The initial planning direction is the direction from the target vertex to another vertex on the diagonal opposite to the target vertex.

8. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the path planning method according to any one of claims 1-5 according to the instructions in the program code.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the path planning method according to any one of claims 1-6.