A path planning method for automatic driving of special vehicles in unstructured environments

Through the SLAM algorithm and reinforcement learning technology, the risk map is constructed and the policy network is trained, which solves the problem of complexity of path planning for special vehicles in unstructured environments, and achieves efficient and adaptable autonomous driving path planning.

CN117346805BActive Publication Date: 2024-09-20CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311150868.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-07
Publication Date
2024-09-20
Estimated Expiration
2043-09-07

AI Technical Summary

Technical Problem

Existing autonomous driving technology is difficult to effectively plan paths in unstructured environments. Especially for special vehicles, such as unmanned mining trucks and wild rescue vehicles, they face high path information complexity and traffic resistance, and lack adaptability and generalization.

Method used

The Simultaneous Localization and Mapping (SLAM) ground segmentation algorithm is used to process real unstructured terrain 3D point cloud data, build a risk map and build a reinforcement learning model, and train the strategy network through reinforcement learning to realize automatic driving of special vehicles in unstructured environments. Path planning.

Benefits of technology

It improves the adaptability and generalization of special vehicles in different terrains, achieves effective autonomous driving, enhances the efficiency and executability of the system, and can plan safe, comfortable and efficient driving in unstructured environments. path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117346805B
    Figure CN117346805B
Patent Text Reader

Abstract

A method for automatic driving path planning for special vehicles in unstructured environments, which uses a SLAM ground segmentation algorithm to store three-dimensional height information in corresponding grids, obtain an unstructured environment occupancy grid map, and then divide the grid map terrain data into a training set and a test set; combined with the input information of a perception module and special vehicle dynamics modeling, the passable area is extracted from the grid map terrain data to achieve risk map construction; an adaptive reward function is constructed according to the risk map, and a reinforcement learning model and an agent neural network are built; training is performed based on the construction of an unstructured environment test machine, and a random function is constructed in the initialization stage of each training cycle to randomize the start and end positions to make the system generalized; a policy network is obtained through reinforcement learning training, and path planning is performed in the test set to achieve efficient processing of environmental information in an unstructured environment, thereby improving the adaptability of special vehicles to different terrains and effective automatic driving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an automatic driving path planning method for a special vehicle in an unstructured environment, and belongs to the technical field of motion planning. Background Art

[0002] Autonomous driving technology helps improve traffic safety, traffic efficiency and promote the leapfrog development of the automobile industry. The path planning system is the core part of the autonomous driving system. It mainly makes decisions based on environmental information and plans a trajectory connecting the starting point and the end point that takes into account safety, comfort and driving efficiency.

[0003] At present, the application scenarios of unmanned driving related technologies are mainly concentrated in structured or semi-structured scenarios such as urban roads, parking lots, and rural roads, and are less applied to unstructured environments such as off-road terrain and open-pit mines. Especially for special vehicles such as unmanned mining trucks and field rescue vehicles, their driving operating environment is mainly a typical unstructured environment. Different from the structured environment with a large amount of driving prior information, the passable area of ​​the unstructured environment has no strict shape regulations, and the path planning stage has higher path information complexity and more feasible search degree, and will be subject to various traffic resistances caused by changes in topography and terrain. Therefore, the development of a path planning system that can efficiently process environmental information in an unstructured environment and adapt to the terrain environment is of great significance for the effective automatic driving of special vehicles. Summary of the invention

[0004] The present invention provides a method for automatic driving path planning of special vehicles in an unstructured environment. The method can realize efficient processing of environmental information in the unstructured environment, improve the adaptability and generalization of special vehicles facing different terrains, and realize effective automatic driving of special vehicles.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is: a method for automatic driving path planning of special vehicles in an unstructured environment, comprising the following steps:

[0006] Step 1: Data preprocessing: Based on the real unstructured terrain 3D point cloud data, the three-dimensional height information is stored in the corresponding grid through the Simultaneous Localization and Mapping ground segmentation algorithm to obtain the unstructured environment occupancy grid map, and then the grid map terrain data is divided into a training set and a test set;

[0007] Step 2: Risk map construction: Combine the input information of the perception module and the special vehicle dynamics modeling to extract the passable area from the raster map terrain data, and on this basis, realize the construction of the risk map;

[0008] Step 3: Model construction: construct an adaptive reward function based on the risk graph, build a reinforcement learning model and the agent's neural network;

[0009] Step 4: Model training: Training is performed based on the construction of an unstructured environment test machine. A random function is constructed in the initialization phase of each training cycle to randomize the starting and ending positions to make the system generalizable.

[0010] Step 5: Plan the path: Obtain the policy network through reinforcement learning training and perform path planning in the test set.

[0011] Furthermore, in the step 1, the working process of the Simultaneous Localization and Mapping ground segmentation algorithm is as follows: select a reference coordinate system in the environment to describe the position of the camera, and use it to describe the position of any object in the environment. The reference coordinate system is called the world coordinate system; adopt the visual SLAM algorithm framework, use the camera as a sensor to obtain information about the unstructured environment, and then use the visual mileage calculation method to estimate the movement of the camera between two adjacent frames of images, and then estimate the camera pose; determine whether the current position has been reached by the robot through loop detection; finally, optimize the camera pose and map point coordinates through back-end optimization to construct a high-precision, globally consistent map.

[0012] Furthermore, the risk map constructed in step 2 provides reliable prior knowledge for the planning module by evaluating the traversable area and obstacles. The risk map is composed of terrain risk, static obstacle risk and dynamic obstacle risk. Each grid in the risk map has a corresponding risk cost, which is calculated as follows:

[0013] RM(i,j)=λ terrain RM terrain (x i ,y j )+λ static RM static +λ dynamic RM dynamic (x i ,y j ) (1)

