Dynamic deviation compensation method and device of autonomous vehicle, electronic equipment and medium

By acquiring historical trajectory point data of the intelligent flatbed vehicle, calculating dynamic compensation, and controlling the wheel angle, the deviation problem in the tracking control of the intelligent flatbed vehicle is solved, and the control accuracy of the vehicle is improved.

CN116360455BActive Publication Date: 2026-06-05SHENZHEN HAIXING ZHIJIA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HAIXING ZHIJIA TECH CO LTD
Filing Date
2023-04-12
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Intelligent flatbed vehicles are prone to deviating from the lane centerline during tracking control, affecting lateral and heading angle errors, and even causing the vehicle to lose control.

Method used

By acquiring the historical trajectory points of the target vehicle, the position, curvature, lateral error, and heading angle error are determined. The dynamic compensation amount is calculated, and the wheel angle is controlled to compensate for the deviation, ensuring that the vehicle travels on a straight trajectory.

Benefits of technology

It improves the control precision of the vehicle during the tracking process, reduces lateral and heading angle errors, and avoids serious deviation from the lane centerline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116360455B_ABST
    Figure CN116360455B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of automatic driving, in particular to a dynamic deviation compensation method and device for an automatic driving vehicle, an electronic device and a medium, comprising: obtaining a plurality of historical trajectory points included in a traveled trajectory corresponding to a target vehicle, and determining a position, a curvature, a lateral error and a heading angle error corresponding to each historical trajectory point; determining each target trajectory point corresponding to a straight trajectory in the historical trajectory according to the position and the curvature corresponding to each historical trajectory point; calculating a dynamic compensation amount of the straight trajectory corresponding to each target trajectory point according to the lateral error and the heading angle error corresponding to each target trajectory point; and controlling a wheel rotation angle of the target vehicle according to the dynamic compensation amount to compensate for a dynamic deviation amount in the driving process of the target vehicle. Thus, the lateral error and the heading angle error are small in the tracking process of the target vehicle, and the target vehicle will not deviate from the center line of the lane seriously. Therefore, the control precision of the target vehicle is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving, and specifically to a dynamic deviation compensation method, device, electronic device, and medium for autonomous vehicles. Background Technology

[0002] With the development of autonomous driving technology, the autonomous driving technology of in-plant transport vehicles is also rapidly advancing. Traditional in-plant autonomous transport vehicles are generally modified from container trucks, which consist of a tractor unit and a trailer. These trucks are relatively long, making them less agile in turning, lane changing, and reversing. The trailer's trajectory is also difficult to predict accurately, resulting in poor maneuverability on narrow roads. Based on these shortcomings, there is a growing trend towards replacing container trucks with intelligent flatbed trucks (IGVs) for in-plant autonomous driving.

[0003] Compared to traditional container trucks, intelligent flatbed trucks lack a tractor unit; the drive system is mounted on the trailer, resulting in a shorter overall length. The steering system is powered by both the front and rear axles, offering full figure-eight steering, half figure-eight steering, and crab-like driving modes. Full and half figure-eight steering enhances maneuverability for turning and lane changes; the vehicle's symmetrical front and rear design makes reversing as easy as driving forward; and crab-like driving allows for smooth lane changes on narrow roads. Based on these advantages, the application of intelligent flatbed trucks in on-site scenarios (such as ports) is becoming increasingly common.

[0004] While intelligent flatbed trucks offer numerous advantages, their numerous steering wheels and complex steering synchronization control, coupled with the fact that the load directly affects each wheel, means that variations in load weight and distribution will impact steering. This effect is evident when the vehicle deviates significantly from the lane centerline during straight-line tracking under zero-angle input conditions. This not only affects lateral error during tracking control but also yaw angle error, and severe deviation from the lane centerline can even lead to loss of control at high speeds. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a dynamic deviation compensation method, device, electronic device and medium for autonomous vehicles, aiming to solve the problem of target vehicles deviating from the lane centerline during tracking control.

[0006] According to a first aspect, embodiments of the present invention provide a dynamic deviation compensation method for an autonomous vehicle, comprising:

[0007] Obtain multiple historical trajectory points included in the target vehicle's already driven trajectory, and determine the position, curvature, lateral error, and heading angle error corresponding to each historical trajectory point;

[0008] Based on the position and curvature of each historical trajectory point, determine the target trajectory points corresponding to the straight lines in the historical trajectory;

[0009] Based on the lateral error and heading angle error corresponding to each target trajectory point, calculate the dynamic compensation amount of the straight trajectory corresponding to each target trajectory point.

[0010] Based on the dynamic compensation amount, the wheel angle of the target vehicle is controlled to compensate for the dynamic offset of the target vehicle during driving.

[0011] The dynamic deviation compensation method for autonomous vehicles provided in this invention acquires multiple historical trajectory points included in the target vehicle's already traveled trajectory, and determines the position, curvature, lateral error, and heading angle error corresponding to each historical trajectory point. Then, based on the position and curvature of each historical trajectory point, it determines each target trajectory point corresponding to a straight line in the historical trajectory, ensuring the accuracy of the determined target trajectory points. Based on the lateral error and heading angle error corresponding to each target trajectory point, it calculates the dynamic compensation amount for the straight line trajectory corresponding to each target trajectory point, ensuring the accuracy of the calculated dynamic compensation amount. Then, based on the dynamic compensation amount, it controls the wheel angles corresponding to the target vehicle to compensate for the dynamic deviation during the target vehicle's driving process, thereby ensuring that the lateral error and heading angle error of the target vehicle are small during tracking, and ensuring that the target vehicle does not deviate significantly from the lane centerline. This improves the control accuracy of the target vehicle.

[0012] In conjunction with the first aspect, in the first embodiment of the first aspect, determining each target trajectory point corresponding to a straight line trajectory in the historical trajectory based on the position and curvature corresponding to each historical trajectory point includes:

[0013] Based on the location of each historical trajectory point, determine the starting point of the historical trajectory from the historical trajectory points;

[0014] Starting from the beginning of the historical trajectory, the curvature of each historical trajectory point is compared with the preset curvature threshold in the order of driving through each historical trajectory point.

[0015] When there are at least two consecutive historical trajectory points whose curvature is less than a preset curvature threshold, at least two consecutive historical trajectory points are determined as candidate trajectory points.

[0016] The target trajectory point is determined from the candidate trajectory points based on their positions.

