A path planning method for autonomous driving tractors in unstructured scenarios

By combining the hybrid A* algorithm and dynamic programming algorithm in the path planning of the autonomous tractor, and using the Reeds-Shepp curve model and Frenet coordinates to optimize the path, the problem of dynamic obstacles and kinematic constraints in unstructured scenes is solved, and efficient , safe tractor path planning.

CN118192601BActive Publication Date: 2024-10-25CHANGZHOU INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410463807.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-17
Publication Date
2024-10-25
Estimated Expiration
2044-04-17

AI Technical Summary

Technical Problem

Traditional self-driving tractor path planning methods are difficult to effectively handle dynamic obstacles and kinematic constraints in unstructured scenarios, resulting in inefficient path planning and insufficient safety.

Method used

The global reference path search and local obstacle avoidance planning methods based on the hybrid A* algorithm and dynamic programming algorithm are used, the heuristic function is improved through the Reeds-Shepp curve model, and the Frenet coordinates and S-L diagram are combined for path optimization and speed planning to ensure that the path satisfies the tractor Kinematic constraints and effective avoidance of dynamic obstacles.

Benefits of technology

It achieves efficient and safe path planning for tractors in unstructured scenarios, improves operating efficiency and productivity, and can effectively handle static and dynamic obstacles to ensure safe driving of the tractor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118192601B_ABST
    Figure CN118192601B_ABST
Patent Text Reader

Abstract

The invention discloses a path planning method for an automatic driving tractor for unstructured scenes. The method first establishes an environmental map model; determines the specific location of static obstacles; uses the Reeds-Shepp curve model to improve the heuristic function, obtains the cost function of the hybrid A* algorithm, and then determines the constraints of the system, and then expands the sub-nodes according to the cost function and the step system constraints to obtain a global reference path; before performing local obstacle avoidance optimization based on a dynamic programming algorithm, the tractor posture information is converted between Frenet coordinates and Cartesian coordinates; according to the global reference path and the coordinate conversion method, the global reference path is optimized using an S-L graph, and a continuous and smooth expected path is obtained; finally, the coordinate conversion method and the expected path planning result are used to perform speed planning using an S-T graph to determine the expected speed for effectively avoiding dynamic obstacles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of autonomous driving vehicle path planning, and in particular relates to an autonomous driving tractor path planning method for unstructured scenarios. Background Art

[0002] Traditional tractors use manual driving to complete various tasks such as sowing, fertilizing, and fruit transportation. However, various obstacles are unavoidable in actual operation scenarios. Traditional operation methods are prone to missing rows and overlapping rows during obstacle avoidance, resulting in low production efficiency and waste of land resources. In recent years, with the gradual transformation of my country's agricultural machinery towards intelligence, the development of precision agriculture has been put on the agenda. An important prerequisite for implementing precision agriculture is path planning to guide agricultural machinery such as self-driving tractors to walk according to the planned operation path, that is, considering the location and layout of obstacles to determine the optimal path.

[0003] Self-driving tractors mainly travel in unstructured scenes. Due to the lack of clear road markings, complex and diverse road conditions, and the difficulty in distinguishing between road and non-road areas, traditional path planning methods that rely on lane lines or clear road boundaries for perception and positioning are not applicable. In addition, in unstructured scenes, if obstacle detection and environmental perception are used to determine a safe driving path using sensor data such as cameras and lidar, it is not only difficult to achieve but also significantly increases the system cost. At present, graph search-based methods (such as the A* algorithm) can discretize the state space into a graph and use offline map modeling to obtain a reference path in unstructured scenes to avoid over-reliance on sensor data. However, such schemes do not fully consider the kinematic constraints of the tractor (the path curvature may have sudden changes) and cannot handle the situation where there are dynamic obstacles in the scene or the movement direction of dynamic obstacles is not fixed. On the other hand, with the help of numerical optimization methods (such as dynamic programming algorithms), the above problems can also be solved online. However, too large a solution range will significantly increase the complexity of the calculation. Therefore, it is necessary to develop a path planning method for self-driving tractors for unstructured scenes, so that the tractor can efficiently bypass obstacles and improve the operation efficiency while ensuring the safety of the operation. Summary of the invention

[0004] Purpose of the invention: In view of the shortcomings in the prior art, the present invention proposes a global reference path search and local obstacle avoidance planning method based on a hybrid A* algorithm and a dynamic programming algorithm for agricultural machinery operation scenarios without lane lines, clear road boundaries, and dynamic obstacles, aiming to solve the path planning problem of autonomous driving tractors for unstructured scenarios. First, a global reference path that satisfies the kinematic constraints of the tractor is determined based on the hybrid A* algorithm, and the optimal reference path search is completed while considering the tractor's dynamic constraints and static obstacles. On this basis, the curvature of the reference path is smoothed using the dynamic programming algorithm, and the speed planning for dynamic obstacles is completed in combination with the dynamic programming algorithm.

[0005] Technical solution:

[0006] The present invention provides a path planning method for an automatic driving tractor in an unstructured scenario, the method comprising the following steps:

[0007] S1. Establish an environmental map model; determine the specific location of static obstacles;

[0008] S2. The heuristic function is improved by using the Reeds-Shepp curve model to obtain the cost function of the hybrid A* algorithm;

[0009] S3. Determine the constraints of the system to ensure obstacle avoidance safety and adapt to the tractor's motion characteristics;

[0010] S4. Expand the sub-nodes according to the cost function of step S2 and the system constraints of step S3 to obtain a global reference path;

[0011] S5. Before performing the local obstacle avoidance optimization based on the dynamic programming algorithm, the tractor posture information is converted into Frenet coordinates and Cartesian coordinates;

[0012] S6. According to the global reference path obtained in step S4 and the coordinate transformation method in step S5, the global reference path is optimized using the SL graph to obtain a continuous and smooth desired path;

[0013] S7. Based on the coordinate conversion method of step S5 and the expected path planning result of step S6, the ST graph is used to perform speed planning to determine the expected speed for effectively avoiding dynamic obstacles.