[0014] In the formula, λ terrain , static , dynamic Respectively represent the weights of the risks of terrain, static obstacles, and dynamic obstacles in the risk map, RM terrain (x i ,y j ), RM static (x i ,y j ), RM dynamic (xi ,y j ) represent the grid (x i ,y j )’s terrain risk index, static risk index, dynamic risk index, x i ,y i are the horizontal and vertical coordinates of the grid respectively;

[0015] (1) Calculation of terrain risk index:

[0016] The terrain risk index is mainly determined based on the slope. The slope of a node in the grid map is calculated using the Horn algorithm. The Horn algorithm can perform slope analysis and classification on DTM data, and can also draw and visualize large-area terrain. It is suitable for terrain data of different resolutions and types. The slope of the grid (i, j) is specifically defined as:

[0017]

[0018] In the formula, dz / dx represents the increment of height z in the x direction, and dz / dy represents the increment of height z in the y direction. When a vehicle is driving on a slope, its force is usually expressed as:

[0019] ma(t)=F t (t)-(F g (t)+F r (t)+F a (t)) (3)

[0020] In the formula, m represents the mass of the vehicle, a(t) represents the acceleration of the vehicle at time t, and F t (t) represents the traction force on the vehicle at time t, F g represents the slope resistance, F r Indicates rolling resistance, F a represents air resistance;

[0021] Assuming that the vehicle moves at a constant speed, while neglecting air resistance and internal energy losses, which are usually very small compared to other values; therefore, the resistance on the slope can be expressed as the sum of rolling resistance and ramp resistance, which are expressed as:

[0022] F r (t) = ηmg*cosθ slope (t) (4)

[0024] F g (t) = mg*sinθ slope (t)

[0025] In the formula, g = 9.8N / kg is a constant, θ slope (t) represents the slope at the current moment, and η represents the rolling resistance coefficient, which is usually determined by the road type, driving speed, tire structure, and material factors; therefore, the formal equation for the climbing of a vehicle in an unstructured environment is expressed as:

[0026] F t =F g +F r =mg*sinθ slope (t)+ηmg*cosθ slope (t) (5)

[0027] When the AV is at maximum traction F tmax When driving, the maximum climbing slope θ is calculated by formula (5): max The approximation of θ is obtained by using the image approximation method. max and Slope(x i ,y j ) values ​​are compared to divide the impassable area, i.e. the grid whose slope exceeds the maximum climbing gradient of the vehicle;

[0028] For the boundary of the impassable area, the boundary line represents the potential risk of vehicle driving and plays a role in limiting the driving area. The closer the distance between the vehicle and the boundary, the higher the danger level. The risk caused by the road boundary is defined as:

[0029]

[0030] In the formula, k i represents the danger level of boundary i, r i Indicates the straight-line distance from the current position (x, y) to the boundary i;

[0031] The terrain risk index function is obtained as follows:

[0032] RM terrain =λ1RM boundary +λ2Slope (7)

[0033] Where λ1 and λ2 are the boundary and slope risk weight parameters respectively;

[0034] (2) Calculation of static obstacle risk index:

[0035] The obstacles in this system are represented using a plane rectangular coordinate system. The static obstacle risk index calculation formula is as follows:

[0036]

[0037] In the formula, k o1 Indicates the influence of the current static obstacle, ko2 Indicates the degree of spatial change of the current obstacle field. x and y represent the horizontal and vertical position coordinates of the grid respectively. o ,y o Respectively represent the horizontal and vertical position coordinates of the obstacle, M o is the equivalent mass of the obstacle, Represents the gradient direction of the static obstacle risk field, that is:

[0038]

[0039] (3) Calculation of dynamic obstacle risk index:

[0040] For the dynamic risks of special vehicles in driving, dynamic obstacles are divided into low-speed obstacles and high-speed obstacles. The low-speed and high-speed classification of dynamic obstacles mainly depends on the type of obstacle. Low-speed obstacles are usually slow and take a long time in path planning, and have higher safety requirements. When dealing with low-speed obstacles, safety and slow movement speed need to be considered to fully avoid possible collision risks. Therefore, this system defines the risk in combination with the relative speed of the vehicle and the obstacle. The risk index calculation formula for low-speed obstacles is:

[0041]

[0042] Where η p and η v Represent the weights of distance and relative speed respectively, V represents the vehicle speed, V o represents the speed of the obstacle, θ is the angle between the relative speed between the special vehicle and the obstacle and the coordinate line;

[0043] High-speed obstacles are relatively fast and only occupy a small part of the path planning process. Therefore, it is necessary to focus on scene prediction, identification and avoidance. When dealing with high-speed obstacles, decisions need to be made faster to fully avoid possible collision risks. Under the premise of ensuring safety, the driving path should be shortened as much as possible to save time. This system uses a long short-term memory (LSTM) neural network to learn the continuous features of the historical trajectory of high-speed obstacles, obtain the future predicted trajectory, and then generate the corresponding risk based on the predicted trajectory. The risk generation formula of high-speed dynamic obstacles is similar to formula (5), that is, the predicted trajectory is regarded as a static obstacle:

[0044]

[0045] In the formula, k o3 Indicates the impact degree of the current high-speed dynamic obstacle, k o4 Indicates the degree of change of the current trajectory field along the space. x and y represent the horizontal and vertical position coordinates of the grid respectively. o ,y oare the horizontal and vertical position coordinates of the predicted trajectory, M h is the equivalent mass of the dynamic obstacle, ▽RM dynamic_h Represents the gradient direction of the static obstacle risk field, that is:

[0046]

[0047] The dynamic obstacle risk index function is:

[0048] RM dynamic =λ3RM dynamic_l +λ4RM dynamic_h (13)

[0049] Where λ3 and λ4 are the risk weight parameters of low-speed obstacles and high-speed obstacles respectively.

[0050] Furthermore, in step 3, the adaptive reward function is a function designed to improve the system's adaptability to terrain, and the specific formula is as follows:

[0051] R=K1RM+K2RE+K3RP (14)

