Vehicle positioning method, device, equipment, storage medium and product
By determining the lateral distance between the vehicle and the local map and detected lane lines, determining the polarity of the lane lines, and performing polarity-corresponding matching, the problems of trajectory jumping and unreliable positioning in traditional lane matching and positioning technology are solved, and accurate lane-level positioning is achieved when the number of detected lanes is inconsistent with the map.
Patent Information
- Application Number
- CN202411878120.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Traditional lane matching positioning technology is susceptible to inaccurate lane detection results, resulting in trajectory jumps and unreliable positioning results. Especially in highway scenarios, existing methods have difficulty maintaining accurate lane-level positioning when the number of detected lanes is inconsistent with the number of lanes in the map.
By determining the lateral distance between the vehicle and the local map and detected lane lines, determining the polarity of the lane lines, and performing polarity matching, and using the local map for correction, we avoid the positioning instability caused by the inconsistent number of lanes in traditional methods. By using the polarity matching method of the local map and detected lane lines, we correct each lane line one by one to improve the matching accuracy.
This ensures that the accuracy and stability of vehicle positioning can be maintained even when the number of detected lanes is inconsistent with the number of lanes in the map, reducing trajectory jitter and improving the reliability of lane-level positioning.
Smart Images

Figure CN119665995B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle positioning technology, and in particular to a vehicle positioning method, device, equipment, storage medium and product. Background Art
[0002] Accurate positioning is crucial for vehicle navigation and autonomous driving, and is especially crucial for the safe and efficient operation of autonomous vehicles (AVs). In highway scenarios, where high speeds and quick decision-making are crucial, accurate lane-level positioning becomes even more critical.
[0003] Currently, the most common lane-level positioning solution is the lane matching positioning solution, which can enhance vehicle positioning in lane scenarios by integrating high-definition maps (HD maps) and lane detection.
[0004] However, traditional lane matching localization techniques usually rely on simple point-to-point or line-to-line matching methods, which are susceptible to inaccurate lane detection results, such as the difference in the number of detected lanes, resulting in trajectory jumps and unreliable localization results. Summary of the Invention
[0005] The present invention provides a vehicle positioning method, device, equipment, storage medium and product, which can solve the problem of poor reliability of positioning results in lane matching positioning solutions.
[0006] According to one aspect of the present invention, a vehicle positioning method is provided, comprising:
[0007] Determine a local map corresponding to the original posture of the vehicle, wherein the local map is determined based on the high-precision map;
[0008] Determining, based on the original pose, a first lateral distance between the vehicle and each lane line in the local map, and a second lateral distance between the vehicle and each lane line detected in the lane detection result;
[0009] Determining a lane line polarity of each of the mapped lane lines based on the first lateral distance, and determining a lane line polarity of each of the detected lane lines based on the second lateral distance, wherein the lane line polarity is used to characterize a lateral direction of the lane line of the vehicle and an order of the lane lines in the lateral direction;
[0010] Matching the map lane line and the detection lane line corresponding to the lane line polarity to obtain target correction information;
[0011] The original posture is corrected based on the target correction information to obtain a target posture of the vehicle.
[0012] According to another aspect of the present invention, there is provided a vehicle positioning device, comprising:
[0013] A local map determination module, configured to determine a local map corresponding to the original position of the vehicle, wherein the local map is determined based on a high-precision map;
[0014] a lateral distance determination module, configured to determine, based on the original position, a first lateral distance between the vehicle and each lane line in the local map, and a second lateral distance between the vehicle and each detected lane line in the lane detection result;
[0015] a lane line polarity determination module, configured to determine a lane line polarity of each of the mapped lane lines based on the first lateral distance, and to determine a lane line polarity of each of the detected lane lines based on the second lateral distance, wherein the lane line polarity is used to characterize a lateral direction of the lane line to the vehicle and an order of the lane lines in the lateral direction;
[0016] A lane matching module is used to match the map lane and the detected lane corresponding to the lane polarity to obtain target correction information;
[0017] The posture correction module is used to correct the original posture based on the target correction information to obtain the target posture of the vehicle.
[0018] According to another aspect of the present invention, an electronic device is provided, comprising:
[0019] at least one processor; and
[0020] a memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the vehicle positioning method according to any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the vehicle positioning method according to any embodiment of the present invention when executed.
[0023] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the vehicle positioning method according to any embodiment of the present invention is implemented.
[0024] The technical solution of the embodiment of the present invention is to first determine the corresponding lane line polarity based on the distance to the vehicle for the map lane lines and the detected lane lines to be matched, and then match the map lane lines and the detected lane lines corresponding to the lane line polarity. After correcting the original posture based on the correction information obtained from the matching, a more accurate and reliable vehicle posture can be obtained, which can avoid trajectory jumping and unreliable positioning caused by the difference between the number of detected lanes and the number of lanes in the map, thereby improving the reliability of the positioning results.
[0025] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 is a flow chart of a vehicle positioning method provided according to an embodiment of the present invention;
[0028] Figure 2 This is a schematic diagram of lane line sorting provided according to an embodiment of the present invention;
[0029] Figure 3 is a lane line polarization schematic diagram provided according to an embodiment of the present invention;
[0030] Figure 4 1 is a schematic diagram of a lane matching process provided according to an embodiment of the present invention;
[0031] Figure 5 is a flow chart of another vehicle positioning method provided according to an embodiment of the present invention;
[0032] Figure 6 is a schematic diagram of a vehicle lateral displacement error provided according to an embodiment of the present invention;
[0033] Figure 7 1 is a schematic diagram of lane width error and jitter provided according to an embodiment of the present invention;
[0034] Figure 8 is a schematic diagram of a loss function provided according to an embodiment of the present invention;
[0035] Figure 9is a flow chart of another vehicle positioning method provided according to an embodiment of the present invention;
[0036] Figure 10 This is a schematic diagram of a vehicle positioning solution architecture provided according to an embodiment of the present invention;
[0037] Figure 11 This is a schematic diagram of a local map generation process provided by an embodiment of the present invention;
[0038] Figure 12 is a structural diagram of a vehicle positioning device provided according to an embodiment of the present invention;
[0039] Figure 13 The figure is a schematic diagram of the structure of an electronic device for implementing the vehicle positioning method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0041] It should be noted that the terms "first", "second", "original" and "target" in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0042] To facilitate understanding of the embodiments of the present invention, the following describes related technologies. For low-cost autonomous vehicles using basic sensors such as cameras and Global Navigation Satellite Systems (GNSS), achieving accurate lane-level positioning is quite challenging, especially on highways. These vehicles typically lack advanced hardware, such as high-resolution lidar or high-precision GNSS systems, which are typically used to generate detailed point cloud maps and perform complex positioning. Therefore, many low-cost systems rely on camera-based solutions to detect and match lane lines to keep the vehicle correctly positioned within the highway lane.
[0043] Lane matching on highways involves taking lane lines detected by cameras or sensors and matching them with high-precision map lines to place the vehicle in the correct lane, ensuring safe navigation at highway speeds and maintaining proper lane discipline during lane changes.
[0044] There are three lane-level localization solutions in the related art, including particle filter technology, iterative closest point (ICP) algorithm, and traditional lane matching technology. Particle filter technology performs localization by generating multiple possible vehicle positions and scoring detected lane lines against HD map features. However, this method requires highly detailed maps, including features such as dashed lines and curbs, which are expensive to create and maintain. In addition, inaccuracies in lane detection, such as missing or distorted lines, can lead to positioning errors. ICP algorithms can align the point cloud of detected lane lines with the map, but encounter difficulties when dealing with inconsistencies, such as a mismatch in the number of detected lanes or differences in lane widths, which can lead to inaccurate positioning. Traditional lane matching technology directly aligns detected lane lines with map data using point-to-point or line-to-line matching. While simple, it is prone to errors. When the number of detected lanes differs from the number of lanes in the map, or when environmental factors (such as lane lines under construction or obscured lanes) interfere with accurate detection, it can lead to unstable positioning results.
[0045] Figure 1This is a flowchart of a vehicle positioning method provided according to an embodiment of the present invention. This embodiment is applicable to the case of lane-level positioning of a vehicle (especially an autonomous driving vehicle) when it is traveling on a road (especially a highway). The method can be executed by a vehicle positioning device, which can be implemented in the form of hardware and / or software, and the vehicle positioning device can be configured in an electronic device. The electronic device can be a vehicle, specifically a vehicle with autonomous driving capabilities, or a device capable of communicating with a vehicle. The vehicle in the embodiment of the present disclosure can be a low-cost autonomous driving system equipped with image acquisition equipment including cameras and economical GNSS equipment, and may not require the configuration of high-resolution lidar or high-precision GNSS equipment. Figure 1 As shown, the method includes:
[0046] Step 101: Determine a local map corresponding to the original posture of the vehicle, wherein the local map is determined based on a high-precision map.
[0047] For example, the vehicle's raw pose can be determined based on GNSS data or fused output data. The fused output data can be generated based on detection data from multiple sensors, for example, without limitation. Based on the raw pose, the vehicle's position in the HD map can be determined, and then a local map can be determined based on map data within a certain range of that position. For example, a HD map can be a segmented map, meaning that the HD map includes multiple map segments. For example, for a highway, each map segment represents a specific section of the highway. Each lane in each map segment includes detailed information about its right and left boundaries and a reference line (such as the centerline). For example, the raw pose can be used to determine the map segment the vehicle is in, and then a local map can be determined. Using the entire HD map as the target for lane matching would be computationally intensive due to the large size of the point cloud. Using a local map allows focusing only on map areas relevant to the vehicle's current location, such as the portion of the map closest to the vehicle, rather than the entire HD map. This can speed up the matching process without compromising accuracy and reduce computing resource consumption.
[0048] Step 102: Determine, based on the original position, a first lateral distance between the vehicle and each lane line in the local map, and a second lateral distance between the vehicle and each detected lane line in the lane detection result.
[0049] In an embodiment of the present invention, the lane lines contained in the local map are recorded as map lane lines, and the lane lines contained in the lane detection results are recorded as detected lane lines. The lane detection results can be obtained by detection by sensors such as cameras. Most lane line detection data from vehicle sensors can be represented in two ways: sampling points or curve parameters. Sampling points are points along the detected lane lines that can be used directly, while curve parameters (such as coefficients C0, C1, C2, and C3) describe the curvature of the lane in a continuous format. The curvature equation used is as follows:
[0050] y(x)=C0+C1x+C2x 2 +C3x 3
[0051] After obtaining the curve parameters, points along the curve can be generated. Both representations can be converted to point clouds, as matching algorithms can achieve higher efficiency when running on point cloud data. In embodiments of the present invention, lane detection results can include detected lane lines in point cloud format.
[0052] For example, each lane line in the local map can be converted to the vehicle's reference system to more accurately determine the lateral distance between the vehicle and the lane line. For example, in the vehicle's reference system, the longitudinal direction is upward as the longitudinal positive direction, and the lateral direction is left as the lateral positive direction. The difference between the lateral coordinate value of the map lane line and the lateral coordinate value in the original position is calculated, and the first lateral distance is determined based on the difference; the difference between the lateral coordinate value of the detected lane line and the lateral coordinate value in the original position is calculated, and the second lateral distance is determined based on the difference.
[0053] Step 103: Determine the lane line polarity of each of the map lane lines based on the first lateral distance, and determine the lane line polarity of each of the detected lane lines based on the second lateral distance, wherein the lane line polarity is used to characterize the lateral direction of the lane line of the vehicle and the order of the lane lines in the lateral direction.
[0054] In related technologies, when attempting to match all lane lines, if the number of detected lanes differs from the number of lanes in the map, it is difficult to accurately determine the lane lines that need to be matched, resulting in trajectory jumps and unreliable positioning.
[0055] In an embodiment of the present invention, the polarity of the map lane lines and the detection lane lines is first determined separately, so that the map lane lines and the detection lane lines that need to be matched can be accurately determined subsequently. The lateral direction includes the left and right sides. For example, the left side has a positive polarity and the right side has a negative polarity. This can be determined based on the positive or negative lateral distance (the first lateral distance or the second lateral distance). The lane line order can specifically be the ordering position in the lane line sequence obtained by sorting the corresponding lateral direction lane lines according to the size of the lateral distance.
[0056] In some embodiments, determining the lane line polarity of each lane line based on the lateral distance includes: grouping each lane line based on the sign of the lateral distance to obtain a first lane line group and a second lane line group, wherein the lateral distance is the first lateral distance or the second lateral distance, and the lane line is the map lane line or the detection lane line; sorting the lane lines in the first lane line group from closest to farthest from the vehicle based on the lateral distance to obtain a first lane line sequence; sorting the lane lines in the second lane line group from closest to farthest from the vehicle based on the lateral distance to obtain a second lane line sequence; for each lane line, determining the lane line's location on the lateral direction of the vehicle based on the sign of the lateral distance, determining the lane line's order in the lateral direction based on the lane line's order in the corresponding lane line sequence, and determining the lane line polarity of the lane line based on the lateral direction and the lane line order. In this way, the lane line polarity can be accurately determined, thereby improving the accuracy of subsequent lane line matching.
[0057] Optionally, taking the map lane line as an example, the lane line polarity of each map lane line is determined according to the first lateral distance, including: grouping the map lane lines according to the positive or negative sign of the first lateral distance to obtain a first map lane line group and a second map lane line group; sorting the map lane lines in the first map lane line group from near to far from the vehicle according to the size of the first lateral distance to obtain a first map lane line sequence; sorting the map lane lines in the second map lane line group from near to far from the vehicle according to the size of the first lateral distance to obtain a second map lane line sequence; for each map lane line, determining the map lane line's location in the lateral direction of the vehicle according to the positive or negative sign of the first lateral distance, determining the lane line order of the map lane line in the lateral direction according to the sorting position of the map lane line in the corresponding map lane line sequence, and determining the lane line polarity of the map lane line according to the lateral direction and the lane line order.
[0058] Optionally, taking the detection lane line as an example, the lane line polarity of each detection lane line is determined according to the first lateral distance, including: grouping the detection lane lines according to the positive or negative sign of the first lateral distance to obtain a first detection lane line group and a second detection lane line group; sorting the detection lane lines in the first detection lane line group from near to far from the vehicle according to the size of the first lateral distance to obtain a first detection lane line sequence; sorting the detection lane lines in the second detection lane line group from near to far from the vehicle according to the size of the first lateral distance to obtain a second detection lane line sequence; for each detection lane line, determining whether the detection lane line is located in the lateral direction of the vehicle according to the positive or negative sign of the first lateral distance, determining the lane line order of the detection lane line in the lateral direction according to the sorting position of the detection lane line in the corresponding detection lane line sequence, and determining the lane line polarity of the detection lane line according to the lateral direction and the lane line order.
[0059] Figure 2 is a lane line sorting schematic diagram provided according to an embodiment of the present invention, such as Figure 2 As shown, taking map lane lines as an example, for each lane line, the first point in front of the vehicle (positive X coordinate) can be found. Then, the lateral distances (Y coordinates) of the found points are compared to determine the order. Lane lines on the right (negative Y coordinates) are sorted in descending order, meaning that the lane line closest to the vehicle has the highest priority. For lane lines on the left (positive Y coordinates), the lines are sorted in ascending order, with priority given to the lane line closest to the vehicle. Assume that there are four map lane lines named A, B, -C, and -D. Each map lane line is grouped according to the positive or negative first lateral distance, resulting in a first map lane line group (-C and -D) and a second map lane line group (A and B). For the first map lane line group, -C is closer to the vehicle than -D, so the first map lane line sequence is -C, -D; for the second map lane line group, B is closer to the vehicle than A, so the second map lane line sequence is B, A.
[0060] In some special cases (such as lane changes), the polarity of the detected lane lines may not match the polarity of the map lane lines. The polarity can be flipped and the left and right lanes can be swapped to maintain accuracy.
[0061] After sorting, polarization processing is performed to obtain the lane line polarity. Figure 3 is a lane line polarization schematic diagram provided according to an embodiment of the present invention, such as Figure 3As shown, the lateral order of map lane lines is determined based on their position in the corresponding map lane sequence. For example, to assign polarity, negative lateral distances (on the right) are processed first: the closest lane is assigned a polarity of -1, the next one -2, and so on. The same process is applied to the left side, using positive lateral distances. This consistent scoring ensures that detected lane lines and map lane lines are correctly aligned during lane matching. If there are more lane lines in the local map or lane detection results, only lanes with corresponding polarity are matched, ensuring accuracy even with different lane line counts. Lane lines with positive polarity are assigned a positive polarity, while lane lines with negative polarity are assigned a positive polarity. For example, after -C polarization, the lane line polarity (map line polarity) is -1; after -D polarization, the lane line polarity is -2; after B polarization, the lane line polarity is 1; and after A polarization, the lane line polarity is 2. Accordingly, the detected lane lines are also polarized, resulting in the lane line polarity (detected line polarity) of the detected lane lines.
[0062] Step 104: Match the map lane line and the detected lane line corresponding to the lane line polarity to obtain target correction information.
[0063] For example, the lane line polarities corresponding to each other may be the same. Figure 3 As shown, the lane line polarity of the leftmost map lane line and the detection lane line is 2. Therefore, the map lane line and the detection lane line with the lane line polarity of 2 are matched. Similarly, the map lane line and the detection lane line with the lane line polarity of 1 are matched. The map lane line and the detection lane line with the lane line polarity of -1 are matched. The map lane line and the detection lane line with the lane line polarity of -2 are matched.
[0064] The specific matching process is not limited. For example, the matching can be performed based on the ICP algorithm or its variants (such as generalized IPC). The matching process can be completed in the vehicle's reference frame rather than in the global (world) coordinate system. This helps to avoid numerical precision problems that may arise when processing large numbers in global coordinates, ensuring the accuracy and stability of the transformation. The specific matching order is also not limited. It can be parallel matching or iterative matching, for example, from left to right, or from right to left, or from far to near according to the distance from the vehicle, etc., and the target correction information is determined based on the results of each matching. The correction information can be a transformation matrix.
[0065] Step 105: Correct the original posture based on the target correction information to obtain the target posture of the vehicle.
[0066] For example, correction based on target correction information is performed on the original posture, such as multiplying by the target transformation matrix, to obtain a posture correction result, that is, the target posture of the vehicle. The target posture represents the updated position and direction of the vehicle after the detected lane line is aligned with the local map. Subsequently, vehicle navigation and automatic driving control can be performed based on the target posture.
[0067] The vehicle positioning method of an embodiment of the present invention first determines the corresponding lane line polarity based on the distance to the vehicle for the map lane lines and the detection lane lines to be matched, and then matches the map lane lines and the detection lane lines corresponding to the lane line polarity. After correcting the original posture based on the correction information obtained from the matching, a more accurate and reliable vehicle posture can be obtained, which can avoid trajectory jumps and unreliable positioning caused by the difference between the number of detected lanes and the number of lanes in the map, thereby improving the reliability of the positioning results.
[0068] In some embodiments, matching the map lane lines corresponding to the lane line polarity with the detected lane lines to obtain target correction information includes matching the map lane lines corresponding to the lane line polarity with the detected lane lines within a preset distance range to obtain target correction information. This can improve matching efficiency.
[0069] For example, the left boundary of the preset distance range can be a first distance threshold for the left side of the vehicle, and the right boundary of the preset distance range can be a second distance threshold for the right side of the vehicle. The first and second distance thresholds can be equal or different, and the specific values can be set according to actual needs, such as the width of two to three lanes, for example, 6 meters. Lane markings outside the preset distance range can be omitted from matching, thereby improving matching efficiency.
[0070] Optionally, for the lane line polarity corresponding to the lane line within a preset distance range, the map lane line and the detection lane line are iteratively matched in order from far to near to obtain target correction information. Thus, starting from the farthest lane line to gradually move to the nearest one, it is different from traditional methods such as normal distribution transform (NDT), which try Figure 1 Instead of matching all detected lane lines at once, the present invention matches lane by lane sequentially, avoiding problems that may occur in distribution-based methods, such as during lane divergence or merging, or when the number of detected lanes does not match the number in the map, and can improve the accuracy of the correction information.
[0071] In some embodiments, the map lane lines and the detection lane lines corresponding to the lane line polarity within the preset distance range are iteratively matched in order from far to near from the vehicle to obtain target correction information, including: for the map lane lines and the detection lane lines corresponding to the lane line polarity within the preset distance range, in order from far to near from the vehicle, determining the current lane line pair to be matched, wherein the current lane line pair includes a map lane line and a detection lane line; if the current lane line pair is not the first lane line pair, using the reference correction information of the current lane line pair to match the detection lane line in the current lane line pair The lane line is transformed, and the transformed detected lane line is determined as the target detected lane line, wherein the reference correction information is the correction information obtained from the last matching; if the current lane line pair is the first lane line pair, the detected lane line in the current lane line pair is determined as the target detected lane line; the target detected lane line in the current lane line pair is matched with the map lane line to obtain the correction information obtained from this matching; if the current lane line pair is not the last lane line pair, the current lane line pair to be matched is re-determined; if the current lane line pair is the last lane line pair, the correction information obtained from this matching is determined as the target correction information.
[0072] Exemplarily, every two map lane lines and detection lane lines with the same polarity within a preset distance range become a lane line pair, and the lane line pair closest to the vehicle is preferentially determined as the current lane line pair. For the first lane line pair, the reference correction information can be empty and matching can be performed directly. For the second lane line pair to the last lane line pair, the detection lane lines are first transformed according to the matching results of the previous lane line pair, and then matched. If there are no other unmatched lane line pairs after the current lane line pair is matched, the correction information obtained after the current lane line pair is matched is determined as the target correction information finally used to correct the original posture of the vehicle. If there are still unmatched lane line pairs, a new current lane line pair is selected from the unmatched lane line pairs in order from far to near from the vehicle, and subsequent iterative matching is performed.
[0073] Therefore, distance sorting is used because lane detections close to the vehicle are generally more reliable than those farther away. Detections farther away may be noisier and more noisy. However, starting from the farthest lane line allows each subsequent match to use the previous result as an initial guess. Since the initial guess is good, the next match will be faster and more accurate, effectively reducing the amount of computation. Polarity constraints ensure that detected lane lines with a certain polarity are only matched with lane lines of corresponding polarity in the local map, improving robustness. Even if the number of detected lane lines is different from that in the map, each lane can be correctly aligned, avoiding the situation where the traditional vehicle positioning results jump back and forth between consecutive lanes, because the traditional algorithm does not know which specific lines to match with the lines in the map. The technical solution of the present invention avoids the situation where the vehicle jumps back and forth between consecutive lanes due to the algorithm not knowing which specific lines to match with the lines in the map. Using this cascade method, the number of iterations required for each stage is significantly reduced, because each new match is based on the previous match until the lane line closest to the vehicle is matched, and the transformation of the last match is used as the final correction of the vehicle posture. Because lane detection close to the vehicle is generally more reliable, it can ensure that the vehicle positioning is as accurate as possible, taking into account lane detection both far and near, while being consistent with the lane structure of the map, effectively improving the accuracy of the correction information.
[0074] Figure 4 FIG. 1 is a schematic diagram of a lane matching process according to an embodiment of the present invention. Figure 4 As shown, based on the detected lane N, the map lane N, and the initial guess, a matching algorithm is used to obtain changes, or correction information. Specifically, lane line pairs to be matched are determined within a preset distance range (the range circled in dark blue in the figure). Since the rightmost lane line is too far from the vehicle, it is outside the preset distance range and is therefore ignored and not matched. For polarity 2, only the detected lane line exists, not the mapped lane line, and no matching is performed. For the lane line pairs to be matched (lane line polarity is -1, 1 and -2), matching starts from the farthest lane line pair (polarity -2), that is, stage 1, and the corresponding transformation (which can be a transformation matrix) is obtained, which is recorded as transformation 1 in the figure, that is, correction information. This transformation is used for matching in stage 2, that is, for the matching of lane line pairs with lane line polarity of 1, the lane line detection lane line with polarity of 1 is transformed using transformation 1. After the transformation, the detection lane line with polarity of 1 is matched with the map lane line with polarity 1 to obtain transformation 2. Transformation 2 is continued for matching in stage 3 (that is, the nearest lane) to obtain the final transformation, that is, target correction information. The result of the last stage is used to correct the original position of the vehicle.
[0075] In some embodiments, after the original posture is corrected based on the target correction information to obtain the target posture of the vehicle, the method further includes: calculating covariance based on the target posture, wherein the covariance is used to measure the confidence of the posture correction. Covariance can be used to evaluate the reliability of the target posture, that is, a measure of the confidence of the posture correction, and can be used by relevant modules of the vehicle (such as a fusion module or a navigation module, etc.). Combining covariance with the target posture provides a more accurate and robust lane matching result, more accurately controls the autonomous driving vehicle, and ensures the safety of autonomous driving.
[0076] Optionally, the covariance includes a fit metric and a loss based on a target error, where the target error includes at least one of lateral displacement error, lane width error, and single-line jitter error. Thus, the covariance is calculated by combining multiple factors that assess the accuracy and reliability of the matching process, thereby improving the accuracy of the covariance.
[0077] Alternatively, the loss based on the target error may be a Huber loss based on the target error. The covariance may include a fit metric, a Huber loss based on a lateral displacement error, and a Huber loss based on a lane width error or a single line jitter error.
[0078] Figure 5 FIG. 1 is a flow chart of another vehicle positioning method according to an embodiment of the present invention. This embodiment is optimized based on the above optional embodiments. Figure 5 As shown, the method includes:
[0079] Step 501: Determine a local map corresponding to the original posture of the vehicle, wherein the local map is determined based on a high-precision map.
[0080] Step 502: Determine, based on the original posture, a first lateral distance between the vehicle and each lane line in the local map, and a second lateral distance between the vehicle and each detected lane line in the lane detection result.
[0081] Step 503: Determine the lane line polarity of each map lane line based on the first lateral distance, and determine the lane line polarity of each detection lane line based on the second lateral distance.
[0082] Step 504 : For the map lane lines and the detection lane lines corresponding to the lane line polarities within the preset distance range, iterative matching is performed in order from far to near distance from the vehicle to obtain target correction information.
[0083] Step 505: Calculate the covariance based on the target pose, where the covariance is used to measure the confidence of the pose correction. The covariance includes a fitting metric and a loss based on the target error. The target error includes at least one of a lateral displacement error, a lane width error, and a single-line jitter error.
[0084] Fit metrics can be used to determine how closely lane markings detected by the vehicle's sensors match lane markings in the map. Specifically, the fit metric can be used to determine how closely the detected lane markings match the map lane markings. Specifically, the distance between corresponding points can be calculated to measure the alignment between the detected lane markings and the map data.
[0085] To calculate the fit metric, points in the local map (points in the local map point cloud) are compared to points in the detected lane lines (detected lane lines) (detection points), and the distance between each map point and its matching detection point is calculated. The smaller these distances, the better the alignment of the detected lane lines with the map. This loss differs from the loss based on lane width error in that the fit metric can be used to characterize how well the overall lane detection results match the HD map.
[0086] For example, the fit metric can be determined based on the average squared distance between the local map points and the matching points of the detected lane lines. This is done by taking the distances between all matching points, squaring them (which eliminates negative values and emphasizes large differences), and then calculating the average of these squared distances. The fit metric can be determined using the following expression:
[0087]
[0088] Where N represents the number of matching points, represents a point in the local map point cloud, Represents the corresponding points in the detected lane lines.
[0089] A lower fit metric indicates a more accurate match between the map and the detected lane markings, meaning that the vehicle's pose is well aligned with the map. Conversely, a higher fit metric indicates significant misalignment, potentially indicating errors in the detection or matching process, reducing confidence in the corrected pose.
[0090] The lateral displacement error can be specifically the average lateral displacement error. The lateral displacement difference characterizes the change in the vehicle's lateral position over time, with the goal of determining whether the corrected vehicle position is consistently stable. This consistency is crucial for assessing the reliability of the corrected matching pose, as frequent lateral displacement or instability may indicate inaccurate positioning.
[0091] For example, a queue of the most recent M lateral displacements can be maintained to track the corrected lateral position of the vehicle. For each new lateral displacement, the difference (which can be an absolute value) between the current lateral position and the previously recorded position can be calculated, and the average lateral displacement difference can be calculated to indicate the degree of lateral movement of the vehicle. The lateral displacement error can be determined by the following expression:
[0092]
[0093] Figure 6 is a schematic diagram of a vehicle lateral displacement error provided by an embodiment of the present invention, such as Figure 6 As shown in the figure, the dotted line behind the vehicle represents the vehicle trajectory, the red dot represents the posture after lane matching correction, that is, the target posture, and T represents the time point. For example, the difference between the lateral coordinate of the target posture of the vehicle at T = -3 and the lateral coordinate of the target posture of the vehicle at T = -4 is calculated (recorded as the first difference, D3+D4). Similarly, the second difference (D2+D3) between the lateral coordinate at T = -2 and the lateral coordinate at T = -3 is calculated, the third difference (D1-D2) between the lateral coordinate at T = -1 and the lateral coordinate at T = -2 is calculated, and the fourth difference (D1) between the lateral coordinate at T = 0 and the lateral coordinate at T = -1 is calculated. Finally, the average of the first difference, the second difference, the third difference and the fourth difference is calculated.
[0094] If the lateral displacement is relatively consistent, for example, approximately 1 meter across multiple consecutive readings, the difference in lateral displacement will be low, indicating stability in the vehicle's position. Therefore, holding other losses constant in the covariance, the covariance will also be low, reflecting higher confidence in the vehicle's position. However, if the vehicle's position changes significantly, with more lateral movement, the average lateral displacement error will be higher. This higher value indicates that the vehicle is not maintaining a stable position and may indicate issues with the accuracy of the positioning system. Therefore, holding other losses constant in the covariance, an increase in the covariance value indicates lower confidence in the current pose estimate.
[0095] Lane width error characterizes the difference between the lane width specified in the local map and the lane width calculated based on the detected lane lines. This error is crucial for determining how accurately the lane lines detected by the vehicle match the actual lane structure in the map, with particular attention paid to the left and right boundaries of the vehicle's lane (referred to as polarity 1 and -1). To calculate lane width error, the distances of the detected left and right lane lines relative to the vehicle are first obtained using stored data. These distances represent how close each lane line is to the vehicle's current position. Similarly, the distances to the corresponding left and right lane boundaries are obtained from the local map data.
[0096] The detected lane width can be calculated by adding the absolute distances of the detected lane lines:
[0097] Detected lane width = |left lane line distance| + |right lane line distance|
[0098] Similarly, the map lane width is calculated as:
[0099] Map lane width = |left map lane line distance| + |right map lane line distance|
[0100] The lane width error is then determined by finding the difference between the detected lane width and the mapped lane width:
[0101] Lane width error = |detected lane width - mapped lane width|
[0102] Figure 7 is a schematic diagram of lane width error and line jitter provided according to an embodiment of the present invention, such as Figure 7 As shown in the upper center section, lane width error is the detected lane width minus the mapped lane width. Lane width error highlights how much the detected lane markings deviate from the lane structure defined in the map. This error can be calculated if both left and right lane polarity are available. However, if one of the lane markings is missing, meaning the detection only captured one side, the lane width error calculation can be skipped to avoid inaccuracies. By monitoring lane width error, the accuracy of lane detection relative to the known map can be assessed, and this value contributes to the calculation of the final covariance. A smaller lane width error means a better match to the map, while a larger error indicates a possible mismatch or detection error.
[0103] For single-line jitter error, the single-lane jitter mechanism handles the situation where the vehicle sensor detects only one lane line instead of the usual two or more. This situation may be due to various anomalies, such as lane obstacles, poor lighting conditions, or sensor limitations. When the left and right lane lines are detected, the lane width error is calculated by measuring the distance of these lane lines from the vehicle to evaluate the accuracy of the vehicle's positioning within the lane. However, when only one lane line is detected, the lane width error cannot be calculated in the aforementioned manner. In order to maintain consistency and reliability in evaluating the accuracy of vehicle positioning, the embodiment of the present invention uses jitter displacement calculation instead of lane width error calculation.
[0104] Optionally, the single-line jitter error is determined in the following manner: in the case where a single lane line is detected on one side of the vehicle this time, if double lane lines were detected on both sides of the vehicle last time, then the first lateral distance between the single lane line and the vehicle is determined, and the second lateral distance between the cached single lane line and the vehicle is determined, and the single-line jitter error is determined based on the difference between the first distance and the second distance.
[0105] If single lane jitter is to be calculated, the lane line input data needs to first have complete left and right lane lines. If the lane detection only gives a single lane from the beginning, the single lane matching mechanism can be not triggered. When the left (polarity 1) and right (polarity -1) lane lines are detected, the lane width error is calculated by calculating the distance of these lane lines from the vehicle. These distance values can be stored for future reference, representing the previously established lane width, and this saved data provides a benchmark for subsequent detection comparisons. In the case where only a single lane line is detected, the jitter displacement is calculated using the saved distance of the lane width distance of the previous lane width error. This involves comparing the position of the currently detected single lane line with the stored distance value. The jitter displacement is determined by finding the difference between the current lane line distance and the distance previously saved when two lanes were detected:
[0106] Jitter displacement = |Current lane distance - Saved lane distance|
[0107] like Figure 7 As shown in the lower part, the single lane line detected this time is located on the right side of the vehicle. The current lane distance is the distance between the vehicle and the detected lane line (first distance). The saved lane distance is the distance from the most recently stored vehicle to the nearest lane line on the right (second distance). The absolute value of the difference between the first distance and the second distance is the single-line jitter error (line jitter shown in the figure).
[0108] If the jitter displacement remains small, it indicates that the detected lane line has not moved significantly relative to its previous position, indicating that the vehicle's positioning is still reliable. Conversely, a larger jitter displacement indicates that the detected lane line has moved significantly, which may indicate potential inaccuracies in positioning.
[0109] By using jitter displacement instead when lane width error cannot be calculated, the system can still match and evaluate the covariance of the vehicle's position within the lane. If single lane matching is not used, the corrected matching pose will not be calculated, which may further affect the overall positioning position.
[0110] Optionally, the target error-based loss is determined as follows: when the target error is less than a first preset threshold, the target error-based loss is zero; when the target error is greater than or equal to the first preset threshold and less than a second preset threshold, the target error-based loss is expressed as a linear function, specifically the difference between the target error and a first preset value, wherein the first preset value is determined based on the product of the first preset threshold and a first preset coefficient, and the first preset coefficient is less than 1; when the target error is greater than or equal to the second preset threshold, the target error-based loss is expressed as a quadratic function, specifically the quotient of the square of the target error and a second preset value, wherein the second preset value is determined based on the product of the second preset threshold and a second preset coefficient, and the second preset coefficient is greater than 1. In this way, a smoother value can be achieved at the transition point, becoming more resilient to outliers and noisy data, tolerating small fluctuations that have little impact on positioning accuracy, while severely penalizing larger errors that may undermine reliability, ensuring that positioning performance remains stable and reliable under various driving conditions, particularly in real-world environments where sensor noise and detection variations are common.
[0111] For example, after obtaining the target error, the target error is processed using the Huber Epsilon loss function in an embodiment of the present invention to calculate a robust error value. The Huber Epsilon loss in an embodiment of the present invention is a special loss function that combines the advantages of the Mean Absolute Error (MAE) and the Mean Squared Error (MSE). This makes it particularly effective in handling outliers because it strikes a balance between penalizing small errors and effectively managing large errors. Essentially, the loss function ignores minor deviations that may be caused by sensor noise or small changes, while still being sensitive to significant differences that require attention. This balance ensures that the system remains stable even in the presence of occasional noisy data or significant errors. The behavior of the Huber Epsilon loss varies depending on the size of the error and is guided by two thresholds: ε (epsilon, a first preset threshold) and δ (delta, a second preset threshold). The first preset threshold corresponds to the threshold at which the error is ignored, and the second preset threshold corresponds to the point at which the error is considered significant and penalized quadratically. The first preset coefficient may be, for example, 0.5, or the second preset coefficient may be, for example, 2.
[0112] For small errors (those below a first preset threshold), the penalty is set to zero, effectively ignoring small deviations and ensuring that insignificant fluctuations do not distort the results. This feature is crucial to prevent small errors that may be caused by sensor noise from affecting the overall results.
[0113] For moderate errors (errors between the first preset threshold and the second preset threshold): the loss transitions to a linear function. Within this range, moderate errors are penalized, but not as harshly as large errors. This linear response makes the system more forgiving than the squared error method used by MSE, allowing it to be less sensitive when dealing with moderate differences.
[0114] For moderate errors (errors above a second preset threshold): the loss function becomes quadratic, so that significant deviations are severely penalized, ensuring that the focus is on these key differences. In this range, the quadratic nature of the loss amplifies the impact of large errors, making them more influential in the overall loss calculation.
[0115] The Huber Epsilon loss function (Loss) in the embodiment of the present invention can be determined by the following expression:
[0116]
[0117] Wherein, x represents the target error, ∈ represents the first preset threshold, and δ represents the second preset threshold.
[0118] Figure 8 is a schematic diagram of a loss function provided according to an embodiment of the present invention. Figure 8 The Huber Epsilon loss is visualized, with the horizontal axis representing the error and the vertical axis representing the loss.
[0119] The vehicle positioning method provided by an embodiment of the present invention first determines the corresponding lane line polarity according to the distance from the vehicle for the map lane lines and detection lane lines to be matched, and iteratively matches the map lane lines and detection lane lines corresponding to the lane line polarities within a preset distance range in order from far to near from the vehicle. After correcting the original posture according to the correction information obtained from the matching, a more accurate and reliable vehicle posture can be obtained, which can avoid trajectory jumping and unreliable positioning caused by the difference between the number of detected lanes and the number of lanes in the map, improve the reliability of the positioning results, and combine multiple factors for evaluating the accuracy and reliability of the matching process to calculate the covariance used to measure the confidence of the posture correction, providing a more accurate and robust lane matching result, and more accurately controlling the autonomous driving vehicle to ensure the safety of autonomous driving.
[0120] In some embodiments, the HD map is segmented, with each map segment containing at least one reference line in point cloud format. This step may include: utilizing a preset search algorithm to search for a target reference line corresponding to the vehicle's original position within the rightmost reference line of the HD map segment; determining the map segment to which the target reference line belongs as the target map segment; and determining the local map corresponding to the original position based on the target map segment. Storing the reference lines in point cloud format can optimize computation, and selecting the rightmost reference line can effectively reduce computational effort, thereby efficiently generating a local map.
[0121] Figure 9 This is a flow chart of another vehicle positioning method provided according to an embodiment of the present invention. This embodiment is optimized based on the above optional embodiments. Figure 10 This is a schematic diagram of a vehicle positioning solution architecture provided according to an embodiment of the present invention. The architecture of the vehicle positioning solution can improve the positioning accuracy of autonomous vehicles on highways, especially when GNSS data is unreliable or unavailable. Figure 10 As shown, three main inputs are used: the current original posture, the high-precision map, and the detected lane lines. These inputs are processed by the vehicle positioning method provided by the embodiment of the present invention (such as the processing including the local map module, matching module, and covariance module in the figure), and the corrected posture is output. Figure 9 As shown, the method includes:
[0122] Step 901: Use a preset search algorithm to search for a target reference line corresponding to the original posture of the vehicle in the rightmost reference line of the map segment in the high-precision map.
[0123] Exemplarily, the preset search algorithm may be, for example, a K-dimensional tree (KDTree) algorithm. Figure 11 FIG. 1 is a schematic diagram of a local map generation process according to an embodiment of the present invention. Figure 11 As shown, the relevant map segment is found based on the current position of the vehicle. This is achieved by using KDTree search to find the point closest to the vehicle in the center line of the point cloud of the map segment. Each map segment contains multiple reference lines (such as center lines), and the embodiment of the present invention can only select the rightmost one for this process. KDTree search helps to find the segment ID by matching the position of the vehicle in all selected center lines, because each point in the center line contains the information of the segment ID. Figure 11 In the Current Segment Search section, the target reference line shown is the centerline of segment 1.
[0124] Step 902: Determine the map segment to which the target reference line belongs as the target map segment.
[0125] Exemplarily, the target map segment is determined according to the segment ID information included in the target reference line.
[0126] Step 903: Determine an initial map point in the target map segment that corresponds to the starting point of the detection lane line.
[0127] For example, after determining the current segment ID (target map segment), the starting points of all detected lane lines in the segment can be tracked. Optionally, a KDTree search can be used to quickly and reliably obtain all starting points.
[0128] Step 904: Starting from the initial map point, move along the map points in the target map segment toward the front of the vehicle, and accumulate the map points passed through during the movement until the line formed by the accumulated map points reaches the target length.
[0129] For example, for each of these initial map points, a local map is created by moving along the map point toward the front of the vehicle, accumulating distance until a predefined threshold (i.e., a target length, which can be, for example, the length of a detected lane line) is reached. As the local map grows from the starting point, the accumulated lines can be stored in an array. If the distance ahead of the target map segment is insufficient, the vehicle can continue to the next map segment until the target length is reached, which helps handle situations where the vehicle moves from one map segment to the next.
[0130] Step 905: Add a preset offset in front of and behind the line to obtain a map lane line, and generate a local map based on the map lane line.
[0131] For example, after collecting the required front length (target length), a static offset can be added to ensure that lane matching accurately aligns the detected lane lines with the local map. Static offsets (preset offsets) are added for both the front and rear of the vehicle. Figure 11 In the local map creation section, a front offset is added before the lane length (target length) and a rear offset is added after the lane length. The values of the preset offsets added before and after can be the same, that is, the front offset and the rear offset can be the same. The result after adding the offsets is a point cloud array, with each index representing the local map data for a lane line. The local map is generated based on all the generated map lane line data.
[0132] Step 906: Determine, based on the original position, a first lateral distance between the vehicle and each lane line in the local map, and a second lateral distance between the vehicle and each detected lane line in the lane detection result.
[0133] Step 907: Determine the lane line polarity of each map lane line based on the first lateral distance, and determine the lane line polarity of each detection lane line based on the second lateral distance.
[0134] Step 908: For the map lane lines and the detection lane lines corresponding to the lane line polarity within the preset distance range, iterative matching is performed in order from far to near distance from the vehicle to obtain target correction information.
[0135] Step 909: Calculate the covariance based on the target pose, where the covariance is used to measure the confidence of the pose correction. The covariance includes the fitting metric and the loss based on the target error. The target error includes the lateral displacement error, and the lane width error or the single line jitter error.
[0136] The target error-based loss is determined based on the Huber Epsilon loss function described above and will not be described in detail here.
[0137] The vehicle positioning method provided by an embodiment of the present invention stores the reference lines of the lanes in the high-precision map in a point cloud format, which can optimize calculations and select the rightmost reference line, effectively reducing the amount of calculation and quickly finding the target map segment. When the vehicle speed is too fast, if the front of the detected lane line exceeds the length of the local map, no matching points can be found. By adding a preset offset, more points can be added to the map to handle this situation, improving the robustness of the lane line matching and thus efficiently generating a local map. For the map lane lines and detection lane lines to be matched, the corresponding lane line polarity is first determined based on the distance to the vehicle. The map lane lines and detection lane lines corresponding to the lane line polarity within the preset distance range are iteratively matched in order from far to near the vehicle. This distance-polarity-based cascaded lane-by-lane matching technology ensures that each lane line is matched separately according to its position and side (left or right), achieving more accurate matching in complex scenarios and maintaining effectiveness when the number of detected lanes is inconsistent with the map. Noisy lane detections can lead to poor pose correction. This embodiment of the present invention also introduces a Huber Epsilon loss function to calculate the covariance that indicates the accuracy and reliability of the correction results. This loss function effectively handles outliers, ignoring minor fluctuations while severely penalizing significant errors and large fluctuations. By calculating the error based on lateral displacement differences and lane width errors, the loss function ensures reliable pose correction and maintains high confidence in the positioning results even in challenging and noisy environments. Furthermore, in traditional methods, missing or incomplete lane detections can lead to large positioning errors. This embodiment of the present invention addresses this issue by implementing a single-lane jitter compensation mechanism. When only one lane line is detected instead of two, previously stored lane width information is used to compensate for the missing data, ensuring stable and accurate positioning even with incomplete or inconsistent lane detections. This embodiment of the present invention introduces a new heuristic-based lane-level localization method for autonomous vehicles in highway scenarios. This method provides a robust and efficient solution for lane-level localization on highways and is applicable to low-cost autonomous vehicle systems using cameras and affordable GNSS equipment. This advancement improves the safety and performance of autonomous vehicles in real-world conditions and promotes the wider application of autonomous driving technology.
[0138] Figure 12 FIG. 1 is a schematic diagram of the structure of a vehicle positioning device provided according to an embodiment of the present invention. Figure 12As shown, the device includes: a local map determination module 1201, used to determine the local map corresponding to the original posture of the vehicle, wherein the local map is determined based on the high-precision map; a lateral distance determination module 1202, used to determine the first lateral distance between the vehicle and each map lane line in the local map, and the second lateral distance between the vehicle and each detected lane line in the lane detection result based on the original posture; a lane line polarity determination module 1203, used to determine the lane line polarity of each map lane line according to the first lateral distance, and determine the lane line polarity of each detected lane line according to the second lateral distance, wherein the lane line polarity is used to characterize the lateral direction of the lane line located in the vehicle and the order of the lane lines in the lateral direction; a lane line matching module 1204, used to match the map lane line and the detected lane line corresponding to the lane line polarity to obtain target correction information; a posture correction module 1205, used to correct the original posture based on the target correction information to obtain the target posture of the vehicle.
[0139] The vehicle positioning device provided by an embodiment of the present invention first determines the corresponding lane line polarity based on the distance to the vehicle for the map lane lines and detection lane lines to be matched, matches the map lane lines and detection lane lines corresponding to the lane line polarity, and then corrects the original posture based on the correction information obtained from the matching. This can obtain a more accurate and reliable vehicle posture, avoid trajectory jumps and unreliable positioning caused by the difference between the number of detected lanes and the number of lanes in the map, and improve the reliability of the positioning results.
[0140] Optionally, the lane line matching module is used to iteratively match the map lane lines and detection lane lines corresponding to the lane line polarity within a preset distance range in order from far to near from the vehicle to obtain target correction information.
[0141] Optionally, the lane line matching module includes: a current lane line pair determination unit, for determining the current lane line pair to be matched in order from far to near for the map lane line and the detection lane line corresponding to the lane line polarity within a preset distance range, wherein the current lane line pair includes a map lane line and a detection lane line; a target detection lane line determination unit, for determining the detection lane line in the current lane line pair as the target detection lane line if the current lane line pair is the first lane line pair; and for determining the detection lane line in the current lane line pair as the target detection lane line if the current lane line pair is not the first lane line pair. The positive information is used to transform the detected lane line in the current lane line pair, and the transformed detected lane line is determined as the target detected lane line, wherein the reference correction information is the correction information obtained in the last matching; the matching unit is used to match the target detected lane line in the current lane line pair with the map lane line to obtain the correction information obtained in this matching; the target correction information determination unit is used to re-determine the current lane line pair to be matched if the current lane line pair is not the last lane line pair; if the current lane line pair is the last lane line pair, the correction information obtained in this matching is determined as the target correction information.
[0142] Optionally, the device also includes: a covariance calculation module, which is used to calculate the covariance based on the target posture after correcting the original posture based on the target correction information to obtain the target posture of the vehicle, wherein the covariance is used to measure the confidence of the posture correction, and the covariance includes a fitting metric and a loss based on a target error, and the target error includes at least one of a lateral displacement error, a lane width error, and a single-line jitter error.
[0143] Optionally, the lane line polarity determination module is used to: group each lane line according to the positive or negative lateral distance to obtain a first lane line group and a second lane line group, wherein the lateral distance is the first lateral distance or the second lateral distance, and the lane line is the map lane line or the detection lane line; sort the lane lines in the first lane line group from near to far from the vehicle according to the size of the lateral distance to obtain a first lane line sequence; sort the lane lines in the second lane line group from near to far from the vehicle according to the size of the lateral distance to obtain a second lane line sequence; for each lane line, determine whether the lane line is located in the lateral direction of the vehicle according to the positive or negative lateral distance, determine the lane line order of the lane line in the lateral direction according to the sorting position of the lane line in the corresponding lane line sequence, and determine the lane line polarity of the lane line according to the lateral direction and the lane line order.
[0144] Optionally, the high-precision map is a segment-based map, and there is at least one reference line in point cloud format in each map segment; wherein the local map determination module includes: a target reference line search unit, used to use a preset search algorithm to search for the target reference line corresponding to the original posture of the vehicle in the rightmost reference line of the map segment in the high-precision map; a target map segment determination unit, used to determine the map segment to which the target reference line belongs as the target map segment; and a local map determination unit, used to determine the local map corresponding to the original posture based on the target map segment.
[0145] Optionally, a local map determination unit is used to determine an initial map point in the target map segment corresponding to the starting point of the detection lane line; starting from the initial map point, move along the map points in the target map segment toward the front of the vehicle, and accumulate the map points passed through during the movement until the line formed by the accumulated map points reaches the target length; add a preset offset in front and behind the line to obtain a map lane line, and generate a local map based on the map lane line.
[0146] The vehicle positioning device provided in the embodiment of the present invention can execute the vehicle positioning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0147] Figure 13 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0148] like Figure 13As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0149] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0150] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the vehicle positioning method.
[0151] In some embodiments, the vehicle positioning method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the vehicle positioning method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the vehicle positioning method in any other suitable manner (e.g., via firmware).
[0152] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0153] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0154] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0156] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0157] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0158] An embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the vehicle positioning method provided by the above embodiment.
[0159] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0160] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A vehicle positioning method, characterized in that: include: Determine a local map corresponding to the original posture of the vehicle, wherein the local map is determined based on the high-precision map; Determining, based on the original pose, a first lateral distance between the vehicle and each lane line in the local map, and a second lateral distance between the vehicle and each lane line detected in the lane detection result; Determining a lane line polarity of each of the mapped lane lines based on the first lateral distance, and determining a lane line polarity of each of the detected lane lines based on the second lateral distance, wherein the lane line polarity is used to characterize a lateral direction of the lane line of the vehicle and an order of the lane lines in the lateral direction; Matching the map lane line and the detection lane line corresponding to the lane line polarity to obtain target correction information; Correcting the original posture based on the target correction information to obtain a target posture of the vehicle; Wherein, after correcting the original posture based on the target correction information to obtain the target posture of the vehicle, the method further includes: Calculating a covariance based on the target pose, wherein the covariance is used to measure confidence in the pose correction, the covariance including a fit metric and a loss based on a target error, the target error including at least one of a lateral displacement error, a lane width error, and a single line jitter error; The single-line jitter error is determined by: In the case where a single lane line is detected on one side of the vehicle this time, if double lane lines were detected on both sides of the vehicle last time, a first lateral distance between the single lane line and the vehicle is determined, a second lateral distance between the cached single lane line and the vehicle is determined, and a single-line jitter error is determined based on the difference between the first distance and the second distance.
2. The method according to claim 1, characterized in that The matching of the map lane line and the detection lane line corresponding to the lane line polarity to obtain target correction information includes: For the map lane lines and the detection lane lines corresponding to the lane line polarity within the preset distance range, iterative matching is performed in order from far to near from the vehicle to obtain target correction information.
3. The method according to claim 2, characterized in that The iterative matching of the map lane lines and the detection lane lines corresponding to the lane line polarity within the preset distance range in order from far to near from the vehicle to obtain target correction information includes: For the map lane lines and the detection lane lines corresponding to the lane line polarity within the preset distance range, determine a current lane line pair to be matched in descending order of distance from the vehicle, wherein the current lane line pair includes a map lane line and a detection lane line; If the current lane line pair is the first lane line pair, the detected lane line in the current lane line pair is determined as the target detected lane line; if the current lane line pair is not the first lane line pair, the detected lane line in the current lane line pair is transformed using the reference correction information of the current lane line pair, and the transformed detected lane line is determined as the target detected lane line, wherein the reference correction information is the correction information obtained in the previous matching; Matching the target detected lane line in the current lane line pair with the map lane line to obtain correction information obtained from this matching; If the current lane line pair is not the last lane line pair, the current lane line pair to be matched is re-determined; if the current lane line pair is the last lane line pair, the correction information obtained from this matching is determined as the target correction information.
4. The method according to claim 1, wherein The target error-based loss is determined as follows: When the target error is less than a first preset threshold, the loss based on the target error is zero; When the target error is greater than or equal to the first preset threshold and less than a second preset threshold, the loss based on the target error is the difference between the target error and a first preset value, wherein the first preset value is determined based on the product of the first preset threshold and a first preset coefficient, and the first preset coefficient is less than 1; When the target error is greater than or equal to the second preset threshold, the loss based on the target error is the quotient of the square of the target error and a second preset value, wherein the second preset value is determined based on the product of the second preset threshold and a second preset coefficient, and the second preset coefficient is greater than 1.
5. The method according to claim 1, wherein Determine the lane polarity of each lane based on the lateral distance, including: Grouping the lane lines according to the positive or negative sign of the lateral distance to obtain a first lane line group and a second lane line group, wherein the lateral distance is the first lateral distance or the second lateral distance, and the lane line is the map lane line or the detection lane line; Sort the lane lines in the first lane line group from near to far from the vehicle according to the lateral distances to obtain a first lane line sequence; and sort the lane lines in the second lane line group from near to far from the vehicle according to the lateral distances to obtain a second lane line sequence; For each lane line, the lane line is determined to be located in the lateral direction of the vehicle based on the positive or negative value of the lateral distance, the lane line order of the lane line in the lateral direction is determined based on the sorting position of the lane line in the corresponding lane line sequence, and the lane line polarity of the lane line is determined based on the lateral direction and the lane line order.
6. The method according to claim 1, characterized in that The high-precision map is a segmented map, and each map segment contains at least one reference line in a point cloud format. The local map corresponding to the original position of the vehicle is determined, including: Using a preset search algorithm, searching for a target reference line corresponding to the original posture of the vehicle in the rightmost reference line of the map segment in the high-precision map; determining the map segment to which the target reference line belongs as the target map segment; A local map corresponding to the original pose is determined based on the target map segment.
7. The method according to claim 6, characterized in that Determining a local map corresponding to the original pose based on the target map segment includes: Determining an initial map point in the target map segment corresponding to a starting point of a detection lane line; Starting from the initial map point, moving along the map points in the target map segment toward the front of the vehicle, and accumulating the map points passed through during the movement until a line formed by the accumulated map points reaches a target length; A preset offset is added before and after the line to obtain a map lane line, and a local map is generated based on the map lane line.
8. A vehicle positioning device, characterized in that: include: A local map determination module, configured to determine a local map corresponding to the original position of the vehicle, wherein the local map is determined based on a high-precision map; a lateral distance determination module, configured to determine, based on the original position, a first lateral distance between the vehicle and each lane line in the local map, and a second lateral distance between the vehicle and each detected lane line in the lane detection result; a lane line polarity determination module, configured to determine a lane line polarity of each of the mapped lane lines based on the first lateral distance, and to determine a lane line polarity of each of the detected lane lines based on the second lateral distance, wherein the lane line polarity is used to characterize a lateral direction of the lane line to the vehicle and an order of the lane lines in the lateral direction; A lane matching module is used to match the map lane and the detected lane corresponding to the lane polarity to obtain target correction information; A posture correction module, configured to correct the original posture based on the target correction information to obtain a target posture of the vehicle; a covariance calculation module, configured to calculate a covariance based on the target pose after correcting the original pose based on the target correction information to obtain a target pose of the vehicle, wherein the covariance is used to measure the confidence of the pose correction, the covariance includes a fitting metric and a loss based on a target error, and the target error includes at least one of a lateral displacement error, a lane width error, and a single-line jitter error; The single-line jitter error is determined by: In the case where a single lane line is detected on one side of the vehicle this time, if double lane lines were detected on both sides of the vehicle last time, a first lateral distance between the single lane line and the vehicle is determined, a second lateral distance between the cached single lane line and the vehicle is determined, and a single-line jitter error is determined based on the difference between the first distance and the second distance.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the vehicle positioning method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the vehicle positioning method according to any one of claims 1 to 7 when executed.
11. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the vehicle positioning method according to any one of claims 1 to 7.