[0014] Furthermore, the specific method of step S1 is:

[0015] Establish a grid map, discretize the tractor working environment into multiple independent square grids, each grid corresponds to a specific position in the real working environment, and mark the corresponding grid as occupied or idle according to the obstacles in the real environment. All marked grids together constitute the environmental map model;

[0016] In the grid map, the occupied grids are represented by black, and the corresponding value in the numerical matrix is ​​1; the idle grids are represented by white, and the corresponding value in the numerical matrix is ​​0. The mathematical model of the grid map is expressed as:

[0017]

[0018] Among them, A represents the entire environment map model, m and p are the number of rows and columns after the environment map is rasterized, and a ij represents the grid at (i,j), a ij =0 means the grid is idle, that is, there is no obstacle; a ij =1 indicates that the grid is occupied, that is, there is an obstacle.

[0019] Furthermore, the specific method of step S2 is:

[0020] The core idea of ​​the A* algorithm is to use the heuristic function to guide the direction of the algorithm traversal and evaluate each node of the network according to the cost function f(n), which can be expressed as:

[0021] f(n)=g(n)+h(n,g)(2)

[0022] Among them, g(n) is the actual cost from the starting node to the current node, h(n,g) is the distance heuristic function from the current node n to the target node g, which is used to evaluate the predicted distance cost from the current node n to the target node g;

[0023] During the search process, the corresponding distance heuristic function h(n,g) uses the Euclidean distance h1(n,g) to ignore the tractor non-integrity constraints and consider the obstacle avoidance environment constraints:

[0024]

[0025] Among them, (x n ,y n ) is the coordinate of the current node n, (x g ,y g ) are the coordinates of the path target point;

[0026] The Reeds-Shepp curve model consists of two turns and a straight line, which is used to determine the shortest path of a tractor or other moving body under given constraints. The distance heuristic function commonly used in the A* algorithm and the Reeds-Shepp curve model are set in parallel to obtain a hybrid A* algorithm, that is, the larger value is selected as the heuristic function value for the search, while satisfying the non-holonomic kinematic constraints of the tractor and the highest travel efficiency:

[0027] h(n,g)=max(h1(n,g),h2(n,g)) (4)

[0028] Among them, h2(n,g) represents the distance heuristic function using the Reeds-Shepp curve model, which obtains the shortest path from the current node to the target location under the conditions of ignoring environmental obstacles and considering the non-holonomic constraints of the tractor;

[0029] In the hybrid A* algorithm, each node records the specific speed and front wheel angle of its parent node extending to the current node. To prevent the vehicle speed v and the front wheel angle δ f Frequent changes, adding an additional cost function g1(n) to the actual cost g(n):

[0030] g1(n)=ω g1 ·|v n -v n-1 |+ω g2 ·|δ fn -δ fn-1 | (5)

[0031] Among them, ω g1 is the weight coefficient when the driving state of the car changes; ω g2 is the weight coefficient when the car's driving direction changes; v n is the speed of the car when it reaches the current node n, v n-4 is the speed of the car when it reaches the previous node n-1, δ fn The front wheel turning angle when the car reaches the current node n, δ fn-1 It is the front wheel turning angle when the car reaches the previous node n-1.

[0032] Furthermore, the specific method of step S3 is: select a rectangle and a polygon as the outline of the tractor and the obstacle, regard the tractor as a rectangle, use the tractor boundary function to describe the size and shape of the tractor, and the horizontal and vertical coordinates of the corresponding four vertices M1 to M4 are expressed as:

[0033]

[0034] Among them, (x, y) is the tractor position coordinate, f is the tractor front overhang distance, r is the tractor rear overhang distance, L is the tractor wheelbase, w is the body width tractor size parameter, Ψ is the tractor heading angle;

[0035] To determine whether the tractor collides with an obstacle, it is necessary to determine whether the tractor boundary and the obstacle outline coincide with each other. The triangle area method is used to check whether the tractor vertex coordinates and the convex polygon N1N2…N n The position relationship of the tractor is as follows: let the coordinate of one of its vertices be M i , connecting point M i Each two adjacent vertices of the convex polygon form a triangle, and the areas of these triangles are accumulated. If the sum of the accumulated areas is greater than the total area of ​​the convex polygon, then point M is determined. i Located outside the convex polygon; if the sum of the areas is less than or equal to the total area of ​​the convex polygon, point M i It may be located inside the polygon, as shown in formula (7):

[0036]

[0037] Among them, S represents the area of ​​each polygon;

[0038] Area of ​​convex polygon The solution can be obtained through several triangles. On a two-dimensional plane, the collision will definitely occur at the vertex. Each vertex of the body rectangle is always constrained to be outside the obstacle polygon. At the same time, each vertex of the polygonal obstacle is also constrained to be outside the body rectangle. Using formula (7), we can get point M i Located in the convex polygon N1N2…N n External constraints f1 and f2, and establish the following obstacle avoidance constraints:

[0039]

[0040] Among them, γ(N1,…N n ) is the set of convex polygon vertices, χ(M1,…M4) is the set of four vertices of the body rectangle; according to the kinematic characteristics of the tractor, it can be seen that the curvature of the path κ of the tractor is only related to the front wheel turning angle δ f related:

[0041]

[0042] Too large a front wheel steering angle will increase the path curvature, which will reduce driving comfort and increase mechanical wear of the tractor. Therefore, the curvature of the planned path is constrained by limiting the tractor's front wheel steering angle:

[0043] |δ f |≤arctan(Lκ max) (10)

[0044] Finally, the obstacle avoidance constraints and front wheel turning angle constraints solved by the hybrid A* algorithm are determined to ensure obstacle avoidance safety and adapt to the tractor's motion characteristics.