[0052] In the formula, K1, K2, and K3 are the risk function weight, the destination reward weight, and the vehicle driving consumption weight, respectively. The size of K2 is set to the distance between the starting point and the destination. RE represents the reward for special vehicles arriving at the destination, that is, a one-time positive reward given when the vehicle arrives at the target location, and its value can be expressed as:

[0053]

[0054] In the formula, x s ,y s Respectively represent the horizontal and vertical coordinates of the starting point, x e ,y e They represent the horizontal and vertical coordinates of the end point, respectively, and λ5 is the reward weight parameter when reaching the end point;

[0055] RP represents the consumption of the vehicle during driving and is used to constrain the vehicle to find the ideal path. Its calculation formula is:

[0056] RP=ΣΣRP(i,j) (16)

[0057] Where RP(i,j) represents the vehicle's driving loss at a certain sampling time.

[0058] Furthermore, in the step three, the reinforcement learning model and the neural network of the agent are to intelligently decide the next target position of the special vehicle through the reinforcement learning method, and the feasible nodes around the current state are used as the output action of the reinforcement learning agent. The proximal policy optimization algorithm with both discrete action space and continuous action space is adopted. The special vehicle automatic driving path planning model in an unstructured environment is trained based on the training set. The proximal policy optimization algorithm adopts the method of two policy networks to update the policy, and uses the Actor-Critic structure to represent the policy and value function, wherein the Actor represents the policy network, which is responsible for outputting the action probability distribution; the Critic represents the value function network, which is responsible for estimating the output state value; in this system, the Actor and Critic networks both contain 2 fully connected layers, the number of hidden neurons is 64, the activation function selects the tanh function, and the input of the reinforcement learning agent is the observation value, including the current position (x, y), the starting point (x s ,y s )、Endpoint(x e ,y e ), current map information, current path set agent based on the input at time t, output the next target position of the special vehicle (x t+1 ,y t+1 ), and (x t+1 ,y t+1 ) is set based on the environment and the current position change, with the vehicle reaching the end point, i.e. (x t+1 ,y t+1 )=(x e ,y e ) as the termination condition for entering the next training cycle. The specific steps are as follows:

[0059] (1) Initialize and set up the PPO network:

[0060] dθ a ←0, dθ c ←0 (17)

[0061] In the formula, θ a ,θ c Represents the network parameters of Actor and Critic respectively, dθ a , dθ c Represents the accumulated gradient of the corresponding network; Combined with the initialized Agent network, an interactive environment based on the training set environment information is constructed, a reinforcement learning framework is built, and strategic actions and environmental change information are obtained through information interaction, and the reward function is calculated. The training process is as follows:

[0062] for n=0,1,2,…,N do,

[0063] Initialize the environment and get s in the initial statet ,

[0064] for m=0,1,2,…,T do,

[0065] Execute action a t ~π(a|s t ,θ a ),

[0066] s t+1 ,r t ,d t ←env(a t ,s t ),

[0067] The sampling {s t ,a t ,r t ,d t ,v(s t )} Add to the experience replay pool,

[0068] Solving for the Dominance Estimate

[0069] endfor;

[0070] for k=0,1,2,…,K do,

[0071] Sampling experience replay pool,

[0072] pass Update the policy parameters θ a , by minimizing δ t Update the value parameter θ c ;

[0073] end for,

[0074] end for;

[0075] Where n represents the number of training cycles, m and k represent the number of action steps and update steps in the cycle respectively; a t 、s t 、r t 、v(s t ) represent the action executed at time t, the observed state, the immediate reward, and the state value, respectively. t A flag indicating whether the system is terminated at time t; Express the odds estimate:

[0076]

[0077] δ t =r t +γv(s t+1 )-v(st ) (18)

[0078] Where γ represents the reward attenuation coefficient, λ=1, and T is the training step length;

[0079] is defined as follows:

[0080]

[0081]

[0082]

[0083] In the formula, c1 is the coefficient, S represents the additional entropy; r t (θ) represents the ratio before and after the parameter θ changes at time t, clip is the clipping function, the upper and lower limits of clipping are 1-ε and 1+ε respectively, and ε is a hyperparameter; is the square loss, represents the target state value function;

[0084] (2) Based on the above training process, the training is repeated until the policy network structure converges to a stable state. The policy network is used in the test set environment, and the result paths are collected and combined with three indicators to comprehensively evaluate the training effect. Among them, the path length evaluation function is as follows, where L is the total length of the result path. The smaller the length, the more efficient the path:

[0085]

[0086] The evaluation function of the path bumpiness is as follows. c is calculated using the coefficient of variation, which is the ratio of the standard deviation to the mean. The smaller c is, the more stable the path is in the longitudinal direction:

[0087]

[0088] In the formula, σ jolt , μ jolt Respectively represent the standard deviation and mean of the result path grid height;

[0089] The path turning angle evaluation function is as follows. The larger the v value, the smaller the path turning angle, that is, the more stable the path is in the horizontal plane:

[0090] v=μ swerve (twenty two)

[0091] In the formula, μ swerve is the mean value of the ratio of the radian angle to π on the result path, and θ represents the result path angle, that is:

[0092]

[0093] Where nθ Indicates the number of corners in the resulting path;

[0094] (3) Evaluate the policy network obtained based on the training set by calculating the above indicators of the test set result path.

[0095] Furthermore, in step 4, the random function is required to initialize the starting position in the feasible domain, and the randomization of the position should be uniform, that is, the probability of all positions in the feasible domain appearing is equal. When it is specifically implemented, the passable area is divided into several small areas, and a point is randomly sampled in each small area as the position. Combined with the characteristics of the grid map, a discrete uniform distribution is used, and all passable grid points are recorded as N1, N2, ..., N p , corresponding to (x1,y1), (x2,y2),...,(x p ,y p ), that is, the coordinates of all traversable points, the distribution function of the discrete uniform distribution is:

[0096]

