Method for drifting correction for planning a path for autonomous driving vehicles
In one embodiment, when planning a path for a current driving cycle for an autonomous driving vehicle (ADV), a current location of the ADV is determined based on sensor data provided by a variety of sensors mounted on the ADV. A path is generated for the current driving cycle to drive the ADV from the current location for a predetermined period of time. An expected location of the ADV calculated based on a previous path, which was generated during a previous driving cycle. A drifting error is then calculated based on the expected location and the current location of the ADV. At least a starting point of the path for the current driving cycle is modified based on the drifting error, generating a modified path. The ADV is then controlled according to the modified path.
1. A computer-implemented method for planning a path to drive an autonomous driving vehicle, the method comprising:
determining a current location of an autonomous driving vehicle (ADV) based on sensor data obtained from a plurality of sensors mounted on the ADV;
planning a path for a current driving cycle to drive the ADV from the current location for a predetermined period of time;
determining an expected location of the ADV that was calculated based on a previous path determined during a previous driving cycle;
calculating a drifting error between the current location and the expected location of the ADV;
calculating a drifting correction factor representing a current drifting correction factor that is calculated based on a prior drifting correction factor determined during the previous driving cycle and the drifting error determined during the current driving cycle;
modifying at least a starting point of the path for the current driving cycle based on the drifting error and the drifting correction factor, generating a modified path; and
controlling the ADV to drive according to the modified path.
2. The method of claim 1 , wherein the drifting error represents a difference between the expected location and the current location of the ADV.
3. The method of claim 1 , further comprising:
calculating the drifting correction factor based on the drifting error using a predetermined drifting correction algorithm; and
modifying at least the starting point of the path based on the drifting correction factor.
4. The method of claim 1 , wherein the current drifting correction factor (y current ) is calculated as follows: y current =y prior +k/time_window_value, and wherein k represents the drifting error and the time_window_value represents a predetermined time window period.
5. The method of claim 4 , wherein the time_window_value is ranging approximately 200 to 400.
6. The method of claim 1 , wherein modifying at least the starting point of the path for the current driving cycle comprises:
projecting the path onto a station-lateral (SL) map as an SL curve, wherein the SL curve represents relative positions of a plurality of path points of the path relative to a reference line of a lane in which the ADV is driving; and
shifting at least the starting point of the SL curve laterally based on the drifting correction factor, wherein the shifted SL curve is utilized to adjust the path.
7. A non-transitory machine-readable medium having instructions stored therein, which when executed by a processor, cause the processor to perform operations of operating an autonomous driving vehicle, the operations comprising:
determining a current location of an autonomous driving vehicle (ADV) based on sensor data obtained from a plurality of sensors mounted on the ADV;
planning a path for a current driving cycle to drive the ADV from the current location for a predetermined period of time;
determining an expected location of the ADV that was calculated based on a previous path determined during a previous driving cycle;
calculating a drifting error between the current location and the expected location of the ADV;
calculating a drifting correction factor representing a current drifting correction factor that is calculated based on a prior drifting correction factor determined during the previous driving cycle and the drifting error determined during the current driving cycle;
modifying at least a starting point of the path for the current driving cycle based on the drifting error and the drifting correction factor, generating a modified path; and
controlling the ADV to drive according to the modified path.
8. The machine-readable medium of claim 7 , wherein the drifting error represents a difference between the expected location and the current location of the ADV.
9. The machine-readable medium of claim 7 , wherein the operations further comprise:
calculating the drifting correction factor based on the drifting error using a predetermined drifting correction algorithm; and
modifying at least the starting point of the path based on the drifting correction factor.
10. The machine-readable medium of claim 7 , wherein the current drifting correction factor (y current ) is calculated as follows: y current =y prior +k/time_window_value, and wherein k represents the drifting error and the time_window_value represents a predetermined time window period.
11. The machine-readable medium of claim 10 , wherein the time_window_value is ranging approximately 200 to 400.
12. The machine-readable medium of claim 7 , wherein modifying at least the starting point of the path for the current driving cycle comprises:
projecting the path onto a station-lateral (SL) map as an SL curve, wherein the SL curve represents relative positions of a plurality of path points of the path relative to a reference line of a lane in which the ADV is driving; and
shifting at least the starting point of the SL curve laterally based on the drifting correction factor, wherein the shifted SL curve is utilized to adjust the path.
13. A data processing system, comprising:
a processor; and
a memory coupled to the processor to store instructions, which when executed by the processor, cause the processor to perform operations, the operations including
determining a current location of an autonomous driving vehicle (ADV) based on sensor data obtained from a plurality of sensors mounted on the ADV,
planning a path for a current driving cycle to drive the ADV from the current location for a predetermined period of time,
determining an expected location of the ADV that was calculated based on a previous path determined during a previous driving cycle,
calculating a drifting error between the current location and the expected location of the ADV,
calculating a drifting correction factor representing a current drifting correction factor that is calculated based on a prior drifting correction factor determined during the previous driving cycle and the drifting error determined during the current driving cycle,
modifying at least a starting point of the path for the current driving cycle based on the drifting error and the drifting correction factor, generating a modified path, and
controlling the ADV to drive according to the modified path.
14. The system of claim 13 , wherein the drifting error represents a difference between the expected location and the current location of the ADV.
15. The system of claim 13 , wherein the operations further comprise:
calculating the drifting correction factor based on the drifting error using a predetermined drifting correction algorithm; and
modifying at least the starting point of the path based on the drifting correction factor.
16. The system of claim 13 , wherein the current drifting correction factor (y current ) is calculated as follows: y current =y prior +k/time_window_value, and wherein k represents the drifting error and the time_window_value represents a predetermined time window period.
17. The system of claim 16 , wherein the time_window_value is ranging approximately 200 to 400.
18. The system of claim 13 , wherein modifying at least the starting point of the path for the current driving cycle comprises:
projecting the path onto a station-lateral (SL) map as an SL curve, wherein the SL curve represents relative positions of a plurality of path points of the path relative to a reference line of a lane in which the ADV is driving; and
shifting at least the starting point of the SL curve laterally based on the drifting correction factor, wherein the shifted SL curve is utilized to adjust the path.