[0045] Furthermore, the specific method of step S4 is: considering the kinematic constraints of the tractor, using the hybrid A* algorithm to change the expansion mode of the node: each node contains the state information (x, y, Ψ) of the tractor, where x and y represent the position coordinates of the tractor, Ψ represents the heading angle of the tractor, and each node represents the parent node with the center point. The number of child nodes of the hybrid A* algorithm is 6, which are generated from any position in the grid. The nodes are connected in a three-dimensional kinematic state, and the searched path can meet the non-integrity constraints of the tractor, that is, the global reference path is obtained by planning and solving using the hybrid A* algorithm.

[0046] Furthermore, the specific method of step S5 is: converting the road description using the Cartesian coordinate system in steps S1-S5 into the description using the Frenet coordinate system, where the motion state of the tractor at a certain point is expressed as [x, y, v, Ψ, a, κ]; a is the longitudinal acceleration in the Cartesian coordinate system, and in the Frenet coordinate system, the motion state of the tractor is expressed as Where s is the longitudinal displacement, is the longitudinal speed, is the longitudinal acceleration, is the lateral speed, is the lateral acceleration, l′ is the derivative of l with respect to s, and l″ is right The derivative of

[0047] The formula for converting Cartesian coordinate system to Frenet coordinate system is:

[0048]

[0049] The formula for converting Frenet coordinate system to Cartesian coordinate system is:

[0050]

[0051] Among them, s r is the expected longitudinal displacement, x r and r is the desired lateral and longitudinal position in the Cartesian coordinate system, κ r is the reference path curvature, κ′ r is the derivative of the reference path curvature with respect to s, ΔΨ=Ψ-Ψ r ,Ψ ris the reference heading angle.

[0052] Furthermore, the specific method of step S6 is: first, construct a relationship diagram between roads and obstacles in the Frenet coordinate system according to the obstacle information in the scene, referred to as the SL diagram, and discretize the space by scattering points in the SL diagram and initializing it; second, set a cost function, assign a cost value to each node to describe the path selection relationship between adjacent units; consider the position of the obstacle, the current position of the tractor and the target position, and use a dynamic programming algorithm to optimize the reference path to ensure that the minimum cost path can be found while avoiding collisions. The cost function J is a safe distance cost function J between the path and the static obstacle. obs , smoothness cost function J s And the cost function J of the degree of deviation from the reference path l describe:

[0053] J=J obs +J s +J l (13)

[0054] The safe distance cost function J between the path and the static obstacle obs It is expressed as:

[0055]

[0056] Among them, d max is the maximum collision distance, d min is the minimum collision distance, [d min ,d max ] is the collision buffer zone, f risk is a monotonically decreasing collision risk function. The closer to the obstacle, the greater the risk of collision. risk The larger the value, the greater the risk of collision.

[0057] Smoothness cost function J s It is expressed as:

[0058]

[0059] Among them, t0 is the start time of path planning, t s is the end time of path planning, ω1, ω2, ω3 are smoothness weight coefficients, representing the path lateral displacement, path curvature and the rate of change of path curvature, respectively, and l″′ is right The derivative of

[0060] The cost function J of the degree of deviation from the reference path l It can be expressed as:

[0061]

[0062] Among them, ω l is the weight coefficient of the degree of deviation from the reference path, l r is the reference line function;

[0063] A recursive method is used to search from the starting point to the end point. The cost value of the current node is updated by calculating the minimum cost value from each node to the end point, and the path information is saved for backtracking. After all nodes are calculated, the minimum connection cost of all path sampling nodes is screened out;

[0064] Then, the given nodes are interpolated and fitted using a quintic polynomial, and the discrete nodes are made continuous to obtain a smooth path curve that meets the requirements. The quintic polynomial curve can be expressed by the following formula:

[0065]

[0066] Among them, t represents time, a 10 ~a (N-1)5 represents the coefficient of the quintic polynomial, τ(s) represents the set of multiple quintic polynomials, s 5 represents the fifth power of s, assuming that the starting state information is [s j ,l j ,l′ j ,l″ j ], the endpoint status information is [s k ,l k ,l′ k ,l″ k ], substituting the starting point and end point status information into formula (17), we get:

[0067]

[0068] Among them, a k0 ~a k5 Represents the coefficients of each section of the quintic polynomial;

[0069] By solving the linear equations of equation (18), all coefficients of the quintic polynomial curve can be determined, and the reference path can be optimized. Finally, the node information of the path is transformed, and the relevant position coordinate information is transformed from the SL diagram of the Frenet coordinate system to the XY diagram of the Cartesian coordinate system to obtain the desired path for tracking control.

[0070] Furthermore, the specific method of step S7 is: the moment when the dynamic obstacle cuts in is recorded as T in , the cut-out time is T out, the length S1S2 is related to the width of the dynamic obstacle. The construction of the ST diagram depends on the prediction of the trajectory of the dynamic obstacle. The constant speed model is used to predict the trajectory of the dynamic obstacle:

[0071]

[0072] In the formula, the initial position of the obstacle is (s0, l0), and the horizontal and vertical velocities are and (s t ,l t ) is the predicted trajectory of the obstacle at time t;

[0073] Dynamic obstacles are projected onto the ST graph and sampled in the ST graph. During the sampling process, a series of sampling points, i.e., multiple candidate solutions, are generated at each moment. In order to obtain the optimal solution, a cost function needs to be defined to evaluate the pros and cons of each candidate solution. Safety means that the tractor should keep a safe distance from dynamic obstacles as much as possible during the speed planning process to ensure driving safety. In the time interval where obstacles exist, a safety cost function J1 is introduced:

[0074]

[0075] Among them, ω obs is the obstacle weight coefficient, a positive number k b Indicates the degree to which the tractor is away from dynamic obstacles, S obs represents the boundary formed by the straight line fitting the dynamic obstacle, S b represents the boundary of the tractor's movement; if the tractor is affected by multiple dynamic obstacles within a certain period of time, multiple safety cost functions J1 are accumulated;

[0076] In order to minimize the tractor's speed and speed change rate, the comfort cost function J2 is set:

[0077]