[0097] Where P is the number of traversable grid points.

[0098] The present invention is based on real unstructured terrain 3D point cloud data, and through the SLAM ground segmentation algorithm, the three-dimensional height information is stored in the corresponding grid, the unstructured environment occupancy grid map is obtained, and the grid map terrain data is divided into a training set and a test set; the passable area is extracted from the grid map terrain data in combination with the perception module input information and special vehicle dynamics modeling, and the construction of the risk map is realized on this basis; an adaptive reward function is constructed according to the risk map, and a reinforcement learning model and an agent neural network are built; training is carried out based on the construction of an unstructured environment test machine, and a random function is constructed in the initialization stage of each training cycle to randomize the starting and end positions so that the system has generalization; a policy network is obtained through reinforcement learning training, and path planning is performed in the test set. The present invention uses a reinforcement learning method to intelligently decide the next target position of a special vehicle, and uses feasible nodes around the current state as the output action of the reinforcement learning agent; uses information including the current position, starting point, end point, current map information, current path set, etc. as the agent observation value; uses the vehicle arriving at the end point and the vehicle encountering a collision as the training termination conditions; randomized initial conditions help the model learn from different initial states and strategies, so that it can better adapt to various environments and situations and improve generalization performance; constructs an environment in a training set, obtains a policy network through reinforcement learning training, executes path planning in a test set based on the policy network, and verifies the feasibility of the path, checks whether there are problems such as collision and exceeding boundaries on the path, verifies the effectiveness and executability of the system, improves the adaptability and generalization of special vehicles facing different terrains, and realizes effective automatic driving of special vehicles. BRIEF DESCRIPTION OF THE DRAWINGS

[0099] Figure 1 It is a block diagram of the automatic driving path planning system for special vehicles in unstructured environments of the present invention;

[0100] Figure 2 It is a schematic diagram of constructing the risk map of the present invention. DETAILED DESCRIPTION

[0101] The present invention will be further described below in conjunction with the accompanying drawings.

[0102] like Figure 1 As shown, a method for automatic driving path planning of a special vehicle in an unstructured environment includes the following steps:

[0103] Step 1: Data preprocessing: Based on the real unstructured terrain 3D point cloud data, the three-dimensional height information is stored in the corresponding grid through the Simultaneous Localization and Mapping ground segmentation algorithm to obtain the unstructured environment occupancy grid map, and then the grid map terrain data is divided into a training set and a test set;

[0104] Step 2: Risk map construction: Combine the input information of the perception module and the special vehicle dynamics modeling to extract the passable area from the raster map terrain data, and on this basis, realize the construction of the risk map;

[0105] Step 3: Model construction: construct an adaptive reward function based on the risk graph, build a reinforcement learning model and the agent's neural network;

[0106] Step 4: Model training: Training is performed based on the construction of an unstructured environment test machine. A random function is constructed in the initialization phase of each training cycle to randomize the starting and ending positions to make the system generalizable.

[0107] Step 5: Plan the path: Obtain the policy network through reinforcement learning training and perform path planning in the test set.

[0108] Furthermore, in the step 1, the working process of the Simultaneous Localization and Mapping (SLAM) ground segmentation algorithm is as follows: select a reference coordinate system in the environment to describe the position of the camera, and use it to describe the position of any object in the environment. The reference coordinate system is called the world coordinate system; adopt the visual SLAM algorithm framework, use the camera as a sensor to obtain information about the unstructured environment, and then use the visual mileage calculation method to estimate the movement of the camera between two adjacent frames of images, and then estimate the camera pose; determine whether the robot has reached the current position through loop detection; finally, optimize the camera pose and map point coordinates through back-end optimization to construct a high-precision, globally consistent map.

[0109] like Figure 2 As shown, further, the risk map construction in step 2 provides reliable prior knowledge for the planning module by evaluating the traversable area and obstacles. The risk map is composed of terrain risk, static obstacle risk and dynamic obstacle risk. Each grid in the risk map has a corresponding risk cost, and its calculation formula is:

[0110] RM(i,j)=λ terrain RM terrain (x i ,y j )+λ static RM static +λ dynamic RM dynamic (x i ,y j ) (1)

[0111] In the formula, λ terrain , static , dynamicRespectively represent the weights of the risks of terrain, static obstacles, and dynamic obstacles in the risk map, RM terrain (x i ,y j ), RM static (x i ,y j ), RM dynamic (x i ,y j ) represent the grid (x i ,y j )’s terrain risk index, static risk index, dynamic risk index, x i ,y i are the horizontal and vertical coordinates of the grid respectively;

[0112] (1) Calculation of terrain risk index:

[0113] The terrain risk index is mainly determined based on the slope. The slope of a node in the grid map is calculated using the Horn algorithm. The Horn algorithm can perform slope analysis and classification on DTM data, and can also draw and visualize large-area terrain. It is suitable for terrain data of different resolutions and types. The slope of the grid (i, j) is specifically defined as:

[0114]

[0115] In the formula, dz / dx represents the increment of height z in the x direction, and dz / dy represents the increment of height z in the y direction; combined with the way of defining slope levels in geography, the grids in the environment are divided into gentle slopes, medium slopes, and steep slopes, and the grids with larger slopes are regarded as step elevation differences. Different levels of slope are assigned different degrees of passing risk, which can realize the classification of terrain; by constructing a special vehicle dynamics model, the maximum climbing gradient of the vehicle can be calculated, thereby determining the impassable area caused by the slope factor in the grid map, reducing the planning complexity. When a vehicle is driving on a slope, its force condition is usually expressed as:

[0116] ma(t)=F t (t)-(F g (t)+F r (t)+F a (t)) (3)

[0117] In the formula, m represents the mass of the vehicle, a(t) represents the acceleration of the vehicle at time t, and F t (t) represents the traction force on the vehicle at time t, F g represents the slope resistance, F r Indicates rolling resistance, F a represents air resistance;