[0017] The dynamic deviation compensation method for autonomous vehicles provided in this invention determines the starting point of the historical trajectory from the historical trajectory points based on their positions, ensuring the accuracy of the determined starting point. Starting from the historical trajectory starting point, the curvature of each historical trajectory point is compared with a preset curvature threshold in the order of traversing the historical trajectory points, ensuring the accuracy of the comparison results. When the curvature of at least two consecutive historical trajectory points is less than the preset curvature threshold, at least two consecutive historical trajectory points are determined as candidate trajectory points, ensuring that the determined candidate trajectory points are on a straight trajectory. Then, based on the positions of each candidate trajectory point, the target trajectory point is determined from among them, ensuring the accuracy of the result where the determined candidate trajectory point is the target trajectory point.

[0018] In conjunction with the first embodiment of the first aspect, in the second embodiment of the first aspect, determining the target trajectory point from the candidate trajectory points based on their positions includes:

[0019] Based on the position of each candidate trajectory point, calculate the candidate distance between the first candidate trajectory point and the last candidate trajectory point;

[0020] Compare the candidate distance with the preset distance threshold;

[0021] When the distance between candidates is greater than a preset distance threshold, the candidate trajectory point is determined as a backup trajectory point.

[0022] Based on the lateral error corresponding to the backup trajectory point, the backup trajectory point is determined as the target trajectory point.

[0023] The dynamic deviation compensation method for autonomous vehicles provided in this invention calculates the candidate distance from the first candidate trajectory point to the last candidate trajectory point based on the position of each candidate trajectory point, ensuring the accuracy of the calculated candidate distance. The candidate distance is compared with a preset distance threshold, ensuring the accuracy of the comparison result. When the candidate distance is greater than the preset distance threshold, the candidate trajectory point is determined as a backup trajectory point, ensuring the accuracy of the determined backup trajectory point. Based on the lateral error corresponding to the backup trajectory point, the backup trajectory point is determined as the target trajectory point, ensuring the accuracy of the determined target trajectory point. This, in turn, ensures the accuracy of controlling the wheel angle of the target vehicle based on the target trajectory point.

[0024] In conjunction with the second embodiment of the first aspect, in the third embodiment of the first aspect, determining the backup trajectory point as the target trajectory point based on the lateral error corresponding to the backup trajectory point includes:

[0025] Compare the absolute values ​​of the lateral errors corresponding to each backup trajectory point, and select the largest absolute lateral error from the absolute values ​​of the lateral errors.

[0026] The maximum absolute lateral error is compared with a preset lateral error threshold.

[0027] When the maximum absolute lateral error is greater than the preset lateral error threshold, the backup trajectory point is determined as the target trajectory point.

[0028] The dynamic deviation compensation method for autonomous vehicles provided in this invention compares the absolute values ​​of the lateral errors corresponding to each backup trajectory point, selects the maximum absolute lateral error from the absolute values, and ensures the accuracy of the determined maximum absolute lateral error. The maximum absolute lateral error is then compared with a preset lateral error threshold; when the maximum absolute lateral error is greater than the preset lateral error threshold, the backup trajectory point is determined as the target trajectory point, ensuring the accuracy of the determined backup trajectory point as the target trajectory point.

[0029] In conjunction with the first aspect, in the fourth embodiment of the first aspect, the dynamic compensation amount of the straight-line trajectory corresponding to each target trajectory point is calculated based on the lateral error and heading angle error corresponding to each target trajectory point, including:

[0030] Calculate the average lateral error corresponding to each target trajectory point based on the lateral error corresponding to each target trajectory point.

[0031] Calculate the average heading angle error for each target trajectory point based on the heading angle error for each target trajectory point.

[0032] The dynamic compensation amount is calculated based on the relationship between the average lateral error and the average heading angle error.

[0033] The dynamic deviation compensation method for autonomous vehicles provided in this invention calculates the average lateral error corresponding to each target trajectory point based on the lateral error corresponding to each target trajectory point, ensuring the accuracy of the calculated average lateral error. It also calculates the average heading angle error corresponding to each target trajectory point based on the heading angle error, ensuring the accuracy of the calculated average heading angle error. Finally, it calculates the dynamic compensation amount based on the relationship between the average lateral error and the average heading angle error, ensuring the accuracy of the calculated dynamic compensation amount.

[0034] In conjunction with the first aspect, in the fifth embodiment of the first aspect, the wheel angle corresponding to the target vehicle is controlled according to the dynamic compensation amount to compensate for the dynamic offset of the target vehicle during its driving process, including:

[0035] Obtain the next feedforward steering angle and the current steering angle for the target vehicle;

[0036] Based on the relationship between dynamic compensation, feedforward steering angle, and current steering angle, determine the next target wheel steering angle for the target vehicle;

[0037] Based on the target wheel rotation angle, the wheel rotation angle corresponding to the target vehicle is controlled to compensate for the dynamic offset of the target vehicle during driving.

[0038] The dynamic deviation compensation method for autonomous vehicles provided in this invention obtains the next feedforward steering angle and the current steering angle of the target vehicle. Then, based on the relationship between the dynamic compensation amount, the feedforward steering angle, and the current steering angle, the target wheel steering angle for the next step of the target vehicle is determined, ensuring the accuracy of the determined target wheel steering angle. Then, based on the target wheel steering angle, the wheel steering angle of the target vehicle is controlled to compensate for the dynamic deviation during the target vehicle's movement, thereby ensuring that the lateral and heading angle errors of the target vehicle are small during tracking, and preventing the target vehicle from deviating significantly from the lane centerline. This improves the control accuracy of the target vehicle.

[0039] In conjunction with the fifth embodiment of the first aspect, in the sixth embodiment of the first aspect, obtaining the next feedforward steering angle corresponding to the target vehicle includes:

[0040] Obtain the current speed and aiming coefficient of the target vehicle;

[0041] The aiming distance is calculated by using the relationship between the current speed and the aiming coefficient;

[0042] Determine the aiming trajectory point based on the aiming distance, and determine the aiming curvature of the aiming trajectory point;

[0043] Obtain the equivalent wheelbase of the target vehicle;

[0044] Based on the relationship between the pre-aiming curvature and the vehicle's equivalent wheelbase, the next feedforward angle corresponding to the target vehicle is determined.