[0078] Among them, ω v and ω a Respectively represent the weight coefficients of speed and speed change rate;

[0079] Expected speed v ref Without considering the impact of moving obstacles, the expected speed cost function J3 is defined by the road speed limit, path curvature and other traffic rules:

[0080]

[0081] Among them, ω r The weight coefficient representing the deviation from the expected speed;

[0082] Integrating the above cost functions, we get the cost function of speed planning:

[0083] J=J1+J2+J3(23)

[0084] Finally, a dynamic programming algorithm is used to solve a speed curve with the lowest cost in the ST diagram to determine the speed decision-making method of the tractor when facing dynamic obstacles; the relevant position and speed information is transformed from the ST diagram of the Frenet coordinate system to the XY diagram of the Cartesian coordinate system to obtain the expected speed for effectively avoiding dynamic obstacles.

[0085] The beneficial effects of the present invention are:

[0086] (1) A hybrid A* algorithm is proposed to perform a global reference path search for static obstacles and obtain the optimal path from the starting point to the end point that satisfies the kinematic constraints of the electric tractor.

[0087] (2) The reference path is optimized based on the SL graph, and the speed planning is completed based on the ST graph, thus realizing local obstacle avoidance optimization considering dynamic obstacles. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 It is the overall block diagram;

[0089] Figure 2 For raster maps;

[0090] Figure 3 Schematic diagram of the sub-node expansion of A* and Hybrid A* algorithms;

[0091] Figure 4 is the triangle area method;

[0092] Figure 5 is the correspondence between the Frenet coordinate system and the Cartesian coordinate system;

[0093] Figure 6 is the projection of the dynamic obstacle on the ST diagram. DETAILED DESCRIPTION

[0094] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments, but the protection scope of the present invention is not limited thereto.

[0095] Step (1), establish an environmental map model; determine the specific location of static obstacles

[0096] A grid map is established to discretize the tractor working environment into multiple independent square grids, each of which corresponds to a specific location in the real working environment. According to the obstacles in the real environment, the corresponding grids are marked as occupied or idle. All marked grids together constitute the environmental map model.

[0097] In the grid map, occupied grids are represented by black, and the corresponding value in the numerical matrix is ​​1; idle grids are represented by white, and the corresponding value in the numerical matrix is ​​0, such as Figure 2 As shown. The mathematical model of the grid map can be expressed as:

[0098]

[0099] Among them, A represents the entire environment map model, m and p are the number of rows and columns after the environment map is rasterized, and a ij represents the grid at (i,j), a ij =0 means the grid is idle, that is, there is no obstacle; a ij =1 indicates that the grid is occupied, that is, there is an obstacle.

[0100] Step (2), using the Reeds-Shepp curve model to improve the heuristic function, and obtain the cost function of the hybrid A* algorithm.

[0101] The core idea of ​​the A* algorithm is to use the heuristic function to guide the direction of the algorithm traversal and evaluate each node of the network according to the cost function f(n), which can be expressed as:

[0102] f(n)=g(n)+h(n,g) (2)

[0103] Among them, g(n) is the actual cost from the starting node to the current node, and h(n,g) is the distance heuristic function from the current node n to the target node g, which is used to evaluate the predicted distance cost from the current node n to the target node g. During the search process, nodes that are more likely to lead to the target should be given priority to improve the search efficiency; the corresponding distance heuristic function h(n,g) uses the Euclidean distance h1(n,g) to ignore the tractor non-integrity constraints and consider the obstacle avoidance environment constraints:

[0104]

[0105] Among them, (x n ,y n ) is the coordinate of the current node n, (x g ,y g ) are the coordinates of the path target point.

[0106] The Reeds-Shepp curve model consists of two turns and a straight line. It can determine the shortest path of a tractor or other moving body under given constraints and can effectively describe different types of movement and steering operations. By using the distance heuristic function commonly used in the A* algorithm and the Reeds-Shepp curve model for parallel settings, a hybrid A* algorithm can be obtained, that is, the larger value is selected as the heuristic function value for the search, while satisfying the non-holonomic kinematic constraints of the tractor and the highest travel efficiency:

[0107] h(n,g)=max(h1(n,g),h2(n,g)) (4)

[0108] Among them, h2(n,g) represents the distance heuristic function using the Reeds-Shepp curve model, which obtains the shortest path from the current node to the target position under the condition of ignoring environmental obstacles and considering the non-integrity constraints of the tractor. This heuristic function can ensure that the child node is constrained by the front wheel angle when expanding.

[0109] In the hybrid A* algorithm, each node records the specific speed and front wheel angle of its parent node to the current node. f Frequent changes, adding an additional cost function g1(n) to the actual cost g(n):

[0110] g1(n)=ω g1 ·|v n -v n-1 |+ω g2 ·|δ fn -δ fn-1 | (5)

[0111] Among them, ω g1 is the weight coefficient when the driving state of the car changes; ω g2 is the weight coefficient when the car's driving direction changes; v n is the speed of the car when it reaches the current node n, v n-1 is the speed of the car when it reaches the previous node n-1, δ fn The front wheel turning angle when the car reaches the current node n, δ fn-1 It is the front wheel turning angle when the car reaches the previous node n-1.

[0112] Step (3) determines the constraints of the system to ensure obstacle avoidance safety and adapt to the tractor's motion characteristics.

[0113] Select rectangles and polygons as the outlines of the tractor and obstacles, regard the tractor as a rectangle, use the tractor boundary function to describe the tractor size and shape, and the corresponding four vertices M1~M4 horizontal and vertical coordinates are expressed as:

[0114]

[0115] Among them, (x, y) is the tractor position coordinate, f is the tractor front overhang distance, r is the tractor rear overhang distance, L is the tractor wheelbase, w is the body width tractor size parameter, Ψ is the tractor heading angle;

