Road reference line smoothing method, storage medium and electronic equipment
By setting numbers for the reference lines in the autonomous driving system and calculating the vectors of the symmetry points, establishing a smoothing model and optimizing the coordinates of the reference lines, the problems of slow calculation speed and poor smoothing effect in the existing technology are solved, achieving faster Computational speed and better smoothing effects meet the needs of autonomous driving systems.
Patent Information
- Application Number
- CN202410889172.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-10-08
AI Technical Summary
The reference line smoothing algorithm in the existing technology has slow calculation speed and poor smoothing effect, and cannot meet the needs of the automatic driving system.
By setting numbers for each reference point in the reference line to be smoothed, its symmetry points relative to the line connecting the preceding and preceding adjacent reference points are obtained to form the first vector, the second vector and the third vector, and on the condition that these vectors are as small as possible Establish a smoothing model, optimize the coordinates of the reference point to generate a smoothed reference line, and dynamically adjust the weight value and curvature constraints to improve the smoothing effect.
It achieves faster calculation speed and significant smoothing effect, meets the requirements of the automatic driving system for reference line smoothing, and improves the vehicle's driving smoothness and control accuracy.
Smart Images

Figure CN118747724A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of autonomous driving information processing, and in particular to a road reference line smoothing method, storage medium and electronic device. Background Art
[0002] Reference Line Smoothing in autonomous driving technology is a processing technology that aims to optimize the continuity and smoothness of predefined reference lines (such as lane center lines or expected driving paths) in vehicle path planning to ensure the stability and comfort of the vehicle's driving trajectory. In autonomous driving systems, reference lines are usually generated by high-precision map data, real-time sensor perception, or preprocessed environmental information, but due to measurement noise, data breakpoints or discontinuities, the original reference lines may contain sudden curvature changes or irregular fluctuations, which have an adverse effect on the vehicle's lateral control, especially speed planning and stability, so reference line smoothing is required.
[0003] The role of reference line smoothing is mainly reflected in several aspects: 1. Improving driving smoothness: Through smoothing, the sharp corners or mutations on the reference line are eliminated, making the vehicle's steering instructions softer, reducing the bumps felt by passengers, and improving the riding experience. 2. Control accuracy: Ensure that the vehicle can track the smoothed reference line more accurately, especially under high-speed driving or complex road conditions, reduce the accumulation of control errors caused by frequent corrections, and improve safety. 3. Optimize calculation efficiency: The smoothed reference line data is more concise and continuous, which is convenient for algorithm processing, and can reduce the calculation burden of the autonomous driving system in path planning and control algorithms, and improve response speed. 4. Integrated adaptability: In complex environments (such as multi-lane changes and construction areas), smoothing technology can help vehicles better adapt to expected path changes, pre-judge and prepare to respond, so that autonomous driving decisions are more in line with expected driving intentions. In summary, reference line smoothing is a key technology in autonomous driving systems. It provides vehicles with a more stable, accurate and comfortable autonomous driving experience by optimizing the continuity and smoothness of path planning, while also improving the overall performance and safety of the system.
[0004] The smoothing algorithms in the prior art include Kalman filtering, wavelet filtering and other filtering algorithms, which have the problems of slow calculation speed, poor smoothing effect and cannot meet the needs of autonomous driving. Summary of the invention
[0005] The technical problem to be solved by the present application is that the reference line smoothing algorithm in the prior art has a slow calculation speed and there is room for optimization in the effect. To this end, the present application proposes a road reference line smoothing method, storage medium and electronic device.
[0006] In a first aspect, the technical solution of the present application provides a road reference line smoothing method, comprising:
[0007] Set numbers for each reference point in the reference line to be smoothed in sequence;
[0008] For each reference point, obtain its symmetric point relative to the line connecting the preceding and following adjacent reference points, and refer to the vector formed by the reference point and the symmetric point as the first vector; refer to the vector formed by the reference point and the previous reference point as the second vector, and refer to the vector formed by the reference point and the next reference point as the third vector;
[0009] Establishing a smoothing model on the condition that the first vector, the second vector and the third vector corresponding to each reference point are as small as possible;
[0010] Substituting the coordinates corresponding to the reference points into the smoothing model to obtain the smoothed coordinates of the reference points;
[0011] A smoothed reference line is generated according to the smoothed coordinates of each reference point.
[0012] In some embodiments, the road reference line smoothing method, wherein the smoothing model is established on the condition that the first vector, the second vector, and the third vector corresponding to each reference point are as small as possible, further comprises:
[0013] The equality of the second vector and the third vector corresponding to each reference point is used as a first constraint condition of the smoothing model; and / or,
[0014] The second constraint condition of the smoothing model is that the slack variable corresponding to each reference point is as small as possible.
[0015] In the road reference line smoothing method described in some embodiments, the first constraint condition is expressed by the following equation:
[0016]
[0017] Among them, Δs represents the length of the second vector or the third vector, which is expressed as the average value of the second vector lengths or the average value of the third vector lengths corresponding to all reference points; R represents the radius of the curve formed by the reference point, the previous reference point and the subsequent reference point, and κ represents the curvature of the reference point.
[0018] In the road reference line smoothing method described in some embodiments, the second constraint condition is expressed by the following equation:
[0019]
[0020] Among them, w s represents the slack variable weight, s irepresents the slack variable corresponding to the i-th reference point, n represents the total number of reference points, and the reference point is numbered i.
[0021] In the road reference line smoothing method described in some solutions, in the smoothing model established on the condition that the first vector, the second vector and the third vector corresponding to each reference point are as small as possible, the smoothing model is expressed as:
[0022]
[0023] Among them, w x 、w y and w z is the weight parameter, (x, y) represents the coordinates of the reference point after smoothing, the subscript i represents the reference point numbered i, the subscript i-1 represents the reference point numbered i-1, the subscript i+1 represents the reference point numbered i+1, and ref represents that the reference point is located on the reference line to be smoothed.
[0024] In some embodiments of the road reference line smoothing method, the weight value w in the smoothing model x and w y To dynamically adjust the weight value; where:
[0025] When the curvature of the reference point is less than the set curvature threshold, increase the weight value w x When the curvature of the reference point is greater than the set curvature threshold, increase the weight value w y .
[0026] The road reference line smoothing method described in some solutions further includes the following steps:
[0027] Obtaining the curvature of each reference point on the smoothed reference line;
[0028] If the curvature of any reference point is not within the set curvature range, the smoothed reference line is used as the reference line to be smoothed and the step of substituting the coordinate parameters corresponding to each reference point into the smoothing model to obtain the smoothed coordinate parameters of each reference point is returned;
[0029] Repeat the above steps until the curvature of each reference point on the smoothed reference line is within the set curvature range or the number of repetitions reaches an upper limit.
[0030] In a second aspect, the technical solution of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the road reference line smoothing method described in any technical solution of the first aspect.
[0031] In a third aspect, the technical solution of the present application provides a computer-readable storage medium, in which program information is stored. After a computer reads the program information, the road reference line smoothing method described in any one of the technical solutions of the first aspect is executed.
[0032] In a fourth aspect, the technical solution of the present application provides an electronic device, comprising at least one processor and at least one memory, wherein at least one of the memories stores program information, and after reading the program information, at least one of the processors executes the road reference line smoothing method described in any one of the technical solutions of the first aspect.
[0033] The above technical solution has the following beneficial effects:
[0034] The road reference line smoothing method, storage medium and electronic device provided by the present application, after setting a number for each reference point in the reference line to be smoothed, obtains the symmetrical point relative to the line connecting the front and rear adjacent reference points for each reference point. According to the positional relationship between the reference point, the previous reference point, the next reference point and the symmetrical point, the first vector, the second vector and the third vector are obtained. According to the smoothing requirements, a smoothing model is established with the condition that the first vector, the second vector and the third vector corresponding to each reference point are as small as possible; the coordinates corresponding to each reference point are substituted into the smoothing model to obtain the smoothed coordinates of each reference point; and the smoothed reference line is generated according to the smoothed coordinates of each reference point. The scheme of the present application approximately optimizes the curve formed between each reference point and the front and rear reference points in the curve to be smoothed, so that the operation model used in the smoothing process is simpler, fewer parameter variables are involved, and thus a faster calculation speed is achieved, and the optimization effect is obvious, and the smoothing effect on the curvature is very good, meeting the needs of autonomous driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a flow chart of a road reference line smoothing method in one embodiment of the present application;
[0036] Figure 2 A schematic diagram of a curve formed by any three reference points in an embodiment of the present application;
[0037] Figure 3 and Figure 4 Schematic diagrams of the effects of smoothing a reference line using the road reference line smoothing method provided in an embodiment of the present application in two specific examples;
[0038] Figure 5 Schematic diagram of the hardware connection relationship of an electronic device for executing a road reference line smoothing method in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The specific implementation of the present application is further described below with reference to the accompanying drawings.
[0040] It is easy to understand that according to the technical solution of the present application, without changing the essential spirit of the present application, a variety of structural modes and implementation modes that can be replaced by those skilled in the art can be replaced with each other. Therefore, the following specific implementation modes and drawings are only exemplary descriptions of the technical solution of the present application, and should not be regarded as the entirety of the present application or as a limitation or restriction on the technical solution of the application.
[0041] The directional terms such as up, down, left, right, front, back, front, back, top, bottom, etc. mentioned or may be mentioned in this specification are defined relative to the structures shown in the drawings. They are relative concepts and may change accordingly according to different positions and different usage conditions. Therefore, these or other directional terms should not be interpreted as restrictive terms.
[0042] The present application embodiment provides a road reference line smoothing method, which is applied to a processor, and the processor is arranged in a vehicle or a cloud server, such as Figure 1 As shown, the method comprises the following steps:
[0043] S10: sequentially setting numbers for the reference points in the reference line to be smoothed.
[0044] The numbering can be sequential from the starting point to the end point. If there are n reference points, the numbering can be 0-(n-1). The reference points can be determined by high-precision map data, real-time sensor perception or pre-processed environmental information. The reference points are connected to form the reference line to be smoothed, such as a lane line or a planned driving route.
[0045] S20: For each reference point, obtain its symmetrical point relative to the line connecting the front and rear adjacent reference points, and call the vector formed by the reference point and the symmetrical point the first vector; set the vector formed by the reference point and the previous reference point as the second vector, and set the vector formed by the reference point and the subsequent reference point as the third vector.
[0046] Combination Figure 2 As shown, taking reference point P1 as an example, the previous reference point is P0, the subsequent reference point is P1, and the symmetric point is P3, then the first vector is The second vector is The third vector is
[0047] S30: Establishing a smoothing model on the condition that the first vector, the second vector and the third vector corresponding to each reference point are as small as possible.
[0048] Combination Figure 2If we want to smooth the P0P1P2 curve, we need to optimize: minimize P1P3 as much as possible. The limit case is when P1P3 = 0, then P0P1P2 is the smoothest state with three points collinear, which is the best state for a straight line. For a curve, we cannot smooth the curve into a straight line, and we need to constrain the curvature of the curve. At this time, we need to consider the relationship between the second vector and the third vector. In actual calculation, if the second vector and the third vector are as small as possible, we can approximate the parameters in the curve as Figure 2 Status shown.
[0049] S40: Substituting the coordinates corresponding to the reference points into the smoothing model to obtain the smoothed coordinates of the reference points.
[0050] That is, in the smoothing model, based on the requirement that the first vector, the second vector and the third vector are as small as possible, the coordinates of each parameter are optimized, and each reference point after optimization can meet the requirement in step S30.
[0051] S50: generating a smoothed reference line according to the smoothed coordinates of each reference point.
[0052] The smoothed reference line has better smoothness than the reference line to be smoothed in the initial state, and the curvature of each reference point meets the reference line smoothing requirements.
[0053] The above technical solution of the present application approximately optimizes the curve formed between each reference point in the curve to be smoothed and the front and rear reference points, so that the calculation model used in the smoothing process is simpler and involves fewer parameter variables, thereby having a faster calculation speed and obvious optimization effect, and the smoothing effect on the curvature is very good, which meets the needs of autonomous driving.
[0054] In some solutions, in step S30, the step of establishing the smoothing model on the condition that the first vector, the second vector, and the third vector corresponding to each reference point are as small as possible further includes:
[0055] The equality of the second vector and the third vector corresponding to each reference point is used as the first constraint condition of the smoothing model; and / or the slack variable corresponding to each reference point is as small as possible is used as the second constraint condition of the smoothing model. Figure 2As shown, if P0P1P2 is a curve, the smoothing process will minimize P1P3 as much as possible. At this time, the optimal state is that the second vector and the third vector can be symmetrical relative to the middle point. In the actual smoothing process of the smoothing model, the constraints set for smoothing each reference point are sometimes not strictly followed. Therefore, the smoothing model will reserve a certain space for each constraint, that is, the slack variable. The value of the slack variable is not specifically limited and is usually implemented by the solver. In this solution, the IPOPT solver can be selected. The IPOPT solver is a nonlinear solver suitable for solving nonlinear problems with constraints.
[0056] Preferably, the first constraint is expressed by the following equation:
[0057]
[0058] Among them, Δs represents the length of the second vector or the third vector, which is expressed as the average value of the second vector lengths or the average value of the third vector lengths corresponding to all reference points; R represents the radius of the curve formed by the reference point, the previous reference point and the subsequent reference point, and κ represents the curvature of the reference point.
[0059] Combination Figure 2 , the derivation process of the first constraint condition is as follows:
[0060]
[0061] in, represents the inference, and ‖‖ represents the modulus length of the vector. As mentioned above, Δs is represented by the average length of the second vector or the average length of the third vector corresponding to all reference points, which can greatly simplify the amount of calculation and improve the calculation speed. In addition, as shown in the formula, the present application scheme provides a reference line smoothing algorithm with curvature constraint, which is more consistent with the actual situation and has a better smoothing effect.
[0062] In some embodiments, the second constraint is expressed by the following equation:
[0063]
[0064] Among them, w s represents the slack variable weight, since s i As small as possible, so w s It can be set higher, and once set, it can be used as a fixed value and will not change. i represents the slack variable corresponding to the i-th reference point, n represents the total number of reference points, and the reference point is numbered i. When calculating the above slack variables, the reference points at the starting position and the end position do not need to be calculated. In this scheme, the introduction of slack variables will accelerate convergence and further improve the smoothing efficiency.
[0065] Preferably, in combination with the first constraint condition and the second constraint condition, in step S30 in the solution of the present application, the smoothing model is established on the condition that the first vector, the second vector and the third vector corresponding to each reference point are as small as possible, and the smoothing model is expressed as follows:
[0066]
[0067] Among them, w x 、w y and w z is the weight parameter, (x, y) represents the coordinates of the reference point after smoothing, the subscript i represents the reference point numbered i, the subscript i-1 represents the reference point numbered i-1, the subscript i+1 represents the reference point numbered i+1, and ref represents that the reference point is located on the reference line to be smoothed.
[0068] in: It represents the square value of the length of the first vector of each reference point. It represents the square value of the length of the second vector / third vector of each reference point. It represents the square value of the distance between a reference point and the smoothed one, that is, when smoothing, it should not deviate too far from the original reference point in theory. In this scheme, by introducing curvature constraints and combining the shape approximation of the curve segment to simplify the calculation, fast and accurate reference line smoothing is achieved.
[0069] Further preferably, the weight value w in the smoothing model x and w y To dynamically adjust the weight value; wherein: when the curvature of the reference point is less than the set curvature threshold, increase the weight value w x When the curvature of the reference point is greater than the set curvature threshold, increase the weight value w y In specific implementation, the curvature threshold can be determined based on empirical values, such as 0.05. In this solution, a dynamic weight value is used to adjust the smoothing model, that is, for reference points with smaller curvature, the weight of the first vector is increased to make it smoother; for reference points with larger curvature, the weight of the second vector or the third vector is increased to make the distance between adjacent points closer, so that the approximate calculation of the curvature constraint is more accurate.
[0070] Further preferably, in the above scheme, the smoothing algorithm of steps S30-S50 can be called iteratively multiple times to make the smoothed reference line smoother and the curvature of each reference point more reasonable. Specifically, after the above step S50, the following steps are also included:
[0071] S60: Obtain the curvature of each reference point on the smoothed reference line.
[0072] S70: If the curvature of any reference point is not within the set curvature range, the smoothed reference line is used as the reference line to be smoothed and the step of substituting the coordinate parameters corresponding to each reference point into the smoothing model to obtain the smoothed coordinate parameters of each reference point is returned.
[0073] If the reference line is smoothed after the first smoothing process, it can be directly determined whether the curvature on each reference line meets the requirements of autonomous driving. If the reference line is smoothed after the second or more smoothing processes, the difference between the curvature of the corresponding reference point after the two smoothing processes can be obtained to determine whether it is within the set difference range. If the difference is within the set range, it can be considered that the curvature is within the set curvature range.
[0074] S80: Repeat the above steps until the curvature of each reference point on the smoothed reference line is within the set curvature range or the number of repetitions reaches an upper limit.
[0075] refer to Figure 4 and Figure 5 The figure is a schematic diagram showing the effect of smoothing the reference line using the above embodiment of the present application. Figure 4 is a smooth comparison of coordinate positions, Figure 5 This is a smoothing comparison of the curvature. It can be seen from the figure that the smoothed reference line has better smoothness and the curvature change is more reasonable.
[0076] Some schemes of the present application provide a computer program product, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the steps of the road reference line smoothing method described in any scheme of the above method embodiments are implemented.
[0077] Some solutions of the present application provide a computer-readable storage medium, in which program information is stored. After a computer reads the program information, the computer executes the steps of the road reference line smoothing method described in any one of the solutions in the above method embodiments.
[0078] Some embodiments of the present application provide an electronic device, such as Figure 5As shown, the electronic device includes at least one processor 51 and at least one memory 52, at least one of the memories 52 stores program information, and at least one of the processors 51 reads the program information and executes the road reference line smoothing method described in any of the above method embodiments. The device may also include: an input device 53 and an output device 54. The processor 51, the memory 52, the input device 53 and the output device 54 can be connected in communication. The memory 52, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The processor 51 executes various functional applications and data processing by running the non-volatile software programs, instructions and modules stored in the memory 52, that is, the road reference line smoothing method provided by any of the above schemes is implemented. The memory 52 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the road reference line smoothing method, etc. In addition, the memory 52 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 52 may optionally include a memory remotely arranged relative to the processor 51, and these remote memories may be connected to the device for executing the road reference line smoothing method through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof. The input device 53 may receive input user clicks, and generate signal inputs related to user settings and function controls of the road reference line smoothing method. The output device 54 may include a display device such as a display screen. When the one or more modules are stored in the memory 52, when they are executed by the one or more processors 51, the road reference line smoothing method in any of the above-mentioned method embodiments is executed.
[0079] As needed, the above technical solutions can be combined to achieve the best technical effect.
[0080] The above are only the principles and preferred embodiments of the present application. It should be noted that, for ordinary technicians in this field, on the basis of the principles of the present application, several other modifications can be made, which should also be considered as the protection scope of the present application.
Claims
1. A road reference line smoothing method, characterized in that: include: Set numbers for each reference point in the reference line to be smoothed in sequence; For each reference point, obtain its symmetric point relative to the line connecting the preceding and following adjacent reference points, and refer to the vector formed by the reference point and the symmetric point as the first vector; refer to the vector formed by the reference point and the previous reference point as the second vector, and refer to the vector formed by the reference point and the next reference point as the third vector; Establishing a smoothing model on the condition that the first vector, the second vector and the third vector corresponding to each reference point are as small as possible; Substituting the coordinates corresponding to the reference points into the smoothing model to obtain the smoothed coordinates of the reference points; A smoothed reference line is generated according to the smoothed coordinates of each reference point.
2. The road reference line smoothing method according to claim 1, characterized in that: The step of establishing the smoothing model with the first vector, the second vector and the third vector corresponding to each reference point being as small as possible further includes: The equality of the second vector and the third vector corresponding to each reference point is used as a first constraint condition of the smoothing model; and / or, The second constraint condition of the smoothing model is that the slack variable corresponding to each reference point is as small as possible.
3. The road reference line smoothing method according to claim 2, characterized in that: The first constraint is expressed by the following equation: Among them, Δs represents the length of the second vector or the third vector, which is expressed as the average value of the second vector lengths or the average value of the third vector lengths corresponding to all reference points; R represents the radius of the curve formed by the reference point, the previous reference point and the subsequent reference point, and κ represents the curvature of the reference point.
4. The road reference line smoothing method according to claim 3, characterized in that: The second constraint is expressed by the following equation: Among them, w s represents the slack variable weight, s i represents the slack variable corresponding to the i-th reference point, n represents the total number of reference points, and the reference point is numbered i.
5. The road reference line smoothing method according to claim 4, characterized in that: In the condition of establishing the smoothing model with the first vector, the second vector and the third vector corresponding to each reference point being as small as possible, the smoothing model is expressed as: Among them, W x , W y and W z is the weight parameter, (x, y) represents the coordinates of the reference point after smoothing, the subscript i represents the reference point numbered i, the subscript i-1 represents the reference point numbered i-1, the subscript i+1 represents the reference point numbered i+1, and ref represents that the reference point is located on the reference line to be smoothed.
6. The road reference line smoothing method according to claim 5, characterized in that: The weight value w in the smoothing model x and w y To dynamically adjust the weight value; where: When the curvature of the reference point is less than the set curvature threshold, increase the weight value w x When the curvature of the reference point is greater than the set curvature threshold, increase the weight value w y .
7. The road reference line smoothing method according to any one of claims 1 to 6, characterized in that: The following steps are also included: Obtaining the curvature of each reference point on the smoothed reference line; If the curvature of any reference point is not within the set curvature range, the smoothed reference line is used as the reference line to be smoothed and the step of substituting the coordinate parameters corresponding to each reference point into the smoothing model to obtain the smoothed coordinate parameters of each reference point is returned; Repeat the above steps until the curvature of each reference point on the smoothed reference line is within the set curvature range or the number of repetitions reaches an upper limit.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the road reference line smoothing method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium, characterized in that: The storage medium stores program information, and the computer reads the program information and executes the road reference line smoothing method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The electronic device includes at least one processor and at least one memory, at least one of the memories stores program information, and at least one of the processors reads the program information and executes the road reference line smoothing method according to any one of claims 1 to 7.