[0118] Assuming that the vehicle moves at a constant speed, while neglecting air resistance and internal energy losses, which are usually very small compared to other values; therefore, the resistance on the slope can be expressed as the sum of rolling resistance and ramp resistance, which are expressed as:

[0119] F r (t) = ηmg*cosθ slope (t) (4)

[0121] F g (t) = mg*sinθ slope (t)

[0122] In the formula, g = 9.8N / kg is a constant, θ slope (t) represents the slope at the current moment, and η represents the rolling resistance coefficient, which is usually determined by the road type, driving speed, tire structure, and material factors; therefore, the formal equation for the climbing of a vehicle in an unstructured environment is expressed as:

[0123] F t =F g +F r =mg*sinθ slope (t)+ηmg*cosθ slope (t) (5)

[0124] When the AV is at maximum traction F tmax When driving, the maximum climbing slope θ is calculated by formula (5): max The approximation of θ is obtained by using the image approximation method. max and Slope(x i ,y j ) values ​​are compared to demarcate the impassable area, i.e. the grid whose slope exceeds the maximum climbing gradient of the vehicle;

[0125] For the boundary of the impassable area, the boundary line represents the potential risk of vehicle driving and plays a role in limiting the driving area. The closer the distance between the vehicle and the boundary, the higher the danger level. The risk caused by the road boundary is defined as:

[0126]

[0127] In the formula, k i represents the danger level of boundary i, r i Indicates the straight-line distance from the current position (x, y) to the boundary i;

[0128] The terrain risk index function is obtained as follows:

[0129] RM terrain =λ1RMboundary +λ2Slope (7)

[0130] Where λ1 and λ2 are the boundary and slope risk weight parameters respectively;

[0131] (2) Calculation of static obstacle risk index:

[0132] According to the perception system, the position of obstacles can be obtained in real time, and the tracking module can accurately track each obstacle and output it in real time. The obstacle representation of this system uses a plane rectangular coordinate system. The calculation formula of the static obstacle risk index is as follows:

[0133]

[0134] In the formula, k o1 Indicates the influence of the current static obstacle, k o2 Indicates the degree of spatial change of the current obstacle field. x and y represent the horizontal and vertical position coordinates of the grid respectively. o ,y o Respectively represent the horizontal and vertical position coordinates of the obstacle, M o is the equivalent mass of the obstacle, Represents the gradient direction of the static obstacle risk field, that is:

[0135]

[0136] (3) Calculation of dynamic obstacle risk index:

[0137] For the dynamic risks of special vehicles in driving, dynamic obstacles are divided into low-speed obstacles and high-speed obstacles. The low-speed and high-speed classification of dynamic obstacles mainly depends on the type of obstacle. Low-speed obstacles are usually slow and take a long time in path planning, and have higher safety requirements. When dealing with low-speed obstacles, safety and slow movement speed need to be considered to fully avoid possible collision risks. Therefore, this system defines the risk in combination with the relative speed of the vehicle and the obstacle. The risk index calculation formula for low-speed obstacles is:

[0138]

[0139] Where η p and η v Represent the weights of distance and relative speed respectively, V represents the vehicle speed, V o represents the speed of the obstacle, θ is the angle between the relative speed between the special vehicle and the obstacle and the coordinate line;

[0140] High-speed obstacles are relatively fast and only occupy a small part of the path planning process. Therefore, it is necessary to focus on scene prediction, identification and avoidance. When dealing with high-speed obstacles, decisions need to be made faster to fully avoid possible collision risks. Under the premise of ensuring safety, the driving path should be shortened as much as possible to save time. This system uses a long short-term memory (LSTM) neural network to learn the continuous features of the historical trajectory of high-speed obstacles, obtain the future predicted trajectory, and then generate the corresponding risk based on the predicted trajectory. The risk generation formula of high-speed dynamic obstacles is similar to formula (5), that is, the predicted trajectory is regarded as a static obstacle:

[0141]

[0142] In the formula, k o3 Indicates the impact degree of the current high-speed dynamic obstacle, k o4 Indicates the degree of change of the current trajectory field along the space. x and y represent the horizontal and vertical position coordinates of the grid respectively. o ,y o are the horizontal and vertical position coordinates of the predicted trajectory, M h is the equivalent mass of the dynamic obstacle, Represents the gradient direction of the static obstacle risk field, that is:

[0143]

[0144] The dynamic obstacle risk index function is:

[0145] RM dynamic =λ3RM dynamic_l +λ4RM dynamic_h (13)

[0146] Where λ3 and λ4 are the risk weight parameters of low-speed obstacles and high-speed obstacles respectively.

[0147] Furthermore, in step 3, the adaptive reward function is a function designed to improve the adaptability of the system to the terrain, and the specific formula is as follows:

[0148] R=K1RM+K2RE+K3RP (14)

[0149] In the formula, K1, K2, and K3 are the risk function weight, the destination reward weight, and the vehicle driving consumption weight, respectively. The size of K2 is set to the distance between the starting point and the destination. RE represents the reward for special vehicles arriving at the destination, that is, a one-time positive reward given when the vehicle arrives at the target location, and its value can be expressed as:

[0150]

[0151] In the formula, x s ,y s Respectively represent the horizontal and vertical coordinates of the starting point, x e ,y e They represent the horizontal and vertical coordinates of the end point, respectively, and λ5 is the reward weight parameter when reaching the end point;

[0152] RP represents the consumption of the vehicle during driving and is used to constrain the vehicle to find the ideal path. Its calculation formula is:

[0153] RP=ΣΣRP(i,j) (16)

[0154] Where RP(i,j) represents the vehicle's driving loss at a certain sampling time.