[0116] To determine whether the tractor collides with an obstacle, it is necessary to determine whether the tractor boundary and the obstacle outline coincide with each other. The triangle area method is used to check whether the tractor vertex coordinates and the convex polygon N1N2…N n The position relationship of the tractor is as follows: let the coordinate of one of its vertices be M i , connecting point M i Each two adjacent vertices of the convex polygon form a triangle, and the areas of these triangles are accumulated. If the sum of the accumulated areas is greater than the total area of ​​the convex polygon, then point M is determined. i Located outside the convex polygon; if the sum of the areas is less than or equal to the total area of ​​the convex polygon, point M i It may be located inside the polygon, as shown in formula (7):

[0117]

[0118] Among them, S represents the area of ​​each polygon;

[0119] Area of ​​convex polygon The solution can be obtained through several triangles. On a two-dimensional plane, the collision will definitely occur at the vertex. Each vertex of the body rectangle is always constrained to be outside the obstacle polygon. At the same time, each vertex of the polygonal obstacle is also constrained to be outside the body rectangle. Using formula (7), we can get point M i Located in the convex polygon N1N2…N n External constraints f1 and f2, and establish the following obstacle avoidance constraints:

[0120]

[0121] Among them, γ(N1,…N n ) is the set of convex polygon vertices, χ(M1,…M4) is the set of four vertices of the body rectangle;

[0122] According to the kinematic characteristics of the tractor, it can be seen that the curvature of the tractor's travel path κ is only related to the front wheel turning angle δ f related:

[0123]

[0124] Too large a front wheel steering angle will increase the path curvature, which will reduce driving comfort and increase mechanical wear of the tractor. Therefore, the curvature of the planned path is constrained by limiting the tractor's front wheel steering angle:

[0125] |δ f |≤arctan(Lκ max ) (10)

[0126] Finally, the obstacle avoidance constraints and front wheel turning angle constraints solved by the hybrid A* algorithm are determined to ensure obstacle avoidance safety and adapt to the tractor's motion characteristics.

[0127] Step (4), expand the child nodes according to the cost function of step S2 and the system constraints of step S3 to obtain the global reference path. Considering the kinematic constraints of the tractor, the hybrid A* algorithm is used to change the node expansion method: each node contains the state information of the tractor (x, y, Ψ), where x and y represent the position coordinates of the tractor, Ψ represents the heading angle of the tractor, and each node represents the parent node with the center point. The number of child nodes of the hybrid A* algorithm is 6, which are generated from any position in the grid. The nodes are connected by three-dimensional kinematic states, and the searched path can meet the non-integrity constraints of the tractor, that is, the hybrid A* algorithm is used to plan and solve to obtain the global reference path.

[0128] In step (5), before performing local obstacle avoidance optimization based on the dynamic programming algorithm, the tractor posture information is converted into Frenet coordinates and Cartesian coordinates.

[0129] The Frenet coordinate system uses curvature and tangent direction to represent the path, which can accurately describe the change in path curvature and the position offset of the tractor relative to the reference path. The road can be represented as a function of the reference line and the lateral offset. Figure 5 As shown in the figure, the two-dimensional path planning task is simplified to a one-dimensional problem based on the SL graph, and the longitudinal displacement s and lateral displacement l are used to represent the relative position relationship between the actual path and the reference path.

[0130] In order to make path planning and tracking control efficient and easy to implement, the Frenet coordinate system is generally used to describe the road in the path planning stage, while the Cartesian coordinate system is used to describe the intuitive and simplified control in the tracking control stage. In the Cartesian coordinate system, the motion state of the tractor at a certain point can be expressed as [x, y, v, Ψ, a, κ]; a is the longitudinal acceleration in the Cartesian coordinate system, while in the Frenet coordinate system, the motion state of the tractor can be expressed as in, is the longitudinal speed, is the longitudinal acceleration, is the lateral speed, is the lateral acceleration, l′ is the derivative of l with respect to s, and l″ is the derivative of l′ with respect to The derivative of .

[0131] The formula for converting Cartesian coordinate system to Frenet coordinate system is:

[0132]

[0133] The formula for converting Frenet coordinate system to Cartesian coordinate system is:

[0134]

[0135] in, and are the longitudinal speed and longitudinal acceleration in the Frenet coordinate system, and is the lateral vehicle speed and lateral acceleration in the Frenet coordinate system, l′ is the derivative of l with respect to s, and l″ is right The derivative of r is the expected longitudinal displacement, x r and r is the desired lateral and longitudinal position in the Cartesian coordinate system, κ r is the reference path curvature, κ′ r is the derivative of the reference path curvature with respect to s, ΔΨ=Ψ-Ψ r ,Ψ r is the reference heading angle.

[0136] Step (6), based on the global reference path obtained in step S4 and the coordinate transformation method in step S5, the global reference path is optimized using the SL graph to obtain a continuous and smooth desired path.

[0137] The reference path is optimized using a dynamic programming algorithm. The solution process is as follows: Figure 6 As shown in the figure. First, the SL graph in the Frenet coordinate system is constructed according to the obstacle information in the scene, and the space is discretized by scattering points in the graph and initializing it. Secondly, a reasonable cost function is set to assign a cost value to each node to describe the path selection relationship between adjacent units. The main factors considered are the location of the obstacle, the current location of the tractor, and the target location, to ensure that the minimum cost path can be found while avoiding collisions. The cost function J is composed of the safe distance cost function J between the path and the static obstacle obs , smoothness cost function J s And the cost function J of the degree of deviation from the reference path l describe:

[0138] J=J obs +Js +J l (13)

[0139] The distance cost function J between the path and the static obstacle obs It can be expressed as:

[0140]

[0141] Among them, d max is the maximum collision distance, d min is the minimum collision distance, [d min ,d max ] is the collision buffer zone, f risk is a monotonically decreasing collision risk function. The closer to the obstacle, the greater the risk of collision. risk The larger the value, the greater the risk of collision.

[0142] Smoothness cost function J s It can be expressed as:

[0143]

[0144] Among them, t0 is the start time of path planning, t s is the end time of path planning, ω1, ω2, ω3 are smoothness weight coefficients, representing the path lateral displacement, path curvature and the rate of change of path curvature, respectively, and l″′ is right The derivative of .

