Reference line smoothing optimization method and device in path planning, equipment and medium
Patent Information
- Application Number
- CN202311085165.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-08-25
AI Technical Summary
[0004]有鉴于此,本发明提供了一种路径规划中参考线平滑优化方法、装置、设备及介质,以解决参考线平滑未进行优化导致局部路径规划不成功无法满足行驶舒适性要求的问题
[0032](1)本发明在选取候选路线时,充分考虑特殊场景的情况,当需要从分叉口由直行路线转换为其他路线,选取长度最长的路线保证所生成的参考线为特殊场景的对应路线,并进一步选择横向偏移量和曲率最小的候选路线,以提高车辆行驶的舒适性,满足特殊场景下的驾驶需求;
Smart Images

Figure CN117146844B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent driving path planning technology, specifically to a method, apparatus, device, and medium for smoothing optimization of reference lines in path planning. Background Technology
[0002] In path planning, reference lines are the baselines used to generate paths. They can be straight lines or curves, and are a crucial concept in path planning algorithms, serving as the foundation and guiding principle. In autonomous driving, reference line smoothing refers to abstracting the generated path as a smooth curve during the path planning process. This plays a vital role in improving driving comfort and safety, as well as enhancing the efficiency and accuracy of path planning.
[0003] Existing smoothing methods based on QP spline paths perform reference line smoothing. However, when dealing with curvature changes to zero over short distances, excessive curvature in a segment of the current lane line, or zigzag roads, the reference line smoothing equation has no solution or poor smoothing effect, leading to unsuccessful local path planning or poor driving comfort of autonomous vehicles. Summary of the Invention
[0004] In view of this, the present invention provides a method, apparatus, device and medium for optimizing reference line smoothing in path planning, so as to solve the problem that the failure of local path planning due to the lack of optimization of reference line smoothing can not meet the requirements of driving comfort.
[0005] In a first aspect, the present invention provides a reference line smoothing optimization method in path planning, the method comprising:
[0006] Based on the vehicle's current driving scenario, candidate routes adjacent to the current lane are obtained, and the original reference line of the candidate route is generated by truncating a preset length on the candidate route and splicing them together.
[0007] The first and second derivatives of each discrete point within the original reference line are calculated according to the derivative operation rules. The curvature of each discrete point is calculated based on the second derivative. Discrete points whose first derivative or curvature exceeds a preset threshold are selected as points to be processed. A line segment to be processed with a preset distance centered on the point to be processed is intercepted on the original reference line, and the start and end points of the line segment to be processed are determined.
[0008] Obtain the location information of the point to be processed, and calculate the location information of the interpolation points within the line segment to be processed that are equidistant from the original reference line according to the preset interpolation algorithm. Then, splice the interpolation points with the discrete points of the original reference line based on the location information to obtain the interpolated reference line.
[0009] The interpolated reference line is smoothed according to a preset smoothing algorithm to obtain the final reference line of the candidate route.
[0010] The path planning reference line smoothing optimization method provided in this invention obtains the original reference line of the candidate route based on the current scenario, calculates the first derivative and curvature of the discrete points of the original reference line, selects the point to be processed on the original reference line and the line segment to be processed at a preset distance centered on the point to be processed based on the first derivative and curvature, calculates interpolation points at equal intervals with the original reference line within the line segment to be processed according to a preset interpolation algorithm, and concatenates these interpolated points with the discrete points of the original reference line to obtain the interpolated reference line. Finally, the interpolated reference line is smoothed according to a preset smoothing algorithm. This invention improves the smoothing effect of reference lines in special road sections by interpolating line segments with excessively large first derivatives or curvatures within the original reference line and smoothing the interpolated reference line. This is beneficial for path planning in intelligent driving, enhances the comfort of autonomous vehicles, and ultimately improves user satisfaction.
[0011] In one alternative implementation, the current driving scenario includes: high-precision map data, sensor data, vehicle dynamic information, vehicle static information, and vehicle path planning strategy.
[0012] This invention can help obtain more accurate reference lines by updating the vehicle's current driving scenario. Based on this, the reference lines are interpolated and smoothed to improve the accuracy of path planning.
[0013] In one alternative implementation, the number of candidate routes is 1 to 3.
[0014] The candidate lanes selected in this invention are the lane where the vehicle is located and the adjacent lanes, so there are a maximum of three candidate lanes: left, center and right. By smoothing and optimizing the reference lines of all three candidate lanes, richer and more accurate lane information can be provided for intelligent driving path planning, thereby improving the comfort of vehicle driving.
[0015] In one alternative implementation, before generating the original reference line for candidate routes, if the current driving scenario includes road forks, the longest candidate route connected to the fork is selected, and then the candidate route with the smallest lateral offset and curvature among the longest routes is selected.
[0016] This invention treats driving scenarios involving road forks as special scenarios. In these scenarios, users need to switch from a straight route to another route at the fork, which results in the road segment to be entered being longer than the straight route. Therefore, selecting the longest candidate route connected to the fork ensures that the generated reference line corresponds to the special scenario. Furthermore, in this special scenario, the candidate route with the smallest lateral offset and curvature is selected, i.e., the lane with the smallest curve is selected, to improve the comfort of vehicle driving.
[0017] In one alternative implementation, the point to be processed further includes a discrete point whose first derivative or curvature changes continuously within a preset range.
[0018] This invention selects discrete points on the route with large first derivatives or curvature, or discrete points with continuously changing curvature, for interpolation. This indicates that the curvature of the route is large. By interpolating the line segment to be processed centered on this point, the smoothing effect of the reference line can be improved, and the situation of misunderstanding of the smoothing equation will not occur.
[0019] In one optional implementation, the preset interpolation algorithm is two-point cubic Hermit interpolation. The process of calculating the position information of interpolation points at equal intervals with the original reference line within the line segment to be processed according to the preset interpolation algorithm includes: calculating the distance between the start and end points based on the coordinates and first derivative of the start and end points of the line segment to be processed; determining the number of interpolation points based on the number of discrete points within the original reference line at the preset distance and the distance between the start and end points; calculating the position component coefficients and direction component coefficients of the start and end points, and calculating the position information of different interpolation points based on the position component coefficients and direction component coefficients; and saving the position information of all interpolation points in array form to replace the position information of the corresponding discrete points within the preset distance.
[0020] This invention performs corresponding interpolation at discrete points with the same equidistant intervals as the original reference line within the line segment to be processed. Using the position component coefficients and direction component coefficients of the start and end points of the line segment as references, the position information of different interpolation points is calculated. This allows for the preliminary smoothing of reference lines with large curvatures, enabling the interpolated reference lines to meet the requirements of the smoothing algorithm, thereby optimizing the smoothing effect.
[0021] In one optional implementation, the preset smoothing algorithm is a quadratic programming algorithm.
[0022] This invention performs secondary planning and smoothing on the interpolated reference line to improve the smoothness of the final generated reference line. Path planning based on this reference line can improve the comfort of intelligent driving according to the path planning results and increase user satisfaction.
[0023] Secondly, the present invention provides a reference line smoothing optimization device for path planning, the device comprising:
[0024] The reference line acquisition module is used to acquire candidate routes adjacent to the current lane based on the current driving scenario of the vehicle, and generate the original reference line of the candidate route by cutting a preset length on the candidate route and splicing them together.
[0025] The line segment extraction module is used to calculate the first and second derivatives of each discrete point within the original reference line according to the derivative operation rules, and calculate the curvature of each discrete point based on the second derivative. Discrete points with first derivatives or curvatures exceeding a preset threshold are selected as points to be processed. The module then extracts a line segment from the original reference line at a preset distance centered on the point to be processed, and determines the start and end points of the line segment to be processed.
[0026] The reference line interpolation module is used to obtain the position information of the point to be processed, and calculate the position information of the interpolation points with the same equidistant interval as the original reference line within the line segment to be processed according to the preset interpolation algorithm. Based on the position information, the interpolation points are spliced with the discrete points of the original reference line to obtain the interpolated reference line.
[0027] The reference line smoothing module is used to smooth the interpolated reference line according to a preset smoothing algorithm to obtain the final reference line of the candidate route.
[0028] The path planning reference line smoothing optimization device provided in this invention obtains the original reference line of the candidate route based on the current scenario, calculates the first derivative and curvature of the discrete points of the original reference line, selects the point to be processed on the original reference line and the line segment to be processed at a preset distance centered on the point to be processed based on the first derivative and curvature, calculates interpolation points at equal intervals with the original reference line within the line segment to be processed according to a preset interpolation algorithm, and splices them with the discrete points of the original reference line to obtain the interpolated reference line. The interpolated reference line is then smoothed according to a preset smoothing algorithm. This invention improves the smoothing effect of reference lines in special road sections by interpolating line segments with excessively large first derivatives or curvatures within the original reference line and smoothing the interpolated reference line, which is helpful for path planning in intelligent driving, enhances the driving comfort of autonomous vehicles, and thus improves user satisfaction.
[0029] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the reference line smoothing optimization method in path planning described in the first aspect or any corresponding embodiment.
[0030] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the reference line smoothing optimization method in path planning according to the first aspect or any corresponding embodiment described above.
[0031] The beneficial effects of this invention are:
[0032] (1) When selecting candidate routes, this invention fully considers the situation of special scenarios. When it is necessary to change from a straight route to another route at a fork, the longest route is selected to ensure that the generated reference line is the corresponding route for the special scenario. Furthermore, the candidate route with the smallest lateral offset and curvature is selected to improve the driving comfort of the vehicle and meet the driving needs under special scenarios.
[0033] (2) Before obtaining the original reference line, the present invention updates the current form of the vehicle, including high-precision map data, sensor data, vehicle dynamic and static information and vehicle path planning strategy, accurately grasps the user's driving intention and driving environment, provides data guidance for the generation of the original reference line, and can generate a more accurate reference line.
[0034] (3) This invention performs interpolation calculations on the line segments to be processed with excessive first derivatives or curvature on the original reference line to obtain interpolation points with the same equidistant intervals as the original reference line, which are used to replace the original discrete points in this line segment. This can perform preliminary smoothing on road segments with large curvature, so that the interpolated reference line meets the smoothing algorithm and further meets the driving needs in special scenarios.
[0035] (4) By smoothing the interpolated reference line, this invention can ensure that the reference line can be smoothed even when the curvature changes to zero in a short distance, or when a certain section of the current lane line has excessive curvature or a “Z” shaped road, thereby improving the success rate of path planning and improving the driving comfort of autonomous vehicles. Attached Figure Description
[0036] 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.
[0037] Figure 1 This is a flowchart illustrating the reference line smoothing optimization method in path planning according to an embodiment of the present invention.
[0038] Figure 2 This is a flowchart illustrating a reference line smoothing optimization method in another path planning according to an embodiment of the present invention.
[0039] Figure 3 This is a schematic diagram of the reference line smoothing optimization device in path planning according to an embodiment of the present invention;
[0040] Figure 4 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0041] 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.
[0042] This invention is applicable to path planning scenarios in intelligent driving. The role of reference lines in path planning is as follows: (1) Providing the basis for path planning: Reference lines are the basis of path planning algorithms, and the planned path is usually generated along the reference lines. For example, when driving on a road, the center line of the road is usually the reference line for path planning; (2) Guiding the search direction of the path planning algorithm: Reference lines can guide the path planning algorithm to choose a suitable direction during the search process, thereby finding the optimal path faster. For example, reference lines can be used as an evaluation function in the heuristic function to guide the algorithm to search in the target direction; (3) Optimizing the path planning effect: The selection of reference lines can affect the effect of path planning. For example, in urban road planning, the selection of reference lines can take into account traffic flow and traffic signal factors to generate a more reasonable path. However, lane line information obtained from high-precision maps or perception cannot be directly used in the local path generation module, mainly because the sparseness and uniformity of the reference lines at discrete points, the interval between discrete points, the smoothness, and the continuity are not yet satisfactory. Therefore, it is necessary to smooth the reference lines again.
[0043] The importance of smooth reference lines is as follows: (1) Improved driving comfort: Smooth reference lines can reduce sharp turns and accelerations / decelerations during path planning, thereby improving passenger comfort. (2) Improved path planning efficiency: Smooth reference lines can reduce the computational load of path planning algorithms during the search process, thereby improving the efficiency of path planning. (3) Improved path planning accuracy: Smooth reference lines can reduce errors in path planning algorithms during the search process, thereby improving the accuracy of path planning. (4) Reduced driving risks: Smooth reference lines can reduce sharp turns and accelerations / decelerations during path planning, thereby reducing driving risks and ensuring driving safety.
[0044] This invention provides a method for smoothing and optimizing reference lines in path planning, which improves driving comfort by smoothing and optimizing reference lines in path planning. According to this invention, an embodiment of the method for smoothing and optimizing reference lines in path planning is provided. It should be noted that the steps shown in the flowcharts can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0045] This embodiment provides a reference line smoothing optimization method for path planning, which can be used in the aforementioned mobile terminals, such as computers. Figure 1 This is a flowchart of a reference line smoothing optimization method in path planning according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0046] Step S101: Based on the current driving scenario of the vehicle, obtain candidate routes adjacent to the current lane, and generate the original reference line of the candidate route by cutting a preset length on the candidate route and splicing them together.
[0047] Specifically, in this embodiment of the invention, before obtaining the original reference line, it is necessary to update the vehicle's current driving scenario to assist in generating a more accurate original reference line. The current driving scenario includes, but is not limited to, high-precision map data, sensor data, vehicle dynamic information, vehicle static information, and vehicle path planning strategies.
[0048] 1. High-precision map data: Map data is the foundation for autonomous driving systems to generate reference lines, including road shape, width, curvature, slope, and speed limit information. Map data can be collected by surveying vehicles or generated from satellite imagery.
[0049] 2. Sensor data: This includes perception data and positioning data, such as data acquired from components like LiDAR, cameras, and GPS. These sensors can provide information about the vehicle's surrounding environment, such as road width and obstacles, thereby helping to generate more accurate reference lines.
[0050] 3. Vehicle Dynamics Information: Vehicle dynamics information, including speed, acceleration, and steering angle, is obtained from the CAN bus. This information can be used to generate reference lines that are more suitable for the vehicle's current state. For example, the generated reference lines may be smoother when driving on a highway than when driving on city roads.
[0051] 4. Vehicle static information: This mainly includes the parameters and execution boundaries of the vehicle actuators, the vehicle's body dimensions, and minimum turning radius information, which are used for reference line production and screening.
[0052] 5. Vehicle Path Planning Strategy: The vehicle path planning strategy includes the vehicle's driving target and speed information. This information can be used to guide the generation of reference lines; for example, when driving on a highway, the generated reference lines may be straighter than when driving on urban roads.
[0053] In one optional implementation, this embodiment of the invention obtains candidate routes adjacent to the current lane based on the vehicle's current driving scenario, including 1 to 3 candidate routes, namely left, middle, and right candidate routes. Because a vehicle occupies a lane while driving and may change lanes during travel, it is necessary to ensure that reference line information for the left and right lanes is available during route planning. However, if the current route contains only one lane, there is only one candidate lane; if the vehicle is in the leftmost or rightmost lane, there is only one adjacent lane, meaning there are two candidate lanes.
[0054] In one alternative implementation, if the current driving scenario includes a road fork, where the user intends to change from a straight route to another, an intersection will occur, such as from a main road to a side road or a highway entrance ramp—this is merely an example and not a limitation. Such driving scenarios can be considered special cases. In this case, the longest candidate route connected to the fork is selected, i.e., another route is chosen, since a straight route is the shortest among all driving scenarios. Further, the candidate route with the smallest lateral offset and curvature among the longest routes is selected, i.e., a route with relatively less curvature, to improve vehicle driving comfort.
[0055] In one optional implementation, after selecting a suitable route, the present invention uses lane lines of a certain length as reference lines from three candidate road lines according to the reference line configuration file. These lane lines are then stitched together in front of and behind the vehicle. Because the discrete points of the candidate lane lines are much greater than those used in the reference lines, a segment of the candidate lane line is cut off and smoothed segment by segment. During the stitching process, the coordinates of the center point of the road lines and the left and right boundaries / entity boundaries are acquired and processed to generate the original reference lines required for autonomous driving.
[0056] Step S102: Calculate the first and second derivatives of each discrete point within the original reference line according to the derivative operation rules, and calculate the curvature of each discrete point according to the second derivative. Based on the first derivative and curvature, select the point to be processed according to the preset selection criteria, and cut the line segment to be processed at a preset distance centered on the point to be processed on the original reference line, and determine the start and end points of the line segment to be processed.
[0057] Specifically, in this embodiment of the invention, derivative geometric operations are performed on the original reference line to obtain the first and second derivatives of each discrete point (x, y) on the original reference line. Then, the curvature of each discrete point is calculated based on the second derivative. The obtained first derivative and curvature represent the curvature of the original reference line at that point. Therefore, the first derivative and curvature of the calculated discrete points of the original reference line are judged, and the index of the point where the first derivative or curvature exceeds a preset threshold or where the first derivative or curvature changes continuously within a preset range is identified. The discrete point represented by this index is used as the point to be processed. In this embodiment of the invention, the preset threshold is set to 0.085, and the preset range is set to 5 meters, but it is not limited to this. With the point to be processed as the center, discrete points within a preset distance on the original reference line are intercepted to form the line segment to be processed, and its starting point and ending point are determined. In this invention, discrete points within 2.5 meters before and after the point to be processed are used, i.e., the preset distance is 5 meters, but it is not limited to this.
[0058] Step S103: Obtain the location information of the point to be processed, and calculate the location information of the interpolation points with the same equidistant interval as the original reference line within the line segment to be processed according to the preset interpolation algorithm. Then, splice the interpolation points with the discrete points of the original reference line according to the location information to obtain the interpolated reference line.
[0059] Specifically, in this embodiment of the invention, the coordinates and first derivatives of the starting and ending points are obtained as position information. The position information of the interpolation points is calculated according to a preset interpolation algorithm, wherein the interval between the interpolation points is the same as the equidistant interval of the original reference line, ensuring that each discrete point corresponds to one interpolation point. This invention selects the Hermit interpolation algorithm to calculate the position information of the interpolation points. The Hermit interpolation is defined as follows: [The text abruptly ends here, so the translation stops as well.] If the polynomial p(x) satisfies the interpolation condition at each node, then the polynomials are distinct.
[0060] p(x i )=f(x i ), i = 0, ..., n
[0061] Simultaneously satisfy the derivative condition:
[0062] p (k) (x i )=f (k) (x i ), where: k = 0, 1, ..., p i i = 0, ..., n
[0063] Then p(x) is called the Hermit interpolation of f(x).
[0064] In some alternative implementations, the interpolation points are spliced with the discrete points of the original reference line based on the location information, that is, the discrete points at the corresponding positions are replaced with the interpolation points to obtain the interpolated reference line.
[0065] Step S104: Smooth the interpolated reference line according to the preset smoothing algorithm to obtain the final reference line of the candidate route.
[0066] Specifically, in this embodiment of the invention, a relatively mature quadratic programming algorithm from the prior art is selected for smoothing processing. That is, the interpolated reference line is imported into a smoother based on the quadratic programming algorithm for smoothing calculation, resulting in a final reference line that has undergone smoothing optimization. In intelligent driving, path planning based on the final reference line can successfully handle situations such as zero-curvature changes over short distances, excessive curvature in a segment of the current lane, or zigzag roads, thereby improving the driving comfort of autonomous vehicles.
[0067] The path planning reference line smoothing optimization method provided in this invention obtains the original reference line of the candidate route based on the current scenario, calculates the first derivative and curvature of the discrete points of the original reference line, selects the point to be processed on the original reference line and the line segment to be processed at a preset distance centered on the point to be processed based on the first derivative and curvature, calculates interpolation points at equal intervals with the original reference line within the line segment to be processed according to a preset interpolation algorithm, and concatenates these interpolated points with the discrete points of the original reference line to obtain the interpolated reference line. Finally, the interpolated reference line is smoothed according to a preset smoothing algorithm. This invention improves the smoothing effect of reference lines in special road sections by interpolating line segments with excessively large first derivatives or curvatures within the original reference line and smoothing the interpolated reference line. This is beneficial for path planning in intelligent driving, enhances the comfort of autonomous vehicles, and ultimately improves user satisfaction.
[0068] This embodiment provides a reference line smoothing optimization method for path planning, which can be used in the aforementioned mobile terminals, such as computers. Figure 2 This is a flowchart of a reference line smoothing optimization method in path planning according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0069] Step S201: Based on the vehicle's current driving scenario, obtain candidate routes adjacent to the current lane, and generate the original reference line of the candidate routes by truncating a preset length from the candidate routes and splicing them together. For details, please refer to... Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0070] Step S202: Calculate the first and second derivatives of each discrete point within the original reference line according to the derivative operation rules, and calculate the curvature of each discrete point based on the second derivative. Based on the first derivative and curvature, select the point to be processed according to a preset selection criterion, and extract a line segment from the original reference line at a preset distance centered on the point to be processed. Determine the start and end points of the line segment to be processed. For details, please refer to [link to details]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0071] Step S203: Obtain the location information of the point to be processed, and calculate the location information of the interpolation points with the same equidistant interval as the original reference line within the line segment to be processed according to the preset interpolation algorithm. Then, splice the interpolation points with the discrete points of the original reference line according to the location information to obtain the interpolated reference line.
[0072] Specifically, step S203 includes:
[0073] Step S2031: Calculate the distance between the starting point and the ending point of the line segment to be processed based on the coordinates of the starting point and the ending point and the first derivative.
[0074] Step S2032: Determine the number of interpolation points according to the number of discrete points within the original reference line with the preset distance and the distance between the start and end points;
[0075] Step S2033: Calculate the position component coefficients and direction component coefficients of the starting point and the ending point, and calculate the position information of different interpolation points based on the position component coefficients and direction component coefficients;
[0076] Step S2034: Save the position information of all interpolation points as an array to replace the position information of the corresponding discrete points within the preset distance.
[0077] Specifically, in this embodiment of the invention, based on the coordinates p0 and p1 of the starting point and the ending point, and the first derivatives heading0 and heading1, the distance vlength between the starting point p0 and the ending point p1 is calculated through geometric operations. Then, the number of interpolation points (divide) is calculated based on the distance vlength and the number and interval of the original reference line discrete points. This embodiment of the invention uses the 5th point before and after the point to be processed as the starting point p0 and the ending point p1, but this is not a limitation. For each interpolation point, its position between the starting point p0 and the ending point p1 is calculated and represented by the variable u, where the calculation formula is:
[0078]
[0079] It can be seen that the variable u∈(0,1], and the position component coefficients coeff_p0, coeff_p1 and the direction component coefficients coeff_v0, coeff_v1 of the starting and ending points are calculated based on the variable u. The calculation formula is as follows:
[0080] coeff_p0=2u 3 -3u 2 +1
[0081] coeff_v0=u 3 -2u 2 +u
[0082] coeff_p1=-2u 3 +3u 2
[0083] coeff_v1=u 3 -u 2
[0084] The position information of different interpolation points is calculated based on the position component coefficients coeff_p0, coeff_p1 and the direction component coefficients coeff_v0, coeff_v1. The calculation formula is shown below:
[0085] x i =coeff_p0*p0_x+coeff_p1*p1_x+coeff_v0*heading0+coeff_v1*heading1
[0086] y i =coeff_p0*p0_y+coeff_p1*p1_y+coeff_v0*heading0+coeff_v1*heading1
[0087] This formula is used to calculate the position information of all interpolation points, and the position information of all interpolation points is saved as an array. This array is used as the result of the interpolation to replace the position information of the corresponding discrete points within the preset distance.
[0088] Step S204: Smooth the interpolated reference line according to a preset smoothing algorithm to obtain the final reference line of the candidate route. For details, please refer to [link to relevant documentation]. Figure 1 Step S104 of the illustrated embodiment will not be described again here.
[0089] This invention interpolates line segments with excessive first derivatives or curvature within the original reference line, generating a series of smooth interpolation points between two points. The interpolated reference line is then smoothed, improving the smoothness of the reference line in special road sections. This aids in path planning for intelligent driving, enhances the comfort of autonomous vehicles, and ultimately increases user satisfaction.
[0090] This embodiment also provides a reference line smoothing optimization device for path planning, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0091] This embodiment provides a reference line smoothing optimization device for path planning, such as... Figure 3 As shown, it includes:
[0092] The reference line acquisition module 301 is used to acquire candidate routes adjacent to the current lane based on the current driving scenario of the vehicle, and generate the original reference line of the candidate route by cutting a preset length on the candidate route and splicing them together.
[0093] The line segment extraction module 302 is used to calculate the first and second derivatives of each discrete point within the original reference line according to the derivative operation rules, and calculate the curvature of each discrete point according to the second derivative. The discrete points with the first derivative or curvature exceeding the preset threshold are selected as the points to be processed. The module then extracts a line segment of the point to be processed at a preset distance from the point to be processed on the original reference line, and determines the start and end points of the line segment to be processed.
[0094] The reference line interpolation module 303 is used to obtain the position information of the point to be processed, and calculate the position information of the interpolation points with the same equidistant interval as the original reference line within the line segment to be processed according to the preset interpolation algorithm. Based on the position information, the interpolation points are spliced with the discrete points of the original reference line to obtain the interpolated reference line.
[0095] The reference line smoothing module 304 is used to smooth the interpolated reference line according to a preset smoothing algorithm to obtain the final reference line of the candidate route.
[0096] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0097] In this embodiment, the reference line smoothing optimization device in path planning is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0098] This invention also provides a computer device having the above-described features. Figure 3 The path planning reference line smoothing optimization device is shown.
[0099] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 4 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 4 Take a processor 10 as an example.
[0100] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0101] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0102] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0103] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0104] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0105] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0106] 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 method for smoothing reference lines in path planning, characterized in that, The method includes: Based on the vehicle's current driving scenario, candidate routes adjacent to the current lane are obtained, and the original reference line of the candidate route is generated by cutting a preset length on the candidate route and splicing them together. The first and second derivatives of each discrete point within the original reference line are calculated according to the derivative operation rules, and the curvature of each discrete point is calculated based on the second derivative. Discrete points whose first derivative or curvature exceeds a preset threshold are selected as points to be processed. A line segment to be processed with a preset distance centered on the point to be processed is intercepted on the original reference line, and the starting point and ending point of the line segment to be processed are determined. The position information of the point to be processed is obtained, and the position information of the interpolation points with the same equidistant interval as the original reference line within the line segment to be processed is calculated according to the preset interpolation algorithm. The interpolation points are spliced with the discrete points of the original reference line according to the position information to obtain the interpolated reference line. The interval of the interpolation points is the same as the equidistant interval of the original reference line, ensuring that each discrete point corresponds to one interpolation point. The interpolated reference line is smoothed according to a preset smoothing algorithm to obtain the final reference line of the candidate route.
2. The method according to claim 1, characterized in that, The current driving scenario includes: high-precision map data, sensor data, vehicle dynamic information, vehicle static information, and vehicle path planning strategy.
3. The method according to claim 1, characterized in that, The number of candidate routes is 1 to 3.
4. The method according to claim 3, characterized in that, Also includes: Before generating the original reference line for candidate routes, if the current driving scenario contains road forks, the longest candidate route connected to the fork is selected, and then the candidate route with the smallest lateral offset and curvature among the longest routes is selected.
5. The method according to claim 1, characterized in that, The points to be processed also include discrete points whose first derivative or curvature changes continuously within a preset range.
6. The method according to claim 1, characterized in that, The preset interpolation algorithm is two-point cubic Hermit interpolation. The process of calculating the position information of interpolation points at equal intervals with the original reference line within the line segment to be processed according to the preset interpolation algorithm includes: Calculate the distance between the starting point and the ending point based on the coordinates of the starting point and the ending point of the line segment to be processed and the first derivative; The number of interpolation points is determined based on the number of discrete points within the original reference line at the preset distance and the distance between the start and end points. Calculate the position component coefficients and direction component coefficients of the starting point and the ending point, and calculate the position information of different interpolation points based on the position component coefficients and direction component coefficients; The position information of all interpolation points is saved as an array to replace the position information of the corresponding discrete points within the preset distance.
7. The method according to claim 6, characterized in that, The preset smoothing algorithm is a quadratic programming algorithm.
8. A reference line smoothing optimization device for path planning, characterized in that, The device includes: The reference line acquisition module is used to acquire candidate routes adjacent to the current lane based on the current driving scenario of the vehicle, and generate the original reference line of the candidate route by cutting a preset length on the candidate route and splicing them together. The line segment extraction module is used to calculate the first and second derivatives of each discrete point within the original reference line according to the derivative operation rules, and calculate the curvature of each discrete point according to the second derivative. The module selects discrete points whose first derivative or curvature exceeds a preset threshold as points to be processed, and extracts a line segment of a preset distance from the point to be processed on the original reference line, and determines the start and end points of the line segment to be processed. The reference line interpolation module is used to obtain the position information of the point to be processed, and calculate the position information of the interpolation points with the same equidistant interval as the original reference line within the line segment to be processed according to the preset interpolation algorithm. Based on the position information, the interpolation points are spliced with the discrete points of the original reference line to obtain the interpolated reference line. The interval between the interpolation points is the same as the equidistant interval of the original reference line, ensuring that each discrete point corresponds to one interpolation point. The reference line smoothing module is used to smooth the interpolated reference line according to a preset smoothing algorithm to obtain the final reference line of the candidate route.
9. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the reference line smoothing optimization method in path planning as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the reference line smoothing optimization method in path planning according to any one of claims 1 to 7.
Citation Information
Patent Citations
A spline curve and spiral curve based reference line smoothing method
CN113286983A