[0045] The dynamic deviation compensation method for autonomous vehicles provided in this invention obtains the current speed and pre-aiming coefficient of the target vehicle. Using the relationship between the current speed and the pre-aiming coefficient, the pre-aiming distance is calculated, ensuring the accuracy of the calculated pre-aiming distance. Based on the pre-aiming distance, a pre-aiming trajectory point is determined, and the pre-aiming curvature of the pre-aiming trajectory point is also determined, ensuring the accuracy of the determined pre-aiming curvature. The equivalent wheelbase of the target vehicle is obtained; based on the relationship between the pre-aiming curvature and the equivalent wheelbase, the feedforward steering angle for the next step of the target vehicle is determined, ensuring the accuracy of the determined feedforward steering angle. This, in turn, ensures the accuracy of the calculated target wheel steering angle.

[0046] According to a second aspect, embodiments of the present invention also provide a dynamic deviation compensation device for an autonomous vehicle, comprising:

[0047] The acquisition module is used to acquire multiple historical trajectory points included in the driving trajectory of the target vehicle, and to determine the position, curvature, lateral error and heading angle error of each historical trajectory point.

[0048] The determination module is used to determine each target trajectory point in the historical trajectory corresponding to the straight line trajectory based on the position and curvature of each historical trajectory point.

[0049] The calculation module is used to calculate the dynamic compensation amount of the straight trajectory corresponding to each target trajectory point based on the lateral error and heading angle error corresponding to each target trajectory point.

[0050] The control module is used to control the wheel angle of the target vehicle according to the dynamic compensation amount, so as to compensate for the dynamic offset of the target vehicle during driving.

[0051] The dynamic deviation compensation device for autonomous vehicles provided in this invention acquires multiple historical trajectory points included in the already driven trajectory of the target vehicle, and determines the position, curvature, lateral error, and heading angle error corresponding to each historical trajectory point. Then, based on the position and curvature of each historical trajectory point, it determines each target trajectory point corresponding to a straight line in the historical trajectory, ensuring the accuracy of the determined target trajectory points. Based on the lateral error and heading angle error corresponding to each target trajectory point, it calculates the dynamic compensation amount for the straight line trajectory corresponding to each target trajectory point, ensuring the accuracy of the calculated dynamic compensation amount. Then, based on the dynamic compensation amount, it controls the wheel angle corresponding to the target vehicle to compensate for the dynamic deviation during the target vehicle's driving process, thereby ensuring that the lateral error and heading angle error of the target vehicle are small during tracking, and ensuring that the target vehicle does not deviate significantly from the lane centerline. This improves the control accuracy of the target vehicle.

[0052] According to a third aspect, embodiments of the present invention provide an electronic device, including a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the dynamic deviation compensation method for an autonomous vehicle according to the first aspect or any embodiment of the first aspect.

[0053] According to a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions for causing a computer to perform the dynamic deviation compensation method for an autonomous vehicle in the first aspect or any embodiment of the first aspect. Attached Figure Description

[0054] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0055] Figure 1 This is a flowchart of the dynamic deviation compensation method for autonomous vehicles provided in the embodiments of the present invention;

[0056] Figure 2 This is a flowchart of a dynamic deviation compensation method for autonomous vehicles provided by another embodiment of the present invention;

[0057] Figure 3 This is a flowchart of a dynamic deviation compensation method for autonomous vehicles provided by another embodiment of the present invention;

[0058] Figure 4 This is a functional block diagram of the dynamic deviation compensation device for autonomous vehicles provided in the embodiments of the present invention;

[0059] Figure 5 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of the present invention. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0061] It should be noted that the method for dynamic deviation compensation of autonomous vehicles provided in this application embodiment can be executed by a device for dynamic deviation compensation of autonomous vehicles. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. The electronic device can be part or all of a computing platform installed inside the target vehicle, or it can be a server or terminal independent of the target vehicle. In this application embodiment, the server can be a single server or a server cluster composed of multiple servers. The terminal in this application embodiment can be a smartphone, personal computer, tablet computer, wearable device, or other intelligent hardware device such as an intelligent robot. The following method embodiments will use an electronic device as the execution subject for explanation.

[0062] In one embodiment of this application, such as Figure 1 As shown, a dynamic deviation compensation method for autonomous vehicles is provided. Taking the application of this method to electronic devices as an example, the method includes the following steps:

[0063] S11. Obtain multiple historical trajectory points included in the already driven trajectory of the target vehicle, and determine the position, curvature, lateral error and heading angle error of each historical trajectory point.

[0064] Optionally, the electronic device can receive a preset trajectory sent by other devices, or a preset trajectory input by the user. It can also plan a preset trajectory from the target starting point to the target ending point using a path planning method based on the target starting point and the target ending point. This application embodiment does not specifically limit the method by which the target vehicle obtains the preset trajectory.

[0065] Specifically, the electronic device can control the target vehicle to perform autonomous driving based on the received preset trajectory, record the already traveled trajectory, obtain multiple historical trajectory points included in the target vehicle's already traveled trajectory, and use the positioning system to determine the position corresponding to each historical trajectory point. The electronic device can also determine the curvature corresponding to each historical trajectory point based on the information of the preset trajectory, and determine the lateral error and heading angle error corresponding to each historical trajectory point based on the positional relationship between each historical trajectory point and the preset trajectory points corresponding to each historical trajectory point in the preset trajectory.

[0066] In one optional embodiment of this application, the electronic device can also determine the cumulative length of the target vehicle to each historical trajectory point based on the location corresponding to each historical trajectory point.

[0067] For example, the electronic device can acquire trajectory point information (x, y, k, s, e, h) corresponding to each historical trajectory point, where x and y are the coordinates of the historical trajectory point in the X-axis and Y-axis, k is the curvature corresponding to the historical trajectory point, s is the cumulative length from the current historical trajectory point to the trajectory starting point, e is the lateral error corresponding to the historical trajectory point, and h is the heading angle error corresponding to the historical trajectory point.

[0068] S12. Based on the position and curvature of each historical trajectory point, determine the target trajectory points corresponding to the straight lines in the historical trajectory.

[0069] Specifically, after acquiring the curvature corresponding to each historical trajectory point, the electronic device can compare the curvature corresponding to each historical trajectory point with a preset curvature threshold, and determine each target trajectory point corresponding to the straight line trajectory in the historical trajectory based on the comparison results and the position of each historical trajectory point.

[0070] This step will be explained in detail below.

[0071] S13. Calculate the dynamic compensation amount of the straight trajectory corresponding to each target trajectory point based on the lateral error and heading angle error corresponding to each target trajectory point.