[0145] The cost function J of the degree of deviation from the reference path l It can be expressed as:

[0146]

[0147] Among them, ω l is the weight coefficient of the degree of deviation from the reference path, l r is the reference line function. The reference line can guide the direction of the tractor. For structured scenes, the center line of the road is usually used as the reference line; for unstructured scenes, the planned reference path can be selected as the reference line.

[0148] A recursive method is used to search from the starting point to the end point. The cost value of the current node is updated by calculating the minimum cost value from each node to the end point, and the path information is saved for backtracking. After all nodes are calculated, the minimum connection cost of all path sampling nodes is screened. Finally, the node information of the path is transformed from the SL diagram of the Frenet coordinate system to the XY diagram of the Cartesian coordinate system for tracking control.

[0149] Use the quintic polynomial to interpolate and fit the given nodes, make the discrete nodes continuous, and obtain a smooth path curve that meets the requirements. The quintic polynomial curve can be expressed by the following formula:

[0150]

[0151] Among them, t represents time, a 10 ~a (N-1)5 represents the coefficient of the quintic polynomial, τ(s) represents the set of multiple quintic polynomials, s 5 represents s to the fifth power. Assume that the starting state information of a certain section of the fifth-order polynomial is [s j ,l j ,l′ j ,l″ j ], the endpoint status information is [s k ,l k ,l′ k ,l″ k ], substituting the starting point and end point state information into formula (17), we can get:

[0152]

[0153] Among them, a k0 ~a k5 Represents the coefficients of each section of the quintic polynomial;

[0154] By solving the linear equations of equation (18), all coefficients of the quintic polynomial curve can be determined, thus optimizing the reference path.

[0155] Step (7): Speed ​​planning based on ST graph

[0156] The ST graph can be used to describe the motion relationship between the tractor and the dynamic obstacle. Using the dynamic programming algorithm, the speed planning problem can be transformed into a feasible node search problem in the ST graph. The speed planning at a certain moment is performed on the premise that the path planning at that moment has been completed. To perform dynamic obstacle avoidance, it is necessary to project the dynamic obstacle position and the predicted future position into the ST graph in the Frenet coordinate system. Figure 6 As shown, the moment when the dynamic obstacle cuts in is T in , the cut-out time is T out , the length S1S2 is related to the width of the dynamic obstacle.

[0157] The construction of the ST graph depends on the prediction of the trajectory of dynamic obstacles. The constant velocity model can be used to predict the trajectory of dynamic obstacles:

[0158]

[0159] In the formula, the initial position of the obstacle is (s0, l0), and the horizontal and vertical velocities are and (s t ,l t ) is the predicted trajectory of the obstacle at time t.

[0160] Dynamic obstacles are projected onto the ST graph and sampled in the ST graph. During the sampling process, a series of sampling points, i.e., multiple candidate solutions, are generated at each moment. In order to obtain the optimal solution, a cost function needs to be defined to evaluate the pros and cons of each candidate solution. The cost function mainly considers factors such as safety, stability, and expected speed.

[0161] Safety means that the tractor should keep a safe distance from dynamic obstacles as much as possible during speed planning to ensure driving safety. In the time interval where obstacles exist, a safety cost function J1 is introduced:

[0162]

[0163] Among them, ω obs is the obstacle weight coefficient, a positive number k b Indicates the degree to which the tractor is away from dynamic obstacles, S obs represents the boundary formed by the straight line fitting the dynamic obstacle, S b Indicates the boundary of the tractor's movement. If the tractor is affected by multiple dynamic obstacles within a certain period of time, multiple safety cost functions J1 can be accumulated.

[0164] Stability can be equivalent to the smoothness of the speed planning curve. In the cost function, the tractor's speed and speed change rate should be as small as possible. The sampling points are connected by a fifth-order polynomial, and the acceleration and its change rate in each time interval can be easily expressed analytically. In order to minimize the tractor's speed and speed change rate, the comfort cost function J2 can be set:

[0165]

[0166] Among them, ω v and ω a Represent the weight coefficients of speed and speed change rate respectively.

[0167] Expected speed v ref Without considering the impact of moving obstacles, the corresponding cost function J3 can be defined based on the road speed limit, path curvature and other traffic rules:

[0168]

[0169] Among them, ω r A weight factor representing the deviation from the desired speed.

[0170] Integrating the above cost functions, we get the cost function of speed planning:

[0171] J=J1+J2+J3 (23)

[0172] Finally, a dynamic programming algorithm is used to solve a speed curve with the lowest cost in the ST diagram to determine the speed decision-making method of the tractor when facing dynamic obstacles; based on the obtained optimal speed planning solution, dynamic obstacles can be effectively avoided.

[0173] The embodiments are preferred implementations of the present invention, but the present invention is not limited to the above-mentioned implementations. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essential content of the present invention belong to the protection scope of the present invention.

Claims