[0155] Furthermore, in the step three, the reinforcement learning model and the neural network of the agent are to intelligently decide the next target position of the special vehicle through the reinforcement learning method, and the feasible nodes around the current state are used as the output action of the reinforcement learning agent. The proximal policy optimization algorithm with both discrete action space and continuous action space is adopted. The special vehicle automatic driving path planning model in an unstructured environment is trained based on the training set. The proximal policy optimization algorithm adopts the method of two policy networks to update the policy, and uses the Actor-Critic structure to represent the policy and value function, wherein the Actor represents the policy network, which is responsible for outputting the action probability distribution; the Critic represents the value function network, which is responsible for estimating the output state value; in this system, the Actor and Critic networks both contain 2 fully connected layers, the number of hidden neurons is 64, the activation function selects the tanh function, and the input of the reinforcement learning agent is the observation value, including the current position (x, y), the starting point (x s ,y s )、Endpoint(x e ,y e ), current map information, current path set, etc., the agent outputs the next target location (x) of the special vehicle based on the input at time t. t+1 ,y t+1 ), and (x t+1 ,y t+1 ) is set based on the environment and the current position change, with the vehicle reaching the end point, i.e. (x t+1 ,y t+1 )=(x e ,y e ) as the termination condition for entering the next training cycle. The specific steps are as follows:

[0156] (1) Initialize and set up the PPO network:

[0157] dθ a ←0, dθ c ←0 (17)

[0158] In the formula, θ a ,θ c Represents the network parameters of Actor and Critic respectively, dθ a , dθ c Represents the accumulated gradient of the corresponding network; Combined with the initialized Agent network, an interactive environment based on the training set environment information is constructed, a reinforcement learning framework is built, and strategic actions and environmental change information are obtained through information interaction, and the reward function is calculated. The training process is as follows:

[0159] for n=0,1,2,…,N do,

[0160] Initialize the environment and get s in the initial state t ,

[0161] for m=0,1,2,…,T do,

[0162] Execute action a t ~π(a|s t ,θ a ),

[0163] s t+1 ,r t ,d t ←env(a t ,s t ),

[0164] The sampling {s t ,a t ,r t ,d t ,v(s t )} Add to the experience replay pool,

[0165] Solving for the Dominance Estimate

[0166] endfor;

[0167] for k=0,1,2,…,K do,

[0168] Sampling experience replay pool,

[0169] pass Update the policy parameters θ a , by minimizing δ t Update the value parameter θ c ;

[0170] end for,

[0171] end for;

[0172] Where n represents the number of training cycles, m and k represent the number of action steps and update steps in the cycle respectively; a t 、s t 、r t 、v(s t ) represent the action executed at time t, the observed state, the immediate reward, and the state value, respectively. t A flag indicating whether the system is terminated at time t; Express the odds estimate:

[0173]

[0174] δ t =r t +γv(s t+1 )-v(s t ) (18)

[0175] Where γ represents the reward attenuation coefficient, λ=1, and T is the training step length;

[0176] is defined as follows:

[0177]

[0178]

[0179]

[0180] In the formula, c1 is the coefficient, S represents the additional entropy; r t (θ) represents the ratio before and after the change of parameter θ at time t, clip is the clipping function, the upper and lower limits of clipping are 1-ε and 1+ε respectively, and ε is a hyperparameter; is the square loss, represents the target state value function;

[0181] (2) Based on the above training process, the training is repeated until the policy network structure converges to a stable state. The policy network is used in the test set environment, and the result paths are collected and combined with three indicators to comprehensively evaluate the training effect. Among them, the path length evaluation function is as follows, where L is the total length of the result path. The smaller the length, the more efficient the path:

[0182]

[0183] The evaluation function of the path bumpiness is as follows. c is calculated using the coefficient of variation, which is the ratio of the standard deviation to the mean. The smaller c is, the more stable the path is in the longitudinal direction:

[0184]

[0185] In the formula, σ jolt , μjolt Respectively represent the standard deviation and mean of the result path grid height;

[0186] The path turning angle evaluation function is as follows. The larger the v value, the smaller the path turning angle, that is, the more stable the path is in the horizontal plane:

[0187]

[0188] In the formula, μ swerve is the mean value of the ratio of the radian angle to π on the result path, and θ represents the result path angle, that is:

[0189]

[0190] Where n θ Indicates the number of corners in the resulting path;

[0191] (3) Evaluate the policy network obtained based on the training set by calculating the above indicators of the test set result path.

[0192] Furthermore, in step 4, the random function is required to initialize the starting position in the feasible domain, and the randomization of the position should be uniform, that is, the probability of all positions in the feasible domain appearing is equal. When it is specifically implemented, the passable area is divided into several small areas, and a point is randomly sampled in each small area as the position. Combined with the characteristics of the grid map, a discrete uniform distribution is used, and all passable grid points are recorded as N1, N2, ..., N n , corresponding to (x1,y1), (x2,y2),...,(x n ,y n ), that is, the coordinates of all traversable points, the distribution function of the discrete uniform distribution is:

[0193]

[0194] Where P is the number of traversable grid points.

[0195] The present invention adopts a proximal policy optimization algorithm (PPO) with both discrete action space and continuous action space. Compared with other similar algorithms, the PPO algorithm has the advantages of fast training speed, good effect, and relatively stable. The next target position of the special vehicle is intelligently determined by the method of reinforcement learning, and the feasible nodes around the current state are used as the output action of the reinforcement learning agent. The information including the current position, starting point, end point, current map information, current path set, etc. are used as the agent observation value. The training termination conditions are the vehicle reaching the end point and the vehicle encountering a collision. The model training is based on the environment and reward. The machine learning algorithm will take action according to the current state, and then obtain a new environment and reward according to the feedback result of the action. The randomized initial conditions help the model learn from different initial states and strategies, so that it can better adapt to various environments and situations, improve generalization performance, and such a training method can make the model more robust, can quickly adapt to new environments and tasks, and improve its overall performance and application range. Therefore, the starting point initialization of the system ensures uniform randomization of the position, that is, the probability of all positions in the feasible domain is equal. The specific implementation divides the feasible domain into several small areas, randomly samples a point as the position in each small area to make the randomization of the position more uniform, and combines spatial analysis to optimize the sampling algorithm; in the planning stage, the environment is constructed in the training set, and the policy network is obtained through reinforcement learning training. Since the training initialization is random, the policy network has good generalization. Based on the policy network, path planning is performed in the test set, and the feasibility of the path is verified. It is checked whether there are problems such as collision and exceeding the boundary on the path, which fully verifies the effectiveness and executability of the system.