[0072] Specifically, after determining the target trajectory points corresponding to the straight lines in the historical trajectory, the electronic device can calculate the dynamic compensation amount of the straight lines corresponding to each target trajectory point based on the relationship between the lateral error and the heading angle error corresponding to each target trajectory point.

[0073] This step will be explained in detail below.

[0074] S14. Based on the dynamic compensation amount, control the wheel angle corresponding to the target vehicle to compensate for the dynamic offset of the target vehicle during driving.

[0075] In one optional embodiment of this application, the electronic device can control the wheel angle of the target vehicle according to the dynamic compensation amount, and dynamically compensate the wheel angle of the target vehicle to compensate for the dynamic offset of the target vehicle during driving.

[0076] The dynamic deviation compensation method for autonomous vehicles provided in this invention acquires multiple historical trajectory points included in the target vehicle's already traveled trajectory, and determines the position, curvature, lateral error, and heading angle error corresponding to each historical trajectory point. Then, based on the position and curvature of each historical trajectory point, it determines each target trajectory point corresponding to a straight line in the historical trajectory, ensuring the accuracy of the determined target trajectory points. Based on the lateral error and heading angle error corresponding to each target trajectory point, it calculates the dynamic compensation amount for the straight line trajectory corresponding to each target trajectory point, ensuring the accuracy of the calculated dynamic compensation amount. Then, based on the dynamic compensation amount, it controls the wheel angles corresponding to the target vehicle to compensate for the dynamic deviation during the target vehicle's driving process, thereby ensuring that the lateral error and heading angle error of the target vehicle are small during tracking, and ensuring that the target vehicle does not deviate significantly from the lane centerline. This improves the control accuracy of the target vehicle.

[0077] In one embodiment of this application, such as Figure 2 As shown, a dynamic deviation compensation method for autonomous vehicles is provided. Taking the application of this method to electronic devices as an example, the method includes the following steps:

[0078] S21. Obtain multiple historical trajectory points included in the already driven trajectory of the target vehicle, and determine the position, curvature, lateral error and heading angle error of each historical trajectory point.

[0079] For details on this step, please refer to [link / reference]. Figure 1 The details of S11 will not be elaborated here.

[0080] S22. Based on the position and curvature of each historical trajectory point, determine the target trajectory points corresponding to the straight lines in the historical trajectory.

[0081] In an optional embodiment of this application, the above-mentioned step S22, "determining each target trajectory point corresponding to the straight line trajectory in the historical trajectory based on the position and curvature corresponding to each historical trajectory point," may include the following steps:

[0082] S221. Based on the location of each historical trajectory point, determine the starting point of the historical trajectory from the historical trajectory points.

[0083] Specifically, electronic devices can determine the starting point of a historical trajectory from the historical trajectory points based on the positions of each historical trajectory point.

[0084] S222. Starting from the starting point of the historical trajectory, compare the curvature of each historical trajectory point with the preset curvature threshold in the order of driving through each historical trajectory point.

[0085] Specifically, the electronic device can receive a preset curvature threshold input by the user, or a preset curvature threshold sent by other devices. It can also set a preset curvature threshold based on the curvature of historical trajectory points. This application embodiment does not specifically limit the method by which the electronic device obtains the preset curvature threshold.

[0086] After determining the starting point of the historical trajectory, the electronic device compares the curvature of each historical trajectory point with a preset curvature threshold, starting from the starting point and following the order in which the target vehicle travels through each historical trajectory point.

[0087] S223. When there are at least two consecutive historical trajectory points whose curvature is less than the preset curvature threshold, at least two consecutive historical trajectory points are determined as candidate trajectory points.

[0088] Specifically, after comparing the curvature of each historical trajectory point with a preset curvature threshold, the electronic device determines at least two consecutive historical trajectory points as candidate trajectory points when the curvature of at least two consecutive historical trajectory points is less than the preset curvature threshold.

[0089] When the curvature of at least one historical trajectory point is greater than or equal to a preset curvature threshold, the electronic device continues to compare the curvature of the next historical trajectory point with the preset curvature threshold until at least two consecutive historical trajectory points are found whose curvature is less than the preset curvature threshold. At least two consecutive historical trajectory points are then identified as candidate trajectory points.

[0090] S224. Determine the target trajectory point from among the candidate trajectory points based on their positions.

[0091] In one optional embodiment of this application, the electronic device determines each candidate trajectory point as a target trajectory point corresponding to a straight line trajectory in the historical trajectory based on the position of each candidate trajectory point.

[0092] In an optional embodiment of this application, the above-mentioned step S224, "determining the target trajectory point from the candidate trajectory points based on the positions of the candidate trajectory points," may include the following steps:

[0093] (1) Calculate the candidate distance from the first candidate trajectory point to the last candidate trajectory point based on the position of each candidate trajectory point.

[0094] Specifically, after determining each candidate trajectory point, the electronic device can calculate the candidate distance between the first candidate trajectory point and the last candidate trajectory point based on the position of each candidate trajectory point.

[0095] (2) Compare the candidate distance with the preset distance threshold.

[0096] Specifically, after determining the candidate distance, the electronic device can receive a preset distance threshold input by the user, or a preset distance threshold sent by other devices. It can also set a preset distance threshold according to the length of the actual driving trajectory. This application embodiment does not specifically limit the method by which the electronic device obtains the preset distance threshold.

[0097] After obtaining the preset distance threshold, the electronic device can compare the candidate distance with the preset distance threshold.

[0098] (3) When the candidate distance is greater than the preset distance threshold, the candidate trajectory point is determined as the backup trajectory point.

[0099] Specifically, when the distance between candidates is greater than a preset distance threshold, the candidate trajectory point is determined as a backup trajectory point.

[0100] When the candidate distance is less than or equal to the preset distance threshold, the electronic device can compare the curvature of the historical trajectory points after the last candidate trajectory point with the preset curvature threshold, and then determine the candidate trajectory points where the curvature of at least two consecutive historical trajectory points is less than the preset curvature threshold, and the candidate distance between the first candidate trajectory point and the last candidate trajectory point is greater than the preset distance threshold, and the candidate trajectory points are designated as backup trajectory points.

[0101] (4) Based on the lateral error corresponding to the backup trajectory point, determine the backup trajectory point as the target trajectory point.

[0102] In one optional embodiment of this application, the electronic device can determine the backup trajectory point as the target trajectory point.

[0103] In another optional embodiment of this application, step (4) above, "determining the backup trajectory point as the target trajectory point based on the lateral error corresponding to the backup trajectory point," may include the following steps:

[0104] (41) Compare the absolute values ​​of the lateral errors corresponding to each backup trajectory point, and select the largest absolute lateral error from the absolute values ​​of the lateral errors.

[0105] (42) Compare the maximum absolute lateral error with the preset lateral error threshold.

[0106] (43) When the maximum absolute lateral error is greater than the preset lateral error threshold, the backup trajectory point is determined as the target trajectory point.

[0107] Specifically, the electronic device can receive a preset lateral error threshold input by the user, or a preset lateral error threshold sent by other devices. It can also set a preset lateral error threshold based on the lateral error corresponding to each historical trajectory point. This application embodiment does not specifically limit the method by which the electronic device obtains the preset lateral error threshold.

[0108] After obtaining the preset lateral error threshold, the electronic device can compare the absolute values of the lateral errors corresponding to each spare trajectory point, and select the maximum absolute lateral error from the absolute values of the lateral errors. Then, compare the maximum absolute lateral error with the preset lateral error threshold. When the maximum absolute lateral error is greater than the preset lateral error threshold, determine the spare trajectory point as the target trajectory point. When the maximum absolute lateral error is less than or equal to the preset lateral error threshold, the electronic device determines that the lateral errors corresponding to each spare trajectory point are small. Therefore, no dynamic deviation compensation is required.

[0109] Then, the electronic device continues to compare the curvature of the historical trajectory points after the last spare trajectory point with the preset curvature threshold, and determines the candidate trajectory points where the curvatures of at least two consecutive historical trajectory points are less than the preset curvature threshold again. When the candidate distance between the first candidate trajectory point and the last candidate trajectory point is greater than the preset distance threshold, determine each candidate trajectory point as a spare trajectory point. Then, when the maximum absolute lateral error corresponding to each spare trajectory point is greater than the preset lateral error threshold, determine the spare trajectory point as the target trajectory point.

[0110] To better introduce the dynamic deviation compensation method for the autonomous vehicle provided in the embodiments of the present application, exemplarily, as follows:

[0111] (1) The electronic device can detect point by point starting from the historical trajectory starting point;

[0112] (2) Determine whether the curvature k i ,y i ,k i ,s i ,e i ,h i ) of the i-th historical trajectory point satisfies k i <k (where a curve trajectory with a curvature less than k is considered a straight trajectory):

[0113] a) If k i <k is not satisfied, let i = i + 1, and repeat step (2);

[0114] b) If k i <k is satisfied, then take the point (x i ,y i ,k i ,s i ,e i ,h i ) as the starting point (x _ s,y _ s,k _ s,s _ s,e _ s,e_ s, h _ s);

[0115] (3) Determine whether the curvature of the (i + 1)-th point satisfies k i+1 < k:

[0116] a) If it does not satisfy k i+1 < k, let i = i + 2, and repeat step (2);

[0117] b) If it satisfies k i+1 < k, calculate d = s i+1 - s _ s;

[0118] (4) Determine whether d > L is satisfied:

[0119] a) If d > L is not satisfied, let i = i + 1, and repeat step (3);

[0120] b) If d > L is satisfied, obtain the lateral error data from the starting point of the straight-line trajectory to the (i + 1)-th point, and find the absolute value of the maximum lateral error, the maximum absolute lateral error e_max;

[0121] (5) Determine whether e max > α is satisfied:

[0122] a) If e max > α is not satisfied, let the (i + 2)-th point be the starting point of the next straight-line trajectory, and repeat step (2);

[0123] b) If e max > α is satisfied, take the historical trajectory point (x i+1 , y i+1 [[ID=5]] i+1 , s i+1 , e i+1 , h i+1 ) at this time as the end point (x _t , y _t , k _t , s _t [[ID=6]] _t , h _t ) of the straight-line trajectory, and determine (x i , y i , k i , s i , e i , h i ) and (x i+1 , y i+1 , k i+1 , s i+1 , e i+1 , h i+1 ) as the target trajectory points. ​​

[0124] S23. Calculate the dynamic compensation amount of the straight trajectory corresponding to each target trajectory point based on the lateral error and heading angle error corresponding to each target trajectory point.

[0125] For details on this step, please refer to [link / reference]. Figure 1 The details of S13 will not be elaborated here.

[0126] S24. Based on the dynamic compensation amount, control the wheel angle corresponding to the target vehicle to compensate for the dynamic offset of the target vehicle during driving.

[0127] For details on this step, please refer to [link / reference]. Figure 1 The details of S14 will not be elaborated here.

[0128] The dynamic deviation compensation method for autonomous vehicles provided in this invention determines the starting point of the historical trajectory from the historical trajectory points based on their positions, ensuring the accuracy of the determined historical trajectory starting point. Starting from the historical trajectory starting point, the curvature of each historical trajectory point is compared with a preset curvature threshold according to the order of driving through each historical trajectory point, ensuring the accuracy of the comparison results. When the curvature of at least two consecutive historical trajectory points is less than the preset curvature threshold, at least two consecutive historical trajectory points are determined as candidate trajectory points, ensuring that the determined candidate trajectory points are on a straight trajectory. Then, based on the positions of each candidate trajectory point, the candidate distance between the first and last candidate trajectory points is calculated, ensuring the accuracy of the calculated candidate distance. The candidate distance is compared with a preset distance threshold, ensuring the accuracy of the comparison results. When the candidate distance is greater than the preset distance threshold, the candidate trajectory point is determined as a backup trajectory point, ensuring the accuracy of the result of determining the candidate trajectory point as a backup trajectory point. Then, the absolute values ​​of the lateral errors corresponding to each backup trajectory point are compared, and the maximum absolute lateral error is selected from the absolute values ​​of the lateral errors, ensuring the accuracy of the determined maximum absolute lateral error. The maximum absolute lateral error is compared with a preset lateral error threshold. When the maximum absolute lateral error is greater than the preset lateral error threshold, a backup trajectory point is determined as the target trajectory point, thus ensuring the accuracy of the determined backup trajectory point as the target trajectory point.

[0129] In one embodiment of this application, such as Figure 3 As shown, a dynamic deviation compensation method for autonomous vehicles is provided. Taking the application of this method to electronic devices as an example, the method includes the following steps:

[0130] S31. Obtain multiple historical trajectory points included in the already driven trajectory of the target vehicle, and determine the position, curvature, lateral error and heading angle error of each historical trajectory point.

[0131] For details on this step, please refer to [link / reference]. Figure 2 The details of S21 will not be elaborated here.