1. A path planning method for an autonomous driving tractor in an unstructured scenario, characterized in that: The method comprises the following steps: S1. Establish an environmental map model; determine the specific location of static obstacles; S2. The heuristic function is improved by using the Reeds-Shepp curve model to obtain the cost function of the hybrid A* algorithm; S3. Determine the constraints of the system to ensure obstacle avoidance safety and adapt to the tractor's motion characteristics; S4. Expand the sub-nodes according to the cost function of step S2 and the system constraints of step S3 to obtain a global reference path; S5. Before performing the local obstacle avoidance optimization based on the dynamic programming algorithm, the tractor posture information is converted into Frenet coordinates and Cartesian coordinates; S6. According to the global reference path obtained in step S4 and the coordinate conversion method in step S5, the global reference path is optimized using the SL graph to obtain a continuous and smooth desired path; S7. Based on the coordinate conversion method of step S5 and the desired path planning result of step S6, the ST diagram is used for speed planning to determine the desired speed for effectively avoiding dynamic obstacles; The specific method of step S3 is: select a rectangle and a polygon as the outline of the tractor and the obstacle, regard the tractor as a rectangle, use the tractor boundary function to describe the size and shape of the tractor, and the horizontal and vertical coordinates of the corresponding four vertices M1 to M4 are expressed as: Among them, (x, y) is the tractor position coordinate, f is the tractor front overhang distance, r is the tractor rear overhang distance, L is the tractor wheelbase, w is the body width tractor size parameter, Ψ is the tractor heading angle; To determine whether the tractor collides with an obstacle, it is necessary to determine whether the tractor boundary and the obstacle outline coincide with each other. The triangle area method is used to check whether the tractor vertex coordinates and the convex polygon N1N2…N q The position relationship of the tractor is as follows: let the coordinate of one of its vertices be M i , connecting point M i Each two adjacent vertices of the convex polygon form a triangle, and the areas of these triangles are accumulated. If the sum of the accumulated areas is greater than the total area of ​​the convex polygon, then point M is determined. i Located outside the convex polygon; as shown in formula (7): Among them, S represents the area of ​​each polygon; Area of ​​convex polygon Through several triangles, the collision will definitely occur at the vertex on the two-dimensional plane. Each vertex of the body rectangle is always constrained to be outside the obstacle polygon. At the same time, each vertex of the polygonal obstacle is also constrained to be outside the body rectangle. Using formula (7), we can get point M i Located in the convex polygon N1N2…N n External constraints f1 and f2, and establish the following obstacle avoidance constraints: Among them, γ(N1,…N n ) is the set of convex polygon vertices, χ(M1,…M4) is the set of four vertices of the body rectangle; According to the kinematic characteristics of the tractor, it can be seen that the curvature of the tractor's travel path κ is only related to the front wheel turning angle δ f related: Too large a front wheel steering angle will increase the path curvature, which will reduce driving comfort and increase mechanical wear of the tractor. Therefore, the curvature of the planned path is constrained by limiting the tractor's front wheel steering angle: |d f |≤arctan(Lκ max ) (10) Finally, the obstacle avoidance constraints and front wheel turning angle constraints solved by the hybrid A* algorithm are determined to ensure obstacle avoidance safety and adapt to the tractor's motion characteristics; The specific method of step S5 is: converting the road description using the Cartesian coordinate system in steps S1-S5 into the description using the Frenet coordinate system. In the Cartesian coordinate system, the motion state of the tractor at a certain point is expressed as [x, y, v, Ψ, a, κ]; a is the vehicle acceleration in the Cartesian coordinate system, and in the Frenet coordinate system, the motion state of the tractor is expressed as Where s is the longitudinal displacement, is the longitudinal speed, is the longitudinal acceleration, l is the lateral displacement, is the lateral speed, is the lateral acceleration, l′ is the derivative of l with respect to s, and l″ is right The derivative of The formula for converting Cartesian coordinate system to Frenet coordinate system is: The formula for converting Frenet coordinate system to Cartesian coordinate system is: Among them, s r is the expected longitudinal displacement, x r and r is the desired lateral and longitudinal position in the Cartesian coordinate system, κ r is the reference path curvature, κ r ′ is the derivative of the reference path curvature with respect to s, ΔΨ=Ψ-Ψ r ,Ψ r is the reference heading angle; The specific method of step S6 is as follows: first, a relationship diagram between roads and obstacles in the Frenet coordinate system is constructed according to the obstacle information in the scene, referred to as the SL diagram, and the space is discretized by scattering points in the SL diagram and initializing it; second, a cost function is set to assign a cost value to each node to describe the path selection relationship between adjacent units; considering the position of the obstacle, the current position of the tractor and the target position, a dynamic programming algorithm is used to optimize the reference path to ensure that the minimum cost path can be found while avoiding collisions, and the cost function J is a safe distance cost function J between the path and the static obstacle. obs , smoothness cost function J s And the cost function J of the degree of deviation from the reference path l describe: J=J obs +J s +J l (13) The safe distance cost function J between the path and the static obstacle obs It is expressed as: Among them, d max is the maximum collision distance, d min is the minimum collision distance, [d min ,d max ] is the collision buffer zone, f risk is a monotonically decreasing collision risk function. The closer to the obstacle, the greater the risk of collision. risk The larger the value, the greater the risk of collision. Smoothness cost function J s It is expressed as: Among them, t0 is the start time of path planning, t s is the end time of path planning, ω1, ω2, ω3 are smoothness weight coefficients, representing the path lateral displacement, path curvature and the rate of change of path curvature, respectively, and l″′ is right The derivative of The cost function J of the deviation from the reference path l It is expressed as: Among them, ω l is the weight coefficient of the degree of deviation from the reference path, l r is the reference line function; A recursive method is used to search from the starting point to the end point. The cost value of the current node is updated by calculating the minimum cost value from each node to the end point, and the path information is saved for backtracking. After all nodes are calculated, the minimum connection cost of all path sampling nodes is screened out; Then, the given nodes are interpolated and fitted using a quintic polynomial, and the discrete nodes are made continuous to obtain a smooth path curve that meets the requirements. The quintic polynomial curve is expressed by the following formula: Among them, t represents time, a 10 ~a (N-1)5 represents the coefficient of the quintic polynomial, τ(s) represents the set of multiple quintic polynomials, s 5 represents the fifth power of s, assuming that the starting state information is [s j ,l j ,l′ j ′,l″ j ], the endpoint status information is [s k ,l k ,l′ k ,l″ k ], substituting the starting point and end point status information into formula (17), we get: Among them, a k0 ~a k5 Represents the coefficients of each section of the quintic polynomial; Solve the linear equations of equation (18) to determine all the coefficients of the quintic polynomial curve and optimize the reference path. Finally, perform coordinate transformation on the node information of the path and transform the relevant position coordinate information from the SL diagram of the Frenet coordinate system to the XY diagram of the Cartesian coordinate system to obtain the desired path for tracking control.