Claims

1. A method for automatic driving path planning for special vehicles in unstructured environments, characterized in that: The steps include: Step 1: Data preprocessing: Based on the real unstructured terrain 3D point cloud data, the three-dimensional height information is stored in the corresponding grid through the Simultaneous Localization and Mapping ground segmentation algorithm to obtain the unstructured environment occupancy grid map, and then the grid map terrain data is divided into a training set and a test set; Step 2: Risk map construction: Combine the input information of the perception module and the special vehicle dynamics modeling to extract the passable area from the raster map terrain data, and on this basis, realize the construction of the risk map; The risk map construction provides reliable prior knowledge for the planning module by evaluating the traversable area and obstacles. The risk map consists of terrain risk, static obstacle risk and dynamic obstacle risk. Each grid in the risk map has a corresponding risk cost, which is calculated as follows: ; In the formula, Respectively represent the risk weights of terrain, static obstacles, and dynamic obstacles in the risk map, Respectively represent the grid terrain risk index, static risk index, dynamic risk index, are the horizontal and vertical coordinates of the grid respectively; (1) Calculation of terrain risk index: The terrain risk index is mainly determined based on the slope. The Horn algorithm is used to calculate the slope of a node in the raster map. The Horn algorithm can perform slope analysis and classification on DTM data, and can also draw and visualize large areas of terrain. It is suitable for terrain data of different resolutions and types. The slope is specifically defined as: ; In the formula, Indicates height exist The increment in direction, Indicates height exist Directional increment; when a vehicle travels on a slope, its force is usually expressed as: ; In the formula, Indicates the mass of the vehicle, Indicates that the vehicle is t The acceleration in time, Indicates that the vehicle is t The pulling force at any moment, represents the slope resistance, represents rolling resistance, represents air resistance; Assuming that the vehicle moves at a constant speed, while neglecting air resistance and internal energy losses, which are usually very small compared to other values; therefore, the resistance on the slope can be expressed as the sum of rolling resistance and ramp resistance, which are expressed as: ; In the formula, is a constant, Indicates the slope at the current moment. represents the rolling resistance coefficient, which is usually determined by road type, driving speed, tire structure, and material factors; therefore, the formal equation for a vehicle climbing a slope in an unstructured environment is expressed as: ; When the AV has maximum traction When driving, the maximum climbing slope is calculated by formula (5): The approximation of and The numerical comparison of is used to divide the impassable area, that is, the grid whose slope exceeds the maximum climbing gradient of the vehicle; For the boundary of the impassable area, the boundary line represents the potential risk of vehicle driving and plays a role in limiting the driving area. The closer the distance between the vehicle and the boundary, the higher the danger level. The risk caused by the road boundary is defined as: ; In the formula, Representing Boundaries degree of danger, Indicates current location To the border Straight-line distance; The terrain risk index function is obtained as follows: ; In the formula, are the boundary and slope risk weight parameters, respectively; (2) Calculation of static obstacle risk index: The obstacles in this system are represented using a plane rectangular coordinate system. The static obstacle risk index calculation formula is as follows: ; In the formula, Indicates the influence of the current static obstacle. Indicates the degree of change of the current obstacle field along the space, Respectively represent the horizontal and vertical position coordinates of the grid, Respectively represent the horizontal and vertical position coordinates of the obstacle, is the equivalent mass of the obstacle, Represents the gradient direction of the static obstacle risk field, that is: ; (3) Calculation of dynamic obstacle risk index: For the dynamic risks of special vehicles in driving, dynamic obstacles are divided into low-speed obstacles and high-speed obstacles. The low-speed and high-speed classification of dynamic obstacles mainly depends on the type of obstacle. Low-speed obstacles are usually slow and take a long time in path planning, and have higher safety requirements. When dealing with low-speed obstacles, safety and slow movement speed need to be considered to fully avoid possible collision risks. Therefore, this system defines the risk in combination with the relative speed of the vehicle and the obstacle. The risk index calculation formula for low-speed obstacles is: ; In the formula, Represent the weights of distance and relative speed respectively, Indicates the vehicle speed. represents the speed of the obstacle, is the angle between the relative speed between the special vehicle and the obstacle and the coordinate line; High-speed obstacles are relatively fast and only occupy a small part of the path planning process. Therefore, it is necessary to focus on scene prediction, identification and avoidance. When dealing with high-speed obstacles, decisions need to be made faster to fully avoid possible collision risks. Under the premise of ensuring safety, the driving path should be shortened as much as possible to save time. This system uses a long short-term memory (LSTM) neural network to learn the continuous features of the historical trajectory of high-speed obstacles, obtain the future predicted trajectory, and then generate the corresponding risk based on the predicted trajectory. The risk generation formula for high-speed dynamic obstacles is similar to formula (5), that is, the predicted trajectory is regarded as a static obstacle: ; In the formula, Indicates the impact of the current high-speed dynamic obstacles. Indicates the degree of change of the current trajectory field along the space, Respectively represent the horizontal and vertical position coordinates of the grid, are the horizontal and vertical position coordinates of the predicted trajectory, is the equivalent mass of the dynamic obstacle, Represents the gradient direction of the static obstacle risk field, that is: ; The dynamic obstacle risk index function is: ; In the formula, are the risk weight parameters for low-speed obstacles and high-speed obstacles respectively; Step 3: Model construction: construct an adaptive reward function based on the risk graph, build a reinforcement learning model and the agent's neural network; Step 4: Model training: Training is performed based on the construction of an unstructured environment test machine. A random function is constructed in the initialization phase of each training cycle to randomize the starting and ending positions to make the system generalizable. Step 5: Plan the path: Obtain the policy network through reinforcement learning training and perform path planning in the test set.