[0132] S32. Based on the position and curvature of each historical trajectory point, determine the target trajectory points corresponding to the straight lines in the historical trajectory.

[0133] For details on this step, please refer to [link / reference]. Figure 2 The details of S22 will not be elaborated here.

[0134] S33. Calculate the dynamic compensation amount of the straight trajectory corresponding to each target trajectory point based on the lateral error and heading angle error corresponding to each target trajectory point.

[0135] In an optional embodiment of this application, step S33, "calculating the dynamic compensation amount of the straight trajectory corresponding to each target trajectory point based on the lateral error and heading angle error corresponding to each target trajectory point," may include the following steps:

[0136] S331. Calculate the average lateral error corresponding to each target trajectory point based on the lateral error corresponding to each target trajectory point.

[0137] Specifically, the electronic device can calculate the average lateral error corresponding to each target trajectory point based on the lateral error corresponding to each target trajectory point.

[0138] For example, an electronic device can calculate the average lateral error using the following formula:

[0139]

[0140] in, This represents the average lateral error. Let n be the lateral error corresponding to each target trajectory point, and n be the number of target trajectory points.

[0141] S332. Calculate the average heading angle error corresponding to each target trajectory point based on the heading angle error corresponding to each target trajectory point.

[0142] Specifically, the electronic device can calculate the average heading angle error corresponding to each target trajectory point based on the heading angle error corresponding to each target trajectory point.

[0143] For example, an electronic device can calculate the average heading angle error using the following formula:

[0144]

[0145] in, This represents the average heading angle error. Let n be the heading angle error corresponding to each target trajectory point, and n be the number of target trajectory points.

[0146] S333. Calculate the dynamic compensation amount based on the relationship between the average lateral error and the average heading angle error.

[0147] Specifically, after calculating the average lateral error and the average heading angle error, the electronic equipment can calculate the dynamic compensation amount based on the relationship between the average lateral error and the average heading angle error.

[0148] For example, an electronic device can calculate the dynamic compensation amount using the following formula:

[0149]

[0150] Where, δ d For dynamic compensation amount, This represents the average lateral error. Let L be the average heading angle error, and L be the length of the straight line trajectory between the first and last target trajectory points.

[0151] S34. Based on the dynamic compensation amount, control the wheel angle corresponding to the target vehicle to compensate for the dynamic offset of the target vehicle during driving.

[0152] In an optional embodiment of this application, step S34, "controlling the wheel angle corresponding to the target vehicle according to the dynamic compensation amount to compensate for the dynamic offset of the target vehicle during driving," may include the following steps:

[0153] S341. Obtain the next feedforward angle and the current angle corresponding to the target vehicle.

[0154] In one optional embodiment of this application, the electronic device can receive the next feedforward angle and the current angle of the target vehicle input by the user, and can also obtain the next feedforward angle and the current angle of the target vehicle sent by other devices.

[0155] In an optional embodiment of this application, step S341, "obtaining the feedforward steering angle corresponding to the target vehicle for the next step," may include the following steps:

[0156] (1) Obtain the current speed and aiming coefficient of the target vehicle.

[0157] Specifically, electronic devices can use speed sensors to measure the current speed of the target vehicle and obtain the aiming coefficient input by the user or the aiming coefficient sent by other devices.

[0158] (2) Calculate the aiming distance using the relationship between the current speed and the aiming coefficient.

[0159] Specifically, after obtaining the target vehicle's current speed and aiming coefficient, the electronic device can multiply the current speed by the aiming coefficient to calculate the aiming distance.

[0160] For example, an electronic device can calculate the aiming distance using the following formula:

[0161] d=kv (4)

[0162] Where d is the aiming distance, k is the aiming coefficient, and v is the current speed.

[0163] (3) Determine the aiming trajectory point based on the aiming distance, and determine the aiming curvature of the aiming trajectory point.

[0164] Specifically, after calculating the aiming distance, the electronic device can determine the aiming trajectory points included in the aiming distance based on the aiming distance, and determine the aiming curvature of the aiming trajectory points based on the position of the aiming trajectory points on the preset trajectory.

[0165] (4) Obtain the vehicle equivalent wheelbase corresponding to the target vehicle.

[0166] Specifically, the electronic device can receive the vehicle equivalent wheelbase corresponding to the target vehicle input by the user, or it can receive the vehicle equivalent wheelbase corresponding to the target vehicle sent by other devices.

[0167] (5) Determine the next feedforward angle of the target vehicle based on the relationship between the pre-aiming curvature and the vehicle's equivalent wheelbase.

[0168] In one optional embodiment of this application, after obtaining the vehicle's equivalent wheelbase and the pre-aiming curvature of the pre-aiming trajectory point, the electronic device can solve the arctangent function of the product of the pre-aiming curvature and the vehicle's equivalent wheelbase to determine the next feedforward angle corresponding to the target vehicle.

[0169] In one optional embodiment of this application, after obtaining the vehicle's equivalent wheelbase and the pre-aiming curvature of the pre-aiming trajectory point, the electronic device can also obtain the feedforward steering angle coefficient corresponding to the target vehicle, and then solve the arctangent function of the product of the pre-aiming curvature and the vehicle's equivalent wheelbase, and then multiply it by the feedforward steering angle coefficient to determine the next feedforward steering angle corresponding to the target vehicle.

[0170] For example, an electronic device can calculate the feedforward angle according to the following formula:

[0171] δ f =arctan(l b *κ)*k f (5)

[0172] Where κ is the aiming curvature, l b k is the vehicle's equivalent wheelbase. f This is the feedforward rotation angle coefficient.

[0173] S342. Based on the relationship between the dynamic compensation amount, the feedforward steering angle, and the current steering angle, determine the next target wheel steering angle for the target vehicle.

[0174] In one optional embodiment of this application, after the electronic device obtains the dynamic compensation amount, the feedforward steering angle, and the current steering angle, it can add the dynamic compensation amount, the feedforward steering angle, and the current steering angle to calculate the next target wheel steering angle corresponding to the target vehicle.

[0175] In another optional embodiment of this application, the electronic device can also obtain the dynamic compensation amount, the feedforward steering angle and the weight coefficient corresponding to the current steering angle respectively, and then multiply the dynamic compensation amount, the feedforward steering angle and the current steering angle by the corresponding weight coefficients respectively, and then add them together to calculate the next wheel target steering angle corresponding to the target vehicle.