2. The method for automatic driving tractor path planning for unstructured scenarios according to claim 1, characterized in that: The specific method of step S1 is: Establish a grid map, discretize the tractor working environment into multiple independent square grids, each grid corresponds to a specific position in the real working environment, and mark the corresponding grid as occupied or idle according to the obstacles in the real environment. All marked grids together constitute the environmental map model; In the grid map, the occupied grids are represented by black, and the corresponding value in the numerical matrix is ​​1; the idle grids are represented by white, and the corresponding value in the numerical matrix is ​​0. The mathematical model of the grid map is expressed as: Among them, A represents the entire environment map model, m and p are the number of rows and columns after the environment map is rasterized, and a ij represents the grid at (i,j), a ij =0 means the grid is idle, that is, there is no obstacle; a ij =1 indicates that the grid is occupied, that is, there is an obstacle.

3. The method for automatic driving tractor path planning for unstructured scenarios according to claim 1, characterized in that: The specific method of step S2 is: The core idea of ​​the A* algorithm is to use the heuristic function to guide the direction of the algorithm traversal and evaluate each node of the network according to the cost function f(n), which is specifically expressed as: f(n)=g(n)+h(n,g)(2) Among them, g(n) is the actual cost from the starting node to the current node, h(n,g) is the distance heuristic function from the current node n to the target node g, which is used to evaluate the predicted distance cost from the current node n to the target node g; During the search process, the corresponding distance heuristic function h(n,g) uses the Euclidean distance h1(n,g) to ignore the tractor non-integrity constraints and consider the obstacle avoidance environment constraints: Among them, (x n ,y n ) is the coordinate of the current node n, (x g ,y g ) are the coordinates of the path target point; The Reeds-Shepp curve model consists of two turns and a straight line, which is used to determine the shortest path of a tractor or other moving body under given constraints. The distance heuristic function commonly used in the A* algorithm and the Reeds-Shepp curve model are set in parallel to obtain a hybrid A* algorithm, that is, the larger value is selected as the heuristic function value for the search, while satisfying the non-holonomic kinematic constraints of the tractor and the highest travel efficiency: h(n,g)=max(h1(n,g),h2(n,g)) (4) Among them, h2(n,g) represents the distance heuristic function using the Reeds-Shepp curve model, which obtains the shortest path from the current node to the target location under the conditions of ignoring environmental obstacles and considering the non-holonomic constraints of the tractor; In the hybrid A* algorithm, each node records the specific speed and front wheel angle of its parent node extending to the current node. To prevent the vehicle speed v and the front wheel angle δ f Frequent changes, adding an additional cost function g1(n) to the actual cost g(n): g1(n)=ω g1 ·|v n -v n-1 |+ω g2 ·|d fn -d fn-1 | (5) Among them, ω g1 is the weight coefficient when the driving state of the car changes; ω g2 is the weight coefficient when the car's driving direction changes; v n is the speed of the car when it reaches the current node n, v n-1 is the speed of the car when it reaches the previous node n-1, δ fn The front wheel turning angle when the car reaches the current node n, δ fn-1 It is the front wheel turning angle when the car reaches the previous node n-1.

4. The method for automatic driving tractor path planning for unstructured scenarios according to claim 1, characterized in that: The specific method of step S4 is: considering the kinematic constraints of the tractor, using the hybrid A* algorithm to change the expansion mode of the node: each node contains the state information of the tractor (x, y, Ψ), where x and y represent the position coordinates of the tractor, Ψ represents the heading angle of the tractor, each node represents the parent node with the center point, the number of child nodes of the hybrid A* algorithm is 6, generated from any position in the grid, the nodes are connected in a three-dimensional kinematic state, and the searched path can meet the non-integrity constraints of the tractor, that is, the hybrid A* algorithm is used to plan and solve to obtain the global reference path.

5. The method for path planning of an automatic driving tractor for unstructured scenes according to claim 1, characterized in that: The specific method of step S7 is: the moment when the dynamic obstacle cuts in is recorded as T in , the cut-out time is T out , the length S1S2 is related to the width of the dynamic obstacle. The construction of the ST diagram depends on the prediction of the trajectory of the dynamic obstacle. The constant speed model is used to predict the trajectory of the dynamic obstacle: In the formula, the initial position of the obstacle is (s0,l0), (s t ,l t ) is the predicted trajectory of the obstacle at time t; Dynamic obstacles are projected onto the ST graph and sampled in the ST graph. During the sampling process, a series of sampling points, i.e., multiple candidate solutions, are generated at each moment. In order to obtain the optimal solution, a cost function needs to be defined to evaluate the pros and cons of each candidate solution. Safety means that the tractor should keep a safe distance from dynamic obstacles as much as possible during the speed planning process to ensure driving safety. In the time interval where obstacles exist, a safety cost function J1 is introduced: Among them, ω obs is the obstacle weight coefficient, a positive number k b Indicates the degree to which the tractor is away from dynamic obstacles, S obs represents the boundary formed by the straight line fitting the dynamic obstacle, S b represents the boundary of the tractor's movement; if the tractor is affected by multiple dynamic obstacles within a certain period of time, multiple safety cost functions J1 are accumulated; In order to minimize the tractor's speed and speed change rate, the comfort cost function J2 is set: Among them, ω v and ω a Respectively represent the weight coefficients of speed and speed change rate; Expected speed v r Without considering the impact of moving obstacles, the expected speed cost function J3 is defined by the road speed limit, path curvature and other traffic rules: Among them, ω r The weight coefficient representing the deviation from the expected speed; Integrating the above cost functions, we get the cost function of speed planning: J=J1+J2+J3(23) Finally, a dynamic programming algorithm is used to solve a speed curve with the lowest cost in the ST diagram to determine the speed decision-making method of the tractor when facing dynamic obstacles; the relevant position and speed information is transformed from the ST diagram of the Frenet coordinate system to the XY diagram of the Cartesian coordinate system to obtain the expected speed for effectively avoiding dynamic obstacles.