2. The method for automatic driving path planning for special vehicles in unstructured environments according to claim 1, characterized in that: In the step 1, the working process of the Simultaneous Localization and Mapping ground segmentation algorithm is as follows: a reference coordinate system is selected in the environment to describe the position of the camera, and the reference coordinate system is used to describe the position of any object in the environment. The reference coordinate system is called the world coordinate system; Adopting the visual SLAM algorithm framework, the camera is used as a sensor to obtain information about the unstructured environment, and then the visual mileage calculation method is used to estimate the movement of the camera between two adjacent frames of images, thereby estimating the camera's position and posture. Loop detection is used to determine whether the robot has reached the current position before; finally, the camera posture and map point coordinates are optimized through back-end optimization to construct a high-precision, globally consistent map.

3. The method for automatic driving path planning for special vehicles in unstructured environments according to claim 1, characterized in that: In step 3, the adaptive reward function is a function designed to improve the system's adaptability to terrain. The specific formula is as follows: ; In the formula, They are the risk function weight, the destination reward weight, and the vehicle driving consumption weight. The size setting and the distance between the start and end points is proportional to; It indicates the reward for special vehicles arriving at the destination, that is, a one-time positive reward given when the vehicle arrives at the target location. Its value can be expressed as: ; In the formula, Respectively represent the horizontal and vertical coordinates of the starting point, Respectively represent the horizontal and vertical coordinates of the end point, The reward weight parameter for reaching the end point; It represents the consumption of the vehicle in driving and is used to constrain the vehicle to find the ideal path. Its calculation formula is: ; In the formula, Represents the vehicle's driving loss at a certain sampling time.

4. The method for automatic driving path planning for special vehicles in unstructured environments according to claim 1, characterized in that: In the step three, the reinforcement learning model and the neural network of the agent are used to intelligently decide the next target position of the special vehicle through the reinforcement learning method, and the feasible nodes around the current state are used as the output action of the reinforcement learning agent. A proximal policy optimization algorithm with both discrete action space and continuous action space is adopted. The special vehicle automatic driving path planning model in an unstructured environment is trained based on the training set. The proximal policy optimization algorithm uses two policy networks to update the policy, and uses the Actor-Critic structure to represent the policy and value function, wherein the Actor represents the policy network, which is responsible for outputting the action probability distribution; the Critic represents the value function network, which is responsible for estimating the output state value; in this system, the Actor and Critic networks both contain 2 fully connected layers, the number of hidden neurons is 64, and the activation function selects the tanh function. The input of the reinforcement learning agent is the observation value, including the current position ,starting point ,end , current map information, current path set, the agent is based on Input at any time and output the next target position of the special vehicle and The range setting is based on the environment and the current position change, with the vehicle reaching the end point, that is, As the termination condition for entering the next training cycle, the specific steps are as follows: (1) Initialize and set up the PPO network: ; In the formula, Respectively represent the network parameters of Actor and Critic, Represents the accumulated gradient of the corresponding network; Combined with the initialized Agent network, an interactive environment based on the training set environment information is constructed, a reinforcement learning framework is built, and strategic actions and environmental change information are obtained through information interaction, and the reward function is calculated. The training process is as follows: , Initialize the environment and get the initial state , , Execute an action , , Sampling Add to the experience replay pool, Solving for the Dominance Estimate , endfor; for k = 0,1,2, …, K do, Sampling experience replay pool, pass Update policy parameters , by minimizing Update value parameters ; end for, end for; Among them, n represents the number of training cycles, m and k represent the number of action steps and update steps in the cycle respectively; Respectively t Execute actions at all times, observe status, get instant rewards, and status value. express t A sign indicating whether the moment is suspended; Express the odds estimate: ; in, represents the reward decay coefficient, is the training step length; is defined as follows: ; In the formula, is the coefficient, represents additional entropy; Indicates at time t parameter The ratio before and after the change, is the clipping function, and the upper and lower limits of clipping are is a hyperparameter; is the square loss, represents the target state value function; (2) Based on the above training process, repeat the training until the policy network structure converges to a stable state, use the policy network in the test set environment, collect the result paths and combine the three indicators to comprehensively evaluate the training effect; among them, the path length evaluation function is as follows: is the total length of the resulting path. The smaller the length, the more efficient the path: ; The evaluation function of path bumpiness is as follows: The coefficient of variation is calculated as the ratio of the standard deviation to the mean. The smaller it is, the more stable the path is in the vertical direction: ; In the formula, Respectively represent the standard deviation and mean of the result path grid height; The path angle evaluation function is as follows: The larger the value, the less the path turns, which means it is more stable in the horizontal plane: ; In the formula, The result path is the angle in radians and The mean of the ratios, Represents the resulting path angle, that is: ; In the formula, Indicates the number of corners in the resulting path; (3) Evaluate the policy network obtained based on the training set by calculating the above indicators of the test set result path.

5. The method for automatic driving path planning for special vehicles in unstructured environments according to claim 1, characterized in that: In step 4, the random function is initialized for the starting position and requires randomization of the position within the feasible domain, and the randomization of the position should be uniform, that is, the probability of all positions in the feasible domain appearing is equal. When specifically executed, the passable area is divided into several small areas, and a point is randomly sampled in each small area as the position. Combined with the characteristics of the grid map, a discrete uniform distribution is used, and all passable grid points are recorded in sequence as Corresponding to That is, the coordinates of all traversable points, the distribution function of discrete uniform distribution is: ; In the formula, P is the number of traversable grid points.