[0176] S343. Based on the target wheel rotation angle, control the wheel rotation angle corresponding to the target vehicle to compensate for the dynamic offset of the target vehicle during driving.

[0177] Specifically, after calculating the target wheel angle, the electronic device controls the wheel angle corresponding to the target vehicle based on the target wheel angle to compensate for the dynamic offset of the target vehicle during driving.

[0178] The dynamic deviation compensation method for autonomous vehicles provided in this invention calculates the average lateral error corresponding to each target trajectory point based on the lateral error corresponding to each target trajectory point, ensuring the accuracy of the calculated average lateral error. It also calculates the average heading angle error corresponding to each target trajectory point based on the heading angle error, ensuring the accuracy of the calculated average heading angle error. Finally, it calculates the dynamic compensation amount based on the relationship between the average lateral error and the average heading angle error, ensuring the accuracy of the calculated dynamic compensation amount.

[0179] Furthermore, the dynamic deviation compensation method for autonomous vehicles provided in this embodiment of the invention obtains the current speed and pre-aiming coefficient of the target vehicle, calculates the pre-aiming distance using the relationship between the current speed and the pre-aiming coefficient, ensuring the accuracy of the calculated pre-aiming distance. Based on the pre-aiming distance, a pre-aiming trajectory point is determined, and the pre-aiming curvature of the pre-aiming trajectory point is determined, ensuring the accuracy of the determined pre-aiming curvature. The equivalent wheelbase of the target vehicle is obtained; based on the relationship between the pre-aiming curvature and the equivalent wheelbase, the next feedforward steering angle of the target vehicle is determined, ensuring the accuracy of the determined feedforward steering angle. This, in turn, ensures the accuracy of the calculated target wheel steering angle. Then, the current steering angle of the target vehicle is obtained, and based on the relationship between the dynamic compensation amount, the feedforward steering angle, and the current steering angle, the next target wheel steering angle of the target vehicle is determined, ensuring the accuracy of the determined next target wheel steering angle. Then, based on the target wheel steering angle, the steering angle of the corresponding wheels of the target vehicle is controlled to compensate for the dynamic offset of the target vehicle during its movement. This ensures that the lateral and heading angle errors of the target vehicle are small during tracking, preventing the target vehicle from deviating significantly from the lane centerline. This improves the control accuracy of the target vehicle.

[0180] It should be understood that, although Figure 1-3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-3 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0181] like Figure 4 As shown, this embodiment provides a dynamic deviation compensation device for an autonomous vehicle, including:

[0182] The acquisition module 41 is used to acquire multiple historical trajectory points included in the travel trajectory of the target vehicle, and to determine the position, curvature, lateral error and heading angle error of each historical trajectory point.

[0183] The determination module 42 is used to determine each target trajectory point corresponding to the straight line trajectory in the historical trajectory based on the position and curvature of each historical trajectory point.

[0184] The calculation module 43 is used to calculate the dynamic compensation amount of the straight trajectory corresponding to each target trajectory point based on the lateral error and heading angle error corresponding to each target trajectory point.

[0185] The control module 44 is used to control the wheel angle of the target vehicle according to the dynamic compensation amount, so as to compensate for the dynamic offset of the target vehicle during driving.

[0186] In one embodiment of this application, the determination module 42 is specifically used to determine the starting point of the historical trajectory from the historical trajectory points according to the position of each historical trajectory point; starting from the starting point of the historical trajectory, compare the curvature of each historical trajectory point with a preset curvature threshold according to the order of driving each historical trajectory point; when there are at least two consecutive historical trajectory points whose curvature is less than the preset curvature threshold, determine at least two consecutive historical trajectory points as candidate trajectory points; and determine the target trajectory point from the candidate trajectory points according to the position of each candidate trajectory point.

[0187] In one embodiment of this application, the determination module 42 is specifically used to calculate the candidate distance between the first candidate trajectory point and the last candidate trajectory point based on the position of each candidate trajectory point; compare the candidate distance with a preset distance threshold; when the candidate distance is greater than the preset distance threshold, determine the candidate trajectory point as a backup trajectory point; and determine the backup trajectory point as the target trajectory point based on the lateral error corresponding to the backup trajectory point.

[0188] In one embodiment of this application, the determination module 42 is specifically used to compare the absolute values ​​of the lateral errors corresponding to each backup trajectory point, select the maximum absolute lateral error from the absolute values ​​of the lateral errors, compare the maximum absolute lateral error with a preset lateral error threshold, and determine the backup trajectory point as the target trajectory point when the maximum absolute lateral error is greater than the preset lateral error threshold.

[0189] In one embodiment of this application, the calculation module 43 is specifically used to calculate the average lateral error corresponding to each target trajectory point based on the lateral error corresponding to each target trajectory point; calculate the average heading angle error corresponding to each target trajectory point based on the heading angle error corresponding to each target trajectory point; and calculate the dynamic compensation amount based on the relationship between the average lateral error and the average heading angle error.

[0190] In one embodiment of this application, the control module 44 is specifically used to obtain the next feedforward steering angle and the current steering angle corresponding to the target vehicle; determine the next wheel target steering angle corresponding to the target vehicle based on the relationship between the dynamic compensation amount, the feedforward steering angle and the current steering angle; and control the wheel steering angle corresponding to the target vehicle based on the wheel target steering angle to compensate for the dynamic offset during the driving process of the target vehicle.

[0191] In one embodiment of this application, the control module 44 is specifically used to obtain the current speed and aiming coefficient of the target vehicle; calculate the aiming distance using the relationship between the current speed and the aiming coefficient; determine the aiming trajectory point based on the aiming distance and determine the aiming curvature of the aiming trajectory point; obtain the vehicle equivalent wheelbase corresponding to the target vehicle; and determine the feedforward steering angle of the next step corresponding to the target vehicle based on the relationship between the aiming curvature and the vehicle equivalent wheelbase.

[0192] For specific limitations and beneficial effects regarding the dynamic deviation compensation device for autonomous vehicles, please refer to the limitations of the dynamic deviation compensation method above, which will not be repeated here. Each module in the aforementioned dynamic deviation compensation device for autonomous vehicles can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the electronic device, or stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.

[0193] This invention also provides an electronic device having the above-described features. Figure 4 The dynamic deviation compensation device shown.

[0194] like Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the electronic device may include: at least one processor 51, such as a CPU (Central Processing Unit), at least one communication interface 53, memory 54, and at least one communication bus 52. The communication bus 52 is used to enable communication between these components. The communication interface 53 may include a display screen or a keyboard; optionally, the communication interface 53 may also include a standard wired interface or a wireless interface. The memory 54 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 54 may also be at least one storage device located remotely from the aforementioned processor 51. The processor 51 may be combined with... Figure 4 The described apparatus has an application program stored in memory 54, and the processor 51 calls the program code stored in memory 54 to perform any of the above method steps.

[0195] The communication bus 52 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 52 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0196] The memory 54 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 54 may also include a combination of the above types of memory.

[0197] The processor 51 can be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.

[0198] The processor 51 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0199] Optionally, memory 54 is also used to store program instructions. Processor 51 can invoke program instructions to implement the functions described in this application. Figures 1 to 3The dynamic deviation compensation method for autonomous vehicles shown in the embodiments.

[0200] This invention also provides a non-transitory computer storage medium storing computer-executable instructions that can execute the dynamic deviation compensation method for autonomous vehicles in any of the above method embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.

[0201] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A dynamic deviation compensation method for an autonomous vehicle, characterized in that, include: Obtain multiple historical trajectory points included in the already driven trajectory of the target vehicle, and determine the position, curvature, lateral error and heading angle error of each historical trajectory point; Determining target trajectory points corresponding to straight lines in the historical trajectory based on the positions and curvatures of each historical trajectory point includes: determining the starting point of the historical trajectory from the historical trajectory points based on their positions; starting from the starting point of the historical trajectory, comparing the curvature of each historical trajectory point with a preset curvature threshold in the order of traveling through each historical trajectory point; determining at least two consecutive historical trajectory points as candidate trajectory points when the curvature of at least two historical trajectory points is less than the preset curvature threshold; determining the target trajectory point from the candidate trajectory points based on their positions; wherein, determining the target trajectory point from the candidate trajectory points based on their positions includes: calculating the candidate distance from the first candidate trajectory point to the last candidate trajectory point based on their positions; comparing the candidate distance with a preset distance threshold; determining the candidate trajectory point as a backup trajectory point when the candidate distance is greater than the preset distance threshold; and determining the backup trajectory point as the target trajectory point based on the lateral error corresponding to the backup trajectory point. Based on the lateral error and heading angle error corresponding to each target trajectory point, the dynamic compensation amount of the straight trajectory corresponding to each target trajectory point is calculated, including: calculating the average lateral error corresponding to each target trajectory point based on the lateral error corresponding to each target trajectory point; calculating the average heading angle error corresponding to each target trajectory point based on the heading angle error corresponding to each target trajectory point; and calculating the dynamic compensation amount based on the relationship between the average lateral error and the average heading angle error. Based on the dynamic compensation amount, the wheel angle corresponding to the target vehicle is controlled to compensate for the dynamic offset of the target vehicle during driving.

2. The method according to claim 1, characterized in that, The step of determining the backup trajectory point as the target trajectory point based on the lateral error corresponding to the backup trajectory point includes: The absolute values ​​of the lateral errors corresponding to each of the backup trajectory points are compared, and the largest absolute lateral error is selected from the absolute values ​​of the lateral errors. The maximum absolute lateral error is compared with a preset lateral error threshold. When the maximum absolute lateral error is greater than the preset lateral error threshold, the backup trajectory point is determined as the target trajectory point.

3. The method according to claim 1, characterized in that, The step of controlling the wheel angle of the target vehicle based on the dynamic compensation amount to compensate for the dynamic offset of the target vehicle during its driving process includes: Obtain the next feedforward steering angle and the current steering angle corresponding to the target vehicle; Based on the relationship between the dynamic compensation amount, the feedforward steering angle, and the current steering angle, the next target wheel steering angle for the target vehicle is determined. Based on the target wheel rotation angle, the wheel rotation angle corresponding to the target vehicle is controlled to compensate for the dynamic offset of the target vehicle during driving.

4. The method according to claim 3, characterized in that, The step of obtaining the feedforward steering angle corresponding to the target vehicle for the next step includes: Obtain the current speed and aiming coefficient of the target vehicle; The aiming distance is calculated using the relationship between the current speed and the aiming coefficient. The aiming trajectory point is determined based on the aiming distance, and the aiming curvature of the aiming trajectory point is determined. Obtain the vehicle equivalent wheelbase corresponding to the target vehicle; Based on the relationship between the pre-aiming curvature and the vehicle's equivalent wheelbase, the next feedforward angle corresponding to the target vehicle is determined.

5. A dynamic deviation compensation device for an autonomous vehicle, characterized in that, include: The acquisition module is used to acquire multiple historical trajectory points included in the driving trajectory of the target vehicle, and to determine the position, curvature, lateral error and heading angle error of each historical trajectory point. A determining module is configured to determine target trajectory points corresponding to straight lines in a historical trajectory based on the positions and curvatures of the historical trajectory points. This includes: determining a historical trajectory starting point from the historical trajectory points based on their positions; starting from the historical trajectory starting point, comparing the curvature of each historical trajectory point with a preset curvature threshold in the order of traveling through the historical trajectory points; determining at least two consecutive historical trajectory points as candidate trajectory points when the curvature of at least two consecutive historical trajectory points is less than the preset curvature threshold; and determining the target trajectory point from the candidate trajectory points based on their positions. The step of determining the target trajectory point from the candidate trajectory points based on their positions includes: calculating a candidate distance from the first candidate trajectory point to the last candidate trajectory point based on their positions; comparing the candidate distance with a preset distance threshold; determining the candidate trajectory point as a backup trajectory point when the candidate distance is greater than the preset distance threshold; and determining the backup trajectory point as the target trajectory point based on the lateral error corresponding to the backup trajectory point. The calculation module is used to calculate the dynamic compensation amount of the straight trajectory corresponding to each target trajectory point based on the lateral error and the heading angle error corresponding to each target trajectory point, including: calculating the average lateral error corresponding to each target trajectory point based on the lateral error corresponding to each target trajectory point; calculating the average heading angle error corresponding to each target trajectory point based on the heading angle error corresponding to each target trajectory point; and calculating the dynamic compensation amount based on the relationship between the average lateral error and the average heading angle error. The control module is used to control the wheel angle of the target vehicle according to the dynamic compensation amount, so as to compensate for the dynamic offset of the target vehicle during driving.

6. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores computer instructions, and the processor executes the computer instructions to perform the dynamic deviation compensation method for an autonomous vehicle as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to execute the dynamic deviation compensation method for an autonomous vehicle according to any one of claims 1-4.